Title: [1466] trunk/qdox/src: Remove default values of FieldDef.name and FieldDef.body
Revision
1466
Author
rfscholte
Date
2011-12-28 14:05:32 -0600 (Wed, 28 Dec 2011)

Log Message

Remove default values of FieldDef.name and FieldDef.body
Codeformatting

Modified Paths

Diff

Modified: trunk/qdox/src/main/java/com/thoughtworks/qdox/parser/structs/FieldDef.java (1465 => 1466)


--- trunk/qdox/src/main/java/com/thoughtworks/qdox/parser/structs/FieldDef.java	2011-12-28 15:01:19 UTC (rev 1465)
+++ trunk/qdox/src/main/java/com/thoughtworks/qdox/parser/structs/FieldDef.java	2011-12-28 20:05:32 UTC (rev 1466)
@@ -24,23 +24,29 @@
 
 /**
  * Used for both fields and parameters
- * 
- *
  */
-public class FieldDef extends LocatedDef {
-    
-    private String name = "";
+public class FieldDef
+    extends LocatedDef
+{
+
+    private String name;
+
     private TypeDef type;
+
     private Set<String> modifiers = new LinkedHashSet<String>();
+
     private int dimensions;
+
     private boolean isVarArgs;
+
     private boolean isEnumConstant;
-    private String body = "";
-    
+
+    private String body;
+
     public FieldDef()
     {
     }
-    
+
     public FieldDef( String name )
     {
         this.name = name;
@@ -141,20 +147,20 @@
     {
         return modifiers;
     }
-    
+
     /**
-     * 
      * @return <code>true</code> if this field is an enum constant, otherwise <code>false</code>
      */
-    public boolean isEnumConstant() {
-		return isEnumConstant;
-	}
-    
+    public boolean isEnumConstant()
+    {
+        return isEnumConstant;
+    }
+
     /**
-     * 
      * @param isEnumConstant value to specify if this field is an enum constant or not
      */
-    public void setEnumConstant(boolean isEnumConstant) {
-		this.isEnumConstant = isEnumConstant;
-	}
-}
+    public void setEnumConstant( boolean isEnumConstant )
+    {
+        this.isEnumConstant = isEnumConstant;
+    }
+}
\ No newline at end of file

Modified: trunk/qdox/src/test/java/com/thoughtworks/qdox/parser/ParserTest.java (1465 => 1466)


--- trunk/qdox/src/test/java/com/thoughtworks/qdox/parser/ParserTest.java	2011-12-28 15:01:19 UTC (rev 1465)
+++ trunk/qdox/src/test/java/com/thoughtworks/qdox/parser/ParserTest.java	2011-12-28 20:05:32 UTC (rev 1466)
@@ -2639,7 +2639,7 @@
         FieldDef fld0 = f.getAllValues().get( 0 );
         assertEquals( "a", fld0.getName() );
         assertEquals( new TypeDef( "x" ), fld0.getType() ); // bug @todo fixme
-        assertEquals( "", fld0.getBody() );
+        assertEquals( null, fld0.getBody() );
         FieldDef fld1 = f.getAllValues().get( 1 );
         assertEquals( "someField", fld1.getName() );
         assertEquals( new TypeDef( "int" ), fld1.getType() );
@@ -2681,7 +2681,7 @@
         FieldDef fld = f.getValue();
         assertEquals( "a", fld.getName() );
         assertEquals( new TypeDef( "x" ), fld.getType() ); //bug @todo fixme
-        assertEquals( "" , fld.getBody() );
+        assertEquals( null , fld.getBody() );
     }
 
     private void setupLex(int token, String value) {

To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

Reply via email to