harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From odea...@apache.org
Subject svn commit: r936272 - /harmony/enhanced/java/trunk/jdktools/modules/jdktools/src/main/java/org/apache/harmony/tools/serialver/ShowGui.java
Date Wed, 21 Apr 2010 11:59:16 GMT
Author: odeakin
Date: Wed Apr 21 11:59:15 2010
New Revision: 936272

URL: http://svn.apache.org/viewvc?rev=936272&view=rev
Log:
Fix minor spelling mistake and add check for the case where nothing is entered for class name.

Modified:
    harmony/enhanced/java/trunk/jdktools/modules/jdktools/src/main/java/org/apache/harmony/tools/serialver/ShowGui.java

Modified: harmony/enhanced/java/trunk/jdktools/modules/jdktools/src/main/java/org/apache/harmony/tools/serialver/ShowGui.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/jdktools/modules/jdktools/src/main/java/org/apache/harmony/tools/serialver/ShowGui.java?rev=936272&r1=936271&r2=936272&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/jdktools/modules/jdktools/src/main/java/org/apache/harmony/tools/serialver/ShowGui.java
(original)
+++ harmony/enhanced/java/trunk/jdktools/modules/jdktools/src/main/java/org/apache/harmony/tools/serialver/ShowGui.java
Wed Apr 21 11:59:15 2010
@@ -67,6 +67,13 @@ public class ShowGui extends JFrame {
 	public void actionPerfomed(ActionEvent evt) {
 		String targetClass = classNameField.getText();
 
+                if (targetClass.length() == 0) {
+                    // No string was entered
+                    statusBarLabel.setText("");
+                    serialVersionField.setText("");
+                    return;
+                }
+
 		// Load the class.
 		try {
 			Clazz clazz = new Clazz(classProvider, targetClass);
@@ -84,7 +91,7 @@ public class ShowGui extends JFrame {
 			}
 		} catch (ClassNotFoundException e) { // Class Not Found
 			serialVersionField.setText("");
-			statusBarLabel.setText("Class " + targetClass + " not fond.");
+			statusBarLabel.setText("Class " + targetClass + " not found.");
 		}
 	}
 }



Mime
View raw message