directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1805825 [2/2] - in /directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config: editor/ editor/databases/ editor/overlays/ editor/pages/ jobs/
Date Tue, 22 Aug 2017 20:37:20 GMT
Modified: directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/pages/OverviewPage.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/pages/OverviewPage.java?rev=1805825&r1=1805824&r2=1805825&view=diff
==============================================================================
--- directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/pages/OverviewPage.java (original)
+++ directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/pages/OverviewPage.java Tue Aug 22 20:37:20 2017
@@ -26,7 +26,6 @@ import java.util.List;
 import org.apache.directory.api.util.Strings;
 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.openldap.common.ui.model.LogLevelEnum;
 import org.apache.directory.studio.openldap.common.ui.dialogs.LogLevelDialog;
@@ -38,7 +37,7 @@ import org.apache.directory.studio.openl
 import org.apache.directory.studio.openldap.config.editor.pages.OverlaysPage;
 import org.apache.directory.studio.openldap.config.editor.wrappers.DatabaseWrapper;
 import org.apache.directory.studio.openldap.config.editor.wrappers.DatabaseWrapperLabelProvider;
-import org.apache.directory.studio.openldap.config.editor.wrappers.DatabaseWrapperViewerSorter;
+import org.apache.directory.studio.openldap.config.editor.wrappers.DatabaseWrapperViewerComparator;
 import org.apache.directory.studio.openldap.config.editor.wrappers.ServerIdDecorator;
 import org.apache.directory.studio.openldap.config.editor.wrappers.ServerIdWrapper;
 import org.apache.directory.studio.openldap.config.model.OlcGlobal;
@@ -47,7 +46,6 @@ import org.apache.directory.studio.openl
 import org.eclipse.jface.viewers.ArrayContentProvider;
 import org.eclipse.jface.viewers.TableViewer;
 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;
@@ -125,11 +123,11 @@ public class OverviewPage extends OpenLD
     public static final String ID = OverviewPage.class.getName(); //$NON-NLS-1$
 
     /** The Page Title */
-    private static final String TITLE = Messages.getString( "OpenLDAPOverviewPage.Title" ); //$NON-NLS-1$"Overview";
+    private static final String TITLE = Messages.getString( "OpenLDAPOverviewPage.Title" ); //$NON-NLS-1$
     
     // UI Controls
     /** The serverID wrapper */
-    private List<ServerIdWrapper> serverIdWrappers = new ArrayList<ServerIdWrapper>();
+    private List<ServerIdWrapper> serverIdWrappers = new ArrayList<>();
     
     /** The Widget used to manage ServerID */
     private TableWidget<ServerIdWrapper> serverIdTableWidget;
@@ -151,7 +149,7 @@ public class OverviewPage extends OpenLD
     private TableViewer databaseViewer;
 
     /** The database wrappers */
-    private List<DatabaseWrapper> databaseWrappers = new ArrayList<DatabaseWrapper>();
+    private List<DatabaseWrapper> databaseWrappers = new ArrayList<>();
 
     /** This link opens the Databases configuration tab */ 
     private Hyperlink databasesPageLink;
@@ -160,7 +158,7 @@ public class OverviewPage extends OpenLD
     private TableViewer moduleViewer;
 
     /** The module wrappers */
-    private List<ModuleWrapper> moduleWrappers = new ArrayList<ModuleWrapper>();
+    private List<ModuleWrapper> moduleWrappers = new ArrayList<>();
 
     /** This link opens the Overlays configuration tab */
     private Hyperlink overlaysPageLink;
@@ -181,43 +179,29 @@ public class OverviewPage extends OpenLD
     /**
      * The olcLogFile listener
      */
-    private ModifyListener logFileTextListener = new ModifyListener()
-    {
-        public void modifyText( ModifyEvent e )
-        {
-            getConfiguration().getGlobal().setOlcLogFile( logFileText.getText() );
-        }
-    };
+    private ModifyListener logFileTextListener = event ->
+        getConfiguration().getGlobal().setOlcLogFile( logFileText.getText() );
     
     
     /**
      * The olcConfigDir listener
      */
-    private ModifyListener configDirTextListener = new ModifyListener()
-    {
-        public void modifyText( ModifyEvent e )
-        {
-            getConfiguration().getGlobal().setOlcConfigDir( configDirText.getText() );
-        }
-    };
-    
+    private ModifyListener configDirTextListener = event ->
+        getConfiguration().getGlobal().setOlcConfigDir( configDirText.getText() );
+
     
     /**
      * The olcPidFile listener
      */
