From f30cf03e0bf2a29d01fa3edf44824c2536e85538 Mon Sep 17 00:00:00 2001 From: Jacques Le Roux Date: Tue, 8 Jan 2019 10:57:44 +0000 Subject: [PATCH] =?UTF-8?q?Improved:=20The=20=E2=80=98ModelFieldType?= =?UTF-8?q?=E2=80=99=20class=20members=20should=20be=20private.=20(OFBIZ-1?= =?UTF-8?q?0773)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850728 13f79535-47bb-0310-9956-ffa450edef68 --- .../ofbiz/entity/model/ModelFieldType.java | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelFieldType.java b/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelFieldType.java index 44d5c306e1..87e4cf66ef 100644 --- a/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelFieldType.java +++ b/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelFieldType.java @@ -36,22 +36,15 @@ public class ModelFieldType implements Serializable { 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) {