directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1291785 - /directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/FilterWidget.java
Date Tue, 21 Feb 2012 13:53:59 GMT
Author: pamarcelot
Date: Tue Feb 21 13:53:58 2012
New Revision: 1291785

URL: http://svn.apache.org/viewvc?rev=1291785&view=rev
Log:
Fixed a potential NPE when using the setFilter() method before the createWidget() method is
called.

Modified:
    directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/FilterWidget.java

Modified: directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/FilterWidget.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/FilterWidget.java?rev=1291785&r1=1291784&r2=1291785&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/FilterWidget.java
(original)
+++ directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/FilterWidget.java
Tue Feb 21 13:53:58 2012
@@ -53,7 +53,6 @@ import org.eclipse.swt.widgets.Composite
  */
 public class FilterWidget extends BrowserWidget
 {
-
     /** The filter combo. */
     private Combo filterCombo;
 
@@ -201,7 +200,14 @@ public class FilterWidget extends Browse
      */
     public void setFilter( String filter )
     {
-        filterCombo.setText( filter );
+        if ( filterCombo == null )
+        {
+            initalFilter = filter;
+        }
+        else
+        {
+            filterCombo.setText( filter );
+        }
     }
 
 



Mime
View raw message