fixed testAutoRendererConfigurable
authorEgor.Ushakov <egor.ushakov@jetbrains.com>
Thu, 3 Sep 2015 13:10:42 +0000 (16:10 +0300)
committerEgor.Ushakov <egor.ushakov@jetbrains.com>
Thu, 3 Sep 2015 13:11:37 +0000 (16:11 +0300)
java/debugger/impl/src/com/intellij/debugger/ui/tree/render/BasicRendererProperties.java

index cc28155a93e2810d45b03bbbeb2fd351d306a0d3..af38859684dde0b37006a9509e2bbb2e543dbd9c 100644 (file)
@@ -40,7 +40,7 @@ public final class BasicRendererProperties implements Cloneable, JDOMExternaliza
   private String myClassName;
 
   private static final @NonNls String SHOWTYPE_OPTION = "SHOW_TYPE";
-  private Boolean myShowType;
+  private boolean myShowType = true;
 
   public String getName() {
     return myName;
@@ -67,7 +67,7 @@ public final class BasicRendererProperties implements Cloneable, JDOMExternaliza
   }
 
   public boolean isShowType() {
-    return myShowType == null || myShowType.booleanValue();
+    return myShowType;
   }
 
   public void setShowType(boolean showType) {
@@ -90,7 +90,8 @@ public final class BasicRendererProperties implements Cloneable, JDOMExternaliza
         myClassName = option.getAttributeValue("value");
       }
       else if (SHOWTYPE_OPTION.equals(optionName)) {
-        myShowType = Boolean.parseBoolean(option.getAttributeValue("value"));
+        // default is true
+        myShowType = !"false".equalsIgnoreCase(option.getAttributeValue("value"));
       }
     }
   }
@@ -105,8 +106,9 @@ public final class BasicRendererProperties implements Cloneable, JDOMExternaliza
     if (myClassName != null) {
       addOption(element, CLASSNAME_OPTION, myClassName);
     }
-    if (myShowType != null) {
-      addOption(element, SHOWTYPE_OPTION, myShowType.toString());
+    if (!myShowType) {
+      // default is true
+      addOption(element, SHOWTYPE_OPTION, "false");
     }
   }