directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1786834 - /directory/studio/trunk/plugins/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/bool/InPlaceBooleanValueEditor.java
Date Tue, 14 Mar 2017 03:20:40 GMT
Author: elecharny
Date: Tue Mar 14 03:20:40 2017
New Revision: 1786834

URL: http://svn.apache.org/viewvc?rev=1786834&view=rev
Log:
o Fixed the update so that it does not always expose 'TRUE'
o Commented the doSetValue() method

Modified:
    directory/studio/trunk/plugins/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/bool/InPlaceBooleanValueEditor.java

Modified: directory/studio/trunk/plugins/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/bool/InPlaceBooleanValueEditor.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/bool/InPlaceBooleanValueEditor.java?rev=1786834&r1=1786833&r2=1786834&view=diff
==============================================================================
--- directory/studio/trunk/plugins/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/bool/InPlaceBooleanValueEditor.java
(original)
+++ directory/studio/trunk/plugins/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/bool/InPlaceBooleanValueEditor.java
Tue Mar 14 03:20:40 2017
@@ -55,21 +55,23 @@ public class InPlaceBooleanValueEditor e
             
             switch ( stringValue )
             {
+                case "F" :
+                case "FALSE" :
+                case "N" :
+                case "NO" :
+                case "0" :
+                    return FALSE;
+    
                 case "T" :
                 case "TRUE" :
                 case "Y" :
                 case "YES" :
                 case "1" :
                 case "" :           // Special case : default to TRUE
-                default :
                     return TRUE;
-                    
-                case "F" :
-                case "FALSE" :
-                case "N" :
-                case "NO" :
-                case "0" :
-                    return FALSE;
+
+                default :
+                    return null;
             }
         }
 
@@ -79,7 +81,7 @@ public class InPlaceBooleanValueEditor e
 
     /**
      * {@inheritDoc}
-     */
+     *
     @Override
     protected void doSetValue( Object value )
     {
@@ -97,8 +99,12 @@ public class InPlaceBooleanValueEditor e
         
         super.doSetValue( v );
     }
+    */
 
 
+    /**
+     * {@inheritDoc}
+     */
     @Override
     public Object getRawValue( IValue value )
     {
@@ -110,7 +116,7 @@ public class InPlaceBooleanValueEditor e
             
             if ( ( stringValue.length() == 0 ) || ( BooleanSyntaxChecker.INSTANCE.isValidSyntax(
stringValue ) ) )
             {
-                return TRUE;
+                return rawValue;
             }
             else
             {



Mime
View raw message