svn commit: r1850728 - /ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelFieldType.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1850728 - /ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelFieldType.java

jleroux@apache.org
Author: jleroux
Date: Tue Jan  8 10:57:44 2019
New Revision: 1850728

URL: http://svn.apache.org/viewvc?rev=1850728&view=rev
Log:
Improved: The ‘ModelFieldType’ class members should be private.
(OFBIZ-10773)

Makes the class members private and remove the default public constructor.

jleroux: All these members are only used in the class and the default public
constructor is useless (it would be automatically added by the compiler if
there was no other constructors, and there is one)
http://tutorials.jenkov.com/java/constructors.html#default-no-arg-constructors

Thanks: Mathieu Lirzin

Modified:
    ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelFieldType.java

Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelFieldType.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelFieldType.java?rev=1850728&r1=1850727&r2=1850728&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelFieldType.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelFieldType.java Tue Jan  8 10:57:44 2019
@@ -36,22 +36,15 @@ public class ModelFieldType implements S
     public static final String module = ModelFieldType.class.getName();
 
     /** The type of the Field */
-    protected String type = null;
-
+    private String type;
     /** The java-type of the Field */
-    protected String javaType = null;
-
+    private String javaType;
     /** The JDBC value handler for this Field */
-    protected JdbcValueHandler<?> jdbcValueHandler = null;
-
+    private JdbcValueHandler<?> jdbcValueHandler;
     /** The sql-type of the Field */
-    protected String sqlType = null;
-
+    private String sqlType;
     /** The sql-type-alias of the Field, this is optional */
-    protected String sqlTypeAlias = null;
-
-    /** Default Constructor */
-    public ModelFieldType() {}
+    private String sqlTypeAlias;
 
     /** XML Constructor */
     public ModelFieldType(Element fieldTypeElement) {