directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1692993 - in /directory/studio/trunk/plugins/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor: actions/AbstractOpenValueEditorAction.java reconciler/LdifReconcilingStrategy.java
Date Tue, 28 Jul 2015 04:59:08 GMT
Author: elecharny
Date: Tue Jul 28 04:59:08 2015
New Revision: 1692993

URL: http://svn.apache.org/r1692993
Log:
o Removed useless checked on x != null when && ( x instanceof X )
o Same for check of x == null when && !( x instanceof X )

Modified:
    directory/studio/trunk/plugins/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/AbstractOpenValueEditorAction.java
    directory/studio/trunk/plugins/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/reconciler/LdifReconcilingStrategy.java

Modified: directory/studio/trunk/plugins/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/AbstractOpenValueEditorAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/AbstractOpenValueEditorAction.java?rev=1692993&r1=1692992&r2=1692993&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/AbstractOpenValueEditorAction.java
(original)
+++ directory/studio/trunk/plugins/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/AbstractOpenValueEditorAction.java
Tue Jul 28 04:59:08 2015
@@ -87,11 +87,12 @@ public abstract class AbstractOpenValueE
                 cellEditor.activate();
                 Object newValue = cellEditor.getValue();
 
-                if ( newValue != null && newValue instanceof String || newValue instanceof
byte[] )
+                if ( ( newValue instanceof String ) || ( newValue instanceof byte[] ) )
                 {
                     IDocument document = editor.getDocumentProvider().getDocument( editor.getEditorInput()
);
 
                     LdifValueLineBase newLine;
+                    
                     if ( line instanceof LdifControlLine )
                     {
                         LdifControlLine oldControlLine = ( LdifControlLine ) line;

Modified: directory/studio/trunk/plugins/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/reconciler/LdifReconcilingStrategy.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/reconciler/LdifReconcilingStrategy.java?rev=1692993&r1=1692992&r2=1692993&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/reconciler/LdifReconcilingStrategy.java
(original)
+++ directory/studio/trunk/plugins/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/reconciler/LdifReconcilingStrategy.java
Tue Jul 28 04:59:08 2015
@@ -109,7 +109,7 @@ public class LdifReconcilingStrategy imp
 
                 // notify outline
                 IContentOutlinePage outline = ( IContentOutlinePage ) editor.getAdapter(
IContentOutlinePage.class );
-                if ( outline != null && outline instanceof LdifOutlinePage )
+                if ( outline instanceof LdifOutlinePage )
                 {
                     ( ( LdifOutlinePage ) outline ).refresh();
                 }



Mime
View raw message