commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ebo...@apache.org
Subject svn commit: r678690 - in /commons/proper/cli/branches/cli-1.x/src: java/org/apache/commons/cli/PatternOptionBuilder.java test/org/apache/commons/cli/PatternOptionBuilderTest.java
Date Tue, 22 Jul 2008 09:23:15 GMT
Author: ebourg
Date: Tue Jul 22 02:23:14 2008
New Revision: 678690

URL: http://svn.apache.org/viewvc?rev=678690&view=rev
Log:
Replaced fully qualified names with imports

Modified:
    commons/proper/cli/branches/cli-1.x/src/java/org/apache/commons/cli/PatternOptionBuilder.java
    commons/proper/cli/branches/cli-1.x/src/test/org/apache/commons/cli/PatternOptionBuilderTest.java

Modified: commons/proper/cli/branches/cli-1.x/src/java/org/apache/commons/cli/PatternOptionBuilder.java
URL: http://svn.apache.org/viewvc/commons/proper/cli/branches/cli-1.x/src/java/org/apache/commons/cli/PatternOptionBuilder.java?rev=678690&r1=678689&r2=678690&view=diff
==============================================================================
--- commons/proper/cli/branches/cli-1.x/src/java/org/apache/commons/cli/PatternOptionBuilder.java
(original)
+++ commons/proper/cli/branches/cli-1.x/src/java/org/apache/commons/cli/PatternOptionBuilder.java
Tue Jul 22 02:23:14 2008
@@ -14,8 +14,14 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package org.apache.commons.cli;
 
+import java.io.File;
+import java.io.FileInputStream;
+import java.net.URL;
+import java.util.Date;
+
 /** 
  * <p>
  * Allows Options to be created from a single String.
@@ -49,36 +55,35 @@
 public class PatternOptionBuilder {
 
     /** String class */
-    public static final Class STRING_VALUE = java.lang.String.class;
+    public static final Class STRING_VALUE = String.class;
 
     /** Object class */
-    public static final Class OBJECT_VALUE = java.lang.Object.class;
+    public static final Class OBJECT_VALUE = Object.class;
 
     /** Number class */
-    public static final Class NUMBER_VALUE = java.lang.Number.class;
+    public static final Class NUMBER_VALUE = Number.class;
 
     /** Date class */
-    public static final Class DATE_VALUE = java.util.Date.class;
+    public static final Class DATE_VALUE = Date.class;
 
     /** Class class */
-    public static final Class CLASS_VALUE = java.lang.Class.class;
+    public static final Class CLASS_VALUE = Class.class;
 
     /// can we do this one?? 
     // is meant to check that the file exists, else it errors.
     // ie) it's for reading not writing.
 
     /** FileInputStream class */
-    public static final Class EXISTING_FILE_VALUE = 
-            java.io.FileInputStream.class;
+    public static final Class EXISTING_FILE_VALUE = FileInputStream.class;
 
     /** File class */
-    public static final Class FILE_VALUE = java.io.File.class;
+    public static final Class FILE_VALUE = File.class;
 
     /** File array class */
-    public static final Class FILES_VALUE = java.io.File[].class;
+    public static final Class FILES_VALUE = File[].class;
 
     /** URL class */
-    public static final Class URL_VALUE = java.net.URL.class;
+    public static final Class URL_VALUE = URL.class;
 
     /**
      * <p>Retrieve the class that <code>ch</code> represents.</p>

Modified: commons/proper/cli/branches/cli-1.x/src/test/org/apache/commons/cli/PatternOptionBuilderTest.java
URL: http://svn.apache.org/viewvc/commons/proper/cli/branches/cli-1.x/src/test/org/apache/commons/cli/PatternOptionBuilderTest.java?rev=678690&r1=678689&r2=678690&view=diff
==============================================================================
--- commons/proper/cli/branches/cli-1.x/src/test/org/apache/commons/cli/PatternOptionBuilderTest.java
(original)
+++ commons/proper/cli/branches/cli-1.x/src/test/org/apache/commons/cli/PatternOptionBuilderTest.java
Tue Jul 22 02:23:14 2008
@@ -17,6 +17,11 @@
 
 package org.apache.commons.cli;
 
+import java.io.File;
+import java.net.URL;
+import java.util.Calendar;
+import java.util.Vector;
+
 import junit.framework.TestCase;
 
 /** 
@@ -36,27 +41,27 @@
 
        assertEquals("flag a", "foo", line.getOptionValue("a"));
        assertEquals("string flag a", "foo", line.getOptionObject("a"));
-       assertEquals("object flag b", new java.util.Vector(), line.getOptionObject("b"));
+       assertEquals("object flag b", new Vector(), line.getOptionObject("b"));
        assertTrue("boolean true flag c", line.hasOption("c"));
        assertFalse("boolean false flag d", line.hasOption("d"));
-       assertEquals("file flag e", new java.io.File("build.xml"), line.getOptionObject("e"));
-       assertEquals("class flag f", java.util.Calendar.class, line.getOptionObject("f"));
+       assertEquals("file flag e", new File("build.xml"), line.getOptionObject("e"));
+       assertEquals("class flag f", Calendar.class, line.getOptionObject("f"));
        assertEquals("number flag n", new Double(4.5), line.getOptionObject("n"));
-       assertEquals("url flag t", new java.net.URL("http://jakarta.apache.org/"), line.getOptionObject("t"));
+       assertEquals("url flag t", new URL("http://jakarta.apache.org/"), line.getOptionObject("t"));
 
        // tests the char methods of CommandLine that delegate to the String methods
        assertEquals("flag a", "foo", line.getOptionValue('a'));
        assertEquals("string flag a", "foo", line.getOptionObject('a'));
-       assertEquals("object flag b", new java.util.Vector(), line.getOptionObject('b'));
+       assertEquals("object flag b", new Vector(), line.getOptionObject('b'));
        assertTrue("boolean true flag c", line.hasOption('c'));
        assertFalse("boolean false flag d", line.hasOption('d'));
-       assertEquals("file flag e", new java.io.File("build.xml"), line.getOptionObject('e'));
-       assertEquals("class flag f", java.util.Calendar.class, line.getOptionObject('f'));
+       assertEquals("file flag e", new File("build.xml"), line.getOptionObject('e'));
+       assertEquals("class flag f", Calendar.class, line.getOptionObject('f'));
        assertEquals("number flag n", new Double(4.5), line.getOptionObject('n'));
-       assertEquals("url flag t", new java.net.URL("http://jakarta.apache.org/"), line.getOptionObject('t'));
+       assertEquals("url flag t", new URL("http://jakarta.apache.org/"), line.getOptionObject('t'));
 
        /// DATES NOT SUPPORTED YET.
-       //      assertEquals("number flag t", new java.util.Date(1023400137276L), line.getOptionObject('z'));
+       //      assertEquals("number flag t", new Date(1023400137276L), line.getOptionObject('z'));
        //     input is:  "Thu Jun 06 17:48:57 EDT 2002"
    }
 }



Mime
View raw message