directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1805792 [1/2] - /directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/
Date Tue, 22 Aug 2017 16:23:35 GMT
Author: elecharny
Date: Tue Aug 22 16:23:35 2017
New Revision: 1805792

URL: http://svn.apache.org/viewvc?rev=1805792&view=rev
Log:
Many sonar lint fixes

Modified:
    directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/AbstractLimitDialog.java
    directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/AbstractOverlayDialogConfigurationBlock.java
    directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/AllowFeatureDialog.java
    directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/DatabaseTypeDialog.java
    directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/DbConfigurationDialog.java
    directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/DbIndexDialog.java
    directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/DisallowFeatureDialog.java
    directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/DnValueDialog.java
    directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/LimitsDialog.java
    directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/Messages.java
    directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/OrderedStringValueDialog.java
    directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/OverlayDialog.java
    directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/OverlayDialogConfigurationBlock.java
    directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/PasswordHashDialog.java
    directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/PurgeTimeSpan.java
    directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/ReplicationConsumerDialog.java
    directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/ReplicationOptionsDialog.java
    directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/ReplicationSaslDialog.java
    directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/RequireConditionDialog.java
    directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/RestrictOperationDialog.java
    directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/RwmMappingDialog.java
    directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/SaslSecPropsDialog.java
    directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/ServerIdDialog.java
    directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/SizeLimitDialog.java
    directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/SizeTimeLimitDialog.java
    directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/SsfDialog.java
    directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/StringValueDialog.java
    directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/TcpBufferDialog.java
    directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/TimeLimitDialog.java
    directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/ValueSortingValueDialog.java

Modified: directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/AbstractLimitDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/AbstractLimitDialog.java?rev=1805792&r1=1805791&r2=1805792&view=diff
==============================================================================
--- directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/AbstractLimitDialog.java (original)
+++ directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/AbstractLimitDialog.java Tue Aug 22 16:23:35 2017
@@ -26,7 +26,6 @@ import org.apache.directory.studio.openl
 import org.apache.directory.studio.openldap.config.editor.wrappers.TimeLimitWrapper;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
 import org.eclipse.swt.events.ModifyListener;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
@@ -184,9 +183,7 @@ public abstract class AbstractLimitDialo
     /**
      * The listener for the Soft Limit Text
      */
-    protected ModifyListener softLimitTextListener = new ModifyListener()
-    {
-        public void modifyText( ModifyEvent e )
+    protected ModifyListener softLimitTextListener = event ->
         {
             Display display = softLimitText.getDisplay();
             Button okButton = getButton( IDialogConstants.OK_ID );
@@ -265,16 +262,13 @@ public abstract class AbstractLimitDialo
             }
             
             okButton.setEnabled( isValid() );
-        }
-    };
+        };
     
     
     /**
      * The listener for the Hard Limit Text
      */
-    protected ModifyListener hardLimitTextListener = new ModifyListener()
-    {
-        public void modifyText( ModifyEvent e )
+    protected ModifyListener hardLimitTextListener = event ->
         {
             Display display = hardLimitText.getDisplay();
             Button okButton = getButton( IDialogConstants.OK_ID );
@@ -348,16 +342,13 @@ public abstract class AbstractLimitDialo
             {
                 okButton.setEnabled( isValid() );
             }
-        }
-    };
+        };
     
     
     /**
      * The listener for the Global Limit Text
      */