-    private ModifyListener pidFileTextListener = new ModifyListener()
-    {
-        public void modifyText( ModifyEvent e )
-        {
-            getConfiguration().getGlobal().setOlcPidFile( pidFileText.getText() );
-        }
-    };
+    private ModifyListener pidFileTextListener = event ->
+        getConfiguration().getGlobal().setOlcPidFile( pidFileText.getText() );
 
     /**
      * The olcLogLevl listener
      */
     private SelectionListener logLevelEditButtonSelectionListener = new SelectionAdapter()
     {
+        @Override
         public void widgetSelected( SelectionEvent e )
         {
             // Creating and opening a LogLevel dialog
@@ -235,7 +219,7 @@ public class OverviewPage extends OpenLD
             {
                 logLevelStr = LogLevelEnum.getLogLevelText( dialog.getLogLevelValue() );
                 logLevelText.setText( logLevelStr );
-                List<String> logLevelList = new ArrayList<String>();
+                List<String> logLevelList = new ArrayList<>();
                 logLevelList.add( logLevelStr );
                 getConfiguration().getGlobal().setOlcLogLevel( logLevelList );
             }
@@ -259,6 +243,7 @@ public class OverviewPage extends OpenLD
      */
     private HyperlinkAdapter databasesPageLinkListener = new HyperlinkAdapter()
     {
+        @Override
         public void linkActivated( HyperlinkEvent e )
         {
             getServerConfigurationEditor().showPage( DatabasesPage.class );
@@ -271,6 +256,7 @@ public class OverviewPage extends OpenLD
      */
     private HyperlinkAdapter overlaysPageLinkListener = new HyperlinkAdapter()
     {
+        @Override
         public void linkActivated( HyperlinkEvent e )
         {
             getServerConfigurationEditor().showPage( OverlaysPage.class );
@@ -283,6 +269,7 @@ public class OverviewPage extends OpenLD
      */
     private HyperlinkAdapter securityPageLinkListener = new HyperlinkAdapter()
     {
+        @Override
         public void linkActivated( HyperlinkEvent e )
         {
             getServerConfigurationEditor().showPage( SecurityPage.class );
@@ -295,6 +282,7 @@ public class OverviewPage extends OpenLD
      */
     private HyperlinkAdapter tuningPageLinkListener = new HyperlinkAdapter()
     {
+        @Override
         public void linkActivated( HyperlinkEvent e )
         {
             getServerConfigurationEditor().showPage( TuningPage.class );
@@ -307,6 +295,7 @@ public class OverviewPage extends OpenLD
      */
     private HyperlinkAdapter schemaPageLinkListener = new HyperlinkAdapter()
     {
+        @Override
         public void linkActivated( HyperlinkEvent e )
         {
             //getServerConfigurationEditor().showPage( SchemaPage.class );
@@ -319,6 +308,7 @@ public class OverviewPage extends OpenLD
      */
     private HyperlinkAdapter optionsPageLinkListener = new HyperlinkAdapter()
     {
+        @Override
         public void linkActivated( HyperlinkEvent e )
         {
             getServerConfigurationEditor().showPage( OptionsPage.class );
@@ -327,14 +317,11 @@ public class OverviewPage extends OpenLD
 
     
     // The listener for the ServerIdTableWidget
-    private WidgetModifyListener serverIdTableWidgetListener = new WidgetModifyListener()
-    {
-        @Override
-        public void widgetModified( WidgetModifyEvent event )
+    private WidgetModifyListener serverIdTableWidgetListener = event ->
         {
             // Process the parameter modification
             TableWidget<ServerIdWrapper> serverIdWrapperTable = (TableWidget<ServerIdWrapper>)event.getSource();
-            List<String> serverIds = new ArrayList<String>();
+            List<String> serverIds = new ArrayList<>();
             
             for ( Object serverIdWrapper : serverIdWrapperTable.getElements() )
             {
@@ -343,8 +330,7 @@ public class OverviewPage extends OpenLD
             }
             
             getConfiguration().getGlobal().setOlcServerID( serverIds );
-        }
-    };
+        };
 
 
     /**
@@ -460,7 +446,7 @@ public class OverviewPage extends OpenLD
         serverIdLabel.setLayoutData( new GridData( SWT.FILL, SWT.FILL, false, false, 5, 1 ) );
 
         // The ServerID widget
-        serverIdTableWidget = new TableWidget<ServerIdWrapper>( new ServerIdDecorator( section.getShell() ) );
+        serverIdTableWidget = new TableWidget<>( new ServerIdDecorator( section.getShell() ) );
 
         serverIdTableWidget.createWidgetWithEdit( globalSectionComposite, toolkit );
         serverIdTableWidget.getControl().setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false, 5, 1 ) );
@@ -543,7 +529,7 @@ public class OverviewPage extends OpenLD
         databaseViewer = new TableViewer( table );
         databaseViewer.setContentProvider( new ArrayContentProvider() );
         databaseViewer.setLabelProvider( new DatabaseWrapperLabelProvider() );
-        databaseViewer.setSorter( new DatabaseWrapperViewerSorter() );
+        databaseViewer.setComparator( new DatabaseWrapperViewerComparator() );
 
         // Databases Page Link
         databasesPageLink = toolkit.createHyperlink( databaseComposite,
@@ -602,7 +588,7 @@ public class OverviewPage extends OpenLD
         moduleViewer = new TableViewer( table );
         moduleViewer.setContentProvider( new ArrayContentProvider() );
         moduleViewer.setLabelProvider( new ModuleWrapperLabelProvider() );
-        moduleViewer.setSorter( new ModuleWrapperViewerSorter() );
+        moduleViewer.setComparator( new ModuleWrapperViewerSorter() );
 
         // Overlays Page Link
         overlaysPageLink = toolkit.createHyperlink( overlayComposite,

Modified: directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/pages/SecurityPage.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/pages/SecurityPage.java?rev=1805825&r1=1805824&r2=1805825&view=diff
==============================================================================
--- directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/pages/SecurityPage.java (original)
+++ directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/pages/SecurityPage.java Tue Aug 22 20:37:20 2017
@@ -24,7 +24,6 @@ import java.util.ArrayList;
 import java.util.List;
 
 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;
@@ -43,7 +42,6 @@ import org.eclipse.ui.forms.widgets.Tabl
 import org.apache.directory.api.util.Strings;
 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.openldap.common.ui.model.PasswordHashEnum;
 import org.apache.directory.studio.openldap.config.editor.OpenLDAPServerConfigurationEditor;
@@ -133,7 +131,7 @@ public class SecurityPage extends OpenLD
     public static final String ID = SecurityPage.class.getName(); //$NON-NLS-1$
 
     /** The Page Title */
-    private static final String TITLE = Messages.getString( "OpenLDAPSecurityPage.Title" ); //$NON-NLS-1$"Overview";"Security";
+    private static final String TITLE = Messages.getString( "OpenLDAPSecurityPage.Title" ); //$NON-NLS-1$
 
     // UI Controls for the TLS part
     /** The olcTLSCACertificateFile Text */
@@ -233,38 +231,27 @@ public class SecurityPage extends OpenLD
     /**
      * The olcLocalSSF listener
      */
-    private ModifyListener localSsfListener = new ModifyListener()
-    {
-        public void modifyText( ModifyEvent e )
+    private ModifyListener localSsfListener = event ->
         {
             if ( !Strings.isEmpty( localSsfText.getText() ) )
             {
                 getConfiguration().getGlobal().setOlcLocalSSF( Integer.valueOf( localSsfText.getText() ) );
             }
-        }
-    };
-    
+        };    
     
     /**
      * The olcPasswordCryptSaltFormat listener
      */
-    private ModifyListener passwordCryptSaltFormatListener = new ModifyListener()
-    {
-        public void modifyText( ModifyEvent e )
-        {
-            getConfiguration().getGlobal().setOlcPasswordCryptSaltFormat( passwordCryptSaltFormatText.getText() );
-        }
-    };
+    private ModifyListener passwordCryptSaltFormatListener = event ->
+        getConfiguration().getGlobal().setOlcPasswordCryptSaltFormat( passwordCryptSaltFormatText.getText() );
     
     
     /**
      * The olcPasswordHash listener
      */
-    private WidgetModifyListener passwordHashListener = new WidgetModifyListener()
-    {
-        public void widgetModified( WidgetModifyEvent e )
+    private WidgetModifyListener passwordHashListener = event -> 
         {
-            List<String> passwordHashes = new ArrayList<String>();
+            List<String> passwordHashes = new ArrayList<>();
             
             for ( PasswordHashEnum passwordHash : passwordHashTableWidget.getElements() )
             {
@@ -272,18 +259,15 @@ public class SecurityPage extends OpenLD
             }
             
             getConfiguration().getGlobal().setOlcPasswordHash( passwordHashes );
-        }
-    };
+        };
     
     
     /**
      * The olcSecurity listener
      */
-    private WidgetModifyListener securityListener = new WidgetModifyListener()
-    {
-        public void widgetModified( WidgetModifyEvent e )
+    private WidgetModifyListener securityListener = event ->
         {
-            List<String> ssfWrappers = new ArrayList<String>();
+            List<String> ssfWrappers = new ArrayList<>();
             
             for ( SsfWrapper ssfWrapper : securityTableWidget.getElements() )
             {
@@ -291,80 +275,49 @@ public class SecurityPage extends OpenLD
             }
             
             getConfiguration().getGlobal().setOlcSecurity( ssfWrappers );
-        }
-    };
+        };
 
     
     /**
      * The olcTlsCertificateFile listener
      */
-    private ModifyListener tlsCertificateFileTextListener = new ModifyListener()
-    {
-        public void modifyText( ModifyEvent e )
-        {
-            getConfiguration().getGlobal().setOlcTLSCertificateFile( tlsCertificateFileText.getText() );
-        }
-    };
+    private ModifyListener tlsCertificateFileTextListener = event ->
+        getConfiguration().getGlobal().setOlcTLSCertificateFile( tlsCertificateFileText.getText() );
     
     
     /**
      * The olcTlsCertificateKeyFile listener
      */
-    private ModifyListener tlsCertificateKeyFileTextListener = new ModifyListener()
-    {
-        public void modifyText( ModifyEvent e )
-        {
-            getConfiguration().getGlobal().setOlcTLSCertificateKeyFile( tlsCertificateKeyFileText.getText() );
-        }
-    };
+    private ModifyListener tlsCertificateKeyFileTextListener = event ->
+        getConfiguration().getGlobal().setOlcTLSCertificateKeyFile( tlsCertificateKeyFileText.getText() );
     
     
     /**
      * The olcTlsCACertificateFile listener
      */
-    private ModifyListener tlsCaCertificateFileTextListener = new ModifyListener()
-    {
-        public void modifyText( ModifyEvent e )
-        {
-            getConfiguration().getGlobal().setOlcTLSCACertificateFile( tlsCaCertificateFileText.getText() );
-        }
-    };
+    private ModifyListener tlsCaCertificateFileTextListener = event ->
+        getConfiguration().getGlobal().setOlcTLSCACertificateFile( tlsCaCertificateFileText.getText() );
     
     
     /**
      * The olcTlsCACertificatePath listener
      */
-    private ModifyListener tlsCaCertificatePathTextListener = new ModifyListener()
-    {
-        public void modifyText( ModifyEvent e )
-        {
-            getConfiguration().getGlobal().setOlcTLSCACertificatePath( tlsCaCertificatePathText.getText() );
-        }
-    };
+    private ModifyListener tlsCaCertificatePathTextListener = event ->
+        getConfiguration().getGlobal().setOlcTLSCACertificatePath( tlsCaCertificatePathText.getText() );
     
     
     /**
      * The olcTlsCipherSuite listener
      */
-    private ModifyListener tlsCipherSuiteTextListener = new ModifyListener()
-    {
-        public void modifyText( ModifyEvent e )
-        {
-            getConfiguration().getGlobal().setOlcTLSCipherSuite( tlsCipherSuiteText.getText() );
-        }
-    };
+    private ModifyListener tlsCipherSuiteTextListener = event ->
+        getConfiguration().getGlobal().setOlcTLSCipherSuite( tlsCipherSuiteText.getText() );
     
     
     /**
      * The olcTlsCrlFile listener
      */
-    private ModifyListener tlsCrlFileTextListener = new ModifyListener()
-    {
-        public void modifyText( ModifyEvent e )
-        {
-            getConfiguration().getGlobal().setOlcTLSCRLFile( tlsCrlFileText.getText() );
-        }
-    };
+    private ModifyListener tlsCrlFileTextListener = event ->
+        getConfiguration().getGlobal().setOlcTLSCRLFile( tlsCrlFileText.getText() );
     
     
     /**
@@ -372,6 +325,7 @@ public class SecurityPage extends OpenLD
      */
     private SelectionListener tlsCrlCheckComboListener = new SelectionAdapter()
     {
+        @Override
         public void widgetSelected( SelectionEvent e )
         {
             getConfiguration().getGlobal().setOlcTLSCRLCheck( tlsCrlCheckCombo.getText() );
@@ -382,25 +336,15 @@ public class SecurityPage extends OpenLD
     /**
      * The olcTlsDhParamFile listener
      */
-    private ModifyListener tlsDhParamFileTextListener = new ModifyListener()
-    {
-        public void modifyText( ModifyEvent e )
-        {
-            getConfiguration().getGlobal().setOlcTLSDHParamFile(  tlsDhParamFileText.getText() );
-        }
-    };
+    private ModifyListener tlsDhParamFileTextListener = event ->
+        getConfiguration().getGlobal().setOlcTLSDHParamFile(  tlsDhParamFileText.getText() );
     
     
     /**
      * The olcTlsRandFile listener
      */
-    private ModifyListener tlsRandFileTextListener = new ModifyListener()
-    {
-        public void modifyText( ModifyEvent e )
-        {
-            getConfiguration().getGlobal().setOlcTLSRandFile(  tlsRandFileText.getText() );
-        }
-    };
+    private ModifyListener tlsRandFileTextListener = event ->
+        getConfiguration().getGlobal().setOlcTLSRandFile(  tlsRandFileText.getText() );
     
     
     /**
@@ -408,6 +352,7 @@ public class SecurityPage extends OpenLD
      */
     private SelectionListener tlsProtocolMinComboListener = new SelectionAdapter()
     {
+        @Override
         public void widgetSelected( SelectionEvent e )
         {
             getConfiguration().getGlobal().setOlcTLSProtocolMin( tlsProtocolMinCombo.getText() );
@@ -420,6 +365,7 @@ public class SecurityPage extends OpenLD
      */
     private SelectionListener tlsVerifyClientComboListener = new SelectionAdapter()
     {
+        @Override
         public void widgetSelected( SelectionEvent e )
         {
             getConfiguration().getGlobal().setOlcTLSVerifyClient( tlsVerifyClientCombo.getText() );
@@ -430,37 +376,22 @@ public class SecurityPage extends OpenLD
     /**
      * The olcSaslAuxProps listener
      */
-    private ModifyListener saslAuxPropsTextListener = new ModifyListener()
-    {
-        public void modifyText( ModifyEvent e )
-        {
-            getConfiguration().getGlobal().setOlcSaslAuxprops( saslAuxPropsText.getText() );
-        }
-    };
+    private ModifyListener saslAuxPropsTextListener = event ->
+        getConfiguration().getGlobal().setOlcSaslAuxprops( saslAuxPropsText.getText() );
     
     
     /**
      * The olcSaslHost listener
      */
-    private ModifyListener saslHostTextListener = new ModifyListener()
-    {
-        public void modifyText( ModifyEvent e )
-        {
-            getConfiguration().getGlobal().setOlcSaslHost( saslHostText.getText() );
-        }
-    };
+    private ModifyListener saslHostTextListener = event ->
+        getConfiguration().getGlobal().setOlcSaslHost( saslHostText.getText() );
     
     
     /**
      * The olcSaslrealm listener
      */
-    private ModifyListener saslRealmTextListener = new ModifyListener()
-    {
-        public void modifyText( ModifyEvent e )
-        {
-            getConfiguration().getGlobal().setOlcSaslRealm( saslRealmText.getText() );
-        }
-    };
+    private ModifyListener saslRealmTextListener = event ->
+        getConfiguration().getGlobal().setOlcSaslRealm( saslRealmText.getText() );
     
     
     /**
@@ -468,6 +399,7 @@ public class SecurityPage extends OpenLD
      */
     private SelectionListener saslSecPropsEditSelectionListener = new SelectionAdapter()
     {
+        @Override
         public void widgetSelected( SelectionEvent e )
         {
             SaslSecPropsDialog dialog = new SaslSecPropsDialog( saslSecPropsText.getShell(), saslSecPropsText.getText() );
@@ -782,7 +714,7 @@ public class SecurityPage extends OpenLD
         Label passwordHashLabel = toolkit.createLabel( miscSectionComposite, Messages.getString( "OpenLDAPSecurityPage.PasswordHash" ) ); //$NON-NLS-1$
         passwordHashLabel.setLayoutData( new GridData( SWT.FILL, SWT.FILL, false, false, 4, 1 ) );
         
-        passwordHashTableWidget = new TableWidget<PasswordHashEnum>( new PasswordHashDecorator( miscSectionComposite.getShell() ) );
+        passwordHashTableWidget = new TableWidget<>( new PasswordHashDecorator( miscSectionComposite.getShell() ) );
 
         passwordHashTableWidget.createWidgetNoEdit( miscSectionComposite, toolkit );
         passwordHashTableWidget.getControl().setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false, 4, 1 ) );
@@ -798,7 +730,7 @@ public class SecurityPage extends OpenLD
         Label securityLabel = toolkit.createLabel( miscSectionComposite, Messages.getString( "OpenLDAPSecurityPage.Security" ) ); //$NON-NLS-1$
         securityLabel.setLayoutData( new GridData( SWT.FILL, SWT.FILL, false, false, 4, 1 ) );
         
-        securityTableWidget = new TableWidget<SsfWrapper>( new SsfDecorator( miscSectionComposite.getShell() ) );
+        securityTableWidget = new TableWidget<>( new SsfDecorator( miscSectionComposite.getShell() ) );
 
         securityTableWidget.createWidgetWithEdit( miscSectionComposite, toolkit );
         securityTableWidget.getControl().setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false, 4, 1 ) );
@@ -950,7 +882,7 @@ public class SecurityPage extends OpenLD
 
             // Password Hash Table Widget
             List<String> passwordHashes = global.getOlcPasswordHash();
-            List<PasswordHashEnum> hashes = new ArrayList<PasswordHashEnum>();
+            List<PasswordHashEnum> hashes = new ArrayList<>();
 
             if ( passwordHashes != null )
             {
@@ -964,7 +896,7 @@ public class SecurityPage extends OpenLD
 
             // Security Table Widget
             List<String> features = global.getOlcSecurity();
-            List<SsfWrapper> ssfWrappers = new ArrayList<SsfWrapper>();
+            List<SsfWrapper> ssfWrappers = new ArrayList<>();
 
             if ( features != null )
             {

Modified: directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/pages/TuningPage.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/pages/TuningPage.java?rev=1805825&r1=1805824&r2=1805825&view=diff
==============================================================================
--- directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/pages/TuningPage.java (original)
+++ directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/pages/TuningPage.java Tue Aug 22 20:37:20 2017
@@ -24,7 +24,6 @@ import java.util.ArrayList;
 import java.util.List;
 
 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;
@@ -44,14 +43,10 @@ import org.eclipse.ui.forms.widgets.Tabl
 import org.apache.directory.studio.common.ui.CommonUIUtils;
 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.openldap.common.ui.model.RequireConditionEnum;
 import org.apache.directory.studio.openldap.config.editor.OpenLDAPServerConfigurationEditor;
 import org.apache.directory.studio.openldap.config.editor.dialogs.OverlayDialog;
 import org.apache.directory.studio.openldap.config.editor.dialogs.SizeLimitDialog;
-import org.apache.directory.studio.openldap.config.editor.dialogs.TimeLimitDialog;
 import org.apache.directory.studio.openldap.config.editor.wrappers.LimitWrapper;
 import org.apache.directory.studio.openldap.config.editor.wrappers.TcpBufferDecorator;
 import org.apache.directory.studio.openldap.config.editor.wrappers.TcpBufferWrapper;
@@ -219,9 +214,7 @@ public class TuningPage extends OpenLDAP
     /**
      * The listener for the sockbufMaxIncomingText Text
      */
-    private ModifyListener sockbufMaxIncomingTextListener = new ModifyListener()
-    {
-        public void modifyText( ModifyEvent e )
+    private ModifyListener sockbufMaxIncomingTextListener = event ->
         {
             Display display = sockbufMaxIncomingText.getDisplay();
 
@@ -244,16 +237,13 @@ public class TuningPage extends OpenLDAP
                 // Not even a number
                 sockbufMaxIncomingText.setForeground( display.getSystemColor( SWT.COLOR_RED ) );
             }
-        }
-    };
+        };
     
     
     /**
      * The listener for the sockbufMaxIncomingAuthText Text
      */
-    private ModifyListener sockbufMaxIncomingAuthTextListener = new ModifyListener()
-    {
-        public void modifyText( ModifyEvent e )
+    private ModifyListener sockbufMaxIncomingAuthTextListener = event ->
         {
             Display display = sockbufMaxIncomingAuthText.getDisplay();
 
@@ -277,16 +267,13 @@ public class TuningPage extends OpenLDAP
                 // Not even a number
                 sockbufMaxIncomingAuthText.setForeground( display.getSystemColor( SWT.COLOR_RED ) );
             }
-        }
-    };
+        };
     
     
     /**
      * The listener for the concurrencyText Text
      */
-    private ModifyListener concurrencyTextListener = new ModifyListener()
-    {
-        public void modifyText( ModifyEvent e )
+    private ModifyListener concurrencyTextListener = event ->
         {
             Display display = concurrencyText.getDisplay();
 
@@ -309,16 +296,13 @@ public class TuningPage extends OpenLDAP
                 // Not even a number
                 concurrencyText.setForeground( display.getSystemColor( SWT.COLOR_RED ) );
             }
-        }
-    };
+        };
     
     
     /**
      * The listener for the connMaxPendingText Text
      */
-    private ModifyListener connMaxPendingTextListener = new ModifyListener()
-    {
-        public void modifyText( ModifyEvent e )
+    private ModifyListener connMaxPendingTextListener = event ->
         {
             Display display = connMaxPendingText.getDisplay();
 
@@ -341,16 +325,13 @@ public class TuningPage extends OpenLDAP
                 // Not even a number
                 connMaxPendingText.setForeground( display.getSystemColor( SWT.COLOR_RED ) );
             }
-        }
-    };
+        };
     
     
     /**
      * The listener for the connMaxPendingAuthText Text
      */
-    private ModifyListener connMaxPendingAuthTextListener = new ModifyListener()
-    {
-        public void modifyText( ModifyEvent e )
+    private ModifyListener connMaxPendingAuthTextListener = event ->
         {
             Display display = connMaxPendingAuthText.getDisplay();
 
@@ -373,16 +354,13 @@ public class TuningPage extends OpenLDAP
                 // Not even a number
                 connMaxPendingAuthText.setForeground( display.getSystemColor( SWT.COLOR_RED ) );
             }
-        }
-    };
+        };
     
     
     /**
      * The listener for the listenerThreadsText Text
      */
-    private ModifyListener listenerThreadsTextListener = new ModifyListener()
-    {
-        public void modifyText( ModifyEvent e )
+    private ModifyListener listenerThreadsTextListener = event ->
         {
             Display display = listenerThreadsText.getDisplay();
 
@@ -405,16 +383,13 @@ public class TuningPage extends OpenLDAP
                 // Not even a number
                 listenerThreadsText.setForeground( display.getSystemColor( SWT.COLOR_RED ) );
             }
-        }
-    };
+        };
     
     
     /**
      * The listener for the ThreadsText Text
      */
-    private ModifyListener threadsTextListener = new ModifyListener()
-    {
-        public void modifyText( ModifyEvent e )
+    private ModifyListener threadsTextListener = event ->
         {
             Display display = threadsText.getDisplay();
 
@@ -437,16 +412,13 @@ public class TuningPage extends OpenLDAP
                 // Not even a number
                 threadsText.setForeground( display.getSystemColor( SWT.COLOR_RED ) );
             }
-        }
-    };
+        };
     
     
     /**
      * The listener for the ToolThreadsText Text
      */
-    private ModifyListener toolThreadsTextListener = new ModifyListener()
-    {
-        public void modifyText( ModifyEvent e )
+    private ModifyListener toolThreadsTextListener = event ->
         {
             Display display = toolThreadsText.getDisplay();
 
@@ -469,16 +441,13 @@ public class TuningPage extends OpenLDAP
                 // Not even a number
                 toolThreadsText.setForeground( display.getSystemColor( SWT.COLOR_RED ) );
             }
-        }
-    };
+        };
     
     
     /**
      * The listener for the IndexIntLenText Text
      */
