Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext GWT Premium Member takayser's Avatar
    Join Date
    Oct 2008
    Location
    Lucerne, Switzerland
    Posts
    188
    Vote Rating
    0
    takayser is an unknown quantity at this point

      0  

    Default [FIXED] [2.0 Trunk] NullPointerException while record.set("property", null);

    [FIXED] [2.0 Trunk] NullPointerException while record.set("property", null);


    Trying to set null in a property on a record throws a NullPointerException.

    There is no check for null values and therefore the equals method throws a NullPointerException

    Record.java:266
    Code:
    if (!modified.containsKey(name)) {
          modified.put(name, model.get(name));
        } else if(modified.get(name).equals(value)){
          dirty = false;
          modified.remove(name);
          validMap.remove(name);
        }
    Suggestion:
    Code:
    if (!modified.containsKey(name)) {
          modified.put(name, model.get(name));
        } else {
          Object modifiedValue = modified.get(name);
          if (modifiedValue == value || (modifiedValue != null && modifiedValue.equals(value))) {
            dirty = false;
            modified.remove(name);
            validMap.remove(name);
          }
        }

  2. #2
    Sencha User
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    Fixed in SVN.

Thread Participants: 1