[ofbiz-framework] branch trunk updated: Fixed: Checkstyle, variable must be private and have accessor methods (OFBIZ-11963)

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

[ofbiz-framework] branch trunk updated: Fixed: Checkstyle, variable must be private and have accessor methods (OFBIZ-11963)

jleroux@apache.org
This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 5d8541e  Fixed: Checkstyle, variable must be private and have accessor methods (OFBIZ-11963)
5d8541e is described below

commit 5d8541ebf85af42ddff6ffce6ae9c1e269fad7ce
Author: Jacques Le Roux <[hidden email]>
AuthorDate: Wed Sep 9 15:46:06 2020 +0200

    Fixed: Checkstyle, variable must be private and have accessor methods (OFBIZ-11963)
   
    Removes RESOURCE, not used anywhere
    Replaces keyseparator by KEY_SEPARATOR in Groovy files that use it
   
    We need to be careful about Groovy files that use variables. At least Eclipse
    Grooby plugin is not able to check that in an easy way (ill-names vars are
    though underlined)
---
 framework/webtools/groovyScripts/labelmanager/LabelManager.groovy     | 4 ++--
 framework/webtools/groovyScripts/labelmanager/UpdateManager.groovy    | 2 +-
 framework/webtools/groovyScripts/labelmanager/ViewReferences.groovy   | 2 +-
 .../org/apache/ofbiz/webtools/labelmanager/LabelManagerFactory.java   | 1 -
 4 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/framework/webtools/groovyScripts/labelmanager/LabelManager.groovy b/framework/webtools/groovyScripts/labelmanager/LabelManager.groovy
index feb9d92..764b927 100644
--- a/framework/webtools/groovyScripts/labelmanager/LabelManager.groovy
+++ b/framework/webtools/groovyScripts/labelmanager/LabelManager.groovy
@@ -31,7 +31,7 @@ context.filesFound = factory.getFilesFound()
 context.componentNamesFound = factory.getComponentNamesFound()
 context.duplicatedLocalesLabels = factory.getDuplicatedLocalesLabels()
 context.duplicatedLocalesLabelsList = factory.getDuplicatedLocalesLabelsList()
-context.keySeparator = factory.keySeparator
+context.keySeparator = factory.KEY_SEPARATOR
 if ("Y".equals(parameters.onlyNotUsedLabels)) {
     LabelReferences refsObject = new LabelReferences(delegator, factory)
     Map references = refsObject.getLabelReferences()
@@ -39,4 +39,4 @@ if ("Y".equals(parameters.onlyNotUsedLabels)) {
     context.referencesList = references.keySet()
 }
 
-context.totalLabelsCount = allLabels.size();
\ No newline at end of file
+context.totalLabelsCount = allLabels.size();
diff --git a/framework/webtools/groovyScripts/labelmanager/UpdateManager.groovy b/framework/webtools/groovyScripts/labelmanager/UpdateManager.groovy
index 334128a..0755509 100644
--- a/framework/webtools/groovyScripts/labelmanager/UpdateManager.groovy
+++ b/framework/webtools/groovyScripts/labelmanager/UpdateManager.groovy
@@ -28,6 +28,6 @@ context.filesFound = factory.getFilesFound()
 context.componentNamesFound = factory.getComponentNamesFound()
 
 if (parameters.sourceKey && parameters.sourceFileName) {
-    context.label = context.labels.get(parameters.sourceKey + LabelManagerFactory.keySeparator + parameters.sourceFileName)
+    context.label = context.labels.get(parameters.sourceKey + LabelManagerFactory.KEY_SEPARATOR + parameters.sourceFileName)
     context.titleProperty = "WebtoolsLabelManagerUpdate"
 }
diff --git a/framework/webtools/groovyScripts/labelmanager/ViewReferences.groovy b/framework/webtools/groovyScripts/labelmanager/ViewReferences.groovy
index 341a417..943e908 100644
--- a/framework/webtools/groovyScripts/labelmanager/ViewReferences.groovy
+++ b/framework/webtools/groovyScripts/labelmanager/ViewReferences.groovy
@@ -30,7 +30,7 @@ context.filesFound = factory.getFilesFound()
 context.componentNamesFound = factory.getComponentNamesFound()
 context.duplicatedLocalesLabels = factory.getDuplicatedLocalesLabels()
 context.duplicatedLocalesLabelsList = factory.getDuplicatedLocalesLabelsList()
-context.keySeparator = factory.keySeparator
+context.keySeparator = factory.KEY_SEPARATOR
 LabelReferences refsObject = new LabelReferences(delegator, factory)
 Map references = refsObject.getLabelReferences()
 context.references = references
diff --git a/framework/webtools/src/main/java/org/apache/ofbiz/webtools/labelmanager/LabelManagerFactory.java b/framework/webtools/src/main/java/org/apache/ofbiz/webtools/labelmanager/LabelManagerFactory.java
index 13dc861..141610f 100644
--- a/framework/webtools/src/main/java/org/apache/ofbiz/webtools/labelmanager/LabelManagerFactory.java
+++ b/framework/webtools/src/main/java/org/apache/ofbiz/webtools/labelmanager/LabelManagerFactory.java
@@ -48,7 +48,6 @@ import org.xml.sax.SAXException;
 public class LabelManagerFactory {
 
     private static final String MODULE = LabelManagerFactory.class.getName();
-    private static final String RESOURCE = "WebtoolsUiLabels";
     public static final String KEY_SEPARATOR = "#";
 
     private static Set<String> componentNamesFound = null;