directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r753470 - /directory/studio/trunk/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/time/GeneralizedTimeValueEditor.java
Date Fri, 13 Mar 2009 23:10:51 GMT
Author: seelmann
Date: Fri Mar 13 23:10:51 2009
New Revision: 753470

URL: http://svn.apache.org/viewvc?rev=753470&view=rev
Log:
DIRSTUDIO-449: Edit new value

Modified:
    directory/studio/trunk/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/time/GeneralizedTimeValueEditor.java

Modified: directory/studio/trunk/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/time/GeneralizedTimeValueEditor.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/time/GeneralizedTimeValueEditor.java?rev=753470&r1=753469&r2=753470&view=diff
==============================================================================
--- directory/studio/trunk/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/time/GeneralizedTimeValueEditor.java
(original)
+++ directory/studio/trunk/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/time/GeneralizedTimeValueEditor.java
Fri Mar 13 23:10:51 2009
@@ -82,11 +82,11 @@
         Object value = getValue();
         if ( value != null && value instanceof String )
         {
+            String s = ( String ) value;
             try
             {
-                GeneralizedTime generalizedTime = new GeneralizedTime( ( String ) value );
-                GeneralizedTimeValueDialog dialog = new GeneralizedTimeValueDialog( shell,
-                    generalizedTime );
+                GeneralizedTime generalizedTime = "".equals( s ) ? null : new GeneralizedTime(
s ); //$NON-NLS-1$
+                GeneralizedTimeValueDialog dialog = new GeneralizedTimeValueDialog( shell,
generalizedTime );
                 if ( dialog.open() == TextDialog.OK )
                 {
                     setValue( dialog.getGeneralizedTime().toGeneralizedTime() );



Mime
View raw message