directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1734037 - /directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/entryeditors/EntryEditorManager.java
Date Tue, 08 Mar 2016 08:58:19 GMT
Author: elecharny
Date: Tue Mar  8 08:58:19 2016
New Revision: 1734037

URL: http://svn.apache.org/viewvc?rev=1734037&view=rev
Log:
Fixed a potential NPE

Modified:
    directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/entryeditors/EntryEditorManager.java

Modified: directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/entryeditors/EntryEditorManager.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/entryeditors/EntryEditorManager.java?rev=1734037&r1=1734036&r2=1734037&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/entryeditors/EntryEditorManager.java
(original)
+++ directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/entryeditors/EntryEditorManager.java
Tue Mar  8 08:58:19 2016
@@ -358,17 +358,22 @@ public class EntryEditorManager
                 for ( IEditorReference ref : activePage.getEditorReferences() )
                 {
                     IEntryEditor editor = getEntryEditor( ref );
-                    IEntry resolvedEntry = editor.getEntryEditorInput().getResolvedEntry();
+                    EntryEditorInput entryEditorInput = editor.getEntryEditorInput();
                     
-                    if ( ( editor != null ) && ( resolvedEntry != null ) )
+                    if ( entryEditorInput != null )
                     {
-                        IBrowserConnection bc = resolvedEntry.getBrowserConnection();
-                        Dn dn = resolvedEntry.getDn();
-                        
-                        if ( bc.getEntryFromCache( dn ) == null )
-                        {
-                            editorReferences.add( ref );
-                        }
+                    	IEntry resolvedEntry = entryEditorInput.getResolvedEntry();
+	                    
+	                    if ( ( editor != null ) && ( resolvedEntry != null ) )
+	                    {
+	                        IBrowserConnection bc = resolvedEntry.getBrowserConnection();
+	                        Dn dn = resolvedEntry.getDn();
+	                        
+	                        if ( bc.getEntryFromCache( dn ) == null )
+	                        {
+	                            editorReferences.add( ref );
+	                        }
+	                    }
                     }
                 }
 



Mime
View raw message