-    protected ModifyListener globalLimitTextListener = new ModifyListener()
-    {
-        public void modifyText( ModifyEvent e )
+    protected ModifyListener globalLimitTextListener = event ->
         {
             Display display = globalLimitText.getDisplay();
             Button okButton = getButton( IDialogConstants.OK_ID );
@@ -418,8 +409,7 @@ public abstract class AbstractLimitDialo
             globalLimitText.setForeground( display.getSystemColor( color ) );
             globalUnlimitedCheckbox.setSelection( unlimited );
             okButton.setEnabled( isValid() );
-        }
-    };
+        };
     
     
     /**
@@ -427,6 +417,7 @@ public abstract class AbstractLimitDialo
      */
     protected SelectionListener softUnlimitedCheckboxSelectionListener = new SelectionAdapter()
     {
+        @Override
         public void widgetSelected( SelectionEvent e )
         {
             Display display = softLimitText.getDisplay();
@@ -464,6 +455,7 @@ public abstract class AbstractLimitDialo
      */
     protected SelectionListener hardUnlimitedCheckboxSelectionListener = new SelectionAdapter()
     {
+        @Override
         public void widgetSelected( SelectionEvent e )
         {
             Display display = hardLimitText.getDisplay();
@@ -496,6 +488,7 @@ public abstract class AbstractLimitDialo
      */
     protected SelectionListener hardSoftCheckboxSelectionListener = new SelectionAdapter()
     {
+        @Override
         public void widgetSelected( SelectionEvent e )
         {
             Display display = hardLimitText.getDisplay();
@@ -546,6 +539,7 @@ public abstract class AbstractLimitDialo
      */
     protected SelectionListener globalUnlimitedCheckboxSelectionListener = new SelectionAdapter()
     {
+        @Override
         public void widgetSelected( SelectionEvent e )
         {
             Display display = globalLimitText.getDisplay();
@@ -574,6 +568,7 @@ public abstract class AbstractLimitDialo
      * Construct the new TimeLimit from what we have in the dialog
      * {@inheritDoc}
      */
+    @Override
     protected void okPressed()
     {
         newLimitStr = getEditedElement().toString();

Modified: directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/AbstractOverlayDialogConfigurationBlock.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/AbstractOverlayDialogConfigurationBlock.java?rev=1805792&r1=1805791&r2=1805792&view=diff
==============================================================================
--- directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/AbstractOverlayDialogConfigurationBlock.java (original)
+++ directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/AbstractOverlayDialogConfigurationBlock.java Tue Aug 22 16:23:35 2017
@@ -30,14 +30,14 @@ import org.apache.directory.studio.openl
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public abstract class AbstractOverlayDialogConfigurationBlock<Overlay extends OlcOverlayConfig> implements
-    OverlayDialogConfigurationBlock<Overlay>
+public abstract class AbstractOverlayDialogConfigurationBlock<O extends OlcOverlayConfig> implements
+    OverlayDialogConfigurationBlock<O>
 {
     /** The dialog */
     protected OverlayDialog dialog;
 
     /** The overlay */
-    protected Overlay overlay;
+    protected O overlay;
 
     /** The connection */
     protected IBrowserConnection browserConnection;
@@ -79,7 +79,7 @@ public abstract class AbstractOverlayDia
     /**
      * {@inheritDoc}
      */
-    public Overlay getOverlay()
+    public O getOverlay()
     {
         return overlay;
     }
@@ -97,7 +97,7 @@ public abstract class AbstractOverlayDia
     /**
      * {@inheritDoc}
      */
-    public void setOverlay( Overlay overlay )
+    public void setOverlay( O overlay )
     {
         this.overlay = overlay;
     }

Modified: directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/AllowFeatureDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/AllowFeatureDialog.java?rev=1805792&r1=1805791&r2=1805792&view=diff
==============================================================================
--- directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/AllowFeatureDialog.java (original)
+++ directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/AllowFeatureDialog.java Tue Aug 22 16:23:35 2017
@@ -75,7 +75,7 @@ public class AllowFeatureDialog extends
     private Button[] allowFeatureCheckboxes = new Button[5];
     
     /** The already selected allowed features */
-    List<AllowFeatureEnum> features = new ArrayList<AllowFeatureEnum>();
+    List<AllowFeatureEnum> features = new ArrayList<>();
 
     /**
      * Create a new instance of the AllowFeatureDialog
@@ -92,6 +92,7 @@ public class AllowFeatureDialog extends
     /**
      * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
      */
+    @Override
     protected void configureShell( Shell shell )
     {
         super.configureShell( shell );
@@ -104,6 +105,7 @@ public class AllowFeatureDialog extends
      */
     private SelectionListener checkboxSelectionListener = new SelectionAdapter()
     {
+        @Override
         public void widgetSelected( SelectionEvent e )
         {
             Object object = e.getSource();
@@ -146,6 +148,7 @@ public class AllowFeatureDialog extends
      * </pre>
      * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
      */
+    @Override
     protected Control createDialogArea( Composite parent )
     {
         Composite composite = ( Composite ) super.createDialogArea( parent );

Modified: directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/DatabaseTypeDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/DatabaseTypeDialog.java?rev=1805792&r1=1805791&r2=1805792&view=diff
==============================================================================
--- directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/DatabaseTypeDialog.java (original)
+++ directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/DatabaseTypeDialog.java Tue Aug 22 16:23:35 2017
@@ -89,6 +89,7 @@ public class DatabaseTypeDialog extends
      */
     private SelectionListener databaseTypeSelectionListener = new SelectionAdapter()
     {
+        @Override
         public void widgetSelected( SelectionEvent e )
         {
             Object object = e.getSource();
@@ -122,6 +123,7 @@ public class DatabaseTypeDialog extends
     /**
      * {@inheritDoc}
      */
+    @Override
     protected void configureShell( Shell shell )
     {
         super.configureShell( shell );
@@ -132,6 +134,7 @@ public class DatabaseTypeDialog extends
     /**
      * {@inheritDoc}
      */
+    @Override
     protected void okPressed()
     {
         // Do nothing if the selected feature is NONE
@@ -155,6 +158,7 @@ public class DatabaseTypeDialog extends
      * +-------------------------------------+
      * </pre>
      */
+    @Override
     protected Control createDialogArea( Composite parent )
     {
         Composite composite = ( Composite ) super.createDialogArea( parent );
@@ -180,6 +184,7 @@ public class DatabaseTypeDialog extends
      * 
      * {@inheritDoc}
      */
+    @Override
     protected Button createButton(Composite parent, int id, String label, boolean defaultButton) 
     {
         Button button = super.createButton( parent, id, label, defaultButton );

Modified: directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/DbConfigurationDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/DbConfigurationDialog.java?rev=1805792&r1=1805791&r2=1805792&view=diff
==============================================================================
--- directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/DbConfigurationDialog.java (original)
+++ directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/DbConfigurationDialog.java Tue Aug 22 16:23:35 2017
@@ -69,6 +69,7 @@ public class DbConfigurationDialog exten
     /**
      * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
      */
+    @Override
     protected void configureShell( Shell shell )
     {
         super.configureShell( shell );
@@ -79,6 +80,7 @@ public class DbConfigurationDialog exten
     /**
      * @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)
      */
+    @Override
     protected void createButtonsForButtonBar( Composite parent )
     {
         createButton( parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, false );
@@ -89,11 +91,12 @@ public class DbConfigurationDialog exten
     /**
      * @see org.eclipse.jface.dialogs.Dialog#okPressed()
      */
+    @Override
     protected void okPressed()
     {
         if ( ( text.getText() != null ) && ( text.getText().length() > 0 ) )
         {
-            List<String> newConfiguration = new ArrayList<String>();
+            List<String> newConfiguration = new ArrayList<>();
 
             String[] splittedConfiguration = text.getText().split( LINE_SEPARATOR );
             for ( int i = 0; i < splittedConfiguration.length; i++ )
@@ -111,6 +114,7 @@ public class DbConfigurationDialog exten
     /**
      * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
      */
+    @Override
     protected Control createDialogArea( Composite parent )
     {
         // create composite

Modified: directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/DbIndexDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/DbIndexDialog.java?rev=1805792&r1=1805791&r2=1805792&view=diff
==============================================================================
--- directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/DbIndexDialog.java (original)
+++ directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/DbIndexDialog.java Tue Aug 22 16:23:35 2017
@@ -28,7 +28,6 @@ import org.apache.directory.studio.commo
 import org.apache.directory.studio.common.ui.dialogs.AttributeDialog;
 import org.apache.directory.studio.common.ui.widgets.BaseWidgetUtils;
 import org.apache.directory.studio.common.ui.widgets.TableWidget;
-import org.apache.directory.studio.common.ui.widgets.WidgetModifyEvent;
 import org.apache.directory.studio.common.ui.widgets.WidgetModifyListener;
 import org.apache.directory.studio.common.ui.wrappers.StringValueWrapper;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
@@ -109,6 +108,7 @@ public class DbIndexDialog extends AddEd
      * */ 
     private SelectionListener attributesCheckboxSelectionListener = new SelectionAdapter()
     {
+        @Override
         public void widgetSelected( SelectionEvent e )
         {
             attributeTable.enable();
@@ -121,9 +121,7 @@ public class DbIndexDialog extends AddEd
     /**
      * The attribute table listener
      */
-    private WidgetModifyListener attributeTableListener = new WidgetModifyListener()
-    {
-        public void widgetModified( WidgetModifyEvent e )
+    private WidgetModifyListener attributeTableListener = event ->
         {
             getEditedElement().getAttributes().clear();
             
@@ -133,8 +131,7 @@ public class DbIndexDialog extends AddEd
             }
 
             checkAndUpdateOkButtonEnableState();
-        }
-    };
+        };
 
     
     /**
@@ -143,6 +140,7 @@ public class DbIndexDialog extends AddEd
      */
     private SelectionListener defaultCheckboxSelectionListener = new SelectionAdapter()
     {
+        @Override
         public void widgetSelected( SelectionEvent e )
         {
             attributeTable.disable();
@@ -157,6 +155,7 @@ public class DbIndexDialog extends AddEd
      */
     private SelectionListener typeButtonSelectionListener = new SelectionAdapter()
     {
+        @Override
         public void widgetSelected( SelectionEvent e )
         {
             checkAndUpdateOkButtonEnableState();
@@ -181,7 +180,7 @@ public class DbIndexDialog extends AddEd
                     }
                 }
             }
-        };
+        }
     };
 
     
@@ -191,6 +190,7 @@ public class DbIndexDialog extends AddEd
      */
     private SelectionListener subCheckboxSelectionListener = new SelectionAdapter()
     {
+        @Override
         public void widgetSelected( SelectionEvent e )
         {
             DbIndexWrapper indexWrapper = getEditedElement();
@@ -228,6 +228,7 @@ public class DbIndexDialog extends AddEd
      */
     private SelectionListener subSubCheckboxSelectionListener = new SelectionAdapter()
     {
+        @Override
         public void widgetSelected( SelectionEvent e )
         {
             // Check that we aren't coming from a modification of the SUB button
@@ -401,6 +402,7 @@ public class DbIndexDialog extends AddEd
     /**
      * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
      */
+    @Override
     protected void configureShell( Shell shell )
     {
         super.configureShell( shell );
@@ -433,6 +435,7 @@ public class DbIndexDialog extends AddEd
      * </pre>
      * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
      */
+    @Override
     protected Control createDialogArea( Composite parent )
     {
         Composite composite = ( Composite ) super.createDialogArea( parent );
@@ -490,7 +493,7 @@ public class DbIndexDialog extends AddEd
         AttributeDialog attributeDialog = new AttributeDialog( parent.getShell() );
         attributeDialog.setAttributeNamesAndOids( attributeLoader.getAttributeNamesAndOids() );
         decorator.setDialog( attributeDialog );
-        attributeTable = new TableWidget<StringValueWrapper>( decorator );
+        attributeTable = new TableWidget<>( decorator );
 
         attributeTable.createWidgetNoEdit( attributesGroup, null );
         attributeTable.getControl().setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false, 1, 1 ) );
@@ -618,7 +621,7 @@ public class DbIndexDialog extends AddEd
     
     private void initAttributeTable( Set<String> attributes )
     {
-        List<StringValueWrapper> attributeWrappers = new ArrayList<StringValueWrapper>();
+        List<StringValueWrapper> attributeWrappers = new ArrayList<>();
 
         if ( attributes != null )
         {
@@ -637,7 +640,7 @@ public class DbIndexDialog extends AddEd
      */
     protected void initDialog()
     {
-        DbIndexWrapper editedElement = (DbIndexWrapper)getEditedElement();
+        DbIndexWrapper editedElement = getEditedElement();
         
         if ( editedElement != null )
         {
@@ -655,7 +658,7 @@ public class DbIndexDialog extends AddEd
             // Index types
             Set<DbIndexTypeEnum> indexTypes = editedElement.getTypes();
 
-            if ( ( indexTypes != null ) && ( indexTypes.size() > 0 ) )
+            if ( ( indexTypes != null ) && !indexTypes.isEmpty() )
             {
                 presCheckbox.setSelection( indexTypes.contains( DbIndexTypeEnum.PRES ) );
                 eqCheckbox.setSelection( indexTypes.contains( DbIndexTypeEnum.EQ ) );
@@ -687,7 +690,7 @@ public class DbIndexDialog extends AddEd
      */
     protected void addNewElement( DbIndexWrapper editedElement )
     {
-        DbIndexWrapper newElement = (DbIndexWrapper)editedElement.clone();
+        DbIndexWrapper newElement = editedElement.clone();
         setEditedElement( newElement );
     }
 
@@ -706,15 +709,16 @@ public class DbIndexDialog extends AddEd
      * 
      * {@inheritDoc}
      */
+    @Override
     protected Button createButton(Composite parent, int id, String label, boolean defaultButton) 
     {
         Button button = super.createButton(parent, id, label, defaultButton);
 
         if ( id == IDialogConstants.OK_ID ) 
         {
-            DbIndexWrapper dbIndexWrapper = (DbIndexWrapper)getEditedElement();
+            DbIndexWrapper dbIndexWrapper = getEditedElement();
 
-            if ( ( dbIndexWrapper == null ) || ( dbIndexWrapper.getAttributes().size() == 0 ) )
+            if ( ( dbIndexWrapper == null ) || dbIndexWrapper.getAttributes().isEmpty() )
             {
                 button.setEnabled( false );
             }
@@ -744,12 +748,12 @@ public class DbIndexDialog extends AddEd
                 subAnyCheckbox.getSelection() ||
                 subFinalCheckbox.getSelection() || 
                 noLangCheckbox.getSelection() || 
-                noLangCheckbox.getSelection() ||
+                noTagsCheckbox.getSelection() || 
                 noSubtypesCheckbox.getSelection() );
         }
         else
         {
-            okButton.setEnabled( getEditedElement().getAttributes().size() > 0 );
+            okButton.setEnabled( !getEditedElement().getAttributes().isEmpty() );
         }
     }
 }

Modified: directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/DisallowFeatureDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/DisallowFeatureDialog.java?rev=1805792&r1=1805791&r2=1805792&view=diff
==============================================================================
--- directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/DisallowFeatureDialog.java (original)
+++ directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/DisallowFeatureDialog.java Tue Aug 22 16:23:35 2017
@@ -77,7 +77,7 @@ public class DisallowFeatureDialog exten
     private Button[] disallowFeatureCheckboxes = new Button[6];
     
     /** The already selected disaallowed features */
-    List<DisallowFeatureEnum> features = new ArrayList<DisallowFeatureEnum>();
+    List<DisallowFeatureEnum> features = new ArrayList<>();
     
     /**
      * Create a new instance of the DisallowFeatureDialog
@@ -94,6 +94,7 @@ public class DisallowFeatureDialog exten
     /**
      * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
      */
+    @Override
     protected void configureShell( Shell shell )
     {
         super.configureShell( shell );
@@ -106,6 +107,7 @@ public class DisallowFeatureDialog exten
      */
     private SelectionListener checkboxSelectionListener = new SelectionAdapter()
     {
+        @Override
         public void widgetSelected( SelectionEvent e )
         {
             Object object = e.getSource();
@@ -149,6 +151,7 @@ public class DisallowFeatureDialog exten
      * </pre>
      * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
      */
+    @Override
     protected Control createDialogArea( Composite parent )
     {
         Composite composite = ( Composite ) super.createDialogArea( parent );

Modified: directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/DnValueDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/DnValueDialog.java?rev=1805792&r1=1805791&r2=1805792&view=diff
==============================================================================
--- directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/DnValueDialog.java (original)
+++ directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/DnValueDialog.java Tue Aug 22 16:23:35 2017
@@ -27,7 +27,6 @@ import org.apache.directory.studio.commo
 import org.apache.directory.studio.openldap.config.editor.wrappers.DnWrapper;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
 import org.eclipse.swt.events.ModifyListener;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
@@ -77,9 +76,7 @@ public class DnValueDialog extends AddEd
     /**
      * The listener for the DN Text
      */
-    private ModifyListener dnValueTextListener = new ModifyListener()
-    {
-        public void modifyText( ModifyEvent e )
+    private ModifyListener dnValueTextListener = event ->
         {
             Display display = dnText.getDisplay();
             Button okButton = getButton( IDialogConstants.OK_ID );
@@ -103,13 +100,13 @@ public class DnValueDialog extends AddEd
                 okButton.setEnabled( false );
                 dnText.setForeground( display.getSystemColor( SWT.COLOR_RED ) );
             }
-        }
-    };
+        };
     
     
     /**
      * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
      */
+    @Override
     protected void configureShell( Shell shell )
     {
         super.configureShell( shell );
@@ -129,6 +126,7 @@ public class DnValueDialog extends AddEd
      * +---------------------------------------+
      * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
      */
+    @Override
     protected Control createDialogArea( Composite parent )
     {
         Composite composite = ( Composite ) super.createDialogArea( parent );
@@ -160,7 +158,7 @@ public class DnValueDialog extends AddEd
      */
     protected void initDialog()
     {
-        DnWrapper editedElement = (DnWrapper)getEditedElement();
+        DnWrapper editedElement = getEditedElement();
         
         if ( editedElement != null )
         {

Modified: directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/LimitsDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/LimitsDialog.java?rev=1805792&r1=1805791&r2=1805792&view=diff
==============================================================================
--- directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/LimitsDialog.java (original)
+++ directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/LimitsDialog.java Tue Aug 22 16:23:35 2017
@@ -23,10 +23,8 @@ package org.apache.directory.studio.open
 import org.apache.directory.studio.common.ui.AddEditDialog;
 import org.apache.directory.studio.common.ui.widgets.BaseWidgetUtils;
 import org.apache.directory.studio.common.ui.widgets.TableWidget;
-import org.apache.directory.studio.common.ui.widgets.WidgetModifyEvent;
 import org.apache.directory.studio.common.ui.widgets.WidgetModifyListener;
 import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
 import org.eclipse.swt.events.ModifyListener;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
@@ -184,6 +182,7 @@ public class LimitsDialog extends AddEdi
      **/ 
     private SelectionListener selectorButtonsSelectionListener = new SelectionAdapter()
     {
+        @Override
         public void widgetSelected( SelectionEvent event )
         {
             if ( event.getSource() instanceof Button )
@@ -244,6 +243,7 @@ public class LimitsDialog extends AddEdi
      */
     private SelectionListener dnSpecTypeComboListener = new SelectionAdapter()
     {
+        @Override
         public void widgetSelected( SelectionEvent e )
         {
             getEditedElement().setDnSpecType( DnSpecTypeEnum.getType( dnSpecTypeCombo.getText() ) );
@@ -257,6 +257,7 @@ public class LimitsDialog extends AddEdi
      */
     private SelectionListener dnSpecStyleComboListener = new SelectionAdapter()
     {
+        @Override
         public void widgetSelected( SelectionEvent e )
         {
             getEditedElement().setDnSpecStyle( DnSpecStyleEnum.getStyle( dnSpecStyleCombo.getText() ) );
@@ -270,6 +271,7 @@ public class LimitsDialog extends AddEdi
      */
     private SelectionListener groupAttributeTypeComboListener = new SelectionAdapter()
     {
+        @Override
         public void widgetSelected( SelectionEvent e )
         {
             getEditedElement().setAttributeType( groupAttributeTypeCombo.getText() );
@@ -283,6 +285,7 @@ public class LimitsDialog extends AddEdi
      */
     private SelectionListener groupObjectClassComboListener = new SelectionAdapter()
     {
+        @Override
         public void widgetSelected( SelectionEvent e )
         {
             getEditedElement().setObjectClass( groupObjectClassCombo.getText() );
@@ -293,11 +296,9 @@ public class LimitsDialog extends AddEdi
     /**
      * The dnSpecPatternText and groupPatternText listener
      */
-    private ModifyListener patternTextListener = new ModifyListener()
-    {
-        public void modifyText( ModifyEvent e )
+    private ModifyListener patternTextListener = event ->
         {
-            if ( e.getSource() == dnSpecPatternText )
+            if ( event.getSource() == dnSpecPatternText )
             {
                 getEditedElement().setSelectorPattern( dnSpecPatternText.getText() );
             }
@@ -307,21 +308,17 @@ public class LimitsDialog extends AddEdi
             }
             
             limitsText.setText( getEditedElement().toString() );
-        }
-    };
+        };
     
     
     /**
      * The olcLimits listener
      */
-    private WidgetModifyListener limitsTableWidgetListener = new WidgetModifyListener()
-    {
-        public void widgetModified( WidgetModifyEvent e )
+    private WidgetModifyListener limitsTableWidgetListener = event ->
         {
             getEditedElement().setLimits( limitsTableWidget.getElements() );
             limitsText.setText( getEditedElement().toString() );
-        }
-    };
+        };
     
 
     /**
@@ -356,6 +353,7 @@ public class LimitsDialog extends AddEdi
     /**
      * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
      */
+    @Override
     protected void configureShell( Shell shell )
     {
         super.configureShell( shell );
@@ -403,6 +401,7 @@ public class LimitsDialog extends AddEdi
      * </pre>
      * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
      */
+    @Override
     protected Control createDialogArea( Composite parent )
     {
         Composite composite = ( Composite ) super.createDialogArea( parent );
@@ -535,7 +534,7 @@ public class LimitsDialog extends AddEdi
         // The Limits table
         BaseWidgetUtils.createLabel( selectorGroup, "Limits :", 1 );
         
-        limitsTableWidget = new TableWidget<LimitWrapper>( 
+        limitsTableWidget = new TableWidget<>( 
             new LimitDecorator( parent.getShell() , "Limit") );
 
         limitsTableWidget.createWidgetWithEdit( selectorGroup, null );
@@ -601,7 +600,7 @@ public class LimitsDialog extends AddEdi
      */
     protected void initDialog()
     {
-        LimitsWrapper editedElement = (LimitsWrapper)getEditedElement();
+        LimitsWrapper editedElement = getEditedElement();
         
         if ( editedElement != null )
         {

Modified: directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/Messages.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/Messages.java?rev=1805792&r1=1805791&r2=1805792&view=diff
==============================================================================
--- directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/Messages.java (original)
+++ directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/Messages.java Tue Aug 22 16:23:35 2017
@@ -31,6 +31,12 @@ import java.util.ResourceBundle;
  */
 public class Messages
 {
+    private Messages()
+    {
+        // Nothing to do
+    }
+    
+    
     /** The resource name */
     private static final ResourceBundle RESOURCE_BUNDLE = 
         ResourceBundle.getBundle( Messages.class.getPackage().getName() + ".messages" );

Modified: directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/OrderedStringValueDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/OrderedStringValueDialog.java?rev=1805792&r1=1805791&r2=1805792&view=diff
==============================================================================
--- directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/OrderedStringValueDialog.java (original)
+++ directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/OrderedStringValueDialog.java Tue Aug 22 16:23:35 2017
@@ -24,7 +24,6 @@ import org.apache.directory.studio.commo
 import org.apache.directory.studio.common.ui.widgets.BaseWidgetUtils;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
 import org.eclipse.swt.events.ModifyListener;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
@@ -80,9 +79,7 @@ public class OrderedStringValueDialog ex
     /**
      * The listener for the String Text
      */
-    private ModifyListener stringValueTextListener = new ModifyListener()
-    {
-        public void modifyText( ModifyEvent e )
+    private ModifyListener stringValueTextListener = event ->
         {
             Button okButton = getButton( IDialogConstants.OK_ID );
             
@@ -94,13 +91,13 @@ public class OrderedStringValueDialog ex
 
             getEditedElement().setValue( stringValue.getText() );
             okButton.setEnabled( true );
-        }
-    };
+        };
     
     
     /**
      * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
      */
+    @Override
     protected void configureShell( Shell shell )
     {
         super.configureShell( shell );
@@ -120,6 +117,7 @@ public class OrderedStringValueDialog ex
      * +---------------------------------------+
      * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
      */
+    @Override
     protected Control createDialogArea( Composite parent )
     {
         Composite composite = ( Composite ) super.createDialogArea( parent );
@@ -151,7 +149,7 @@ public class OrderedStringValueDialog ex
      */
     protected void initDialog()
     {
-        OrderedStringValueWrapper editedElement = (OrderedStringValueWrapper)getEditedElement();
+        OrderedStringValueWrapper editedElement = getEditedElement();
         
         if ( editedElement != null )
         {
@@ -180,7 +178,7 @@ public class OrderedStringValueDialog ex
 
     public void addNewElement( OrderedStringValueWrapper editedElement )
     {
-        OrderedStringValueWrapper newElement = (OrderedStringValueWrapper)editedElement.clone();
+        OrderedStringValueWrapper newElement = editedElement.clone();
         setEditedElement( newElement );
     }
 

Modified: directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/OverlayDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/OverlayDialog.java?rev=1805792&r1=1805791&r2=1805792&view=diff
==============================================================================
--- directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/OverlayDialog.java (original)
+++ directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/OverlayDialog.java Tue Aug 22 16:23:35 2017
@@ -86,6 +86,7 @@ public class OverlayDialog extends Dialo
     // Listeners
     private SelectionListener overlayTypeComboViewerSelectionChangedListener = new SelectionAdapter()
     {
+        @Override
         public void widgetSelected( SelectionEvent event )
         {
             OverlayTypeEnum type = OverlayTypeEnum.getOverlay( overlayTypeCombo.getText() );
@@ -177,6 +178,7 @@ public class OverlayDialog extends Dialo
     /**
      * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
      */
+    @Override
     protected void configureShell( Shell shell )
     {
         super.configureShell( shell );
@@ -205,6 +207,7 @@ public class OverlayDialog extends Dialo
     /**
      * {@inheritDoc}
      */
+    @Override
     protected void okPressed()
     {
         if ( configurationBlock != null )
@@ -219,6 +222,7 @@ public class OverlayDialog extends Dialo
     /**
      * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
      */
+    @Override
     protected Control createDialogArea( Composite parent )
     {
         Composite composite = ( Composite ) super.createDialogArea( parent );

Modified: directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/OverlayDialogConfigurationBlock.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/OverlayDialogConfigurationBlock.java?rev=1805792&r1=1805791&r2=1805792&view=diff
==============================================================================
--- directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/OverlayDialogConfigurationBlock.java (original)
+++ directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/OverlayDialogConfigurationBlock.java Tue Aug 22 16:23:35 2017
@@ -30,7 +30,7 @@ import org.apache.directory.studio.openl
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public interface OverlayDialogConfigurationBlock<Overlay extends OlcOverlayConfig>
+public interface OverlayDialogConfigurationBlock<O extends OlcOverlayConfig>
 {
     /**
      * Creates the block content.
@@ -53,7 +53,7 @@ public interface OverlayDialogConfigurat
      *
      * @return the overlay
      */
-    Overlay getOverlay();
+    O getOverlay();
 
 
     /**
@@ -81,5 +81,5 @@ public interface OverlayDialogConfigurat
      *
      * @param overlay the overlay
      */
-    void setOverlay( Overlay overlay );
+    void setOverlay( O overlay );
 }

Modified: directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/PasswordHashDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/PasswordHashDialog.java?rev=1805792&r1=1805791&r2=1805792&view=diff
==============================================================================
--- directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/PasswordHashDialog.java (original)
+++ directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/PasswordHashDialog.java Tue Aug 22 16:23:35 2017
@@ -76,7 +76,7 @@ public class PasswordHashDialog extends
     private Button[] passwordHashCheckboxes = new Button[9];
     
     /** The already selected hashes */
-    List<PasswordHashEnum> hashes = new ArrayList<PasswordHashEnum>();
+    List<PasswordHashEnum> hashes = new ArrayList<>();
     
     /**
      * Create a new instance of the PasswordHashDialog
@@ -93,6 +93,7 @@ public class PasswordHashDialog extends
     /**
      * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
      */
+    @Override
     protected void configureShell( Shell shell )
     {
         super.configureShell( shell );
@@ -104,6 +105,7 @@ public class PasswordHashDialog extends
      */
     private SelectionListener checkboxSelectionListener = new SelectionAdapter()
     {
+        @Override
         public void widgetSelected( SelectionEvent e )
         {
             Object object = e.getSource();
@@ -145,6 +147,7 @@ public class PasswordHashDialog extends
      * </pre>
      * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
      */
+    @Override
     protected Control createDialogArea( Composite parent )
     {
         Composite composite = ( Composite ) super.createDialogArea( parent );

Modified: directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/PurgeTimeSpan.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/PurgeTimeSpan.java?rev=1805792&r1=1805791&r2=1805792&view=diff
==============================================================================
--- directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/PurgeTimeSpan.java (original)
+++ directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/PurgeTimeSpan.java Tue Aug 22 16:23:35 2017
@@ -192,7 +192,7 @@ public class PurgeTimeSpan
         // Initializing parsing objects
         int position = 0;
         char c;
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder buffer = new StringBuilder();
         boolean hoursParsed = false;
         boolean minutesParsed = false;
 
@@ -221,7 +221,7 @@ public class PurgeTimeSpan
                         this.days = days;
                     }
 
-                    buffer = new StringBuffer();
+                    buffer = new StringBuilder();
                 }
                 // Colon sign
                 else if ( ':' == c )
@@ -240,7 +240,7 @@ public class PurgeTimeSpan
                         }
 
                         hoursParsed = true;
-                        buffer = new StringBuffer();
+                        buffer = new StringBuilder();
                     }
                     else
                     {
@@ -256,7 +256,7 @@ public class PurgeTimeSpan
                         }
 
                         minutesParsed = true;
-                        buffer = new StringBuffer();
+                        buffer = new StringBuilder();
                     }
                 }
                 else
@@ -428,7 +428,7 @@ public class PurgeTimeSpan
         }
         else
         {
-            return "" + value;
+            return Integer.toString( value );
         }
     }
 

Modified: directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/ReplicationConsumerDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/ReplicationConsumerDialog.java?rev=1805792&r1=1805791&r2=1805792&view=diff
==============================================================================
--- directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/ReplicationConsumerDialog.java (original)
+++ directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/ReplicationConsumerDialog.java Tue Aug 22 16:23:35 2017
@@ -29,7 +29,6 @@ import org.apache.directory.api.ldap.mod
 import org.apache.directory.api.ldap.model.exception.LdapInvalidDnException;
 import org.apache.directory.api.ldap.model.name.Dn;
 import org.apache.directory.studio.common.ui.widgets.BaseWidgetUtils;
-import org.apache.directory.studio.common.ui.widgets.WidgetModifyEvent;
 import org.apache.directory.studio.common.ui.widgets.WidgetModifyListener;
 import org.apache.directory.studio.ldapbrowser.common.widgets.search.EntryWidget;
 import org.apache.directory.studio.ldapbrowser.common.widgets.search.FilterWidget;
@@ -38,22 +37,18 @@ import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.viewers.ArrayContentProvider;
 import org.eclipse.jface.viewers.ComboViewer;
-import org.eclipse.jface.viewers.DoubleClickEvent;
 import org.eclipse.jface.viewers.IDoubleClickListener;
 import org.eclipse.jface.viewers.ISelectionChangedListener;
 import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
 import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.jface.viewers.TableViewer;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.custom.ScrolledComposite;
-import org.eclipse.swt.events.ModifyEvent;
 import org.eclipse.swt.events.ModifyListener;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.events.VerifyEvent;
 import org.eclipse.swt.events.VerifyListener;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.layout.GridData;
@@ -98,7 +93,7 @@ public class ReplicationConsumerDialog e
     /** The connection */
     private IBrowserConnection browserConnection;
 
-    private List<String> attributes = new ArrayList<String>();
+    private List<String> attributes = new ArrayList<>();
 
     // UI widgets
     private Button okButton;
@@ -127,20 +122,15 @@ public class ReplicationConsumerDialog e
     private Button attributesOnlyCheckbox;
 
     // Listeners
-    private VerifyListener integerVerifyListener = new VerifyListener()
-    {
-        public void verifyText( VerifyEvent e )
+    private VerifyListener integerVerifyListener = event ->
         {
-            if ( !e.text.matches( "[0-9]*" ) ) //$NON-NLS-1$
+            if ( !event.text.matches( "[0-9]*" ) ) //$NON-NLS-1$
             {
-                e.doit = false;
+                event.doit = false;
             }
-        }
-    };
+        };
 
-    private ModifyListener replicatIdTextListener = new ModifyListener()
-    {
-        public void modifyText( ModifyEvent e )
+    private ModifyListener replicatIdTextListener = event ->
         {
             String replicaId = replicaIdText.getText();
 
@@ -154,19 +144,13 @@ public class ReplicationConsumerDialog e
             }
 
             updateOkButtonEnableState();
-        }
-    };
+        };
 
-    private ISelectionChangedListener replicationTypeComboViewerListener = new ISelectionChangedListener()
-    {
-        public void selectionChanged( SelectionChangedEvent event )
-        {
-            syncRepl.setType( getReplicationType() );
-        }
-    };
+    private ISelectionChangedListener replicationTypeComboViewerListener = event -> syncRepl.setType( getReplicationType() );
 
     private SelectionListener configureReplicationButtonListener = new SelectionAdapter()
     {
+        @Override
         public void widgetSelected( SelectionEvent e )
         {
             ReplicationOptionsDialog dialog = new ReplicationOptionsDialog( getShell(), syncRepl, browserConnection );
@@ -178,27 +162,16 @@ public class ReplicationConsumerDialog e
         }
     };
 
-    private ModifyListener hostTextListener = new ModifyListener()
-    {
-        public void modifyText( ModifyEvent e )
+    private ModifyListener hostTextListener = event ->
         {
             syncRepl.setProvider( getProvider() );
 
             updateOkButtonEnableState();
-        }
-    };
+        };
 
-    private ModifyListener portTextListener = new ModifyListener()
-    {
-        public void modifyText( ModifyEvent e )
-        {
-            syncRepl.setProvider( getProvider() );
-        }
-    };
+    private ModifyListener portTextListener = event -> syncRepl.setProvider( getProvider() );
 
-    private ISelectionChangedListener encryptionMethodComboViewerListener = new ISelectionChangedListener()
-    {
-        public void selectionChanged( SelectionChangedEvent event )
+    private ISelectionChangedListener encryptionMethodComboViewerListener = event ->
         {
             syncRepl.setProvider( getProvider() );
 
@@ -214,11 +187,11 @@ public class ReplicationConsumerDialog e
             {
                 configureStartTlsButton.setEnabled( true );
             }
-        }
-    };
+        };
 
     private SelectionListener configureStartTlsButtonListener = new SelectionAdapter()
     {
+        @Override
         public void widgetSelected( SelectionEvent e )
         {
             // TODO
@@ -227,6 +200,7 @@ public class ReplicationConsumerDialog e
 
     private SelectionListener authenticationTabFolderListener = new SelectionAdapter()
     {
+        @Override
         public void widgetSelected( SelectionEvent e )
         {
             // Simple Authentication
@@ -253,12 +227,10 @@ public class ReplicationConsumerDialog e
             }
 
             refreshUI();
-        };
+        }
     };
 
-    private ModifyListener bindDnTextListener = new ModifyListener()
-    {
-        public void modifyText( ModifyEvent e )
+    private ModifyListener bindDnTextListener = event ->
         {
             String bindDn = bindDnText.getText();
 
@@ -270,12 +242,9 @@ public class ReplicationConsumerDialog e
             {
                 syncRepl.setBindDn( null );
             }
-        }
-    };
+        };
 
-    private ModifyListener credentialsTextListener = new ModifyListener()
-    {
-        public void modifyText( ModifyEvent e )
+    private ModifyListener credentialsTextListener = event ->
         {
             String credentials = credentialsText.getText();
 
@@ -287,11 +256,11 @@ public class ReplicationConsumerDialog e
             {
                 syncRepl.setCredentials( null );
             }
-        }
-    };
+        };
 
     private SelectionListener showCredentialsCheckboxListener = new SelectionAdapter()
     {
+        @Override
         public void widgetSelected( SelectionEvent e )
         {
             if ( showCredentialsCheckbox.getSelection() )
@@ -307,6 +276,7 @@ public class ReplicationConsumerDialog e
 
     private SelectionListener configureSaslAuthenticationButtonListener = new SelectionAdapter()
     {
+        @Override
         public void widgetSelected( SelectionEvent e )
         {
             ReplicationSaslDialog dialog = new ReplicationSaslDialog( getShell(), syncRepl, browserConnection );
@@ -318,9 +288,7 @@ public class ReplicationConsumerDialog e
         }
     };
 
-    private WidgetModifyListener searchBaseDnEntryWidgetListener = new WidgetModifyListener()
-    {
-        public void widgetModified( WidgetModifyEvent event )
+    private WidgetModifyListener searchBaseDnEntryWidgetListener = event ->
         {
             Dn searchBaseDn = searchBaseDnEntryWidget.getDn();
 
@@ -334,12 +302,9 @@ public class ReplicationConsumerDialog e
             }
 
             updateOkButtonEnableState();
-        }
-    };
+        };
 
-    private WidgetModifyListener filterWidgetListener = new WidgetModifyListener()
-    {
-        public void widgetModified( WidgetModifyEvent event )
+    private WidgetModifyListener filterWidgetListener = event ->
         {
             String filter = filterWidget.getFilter();
 
@@ -351,35 +316,17 @@ public class ReplicationConsumerDialog e
             {
                 syncRepl.setFilter( null );
             }
-        }
-    };
+        };
 
-    private ISelectionChangedListener scopeComboViewerListener = new ISelectionChangedListener()
-    {
-        public void selectionChanged( SelectionChangedEvent event )
-        {
-            syncRepl.setScope( getScope() );
-        }
-    };
+    private ISelectionChangedListener scopeComboViewerListener = event -> syncRepl.setScope( getScope() );
 
-    private ISelectionChangedListener attributesTableViewerSelectionChangedListener = new ISelectionChangedListener()
-    {
-        public void selectionChanged( SelectionChangedEvent event )
-        {
-            updateAttributesTableButtonsState();
-        }
-    };
+    private ISelectionChangedListener attributesTableViewerSelectionChangedListener = event -> updateAttributesTableButtonsState();
 
-    private IDoubleClickListener attributesTableViewerDoubleClickListener = new IDoubleClickListener()
-    {
-        public void doubleClick( DoubleClickEvent event )
-        {
-            editAttributeButtonAction();
-        }
-    };
+    private IDoubleClickListener attributesTableViewerDoubleClickListener = event -> editAttributeButtonAction();
 
     private SelectionListener addAttributeButtonListener = new SelectionAdapter()
     {
+        @Override
         public void widgetSelected( SelectionEvent e )
         {
             addAttributeButtonAction();
@@ -388,6 +335,7 @@ public class ReplicationConsumerDialog e
 
     private SelectionListener editAttributeButtonListener = new SelectionAdapter()
     {
+        @Override
         public void widgetSelected( SelectionEvent e )
         {
             editAttributeButtonAction();
@@ -396,6 +344,7 @@ public class ReplicationConsumerDialog e
 
     private SelectionListener deleteAttributeButtonListener = new SelectionAdapter()
     {
+        @Override
         public void widgetSelected( SelectionEvent e )
         {
             deleteAttributeButtonAction();
@@ -404,10 +353,11 @@ public class ReplicationConsumerDialog e
 
     private SelectionListener attributesOnlyCheckboxListener = new SelectionAdapter()
     {
+        @Override
         public void widgetSelected( SelectionEvent e )
         {
             syncRepl.setAttrsOnly( attributesOnlyCheckbox.getSelection() );
-        };
+        }
     };
 
 
@@ -458,15 +408,14 @@ public class ReplicationConsumerDialog e
      */
     private SyncRepl createDefaultSyncRepl()
     {
-        SyncRepl syncRepl = new SyncRepl();
-
-        return syncRepl;
+        return new SyncRepl();
     }
 
 
     /**
      * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
      */
+    @Override
     protected void configureShell( Shell shell )
     {
         super.configureShell( shell );
@@ -477,6 +426,7 @@ public class ReplicationConsumerDialog e
     /**
      * @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)
      */
+    @Override
     protected void createButtonsForButtonBar( Composite parent )
     {
         okButton = createButton( parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true );
@@ -487,17 +437,9 @@ public class ReplicationConsumerDialog e
 
 
     /**
-     * {@inheritDoc}
-     */
-    protected void okPressed()
-    {
-        super.okPressed();
-    }
-
-
-    /**
      * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
      */
+    @Override
     protected Control createDialogArea( Composite parent )
     {
         // Creating the scrolled composite
@@ -549,6 +491,7 @@ public class ReplicationConsumerDialog e
         replicationTypeComboViewer.setContentProvider( new ArrayContentProvider() );
         replicationTypeComboViewer.setLabelProvider( new LabelProvider()
         {
+            @Override
             public String getText( Object element )
             {
                 if ( element instanceof Type )
@@ -607,6 +550,7 @@ public class ReplicationConsumerDialog e
         encryptionMethodComboViewer.setContentProvider( new ArrayContentProvider() );
         encryptionMethodComboViewer.setLabelProvider( new LabelProvider()
         {
+            @Override
             public String getText( Object element )
             {
                 if ( element instanceof EncryptionMethod )
@@ -737,6 +681,7 @@ public class ReplicationConsumerDialog e
         scopeComboViewer.setContentProvider( new ArrayContentProvider() );
         scopeComboViewer.setLabelProvider( new LabelProvider()
         {
+            @Override
             public String getText( Object element )
             {
                 if ( element instanceof Scope )
@@ -772,6 +717,7 @@ public class ReplicationConsumerDialog e
         attributesTableViewer.setContentProvider( new ArrayContentProvider() );
         attributesTableViewer.setLabelProvider( new LabelProvider()
         {
+            @Override
             public String getText( Object element )
             {
                 if ( SchemaConstants.ALL_OPERATIONAL_ATTRIBUTES.equals( element ) )
@@ -784,9 +730,10 @@ public class ReplicationConsumerDialog e
                 }
 
                 return super.getText( element );
-            };
+            }
 
 
+            @Override
             public Image getImage( Object element )
             {
                 return OpenLdapConfigurationPlugin.getDefault().getImage(
@@ -965,7 +912,7 @@ public class ReplicationConsumerDialog e
 
                 if ( providerPort != Provider.NO_PORT )
                 {
-                    portText.setText( "" + providerPort );
+                    portText.setText( Integer.toString( providerPort ) );
                 }
                 else
                 {

Modified: directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/ReplicationOptionsDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/ReplicationOptionsDialog.java?rev=1805792&r1=1805791&r2=1805792&view=diff
==============================================================================
--- directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/ReplicationOptionsDialog.java (original)
+++ directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/ReplicationOptionsDialog.java Tue Aug 22 16:23:35 2017
@@ -29,7 +29,6 @@ import org.apache.directory.studio.ldapb
 import org.apache.directory.studio.ldapbrowser.common.widgets.search.FilterWidget;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IInputValidator;
 import org.eclipse.jface.dialogs.InputDialog;
 import org.eclipse.jface.viewers.ArrayContentProvider;
 import org.eclipse.jface.viewers.ComboViewer;
@@ -40,7 +39,6 @@ import org.eclipse.swt.custom.ScrolledCo
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.events.VerifyEvent;
 import org.eclipse.swt.events.VerifyListener;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
@@ -98,23 +96,22 @@ public class ReplicationOptionsDialog ex
     private FilterWidget logFilterWidget;
 
     // Listeners
-    private VerifyListener integerVerifyListener = new VerifyListener()
-    {
-        public void verifyText( VerifyEvent e )
+    private VerifyListener integerVerifyListener = event ->
         {
-            if ( !e.text.matches( "[0-9]*" ) ) //$NON-NLS-1$
+            if ( !event.text.matches( "[0-9]*" ) ) //$NON-NLS-1$
             {
-                e.doit = false;
+                event.doit = false;
             }
-        }
-    };
+        };
 
     private SelectionListener editRetryButtonListener = new SelectionAdapter()
     {
+        @Override
         public void widgetSelected( SelectionEvent e )
         {
             // Getting the retry value
             String retryValue = null;
+            
             if ( syncRepl != null )
             {
                 Retry retry = syncRepl.getRetry();
@@ -127,22 +124,19 @@ public class ReplicationOptionsDialog ex
 
             // Creating and displaying a dialog to edit the retry value
             InputDialog dialog = new InputDialog( editRetryButton.getShell(), "Edit Retry Value", "Specify the retry value as a list of the <retry interval> and <# of retries> pairs:",
-                retryValue, new IInputValidator()
-                {
-                    public String isValid( String newText )
+                retryValue, newText ->
                     {
                         try
                         {
                             Retry.parse( newText );
                         }
-                        catch ( ParseException e )
+                        catch ( ParseException pe )
                         {
-                            return e.getMessage();
+                            return pe.getMessage();
                         }
 
                         return null;
-                    }
-                } );
+                    } );
 
             if ( InputDialog.OK == dialog.open() )
             {
@@ -162,6 +156,7 @@ public class ReplicationOptionsDialog ex
 
     private SelectionListener enableDeltaSyncReplCheckboxListener = new SelectionAdapter()
     {
+        @Override
         public void widgetSelected( SelectionEvent e )
         {
             boolean isChecked = enableDeltaSyncReplCheckbox.getSelection();
@@ -204,15 +199,14 @@ public class ReplicationOptionsDialog ex
      */
     private SyncRepl createDefaultSyncRepl()
     {
-        SyncRepl syncRepl = new SyncRepl();
-
-        return syncRepl;
+        return new SyncRepl();
     }
 
 
     /**
      * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
      */
+    @Override
     protected void configureShell( Shell shell )
     {
         super.configureShell( shell );
@@ -223,6 +217,7 @@ public class ReplicationOptionsDialog ex
     /**
      * {@inheritDoc}
      */
+    @Override
     protected void okPressed()
     {
         saveToSyncRepl();
@@ -234,6 +229,7 @@ public class ReplicationOptionsDialog ex
     /**
      * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
      */
+    @Override
     protected Control createDialogArea( Composite parent )
     {
         // Creating the scrolled composite
@@ -277,6 +273,7 @@ public class ReplicationOptionsDialog ex
         replicationTypeComboViewer.setContentProvider( new ArrayContentProvider() );
         replicationTypeComboViewer.setLabelProvider( new LabelProvider()
         {
+            @Override
             public String getText( Object element )
             {
                 if ( element instanceof Type )
@@ -437,6 +434,7 @@ public class ReplicationOptionsDialog ex
         syncDataComboViewer.setContentProvider( new ArrayContentProvider() );
         syncDataComboViewer.setLabelProvider( new LabelProvider()
         {
+            @Override
             public String getText( Object element )
             {
                 if ( element instanceof SyncData )
@@ -521,7 +519,7 @@ public class ReplicationOptionsDialog ex
 
             if ( sizeLimit != -1 )
             {
-                sizeLimitText.setText( "" + sizeLimit );
+                sizeLimitText.setText( Integer.toString( sizeLimit ) );
             }
 
             // Time Limit
@@ -529,7 +527,7 @@ public class ReplicationOptionsDialog ex
 
             if ( timeLimit != -1 )
             {
-                timeLimitText.setText( "" + timeLimit );
+                timeLimitText.setText( Integer.toString( timeLimit ) );
             }
 
             // Network Timeout
@@ -537,7 +535,7 @@ public class ReplicationOptionsDialog ex
 
             if ( networkTimeout != -1 )
             {
-                networkTimeoutText.setText( "" + networkTimeout );
+                networkTimeoutText.setText( Integer.toString( networkTimeout ) );
             }
 
             // Timeout
@@ -545,7 +543,7 @@ public class ReplicationOptionsDialog ex
 
             if ( timeout != -1 )
             {
-                timeoutText.setText( "" + timeout );
+                timeoutText.setText( Integer.toString( timeout ) );
             }
 
             // Enable Schema Checking

Modified: directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/ReplicationSaslDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/ReplicationSaslDialog.java?rev=1805792&r1=1805791&r2=1805792&view=diff
==============================================================================
--- directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/ReplicationSaslDialog.java (original)
+++ directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/ReplicationSaslDialog.java Tue Aug 22 16:23:35 2017
@@ -74,6 +74,7 @@ public class ReplicationSaslDialog exten
     // Listeners
     private SelectionListener showCredentialsCheckboxListener = new SelectionAdapter()
     {
+        @Override
         public void widgetSelected( SelectionEvent e )
         {
             if ( showCredentialsCheckbox.getSelection() )
@@ -119,15 +120,14 @@ public class ReplicationSaslDialog exten
      */
     private SyncRepl createDefaultSyncRepl()
     {
-        SyncRepl syncRepl = new SyncRepl();
-
-        return syncRepl;
+        return new SyncRepl();
     }
 
 
     /**
      * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
      */
+    @Override
     protected void configureShell( Shell shell )
     {
         super.configureShell( shell );
@@ -138,6 +138,7 @@ public class ReplicationSaslDialog exten
     /**
      * {@inheritDoc}
      */
+    @Override
     protected void okPressed()
     {
         saveToSyncRepl();
@@ -149,6 +150,7 @@ public class ReplicationSaslDialog exten
     /**
      * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
      */
+    @Override
     protected Control createDialogArea( Composite parent )
     {
         // Creating the scrolled composite
@@ -191,6 +193,7 @@ public class ReplicationSaslDialog exten
         saslMechanismComboViewer.setContentProvider( new ArrayContentProvider() );
         saslMechanismComboViewer.setLabelProvider( new LabelProvider()
         {
+            @Override
             public String getText( Object element )
             {
                 if ( element instanceof SaslMechanism )

Modified: directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/RequireConditionDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/RequireConditionDialog.java?rev=1805792&r1=1805791&r2=1805792&view=diff
==============================================================================
--- directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/RequireConditionDialog.java (original)
+++ directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/RequireConditionDialog.java Tue Aug 22 16:23:35 2017
@@ -74,7 +74,7 @@ public class RequireConditionDialog exte
     private Button[] requireConditionCheckboxes = new Button[6];
     
     /** The already selected Required Conditions */
-    List<RequireConditionEnum> conditions = new ArrayList<RequireConditionEnum>();
+    List<RequireConditionEnum> conditions = new ArrayList<>();
     
     /**
      * Create a new instance of the RequireConditionDialog
@@ -91,6 +91,7 @@ public class RequireConditionDialog exte
     /**
      * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
      */
+    @Override
     protected void configureShell( Shell shell )
     {
         super.configureShell( shell );
@@ -103,6 +104,7 @@ public class RequireConditionDialog exte
      */
     private SelectionListener checkboxSelectionListener = new SelectionAdapter()
     {
+        @Override
         public void widgetSelected( SelectionEvent e )
         {
             Object object = e.getSource();
@@ -143,6 +145,7 @@ public class RequireConditionDialog exte
      * </pre>
      * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
      */
+    @Override
     protected Control createDialogArea( Composite parent )
     {
         Composite composite = ( Composite ) super.createDialogArea( parent );

Modified: directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/RestrictOperationDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/RestrictOperationDialog.java?rev=1805792&r1=1805791&r2=1805792&view=diff
==============================================================================
--- directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/RestrictOperationDialog.java (original)
+++ directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/RestrictOperationDialog.java Tue Aug 22 16:23:35 2017
@@ -85,7 +85,7 @@ public class RestrictOperationDialog ext
     private Button[] restrictOperationCheckboxes = new Button[16];
     
     /** The already selected Restricted Operations */
-    List<RestrictOperationEnum> operations = new ArrayList<RestrictOperationEnum>();
+    List<RestrictOperationEnum> operations = new ArrayList<>();
     
     /**
      * Create a new instance of the RestrictOperationDialog
@@ -102,6 +102,7 @@ public class RestrictOperationDialog ext
     /**
      * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
      */
+    @Override
     protected void configureShell( Shell shell )
     {
         super.configureShell( shell );
@@ -114,6 +115,7 @@ public class RestrictOperationDialog ext
      */
     private SelectionListener checkboxSelectionListener = new SelectionAdapter()
     {
+        @Override
         public void widgetSelected( SelectionEvent e )
         {
             Object object = e.getSource();
@@ -155,6 +157,7 @@ public class RestrictOperationDialog ext
      * </pre>
      * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
      */
+    @Override
     protected Control createDialogArea( Composite parent )
     {
         Composite composite = ( Composite ) super.createDialogArea( parent );

Modified: directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/RwmMappingDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/RwmMappingDialog.java?rev=1805792&r1=1805791&r2=1805792&view=diff
==============================================================================
--- directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/RwmMappingDialog.java (original)
+++ directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/RwmMappingDialog.java Tue Aug 22 16:23:35 2017
@@ -37,10 +37,8 @@ import org.eclipse.jface.viewers.ArrayCo
 import org.eclipse.jface.viewers.ComboViewer;
 import org.eclipse.jface.viewers.ISelectionChangedListener;
 import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
 import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
 import org.eclipse.swt.events.ModifyListener;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.widgets.Button;
@@ -79,16 +77,9 @@ public class RwmMappingDialog extends Di
 
     // Listeners
 
-    private ModifyListener namesComboViewerListener = new ModifyListener()
-    {
-        public void modifyText( ModifyEvent e )
-        {
-            checkAndUpdateOkButtonEnableState();
-        }
-    };
-    private ISelectionChangedListener typeComboViewerSelectionListener = new ISelectionChangedListener()
-    {
-        public void selectionChanged( SelectionChangedEvent event )
+    private ModifyListener namesComboViewerListener = event -> checkAndUpdateOkButtonEnableState();
+
+    private ISelectionChangedListener typeComboViewerSelectionListener = event ->
         {
             OlcRwmMapValueTypeEnum selectedType = getSelectedType();
 
@@ -111,8 +102,7 @@ public class RwmMappingDialog extends Di
             // Restoring the combos text
             localNameComboViewer.getCombo().setText( localNameText );
             foreignNameComboViewer.getCombo().setText( foreignNameText );
-        }
-    };
+        };
 
 
     /**
@@ -170,8 +160,8 @@ public class RwmMappingDialog extends Di
      */
     private void initAttributeTypesAndObjectClassesLists()
     {
-        connectionAttributeTypes = new ArrayList<String>();
-        connectionObjectClasses = new ArrayList<String>();
+        connectionAttributeTypes = new ArrayList<>();
+        connectionObjectClasses = new ArrayList<>();
 
         if ( browserConnection != null )
         {
@@ -198,13 +188,7 @@ public class RwmMappingDialog extends Di
             }
 
             // Creating a case insensitive comparator
-            Comparator<String> ignoreCaseComparator = new Comparator<String>()
-            {
-                public int compare( String o1, String o2 )
-                {
-                    return o1.compareToIgnoreCase( o2 );
-                }
-            };
+            Comparator<String> ignoreCaseComparator = ( o1, o2 ) -> o1.compareToIgnoreCase( o2 );
 
             // Sorting the lists
             Collections.sort( connectionAttributeTypes, ignoreCaseComparator );
@@ -220,6 +204,7 @@ public class RwmMappingDialog extends Di
     /**
      * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
      */
+    @Override
     protected void configureShell( Shell shell )
     {
         super.configureShell( shell );
@@ -230,6 +215,7 @@ public class RwmMappingDialog extends Di
     /**
      * @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)
      */
+    @Override
     protected void createButtonsForButtonBar( Composite parent )
     {
         okButton = createButton( parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true );
@@ -242,6 +228,7 @@ public class RwmMappingDialog extends Di
     /**
      * {@inheritDoc}
      */
+    @Override
     protected void okPressed()
     {
         // Type
@@ -278,6 +265,7 @@ public class RwmMappingDialog extends Di
     /**
      * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
      */
+    @Override
     protected Control createDialogArea( Composite parent )
     {
         // Creating the dialog composites
@@ -296,6 +284,7 @@ public class RwmMappingDialog extends Di
         typeComboViewer.setContentProvider( new ArrayContentProvider() );
         typeComboViewer.setLabelProvider( new LabelProvider()
         {
+            @Override
             public String getText( Object element )
             {
                 if ( element instanceof OlcRwmMapValueTypeEnum )

Modified: directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/SaslSecPropsDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/SaslSecPropsDialog.java?rev=1805792&r1=1805791&r2=1805792&view=diff
==============================================================================
--- directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/SaslSecPropsDialog.java (original)
+++ directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/SaslSecPropsDialog.java Tue Aug 22 16:23:35 2017
@@ -27,7 +27,6 @@ import org.apache.directory.studio.openl
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
 import org.eclipse.swt.events.ModifyListener;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
@@ -116,6 +115,7 @@ public class SaslSecPropsDialog extends
      */
     private SelectionListener checkboxSelectionListener = new SelectionAdapter()
     {
+        @Override
         public void widgetSelected( SelectionEvent e )
         {
             Object object = e.getSource();
@@ -232,9 +232,7 @@ public class SaslSecPropsDialog extends
     /**
      * The listener for the minSsf Limit Text
      */
-    private ModifyListener minSsfListener = new ModifyListener()
-    {
-        public void modifyText( ModifyEvent e )
+    private ModifyListener minSsfListener = event ->
         {
             Display display = minSsfText.getDisplay();
             Button okButton = getButton( IDialogConstants.OK_ID );
@@ -283,16 +281,13 @@ public class SaslSecPropsDialog extends
             minSsfText.setForeground( display.getSystemColor( color ) );
             saslSecPropsText.setText( saslSecPropsWrapper.toString() );
             okButton.setEnabled( valid );
-        }
-    };
+        };
 
     
     /**
      * The listener for the maxSsf Limit Text
      */
-    private ModifyListener maxSsfListener = new ModifyListener()
-    {
-        public void modifyText( ModifyEvent e )
+    private ModifyListener maxSsfListener = event ->
         {
             Display display = maxSsfText.getDisplay();
             Button okButton = getButton( IDialogConstants.OK_ID );
@@ -341,16 +336,13 @@ public class SaslSecPropsDialog extends
             maxSsfText.setForeground( display.getSystemColor( color ) );
             saslSecPropsText.setText( saslSecPropsWrapper.toString() );
             okButton.setEnabled( valid );
-        }
-    };
+        };
 
     
     /**
      * The listener for the maxBufSize Limit Text
      */
-    private ModifyListener maxBufSizeListener = new ModifyListener()
-    {
-        public void modifyText( ModifyEvent e )
+    private ModifyListener maxBufSizeListener = event ->
         {
             Display display = maxBufSizeText.getDisplay();
             Button okButton = getButton( IDialogConstants.OK_ID );
@@ -399,8 +391,7 @@ public class SaslSecPropsDialog extends
             maxBufSizeText.setForeground( display.getSystemColor( color ) );
             saslSecPropsText.setText( saslSecPropsWrapper.toString() );
             okButton.setEnabled( valid );
-        }
-    };
+        };
 
 
     /**
@@ -432,6 +423,7 @@ public class SaslSecPropsDialog extends
     /**
      * {@inheritDoc}
      */
+    @Override
     protected void configureShell( Shell shell )
     {
         super.configureShell( shell );
@@ -442,15 +434,7 @@ public class SaslSecPropsDialog extends
     /**
      * {@inheritDoc}
      */
-    protected void okPressed()
-    {
-        super.okPressed();
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
+    @Override
     protected Control createDialogArea( Composite parent )
     {
         Composite composite = ( Composite ) super.createDialogArea( parent );



Mime
View raw message