-    private ModifyListener indexIntLenTextListener = new ModifyListener()
-    {
-        public void modifyText( ModifyEvent e )
+    private ModifyListener indexIntLenTextListener = event ->
         {
             Display display = indexIntLenText.getDisplay();
 
@@ -501,16 +470,13 @@ public class TuningPage extends OpenLDAP
                 // Not even a number
                 indexIntLenText.setForeground( display.getSystemColor( SWT.COLOR_RED ) );
             }
-        }
-    };
+        };
     
     
     /**
      * The listener for the IndexSubstrAnyLenText Text
      */
-    private ModifyListener indexSubstrAnyLenTextListener = new ModifyListener()
-    {
-        public void modifyText( ModifyEvent e )
+    private ModifyListener indexSubstrAnyLenTextListener = event ->
         {
             Display display = indexSubstrAnyLenText.getDisplay();
 
@@ -533,16 +499,13 @@ public class TuningPage extends OpenLDAP
                 // Not even a number
                 indexSubstrAnyLenText.setForeground( display.getSystemColor( SWT.COLOR_RED ) );
             }
-        }
-    };
+        };
     
     
     /**
      * The listener for the IndexSubstrAnyStepText Text
      */
-    private ModifyListener indexSubstrAnyStepTextListener = new ModifyListener()
-    {
-        public void modifyText( ModifyEvent e )
+    private ModifyListener indexSubstrAnyStepTextListener = event ->
         {
             Display display = indexSubstrAnyStepText.getDisplay();
 
@@ -565,16 +528,13 @@ public class TuningPage extends OpenLDAP
                 // Not even a number
                 indexSubstrAnyStepText.setForeground( display.getSystemColor( SWT.COLOR_RED ) );
             }
-        }
-    };
+        };
     
     
     /**
      * The listener for the IndexSubstrIfMaxLenText Text
      */
