directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r822417 - in /directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors: AbstractDialogValueEditor.java AbstractInPlaceStringValueEditor.java
Date Tue, 06 Oct 2009 18:31:38 GMT
Author: seelmann
Date: Tue Oct  6 18:31:38 2009
New Revision: 822417

URL: http://svn.apache.org/viewvc?rev=822417&view=rev
Log:
use for-each-loop and code style

Modified:
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/AbstractDialogValueEditor.java
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/AbstractInPlaceStringValueEditor.java

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/AbstractDialogValueEditor.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/AbstractDialogValueEditor.java?rev=822417&r1=822416&r2=822417&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/AbstractDialogValueEditor.java
(original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/AbstractDialogValueEditor.java
Tue Oct  6 18:31:38 2009
@@ -79,8 +79,8 @@
      */
     protected boolean showRawValues()
     {
-        return BrowserCommonActivator.getDefault().getPreferenceStore()
-            .getBoolean( BrowserCommonConstants.PREFERENCE_SHOW_RAW_VALUES );
+        return BrowserCommonActivator.getDefault().getPreferenceStore().getBoolean(
+            BrowserCommonConstants.PREFERENCE_SHOW_RAW_VALUES );
     }
 
 
@@ -140,9 +140,13 @@
         {
             IValue.EmptyValue emptyValue = ( IValue.EmptyValue ) value;
             if ( emptyValue.isBinary() )
+            {
                 value = emptyValue.getBinaryValue();
+            }
             else
+            {
                 value = emptyValue.getStringValue();
+            }
         }
         this.value = value;
     }
@@ -206,9 +210,8 @@
         }
 
         List<IValue> valueList = new ArrayList<IValue>();
-        for ( Iterator it = attributeHierarchy.iterator(); it.hasNext(); )
+        for ( IAttribute attribute : attributeHierarchy )
         {
-            IAttribute attribute = ( IAttribute ) it.next();
             valueList.addAll( Arrays.asList( attribute.getValues() ) );
         }
 
@@ -218,7 +221,9 @@
             IValue value = it.next();
             sb.append( getDisplayValue( value ) );
             if ( it.hasNext() )
+            {
                 sb.append( ", " ); //$NON-NLS-1$
+            }
         }
         return sb.toString();
     }

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/AbstractInPlaceStringValueEditor.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/AbstractInPlaceStringValueEditor.java?rev=822417&r1=822416&r2=822417&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/AbstractInPlaceStringValueEditor.java
(original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/AbstractInPlaceStringValueEditor.java
Tue Oct  6 18:31:38 2009
@@ -72,8 +72,8 @@
      */
     protected boolean showRawValues()
     {
-        return BrowserCommonActivator.getDefault().getPreferenceStore()
-            .getBoolean( BrowserCommonConstants.PREFERENCE_SHOW_RAW_VALUES );
+        return BrowserCommonActivator.getDefault().getPreferenceStore().getBoolean(
+            BrowserCommonConstants.PREFERENCE_SHOW_RAW_VALUES );
     }
 
 
@@ -91,9 +91,8 @@
         }
 
         List<IValue> valueList = new ArrayList<IValue>();
-        for ( Iterator it = attributeHierarchy.iterator(); it.hasNext(); )
+        for ( IAttribute attribute : attributeHierarchy )
         {
-            IAttribute attribute = ( IAttribute ) it.next();
             valueList.addAll( Arrays.asList( attribute.getValues() ) );
         }
 
@@ -103,7 +102,9 @@
             IValue value = it.next();
             sb.append( getDisplayValue( value ) );
             if ( it.hasNext() )
+            {
                 sb.append( ", " ); //$NON-NLS-1$
+            }
         }
         return sb.toString();
     }
@@ -294,5 +295,4 @@
         return imageDescriptor;
     }
 
-
 }



Mime
View raw message