-    private ModifyListener indexSubstrIfMaxLenTextListener = new ModifyListener()
-    {
-        public void modifyText( ModifyEvent e )
+    private ModifyListener indexSubstrIfMaxLenTextListener = event ->
         {
             Display display = indexSubstrIfMaxLenText.getDisplay();
 
@@ -597,16 +557,13 @@ public class TuningPage extends OpenLDAP
                 // Not even a number
                 indexSubstrIfMaxLenText.setForeground( display.getSystemColor( SWT.COLOR_RED ) );
             }
-        }
-    };
+        };
     
     
     /**
      * The listener for the IndexSubstrIfMinLenText Text
      */
-    private ModifyListener indexSubstrIfMinLenTextListener = new ModifyListener()
-    {
-        public void modifyText( ModifyEvent e )
+    private ModifyListener indexSubstrIfMinLenTextListener = event ->
         {
             Display display = indexSubstrIfMinLenText.getDisplay();
 
@@ -629,16 +586,13 @@ public class TuningPage extends OpenLDAP
                 // Not even a number
                 indexSubstrIfMinLenText.setForeground( display.getSystemColor( SWT.COLOR_RED ) );
             }
-        }
-    };
+        };
     
     
     /**
      * The listener for the writeTimeout Text
      */
-    private ModifyListener writeTimeoutTextListener = new ModifyListener()
-    {
-        public void modifyText( ModifyEvent e )
+    private ModifyListener writeTimeoutTextListener = event ->
         {
             Display display = writeTimeoutText.getDisplay();
 
@@ -661,16 +615,13 @@ public class TuningPage extends OpenLDAP
                 // Not even a number
                 writeTimeoutText.setForeground( display.getSystemColor( SWT.COLOR_RED ) );
             }
-        }
-    };
+        };
     
     
     /**
      * The listener for the idleTimeout Text
      */
-    private ModifyListener idleTimeoutTextListener = new ModifyListener()
-    {
-        public void modifyText( ModifyEvent e )
+    private ModifyListener idleTimeoutTextListener = event ->
         {
             Display display = idleTimeoutText.getDisplay();
 
@@ -693,15 +644,12 @@ public class TuningPage extends OpenLDAP
                 // Not even a number
                 idleTimeoutText.setForeground( display.getSystemColor( SWT.COLOR_RED ) );
             }
-        }
-    };
+        };
     
     
-    private WidgetModifyListener timeLimitTableListener = new WidgetModifyListener()
-    {
-        public void widgetModified( WidgetModifyEvent e )
+    private WidgetModifyListener timeLimitTableListener = event ->
         {
-            List<String> timeLimits = new ArrayList<String>();
+            List<String> timeLimits = new ArrayList<>();
             
             for ( LimitWrapper limitWrapper : timeLimitTableViewer.getElements() )
             {
@@ -709,8 +657,7 @@ public class TuningPage extends OpenLDAP
             }
             
             getConfiguration().getGlobal().setOlcTimeLimit( timeLimits );
-        }
-    };
+        };
     
     
     /**
@@ -718,6 +665,7 @@ public class TuningPage extends OpenLDAP
      */
     private SelectionListener sizeLimitEditSelectionListener = new SelectionAdapter()
     {
+        @Override
         public void widgetSelected( SelectionEvent e )
         {
             SizeLimitDialog dialog = new SizeLimitDialog( sizeLimitText.getShell(), sizeLimitText.getText() );
@@ -737,14 +685,11 @@ public class TuningPage extends OpenLDAP
     
     
     // The listener for the TcpBufferTableWidget
-    private WidgetModifyListener tcpBufferTableWidgetListener = new WidgetModifyListener()
-    {
-        @Override
-        public void widgetModified( WidgetModifyEvent event )
+    private WidgetModifyListener tcpBufferTableWidgetListener = event ->
         {
             // Process the parameter modification
             TableWidget<TcpBufferWrapper> tcpBufferWrapperTable = (TableWidget<TcpBufferWrapper>)event.getSource();
-            List<String> tcpBuffers = new ArrayList<String>();
+            List<String> tcpBuffers = new ArrayList<>();
             
             for ( Object tcpBufferWrapper : tcpBufferWrapperTable.getElements() )
             {
@@ -753,8 +698,7 @@ public class TuningPage extends OpenLDAP
             }
             
             getConfiguration().getGlobal().setOlcTCPBuffer( tcpBuffers );
-        }
-    };
+        };
     
     
     /**
@@ -859,7 +803,7 @@ public class TuningPage extends OpenLDAP
         serverIdLabel.setLayoutData( new GridData( SWT.FILL, SWT.FILL, false, false, 2, 1 ) );
 
         // The TCPBuffers widget
-        tcpBufferTableWidget = new TableWidget<TcpBufferWrapper>( new TcpBufferDecorator( networkSectionComposite.getShell() ) );
+        tcpBufferTableWidget = new TableWidget<>( new TcpBufferDecorator( networkSectionComposite.getShell() ) );
 
         tcpBufferTableWidget.createWidgetWithEdit( networkSectionComposite, toolkit );
         tcpBufferTableWidget.getControl().setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false, 4, 1 ) );
@@ -993,8 +937,6 @@ public class TuningPage extends OpenLDAP
         writeTimeoutText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, false, false ) );
         // Attach a listener to check the value
         writeTimeoutText.addModifyListener( writeTimeoutTextListener );
-        //toolkit.createLabel( ldapLimitSectionComposite, "" );
-        //toolkit.createLabel( ldapLimitSectionComposite, "" );
         
         // The olcIdleTimeout parameter.
         toolkit.createLabel( ldapLimitSectionComposite, 
@@ -1003,8 +945,6 @@ public class TuningPage extends OpenLDAP
         idleTimeoutText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, false, false ) );
         // Attach a listener to check the value
         idleTimeoutText.addModifyListener( idleTimeoutTextListener );
-        //toolkit.createLabel( ldapLimitSectionComposite, "" );
-        //toolkit.createLabel( ldapLimitSectionComposite, "" );
         
         // The olcSizeLimit parameter.
         toolkit.createLabel( ldapLimitSectionComposite, 
@@ -1027,25 +967,11 @@ public class TuningPage extends OpenLDAP
         // The olcTimeLimit parameter.
         toolkit.createLabel( ldapLimitSectionComposite, 
             Messages.getString( "OpenLDAPTuningPage.TimeLimit" ) ); //$NON-NLS-1$
-        timeLimitTableViewer = new TableWidget<TimeLimitWrapper>( new TimeLimitDecorator( ldapLimitSectionComposite.getShell() ) );
+        timeLimitTableViewer = new TableWidget<>( new TimeLimitDecorator( ldapLimitSectionComposite.getShell() ) );
 
         timeLimitTableViewer.createWidgetWithEdit( ldapLimitSectionComposite, toolkit );
         timeLimitTableViewer.getControl().setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false, 4, 1 ) );
         timeLimitTableViewer.addWidgetModifyListener( timeLimitTableListener );
-
-        /*
-        toolkit.createLabel( ldapLimitSectionComposite, 
-            Messages.getString( "OpenLDAPTuningPage.TimeLimit" ) ); //$NON-NLS-1$
-        timeLimitText = toolkit.createText( ldapLimitSectionComposite, "" );
-        timeLimitText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false, 2, 1 ) );
-        timeLimitText.setEditable( false );
-
-        // The TimeLimit edit button
-        timeLimitEditButton = BaseWidgetUtils.createButton( ldapLimitSectionComposite, 
-            Messages.getString( "OpenLDAPSecurityPage.Edit" ), 1 );
-        timeLimitEditButton.setLayoutData( new GridData( SWT.RIGHT, SWT.CENTER, false, false ) );
-        timeLimitEditButton.addSelectionListener( timeLimitEditSelectionListener );
-        */
     }
 
     
@@ -1116,7 +1042,7 @@ public class TuningPage extends OpenLDAP
      */
     private List<TcpBufferWrapper> createTcpBufferList( List<String> tcpBufferList )
     {
-        List<TcpBufferWrapper> tcpBufferWrapperList = new ArrayList<TcpBufferWrapper>();
+        List<TcpBufferWrapper> tcpBufferWrapperList = new ArrayList<>();
         
         for ( String tcpBuffer : tcpBufferList )
         {
@@ -1200,9 +1126,9 @@ public class TuningPage extends OpenLDAP
     
             // TimeLimit Text Text
             List<String> timeLimitList = getConfiguration().getGlobal().getOlcTimeLimit();
-            List<TimeLimitWrapper> limitWrappers = new ArrayList<TimeLimitWrapper>();
+            List<TimeLimitWrapper> limitWrappers = new ArrayList<>();
 
-            if ( ( timeLimitList != null ) && ( timeLimitList.size() > 0 ) )
+            if ( ( timeLimitList != null ) && !timeLimitList.isEmpty() )
             {
                 for ( String timeLimit : timeLimitList )
                 {

Modified: directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/jobs/EntryBasedConfigurationPartition.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/jobs/EntryBasedConfigurationPartition.java?rev=1805825&r1=1805824&r2=1805825&view=diff
==============================================================================
--- directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/jobs/EntryBasedConfigurationPartition.java (original)
+++ directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/jobs/EntryBasedConfigurationPartition.java Tue Aug 22 20:37:20 2017
@@ -22,8 +22,6 @@ package org.apache.directory.studio.open
 
 import java.util.UUID;
 
-import javax.naming.InvalidNameException;
-
 import org.apache.directory.api.ldap.model.constants.SchemaConstants;
 import org.apache.directory.api.ldap.model.entry.Entry;
 import org.apache.directory.api.ldap.model.exception.LdapException;
@@ -40,10 +38,6 @@ import org.apache.directory.server.core.
  */
 public class EntryBasedConfigurationPartition extends AbstractLdifPartition
 {
-    /** The suffix DN */
-    protected Dn suffixDn;
-
-
     /**
      * Creates a new instance of EntryBasedConfigurationPartition.
      *
@@ -60,7 +54,8 @@ public class EntryBasedConfigurationPart
     /**
      * {@inheritDoc}
      */
-    protected void doInit() throws InvalidNameException, Exception
+    @Override
+    protected void doInit() throws Exception
     {
         setId( "config" );
         setSuffixDn( new Dn( "cn=config" ) );

Modified: directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/jobs/LoadConfigurationRunnable.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/jobs/LoadConfigurationRunnable.java?rev=1805825&r1=1805824&r2=1805825&view=diff
==============================================================================
--- directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/jobs/LoadConfigurationRunnable.java (original)
+++ directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/jobs/LoadConfigurationRunnable.java Tue Aug 22 20:37:20 2017
@@ -96,13 +96,7 @@ public class LoadConfigurationRunnable i
             
             if ( configuration != null )
             {
-                Display.getDefault().asyncExec( new Runnable()
-                {
-                    public void run()
-                    {
-                        editor.configurationLoaded( configuration );
-                    }
-                } );
+                Display.getDefault().asyncExec( () -> editor.configurationLoaded( configuration ) );
             }
         }
         catch ( Exception e )
@@ -113,13 +107,7 @@ public class LoadConfigurationRunnable i
             // Reporting the error to the editor
             final Exception exception = e;
             
-            Display.getDefault().asyncExec( new Runnable()
-            {
-                public void run()
-                {
-                    editor.configurationLoadFailed( exception );
-                }
-            } );
+            Display.getDefault().asyncExec( () -> editor.configurationLoadFailed( exception ) );
         }
     }
 

Modified: directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/jobs/PartitionsDiffComputer.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/jobs/PartitionsDiffComputer.java?rev=1805825&r1=1805824&r2=1805825&view=diff
==============================================================================
--- directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/jobs/PartitionsDiffComputer.java (original)
+++ directory/studio/branches/studio-value/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/jobs/PartitionsDiffComputer.java Tue Aug 22 20:37:20 2017
@@ -55,6 +55,11 @@ import org.apache.directory.server.core.
  */
 public class PartitionsDiffComputer
 {
+    private PartitionsDiffComputer()
+    {
+        // Nothing to do
+    }
+    
     /**
      * Compute the difference between two partitions :
      * <ul>
@@ -182,7 +187,7 @@ public class PartitionsDiffComputer
         Dn baseDn, String[] attributeIds ) throws PartitionsDiffException
     {
         // Creating the list containing all the modifications
-        List<LdifEntry> modifications = new ArrayList<LdifEntry>();
+        List<LdifEntry> modifications = new ArrayList<>();
 
         try
         {
@@ -196,7 +201,7 @@ public class PartitionsDiffComputer
 
             // Creating the list containing all the original entries to be processed
             // and adding it the original base entry. This is done going down the tree.
-            List<Entry> originalEntries = new ArrayList<Entry>();
+            List<Entry> originalEntries = new ArrayList<>();
             originalEntries.add( originalBaseEntry );
 
             // Looping until all original entries are being processed. We will read all the children,
@@ -204,7 +209,7 @@ public class PartitionsDiffComputer
             // at every iteration. When we have processed all the tree in depth, we should not have 
             // any left entries in the list.
             // We don't dereference aliases and referrals.
-            while ( originalEntries.size() > 0 )
+            while ( !originalEntries.isEmpty() )
             {
                 // Getting the first original entry from the list
                 Entry originalEntry = originalEntries.remove( 0 );
@@ -247,8 +252,7 @@ public class PartitionsDiffComputer
                 if ( modificationEntryChangeType != ChangeType.None )
                 {
                     if ( modificationEntryChangeType == ChangeType.Delete
-                        || ( modificationEntryChangeType == ChangeType.Modify && ldifEntry
-                            .getModifications().size() > 0 ) )
+                        || ( modificationEntryChangeType == ChangeType.Modify && !ldifEntry.getModifications().isEmpty() ) )
                     {
                         // Adding the modification entry to the list
                         modifications.add( ldifEntry );
@@ -282,11 +286,11 @@ public class PartitionsDiffComputer
 
             // Creating the list containing all the destination entries to be processed
             // and adding it the destination base entry
-            List<Entry> modifiedEntries = new ArrayList<Entry>();
+            List<Entry> modifiedEntries = new ArrayList<>();
             modifiedEntries.add( originalBaseEntry );
 
             // Looping until all modified entries are being processed
-            while ( modifiedEntries.size() > 0 )
+            while ( !modifiedEntries.isEmpty() )
             {
                 // Getting the first modification entry from the list
                 Entry modifiedEntry = modifiedEntries.remove( 0 );
@@ -345,7 +349,7 @@ public class PartitionsDiffComputer
      */
     private static List<LdifEntry> deleteEntry( Partition originalPartition, Dn parentDn ) throws LdapException, ParseException, CursorException
     {
-        List<LdifEntry> deletions = new ArrayList<LdifEntry>();
+        List<LdifEntry> deletions = new ArrayList<>();
         
         // Lookup for the children
         SearchOperationContext soc = new SearchOperationContext( null, parentDn,



Mime
View raw message