You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by su...@apache.org on 2020/07/11 09:04:38 UTC
[ofbiz-framework] 01/02: Improved: Corrected checkstyle formatting
issues, 'is preceded/not preceded with whitespace' for framework component.
(OFBIZ-11874) This fixes following checkstyle issues: '{' is not preceded
with whitespace. '{' is not followed by whitespace. '}' is not followed by
whitespace. '}' is not preceded with whitespace. 'typecast' is not followed
by whitespace. 'try' is not followed by whitespace. ';
' is preceded with whitespace.
This is an automated email from the ASF dual-hosted git repository.
surajk pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
commit dd4da77d761d48606b57215d12740ad9128104db
Merge: bdc8c73 d0fceff
Author: Suraj Khurana <su...@apache.org>
AuthorDate: Sat Jul 11 14:31:36 2020 +0530
Improved: Corrected checkstyle formatting issues, 'is preceded/not preceded with whitespace' for framework component.
(OFBIZ-11874)
This fixes following checkstyle issues:
'{' is not preceded with whitespace.
'{' is not followed by whitespace.
'}' is not followed by whitespace.
'}' is not preceded with whitespace.
'typecast' is not followed by whitespace.
'try' is not followed by whitespace.
';' is preceded with whitespace.
INSTALL | 48 +++++++++++----------
build.gradle | 10 +++++
.../ofbiz/base/component/ComponentConfig.java | 4 +-
.../apache/ofbiz/base/config/JNDIConfigUtil.java | 2 +-
.../apache/ofbiz/base/config/ResourceLoader.java | 2 +-
.../base/container/NamingServiceContainer.java | 2 +-
.../apache/ofbiz/base/conversion/Converters.java | 4 +-
.../org/apache/ofbiz/base/crypto/HashCrypt.java | 4 +-
.../java/org/apache/ofbiz/base/crypto/Main.java | 1 -
.../ofbiz/base/location/FlexibleLocation.java | 2 +-
.../apache/ofbiz/base/metrics/MetricsFactory.java | 2 +-
.../apache/ofbiz/base/util/AliasKeyManager.java | 2 +-
.../java/org/apache/ofbiz/base/util/Assert.java | 2 +-
.../java/org/apache/ofbiz/base/util/FileUtil.java | 2 +-
.../org/apache/ofbiz/base/util/GroovyUtil.java | 2 +-
.../org/apache/ofbiz/base/util/HttpClient.java | 2 +-
.../org/apache/ofbiz/base/util/KeyStoreUtil.java | 2 +-
.../org/apache/ofbiz/base/util/Observable.java | 2 +-
.../java/org/apache/ofbiz/base/util/SSLUtil.java | 2 +-
.../org/apache/ofbiz/base/util/ScriptUtil.java | 2 +-
.../org/apache/ofbiz/base/util/URLConnector.java | 2 +-
.../org/apache/ofbiz/base/util/UtilDateTime.java | 2 +-
.../org/apache/ofbiz/base/util/UtilFormatOut.java | 4 +-
.../org/apache/ofbiz/base/util/UtilGenerics.java | 2 +-
.../java/org/apache/ofbiz/base/util/UtilHttp.java | 12 ++----
.../java/org/apache/ofbiz/base/util/UtilIO.java | 2 +-
.../org/apache/ofbiz/base/util/UtilJavaParse.java | 2 +-
.../java/org/apache/ofbiz/base/util/UtilMisc.java | 8 ++--
.../org/apache/ofbiz/base/util/UtilNumber.java | 40 ++++++++---------
.../java/org/apache/ofbiz/base/util/UtilPlist.java | 2 +-
.../org/apache/ofbiz/base/util/UtilProperties.java | 4 +-
.../java/org/apache/ofbiz/base/util/UtilURL.java | 2 +-
.../org/apache/ofbiz/base/util/UtilValidate.java | 2 +-
.../java/org/apache/ofbiz/base/util/UtilXml.java | 23 +++++-----
.../ofbiz/base/util/collections/LifoSet.java | 2 +-
.../org/apache/ofbiz/base/util/string/UelUtil.java | 2 +-
.../string/test/FlexibleStringExpanderTests.java | 2 +-
.../ofbiz/base/util/template/XslTransform.java | 10 ++---
.../org/apache/ofbiz/base/util/UtilCodecTests.java | 2 +-
.../catalina/container/CatalinaContainer.java | 4 +-
.../ofbiz/catalina/container/OFBizRealm.java | 2 +-
.../org/apache/ofbiz/common/CommonWorkers.java | 4 +-
.../java/org/apache/ofbiz/common/FindServices.java | 4 +-
.../org/apache/ofbiz/common/KeywordSearchUtil.java | 2 +-
.../org/apache/ofbiz/common/UrlServletHelper.java | 18 ++++----
.../apache/ofbiz/common/email/EmailServices.java | 18 ++++----
.../org/apache/ofbiz/common/geo/GeoWorker.java | 2 +-
.../apache/ofbiz/common/image/ImageTransform.java | 6 +--
.../apache/ofbiz/common/period/PeriodWorker.java | 2 +-
.../ofbiz/common/preferences/PreferenceWorker.java | 2 +-
.../apache/ofbiz/common/qrcode/QRCodeServices.java | 2 -
.../apache/ofbiz/common/status/StatusWorker.java | 2 +-
.../ofbiz/common/telecom/TelecomServices.java | 2 -
.../org/apache/ofbiz/common/uom/UomWorker.java | 2 +-
.../org/apache/ofbiz/datafile/ModelDataFile.java | 2 -
.../org/apache/ofbiz/entity/GenericDelegator.java | 2 +-
.../org/apache/ofbiz/entity/GenericEntity.java | 4 +-
.../ofbiz/entity/condition/EntityClause.java | 2 +-
.../entity/condition/EntityConditionParam.java | 2 +-
.../apache/ofbiz/entity/condition/EntityExpr.java | 2 +-
.../ofbiz/entity/finder/EntityFinderUtil.java | 2 +-
.../org/apache/ofbiz/entity/jdbc/SqlJdbcUtil.java | 2 +-
.../ofbiz/entity/model/ModelEntityChecker.java | 2 +-
.../apache/ofbiz/entity/model/ModelRelation.java | 4 +-
.../org/apache/ofbiz/entity/model/ModelUtil.java | 4 +-
.../apache/ofbiz/entity/model/ModelViewEntity.java | 2 +-
.../entity/transaction/DumbTransactionFactory.java | 2 +-
.../entity/transaction/JNDITransactionFactory.java | 2 +-
.../ofbiz/entity/transaction/TransactionUtil.java | 4 +-
.../org/apache/ofbiz/entity/util/ByteWrapper.java | 2 +-
.../ofbiz/entity/util/EntityFindOptions.java | 2 +-
.../apache/ofbiz/entity/util/EntitySaxReader.java | 4 +-
.../apache/ofbiz/entity/util/EntityTypeUtil.java | 2 +-
.../org/apache/ofbiz/entity/util/EntityUtil.java | 2 +-
.../ofbiz/entity/util/EntityUtilProperties.java | 2 +-
.../apache/ofbiz/entityext/EntityGroupUtil.java | 2 +-
.../ofbiz/entityext/cache/EntityCacheServices.java | 2 +-
.../entityext/data/EntityDataLoadContainer.java | 4 +-
.../ofbiz/entityext/data/EntityDataServices.java | 8 ++--
.../apache/ofbiz/entityext/eca/EntityEcaRule.java | 4 +-
.../apache/ofbiz/entityext/eca/EntityEcaUtil.java | 2 +-
.../permission/EntityPermissionChecker.java | 32 ++++++--------
.../synchronization/EntitySyncContext.java | 4 --
.../org/apache/ofbiz/minilang/MiniLangUtil.java | 4 +-
.../apache/ofbiz/minilang/MiniLangValidate.java | 2 +-
.../org/apache/ofbiz/minilang/SimpleMethod.java | 1 -
.../ofbiz/minilang/method/callops/CallScript.java | 1 -
.../org/apache/ofbiz/security/SecurityFactory.java | 4 +-
.../ofbiz/service/GenericAbstractDispatcher.java | 2 +-
.../java/org/apache/ofbiz/service/ModelParam.java | 2 +-
.../org/apache/ofbiz/service/ModelService.java | 4 +-
.../java/org/apache/ofbiz/service/ServiceUtil.java | 2 +-
.../org/apache/ofbiz/service/ServiceXaWrapper.java | 2 +-
.../ofbiz/service/calendar/ExpressionUiHelper.java | 6 +--
.../ofbiz/service/calendar/RecurrenceInfo.java | 3 +-
.../ofbiz/service/calendar/RecurrenceUtil.java | 2 +-
.../ofbiz/service/calendar/TemporalExpression.java | 2 +-
.../service/calendar/TemporalExpressionWorker.java | 2 +-
.../ofbiz/service/config/ServiceConfigUtil.java | 2 +-
.../apache/ofbiz/service/eca/ServiceEcaAction.java | 2 +-
.../ofbiz/service/eca/ServiceEcaCondition.java | 2 +-
.../apache/ofbiz/service/eca/ServiceEcaUtil.java | 2 +-
.../ofbiz/service/engine/EntityAutoEngine.java | 6 +--
.../ofbiz/service/jms/JmsListenerFactory.java | 2 +-
.../java/org/apache/ofbiz/service/job/Job.java | 2 +-
.../ofbiz/service/mail/MimeMessageWrapper.java | 2 +-
.../apache/ofbiz/service/mail/ServiceMcaUtil.java | 2 +-
.../test/ServiceEngineTestPermissionServices.java | 2 +-
.../ofbiz/service/test/ServiceEntityAutoTests.java | 4 +-
.../ofbiz/service/test/ServicePermissionTests.java | 6 +--
.../java/org/apache/ofbiz/base/start/Config.java | 2 +-
.../ofbiz/base/start/StartupControlPanel.java | 11 +++--
.../apache/ofbiz/testtools/SimpleMethodTest.java | 2 -
.../apache/ofbiz/testtools/TestRunContainer.java | 2 +-
.../java/org/apache/ofbiz/webapp/WebAppUtil.java | 2 +-
.../apache/ofbiz/webapp/control/ContextFilter.java | 4 +-
.../control/ControlActivationEventListener.java | 3 +-
.../ofbiz/webapp/control/ControlEventListener.java | 2 +-
.../webapp/control/ExternalLoginKeysManager.java | 3 +-
.../ofbiz/webapp/control/LoginEventListener.java | 2 +-
.../apache/ofbiz/webapp/control/LoginWorker.java | 18 +-------
.../ofbiz/webapp/control/ProtectViewWorker.java | 2 +-
.../ofbiz/webapp/control/RequestHandler.java | 9 ++--
.../org/apache/ofbiz/webapp/event/CoreEvents.java | 10 ++---
.../ofbiz/webapp/ftl/OfbizContentTransform.java | 8 ++--
.../apache/ofbiz/webapp/stats/VisitHandler.java | 8 +---
.../apache/ofbiz/webapp/view/ApacheFopWorker.java | 4 +-
.../apache/ofbiz/webapp/webdav/WebDavServlet.java | 2 +-
.../org/apache/ofbiz/webapp/webdav/WebDavUtil.java | 2 +-
.../ofbiz/webapp/website/WebSiteProperties.java | 2 -
.../apache/ofbiz/webapp/website/WebSiteWorker.java | 2 +-
.../org/apache/ofbiz/webtools/UtilCacheEvents.java | 3 +-
.../apache/ofbiz/webtools/WebToolsServices.java | 18 ++++----
.../webtools/artifactinfo/ArtifactInfoFactory.java | 2 +-
.../artifactinfo/FormWidgetArtifactInfo.java | 4 +-
.../artifactinfo/ScreenWidgetArtifactInfo.java | 2 +-
.../ofbiz/webtools/print/FoPrintServerEvents.java | 3 +-
.../org/apache/ofbiz/widget/WidgetFactory.java | 2 +-
.../java/org/apache/ofbiz/widget/WidgetWorker.java | 8 ++--
.../ofbiz/widget/cache/WidgetContextCacheKey.java | 2 +-
.../ofbiz/widget/content/WidgetContentWorker.java | 2 +-
.../widget/content/WidgetDataResourceWorker.java | 2 +-
.../ofbiz/widget/model/AbstractModelAction.java | 4 +-
.../org/apache/ofbiz/widget/model/MenuFactory.java | 2 +-
.../ofbiz/widget/model/ModelActionVisitor.java | 2 +-
.../ofbiz/widget/model/ModelFieldVisitor.java | 50 +++++++++++-----------
.../apache/ofbiz/widget/model/ModelFormField.java | 4 +-
.../apache/ofbiz/widget/model/ModelMenuAction.java | 14 +++---
.../ofbiz/widget/portal/PortalPageWorker.java | 3 +-
.../apache/ofbiz/widget/renderer/FormRenderer.java | 6 +--
.../ofbiz/widget/renderer/MenuStringRenderer.java | 18 ++++----
.../apache/ofbiz/widget/renderer/Paginator.java | 6 +--
.../apache/ofbiz/widget/renderer/UtilHelpText.java | 2 +-
.../ofbiz/widget/renderer/fo/FoFormRenderer.java | 4 +-
.../widget/renderer/fo/ScreenFopViewHandler.java | 6 +--
.../widget/renderer/html/HtmlMenuRenderer.java | 2 +-
.../renderer/html/HtmlMenuRendererImage.java | 2 +-
.../widget/renderer/html/HtmlMenuWrapper.java | 2 +-
.../widget/renderer/html/HtmlMenuWrapperImage.java | 2 +-
.../widget/renderer/html/HtmlTreeRenderer.java | 2 +-
.../widget/renderer/macro/MacroMenuRenderer.java | 4 +-
.../widget/renderer/macro/MacroScreenRenderer.java | 14 +++---
.../ofbiz/widget/test/WidgetMacroLibraryTests.java | 2 +-
163 files changed, 365 insertions(+), 413 deletions(-)
diff --cc framework/base/src/main/java/org/apache/ofbiz/base/component/ComponentConfig.java
index 3a8c109,3a8c109..7a0450d
--- a/framework/base/src/main/java/org/apache/ofbiz/base/component/ComponentConfig.java
+++ b/framework/base/src/main/java/org/apache/ofbiz/base/component/ComponentConfig.java
@@@ -264,7 -264,7 +264,7 @@@ public final class ComponentConfig
}
return info;
}
--
++
// ========== ComponentConfig instance ==========
private final String globalName;
@@@ -459,7 -459,7 +459,7 @@@
.flatMap(element -> {
try {
return Stream.of(mapper.apply(this, element));
-- } catch(IllegalArgumentException e) {
++ } catch (IllegalArgumentException e) {
Debug.log(e.getMessage());
return Stream.empty();
}
diff --cc framework/base/src/main/java/org/apache/ofbiz/base/config/JNDIConfigUtil.java
index a8126dc,a8126dc..9f6bec4
--- a/framework/base/src/main/java/org/apache/ofbiz/base/config/JNDIConfigUtil.java
+++ b/framework/base/src/main/java/org/apache/ofbiz/base/config/JNDIConfigUtil.java
@@@ -33,7 -33,7 +33,7 @@@ public final class JNDIConfigUtil
private static final String MODULE = JNDIConfigUtil.class.getName();
private static final String JNDI_CONFIG_XML_FILENAME = "jndiservers.xml";
private static final ConcurrentHashMap<String, JndiServerInfo> jndiServerInfos = new ConcurrentHashMap<>();
-- private JNDIConfigUtil() {}
++ private JNDIConfigUtil() { }
private static Element getXmlRootElement() throws GenericConfigException {
try {
diff --cc framework/base/src/main/java/org/apache/ofbiz/base/config/ResourceLoader.java
index e66f6d5,e66f6d5..455ebfe
--- a/framework/base/src/main/java/org/apache/ofbiz/base/config/ResourceLoader.java
+++ b/framework/base/src/main/java/org/apache/ofbiz/base/config/ResourceLoader.java
@@@ -166,7 -166,7 +166,7 @@@ public abstract class ResourceLoader
private String prefix;
private String envName;
-- protected ResourceLoader() {}
++ protected ResourceLoader() { }
private void init(String name, String prefix, String envName) {
this.prefix = prefix;
diff --cc framework/base/src/main/java/org/apache/ofbiz/base/container/NamingServiceContainer.java
index af852fb,af852fb..6967a31
--- a/framework/base/src/main/java/org/apache/ofbiz/base/container/NamingServiceContainer.java
+++ b/framework/base/src/main/java/org/apache/ofbiz/base/container/NamingServiceContainer.java
@@@ -71,7 -71,7 +71,7 @@@ public class NamingServiceContainer imp
// get the naming (JNDI) server
Configuration.Property host = cfg.getProperty("host");
if (host != null && host.value() != null) {
-- this.namingHost = host.value() ;
++ this.namingHost = host.value();
}
try {
diff --cc framework/base/src/main/java/org/apache/ofbiz/base/conversion/Converters.java
index 0a2d2e3,0a2d2e3..e26dbca
--- a/framework/base/src/main/java/org/apache/ofbiz/base/conversion/Converters.java
+++ b/framework/base/src/main/java/org/apache/ofbiz/base/conversion/Converters.java
@@@ -52,7 -52,7 +52,7 @@@ public class Converters
}
}
-- private Converters() {}
++ private Converters() { }
/** Returns an appropriate <code>Converter</code> instance for
* <code>sourceClass</code> and <code>targetClass</code>. If no matching
@@@ -197,7 -197,7 +197,7 @@@ OUTER
}
}
-- protected static class PassThruConverterCreator implements ConverterCreator{
++ protected static class PassThruConverterCreator implements ConverterCreator {
protected PassThruConverterCreator() {
}
diff --cc framework/base/src/main/java/org/apache/ofbiz/base/crypto/HashCrypt.java
index 6cc84ac,6cc84ac..40db7b1
--- a/framework/base/src/main/java/org/apache/ofbiz/base/crypto/HashCrypt.java
+++ b/framework/base/src/main/java/org/apache/ofbiz/base/crypto/HashCrypt.java
@@@ -162,7 -162,7 +162,7 @@@ public class HashCrypt
}
}
-- public static String pbkdf2HashCrypt(String hashType, String salt, String value){
++ public static String pbkdf2HashCrypt(String hashType, String salt, String value) {
char[] chars = value.toCharArray();
if (UtilValidate.isEmpty(salt)) {
salt = getSalt();
@@@ -201,7 -201,7 +201,7 @@@
}
}
-- public static boolean doComparePbkdf2(String crypted, String password){
++ public static boolean doComparePbkdf2(String crypted, String password) {
try {
int typeEnd = crypted.indexOf("}");
String hashType = crypted.substring(1, typeEnd);
diff --cc framework/base/src/main/java/org/apache/ofbiz/base/crypto/Main.java
index bcacecc,bcacecc..5ec1f2d
--- a/framework/base/src/main/java/org/apache/ofbiz/base/crypto/Main.java
+++ b/framework/base/src/main/java/org/apache/ofbiz/base/crypto/Main.java
@@@ -23,7 -23,7 +23,6 @@@ import org.apache.ofbiz.base.util.Debug
import org.apache.shiro.crypto.AesCipherService;
public class Main {
--
private static final String MODULE = Main.class.getName();
public static void main(String[] args) throws Exception {
if ("-crypt".equals(args[0])) {
diff --cc framework/base/src/main/java/org/apache/ofbiz/base/location/FlexibleLocation.java
index 94bc2e5,94bc2e5..9f4c58c
--- a/framework/base/src/main/java/org/apache/ofbiz/base/location/FlexibleLocation.java
+++ b/framework/base/src/main/java/org/apache/ofbiz/base/location/FlexibleLocation.java
@@@ -140,5 -140,5 +140,5 @@@ public final class FlexibleLocation
return strippedSoFar.toString();
}
-- private FlexibleLocation() {}
++ private FlexibleLocation() { }
}
diff --cc framework/base/src/main/java/org/apache/ofbiz/base/metrics/MetricsFactory.java
index 7012048,7012048..1444518
--- a/framework/base/src/main/java/org/apache/ofbiz/base/metrics/MetricsFactory.java
+++ b/framework/base/src/main/java/org/apache/ofbiz/base/metrics/MetricsFactory.java
@@@ -290,5 -290,5 +290,5 @@@ public final class MetricsFactory
}
}
-- private MetricsFactory() {}
++ private MetricsFactory() { }
}
diff --cc framework/base/src/main/java/org/apache/ofbiz/base/util/AliasKeyManager.java
index 83a42b8,83a42b8..17ca29c
--- a/framework/base/src/main/java/org/apache/ofbiz/base/util/AliasKeyManager.java
+++ b/framework/base/src/main/java/org/apache/ofbiz/base/util/AliasKeyManager.java
@@@ -35,7 -35,7 +35,7 @@@ public class AliasKeyManager implement
protected X509KeyManager keyManager = null;
protected String alias = null;
-- protected AliasKeyManager() {}
++ protected AliasKeyManager() { }
public AliasKeyManager(X509KeyManager keyManager, String alias) {
this.keyManager = keyManager;
diff --cc framework/base/src/main/java/org/apache/ofbiz/base/util/Assert.java
index 1cea0d8,1cea0d8..d0912e4
--- a/framework/base/src/main/java/org/apache/ofbiz/base/util/Assert.java
+++ b/framework/base/src/main/java/org/apache/ofbiz/base/util/Assert.java
@@@ -211,5 -211,5 +211,5 @@@ public class Assert
}
}
-- private Assert() {}
++ private Assert() { }
}
diff --cc framework/base/src/main/java/org/apache/ofbiz/base/util/FileUtil.java
index 45e1e5d,45e1e5d..dc5749a
--- a/framework/base/src/main/java/org/apache/ofbiz/base/util/FileUtil.java
+++ b/framework/base/src/main/java/org/apache/ofbiz/base/util/FileUtil.java
@@@ -57,7 -57,7 +57,7 @@@ public final class FileUtil
private static final String MODULE = FileUtil.class.getName();
-- private FileUtil () {}
++ private FileUtil() { }
private static class SearchTextFilesFilter implements FilenameFilter {
String fileExtension;
diff --cc framework/base/src/main/java/org/apache/ofbiz/base/util/GroovyUtil.java
index 56b58b4,56b58b4..bf7d520
--- a/framework/base/src/main/java/org/apache/ofbiz/base/util/GroovyUtil.java
+++ b/framework/base/src/main/java/org/apache/ofbiz/base/util/GroovyUtil.java
@@@ -125,7 -125,7 +125,7 @@@ public final class GroovyUtil
vars.put("context", context);
if (vars.get(ScriptUtil.SCRIPT_HELPER_KEY) == null) {
ScriptContext scriptContext = ScriptUtil.createScriptContext(context);
-- ScriptHelper scriptHelper = (ScriptHelper)scriptContext.getAttribute(ScriptUtil.SCRIPT_HELPER_KEY);
++ ScriptHelper scriptHelper = (ScriptHelper) scriptContext.getAttribute(ScriptUtil.SCRIPT_HELPER_KEY);
if (scriptHelper != null) {
vars.put(ScriptUtil.SCRIPT_HELPER_KEY, scriptHelper);
}
diff --cc framework/base/src/main/java/org/apache/ofbiz/base/util/HttpClient.java
index 87cee50,87cee50..8b71654
--- a/framework/base/src/main/java/org/apache/ofbiz/base/util/HttpClient.java
+++ b/framework/base/src/main/java/org/apache/ofbiz/base/util/HttpClient.java
@@@ -66,7 -66,7 +66,7 @@@ public class HttpClient
private URLConnection con = null;
/** Creates an empty HttpClient object. */
-- public HttpClient() {}
++ public HttpClient() { }
/** Creates a new HttpClient object. */
public HttpClient(URL url) {
diff --cc framework/base/src/main/java/org/apache/ofbiz/base/util/KeyStoreUtil.java
index aafa1c8,aafa1c8..6cfb43f
--- a/framework/base/src/main/java/org/apache/ofbiz/base/util/KeyStoreUtil.java
+++ b/framework/base/src/main/java/org/apache/ofbiz/base/util/KeyStoreUtil.java
@@@ -62,7 -62,7 +62,7 @@@ public final class KeyStoreUtil
private static final String MODULE = KeyStoreUtil.class.getName();
-- private KeyStoreUtil () {}
++ private KeyStoreUtil() { }
public static void storeComponentKeyStore(String componentName, String keyStoreName, KeyStore store) throws IOException, GenericConfigException, NoSuchAlgorithmException, CertificateException, KeyStoreException {
ComponentConfig.KeystoreInfo ks = ComponentConfig.getKeystoreInfo(componentName, keyStoreName);
diff --cc framework/base/src/main/java/org/apache/ofbiz/base/util/Observable.java
index faa1162,faa1162..953b31a
--- a/framework/base/src/main/java/org/apache/ofbiz/base/util/Observable.java
+++ b/framework/base/src/main/java/org/apache/ofbiz/base/util/Observable.java
@@@ -37,7 -37,7 +37,7 @@@ public final class Observable
private final AtomicBoolean changed = new AtomicBoolean();
private final CopyOnWriteArrayList<Observer> observers = new CopyOnWriteArrayList<>();
-- public Observable() {}
++ public Observable() { }
public Observable(Observable observable) {
Assert.notNull("observable", observable);
diff --cc framework/base/src/main/java/org/apache/ofbiz/base/util/SSLUtil.java
index 783953e,783953e..732bb74
--- a/framework/base/src/main/java/org/apache/ofbiz/base/util/SSLUtil.java
+++ b/framework/base/src/main/java/org/apache/ofbiz/base/util/SSLUtil.java
@@@ -61,7 -61,7 +61,7 @@@ public final class SSLUtil
private static boolean loadedProps = false;
-- private SSLUtil () {}
++ private SSLUtil() { }
static {
SSLUtil.loadJsseProperties();
diff --cc framework/base/src/main/java/org/apache/ofbiz/base/util/ScriptUtil.java
index e6a79e9,e6a79e9..ea47e78
--- a/framework/base/src/main/java/org/apache/ofbiz/base/util/ScriptUtil.java
+++ b/framework/base/src/main/java/org/apache/ofbiz/base/util/ScriptUtil.java
@@@ -399,7 -399,7 +399,7 @@@ public final class ScriptUtil
return scriptClass;
}
-- private ScriptUtil() {}
++ private ScriptUtil() { }
private static final class ProtectedBindings implements Bindings {
private final Map<String, Object> bindings;
diff --cc framework/base/src/main/java/org/apache/ofbiz/base/util/URLConnector.java
index 38e4b7c,38e4b7c..174cd3f
--- a/framework/base/src/main/java/org/apache/ofbiz/base/util/URLConnector.java
+++ b/framework/base/src/main/java/org/apache/ofbiz/base/util/URLConnector.java
@@@ -44,7 -44,7 +44,7 @@@ public class URLConnector
private boolean trustAnyCert = false;
private int hostCertLevel = 2;
-- protected URLConnector() {}
++ protected URLConnector() { }
protected URLConnector(URL url, String clientCertAlias, int hostCertLevel, boolean trustAnyCert) {
this.clientCertAlias = clientCertAlias;
this.url = url;
diff --cc framework/base/src/main/java/org/apache/ofbiz/base/util/UtilDateTime.java
index 6c33802,6c33802..77596ea
--- a/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilDateTime.java
+++ b/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilDateTime.java
@@@ -63,7 -63,7 +63,7 @@@ public final class UtilDateTime
*/
private static final String TIME_FORMAT = "HH:mm:ss";
-- private UtilDateTime() {}
++ private UtilDateTime() { }
public static double getInterval(Date from, Date thru) {
return thru != null ? thru.getTime() - from.getTime() : 0;
diff --cc framework/base/src/main/java/org/apache/ofbiz/base/util/UtilFormatOut.java
index 36fb4bf,36fb4bf..5e46a86
--- a/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilFormatOut.java
+++ b/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilFormatOut.java
@@@ -40,7 -40,7 +40,7 @@@ public final class UtilFormatOut
public static final String PERCENTAGE_FORMAT = "percentage";
public static final String SPELLED_OUT_FORMAT = "spelled-out";
-- private UtilFormatOut() {}
++ private UtilFormatOut() { }
public static String safeToString(Object obj) {
if (obj != null) {
@@@ -574,7 -574,7 +574,7 @@@
}
StringBuilder buffer = new StringBuilder();
-- for (int i=0; i < original.length()-4 ; i++) {
++ for (int i = 0; i < original.length()-4; i++) {
buffer.append('*');
}
buffer.append(original.substring(original.length()-4));
diff --cc framework/base/src/main/java/org/apache/ofbiz/base/util/UtilGenerics.java
index c4f9b32,c4f9b32..fdae05d
--- a/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilGenerics.java
+++ b/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilGenerics.java
@@@ -25,7 -25,7 +25,7 @@@ public final class UtilGenerics
private static final String MODULE = UtilMisc.class.getName();
-- private UtilGenerics() {}
++ private UtilGenerics() { }
@SuppressWarnings("unchecked")
public static <V> V cast(Object object) {
diff --cc framework/base/src/main/java/org/apache/ofbiz/base/util/UtilHttp.java
index c506219,c506219..b2c380c
--- a/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilHttp.java
+++ b/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilHttp.java
@@@ -96,7 -96,7 +96,7 @@@ public final class UtilHttp
private static final String SESSION_KEY_TIMEZONE = "timeZone";
private static final String SESSION_KEY_THEME = "visualTheme";
-- private UtilHttp () {}
++ private UtilHttp() { }
/**
* Create a combined map from servlet context, session, attributes and parameters
@@@ -185,13 -185,13 +185,11 @@@
long maxUploadSize = getMaxUploadSize(delegator);
int sizeThreshold = getSizeThreshold(delegator);
File tmpUploadRepository = getTmpUploadRepository(delegator);
--
String encoding = request.getCharacterEncoding();
// check for multipart content types which may have uploaded items
ServletFileUpload upload = new ServletFileUpload(new DiskFileItemFactory(sizeThreshold, tmpUploadRepository));
upload.setSizeMax(maxUploadSize);
--
// create the progress listener and add it to the session
FileUploadProgressListener listener = new FileUploadProgressListener();
upload.setProgressListener(listener);
@@@ -334,7 -334,7 +332,7 @@@
if (UtilValidate.isEmpty(paramMap.get(name))) {
paramMap.put(name, paramValue);
} else {
-- if (paramMap.get(name) instanceof Collection<?>){
++ if (paramMap.get(name) instanceof Collection<?>) {
List<String> valueList = UtilGenerics.cast(paramMap.get(name));
valueList.add(paramValue);
paramMap.put(name, valueList);
@@@ -1168,14 -1168,14 +1166,10 @@@
https://wiki.mozilla.org/Security/Features/XSS_Filter
https://bugzilla.mozilla.org/show_bug.cgi?id=528661
**/
-- resp.addHeader("X-XSS-Protection","1; mode=block");
--
++ resp.addHeader("X-XSS-Protection", "1; mode=block");
resp.setHeader("Referrer-Policy", "no-referrer-when-downgrade"); // This is the default (in Firefox at least)
--
resp.setHeader("Content-Security-Policy-Report-Only", "default-src 'self'");
--
SameSiteFilter.addSameSiteCookieAttribute(resp);
--
// TODO in custom project. Public-Key-Pins-Report-Only is interesting but can't be used OOTB because of demos (the letsencrypt certificate is renewed every 3 months)
}
diff --cc framework/base/src/main/java/org/apache/ofbiz/base/util/UtilIO.java
index 4a0edb4,4a0edb4..b46be75
--- a/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilIO.java
+++ b/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilIO.java
@@@ -36,7 -36,7 +36,7 @@@ import java.nio.charset.StandardCharset
public final class UtilIO {
private static final String MODULE = UtilIO.class.getName();
-- private UtilIO () {}
++ private UtilIO() { }
/** Copy a Reader to an Appendable.
*
diff --cc framework/base/src/main/java/org/apache/ofbiz/base/util/UtilJavaParse.java
index 0453879,0453879..63c1be5
--- a/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilJavaParse.java
+++ b/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilJavaParse.java
@@@ -92,7 -92,7 +92,7 @@@ public final class UtilJavaParse
entityMethodNames.add("findCountByCondition");
}
-- private UtilJavaParse () {}
++ private UtilJavaParse() { }
public static String findRealPathAndFileForClass(String fullyQualifiedClassName) {
// search through the component directories, in the src directory for each, using the class path as the path within it
diff --cc framework/base/src/main/java/org/apache/ofbiz/base/util/UtilMisc.java
index f0934c3,f0934c3..799b004
--- a/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilMisc.java
+++ b/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilMisc.java
@@@ -62,7 -62,7 +62,7 @@@ public final class UtilMisc
private static final BigDecimal ZERO_BD = BigDecimal.ZERO;
-- private UtilMisc () {}
++ private UtilMisc() { }
public static final <T extends Throwable> T initCause(T throwable, Throwable cause) {
throwable.initCause(cause);
@@@ -355,13 -355,13 +355,13 @@@
*/
@SafeVarargs
public static <T> List<T> toList(T... data) {
-- if (data == null){
++ if (data == null) {
return null;
}
List<T> list = new LinkedList<>();
-- for(T t : data){
++ for (T t : data) {
list.add(t);
}
@@@ -625,7 -625,7 +625,7 @@@
public static void copyFile(File sourceLocation , File targetLocation) throws IOException {
if (sourceLocation.isDirectory()) {
-- throw new IOException("File is a directory, not a file, cannot copy") ;
++ throw new IOException("File is a directory, not a file, cannot copy");
}
try (
InputStream in = new FileInputStream(sourceLocation);
diff --cc framework/base/src/main/java/org/apache/ofbiz/base/util/UtilNumber.java
index 46348dc,46348dc..8eafa6a
--- a/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilNumber.java
+++ b/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilNumber.java
@@@ -31,7 -31,7 +31,7 @@@ public final class UtilNumber
private static final String MODULE = UtilNumber.class.getName();
// properties file name for arithmetic configuration
-- private static final String arithmeticPropertiesFile = "arithmetic.properties";
++ private static final String ARITH_PROP_FILE = "arithmetic.properties";
// default scale and rounding mode for BigDecimals
private static final int DEFAULT_BD_SCALE = 2;
@@@ -39,7 -39,7 +39,7 @@@
// ICU4J rule sets for the en_US locale. To add more rules, expand this string.
// For reference, see the RbnfSampleRuleSets.java file distributed with ICU4J
-- private static final String ruleSet_en_US =
++ private static final String RULE_SET_EN_US =
/*
* These rules format a number in one of the two styles often used
* on checks. %dollars-and-hundredths formats cents as hundredths of
@@@ -78,7 -78,7 +78,7 @@@
// ICU4J rule sets for the th_TH locale. To add more rules, expand this string.
// For reference, see the RbnfSampleRuleSets.java file distributed with ICU4J
-- private static final String ruleSet_th_TH =
++ private static final String RULE_SET_TH_TH =
/*
* These rules format a number in one of the two styles often used
* on checks. %bahts-and-hundredths formats stangs as hundredths of
@@@ -117,7 -117,7 +117,7 @@@
// ICU4J rule sets for the en_IN locale. To add more rules, expand this string.
// For reference, see the RbnfSampleRuleSets.java file distributed with ICU4J
-- public static final String ruleSet_en_IN =
++ public static final String RULE_SET_EN_IN =
/*
* These rules format a number in one of the two styles often used
* on checks. %simplified formats paise as hundredths of
@@@ -170,17 -170,17 +170,17 @@@
private static HashMap<Locale, String> rbnfRuleSets;
static {
rbnfRuleSets = new HashMap<>();
-- rbnfRuleSets.put(Locale.US, ruleSet_en_US);
-- rbnfRuleSets.put(new Locale("th"), ruleSet_th_TH);
-- rbnfRuleSets.put(new Locale("en", "IN"), ruleSet_en_IN);
++ rbnfRuleSets.put(Locale.US, RULE_SET_EN_US);
++ rbnfRuleSets.put(new Locale("th"), RULE_SET_TH_TH);
++ rbnfRuleSets.put(new Locale("en", "IN"), RULE_SET_EN_IN);
}
-- private UtilNumber() {}
++ private UtilNumber() { }
/**
* Method to get BigDecimal scale factor from a property
* @param file - Name of the property file
-- * @param property - Name of the config property from arithmeticPropertiesFile (e.g., "invoice.decimals")
++ * @param property - Name of the config property from ARITH_PROP_FILE (e.g., "invoice.decimals")
* @return int - Scale factor to pass to BigDecimal's methods. Defaults to DEFAULT_BD_SCALE (2)
*/
public static int getBigDecimalScale(String file, String property) {
@@@ -203,18 -203,18 +203,18 @@@
}
/**
-- * Method to get BigDecimal scale factor from a property. Use the default arithmeticPropertiesFile properties file
-- * @param property - Name of the config property from arithmeticPropertiesFile (e.g., "invoice.decimals")
++ * Method to get BigDecimal scale factor from a property. Use the default ARITH_PROP_FILE properties file
++ * @param property - Name of the config property from ARITH_PROP_FILE (e.g., "invoice.decimals")
* @return int - Scale factor to pass to BigDecimal's methods. Defaults to DEFAULT_BD_SCALE (2)
*/
public static int getBigDecimalScale(String property) {
-- return getBigDecimalScale(arithmeticPropertiesFile, property);
++ return getBigDecimalScale(ARITH_PROP_FILE, property);
}
/**
* Method to get BigDecimal rounding mode from a property
* @param file - Name of the property file
-- * @param property - Name of the config property from arithmeticPropertiesFile (e.g., "invoice.rounding")
++ * @param property - Name of the config property from ARITH_PROP_FILE (e.g., "invoice.rounding")
* @return int - Rounding mode to pass to BigDecimal's methods. Defaults to BigDecimal.ROUND_HALF_UP
* @deprecated Use {@link #getRoundingMode(String, String)} instead
*/
@@@ -224,20 -224,20 +224,20 @@@
}
/**
-- * Method to get BigDecimal rounding mode from a property. Use the default arithmeticPropertiesFile properties file
-- * @param property - Name of the config property from arithmeticPropertiesFile (e.g., "invoice.rounding")
++ * Method to get BigDecimal rounding mode from a property. Use the default ARITH_PROP_FILE properties file
++ * @param property - Name of the config property from ARITH_PROP_FILE (e.g., "invoice.rounding")
* @return int - Rounding mode to pass to BigDecimal's methods. Defaults to BigDecimal.ROUND_HALF_UP
* @deprecated Use {@link #getRoundingMode(String)} instead
*/
@Deprecated
public static int getBigDecimalRoundingMode(String property) {
-- return getRoundingMode(arithmeticPropertiesFile, property).ordinal();
++ return getRoundingMode(ARITH_PROP_FILE, property).ordinal();
}
/**
* Method to get BigDecimal rounding mode from a property
* @param file - Name of the property file
-- * @param property - Name of the config property from arithmeticPropertiesFile (e.g., "invoice.rounding")
++ * @param property - Name of the config property from ARITH_PROP_FILE (e.g., "invoice.rounding")
* @return RoundingMode - Rounding mode to pass to BigDecimal's methods. Defaults to DEFAULT_BD_ROUNDING_MODE (RoundingMode.HALF_UP)
*/
public static RoundingMode getRoundingMode(String file, String property) {
@@@ -254,12 -254,12 +254,12 @@@
return mode;
}
/**
-- * Method to get BigDecimal rounding mode from a property. Use the default arithmeticPropertiesFile properties file
-- * @param property - Name of the config property from arithmeticPropertiesFile (e.g., "invoice.rounding")
++ * Method to get BigDecimal rounding mode from a property. Use the default ARITH_PROP_FILE properties file
++ * @param property - Name of the config property from ARITH_PROP_FILE (e.g., "invoice.rounding")
* @return RoundingMode - Rounding mode to pass to BigDecimal's methods. Defaults to DEFAULT_BD_ROUNDING_MODE (RoundingMode.HALF_UP)
*/
public static RoundingMode getRoundingMode(String property) {
-- return getRoundingMode(arithmeticPropertiesFile, property);
++ return getRoundingMode(ARITH_PROP_FILE, property);
}
/**
diff --cc framework/base/src/main/java/org/apache/ofbiz/base/util/UtilPlist.java
index aaeec75,aaeec75..414781c
--- a/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilPlist.java
+++ b/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilPlist.java
@@@ -37,7 -37,7 +37,7 @@@ public final class UtilPlist
private static final String MODULE = UtilPlist.class.getName();
-- private UtilPlist() {}
++ private UtilPlist() { }
/** simple 4 char indentation */
private static final String indentFourString = " ";
diff --cc framework/base/src/main/java/org/apache/ofbiz/base/util/UtilProperties.java
index b092ff0,b092ff0..be964bd
--- a/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilProperties.java
+++ b/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilProperties.java
@@@ -65,7 -65,7 +65,7 @@@ public final class UtilProperties imple
private static final String MODULE = UtilProperties.class.getName();
-- private UtilProperties() {}
++ private UtilProperties() { }
/**
* A cache for storing Properties instances. Each Properties instance is keyed by its URL.
@@@ -996,7 -996,7 +996,7 @@@
protected Locale locale = null;
protected int hashCode = hashCode();
-- protected UtilResourceBundle() {}
++ protected UtilResourceBundle() { }
public UtilResourceBundle(Properties properties, Locale locale, UtilResourceBundle parent) {
this.properties = properties;
diff --cc framework/base/src/main/java/org/apache/ofbiz/base/util/UtilURL.java
index 8486e28,8486e28..ce6600d
--- a/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilURL.java
+++ b/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilURL.java
@@@ -33,7 -33,7 +33,7 @@@ public final class UtilURL
private static final String MODULE = UtilURL.class.getName();
private static final Map<String, URL> urlMap = new ConcurrentHashMap<>();
-- private UtilURL() {}
++ private UtilURL() { }
public static <C> URL fromClass(Class<C> contextClass) {
String resourceName = contextClass.getName();
diff --cc framework/base/src/main/java/org/apache/ofbiz/base/util/UtilValidate.java
index 610c875,610c875..ad5262c
--- a/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilValidate.java
+++ b/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilValidate.java
@@@ -72,7 -72,7 +72,7 @@@ public final class UtilValidate
private static final String MODULE = UtilValidate.class.getName();
-- private UtilValidate() {}
++ private UtilValidate() { }
/** boolean specifying by default whether or not it is okay for a String to be empty */
private static final boolean defaultEmptyOK = true;
diff --cc framework/base/src/main/java/org/apache/ofbiz/base/util/UtilXml.java
index 90249b3,90249b3..2c57cf4
--- a/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilXml.java
+++ b/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilXml.java
@@@ -82,7 -82,7 +82,7 @@@ public final class UtilXml
private static final String MODULE = UtilXml.class.getName();
private static final XStream xstream = createXStream();
-- private UtilXml () {}
++ private UtilXml() { }
private static XStream createXStream() {
XStream xstream = new XStream();
@@@ -828,7 -828,7 +828,7 @@@
if (node != null) {
do {
String nodeName = node.getLocalName();
-- if (nodeName == null){
++ if (nodeName == null) {
nodeName = UtilXml.getNodeNameIgnorePrefix(node);
}
if (node.getNodeType() == Node.ELEMENT_NODE && (childElementName == null ||
@@@ -1172,12 -1172,12 +1172,12 @@@
* @param node
* @return nodeName
*/
-- public static String getNodeNameIgnorePrefix(Node node){
++ public static String getNodeNameIgnorePrefix(Node node) {
if (node==null) {
return null;
}
String nodeName = node.getNodeName();
-- if (nodeName.contains(":")){
++ if (nodeName.contains(":")) {
// remove any possible prefix
nodeName = nodeName.split(":")[1];
}
@@@ -1189,12 -1189,12 +1189,12 @@@
* @param element
* @return tagName
*/
-- public static String getTagNameIgnorePrefix(Element element){
++ public static String getTagNameIgnorePrefix(Element element) {
if (element==null) {
return null;
}
String tagName = element.getTagName();
-- if (tagName.contains(":")){
++ if (tagName.contains(":")) {
// remove any possible prefix
tagName = tagName.split(":")[1];
}
@@@ -1206,19 -1206,19 +1206,18 @@@
* @param element
* @return The value of the node, depending on its type; see the table Node class
*/
-- public static String getAttributeValueIgnorePrefix(Element element, String attributeName){
++ public static String getAttributeValueIgnorePrefix(Element element, String attributeName) {
if (element==null) {
return "";
}
NamedNodeMap attributes = element.getAttributes();
-- if (attributes != null){
-- for (int i = 0, size = attributes.getLength(); i < size; i++)
-- {
++ if (attributes != null) {
++ for (int i = 0, size = attributes.getLength(); i < size; i++) {
Node node = attributes.item(i);
-- if (node.getNodeType() == Node.ATTRIBUTE_NODE){
++ if (node.getNodeType() == Node.ATTRIBUTE_NODE) {
String nodeName = UtilXml.getNodeNameIgnorePrefix(node);
-- if (nodeName.equals(attributeName)){
++ if (nodeName.equals(attributeName)) {
return node.getNodeValue();
}
}
diff --cc framework/base/src/main/java/org/apache/ofbiz/base/util/collections/LifoSet.java
index fc4bd9e,fc4bd9e..2557ef0
--- a/framework/base/src/main/java/org/apache/ofbiz/base/util/collections/LifoSet.java
+++ b/framework/base/src/main/java/org/apache/ofbiz/base/util/collections/LifoSet.java
@@@ -41,7 -41,7 +41,7 @@@ public class LifoSet<V> extends Abstrac
* collection, in the order they are returned by the collection's
* iterator.
*/
-- public LifoSet() {}
++ public LifoSet() { }
/**
* Constructs a set containing the elements of the specified
diff --cc framework/base/src/main/java/org/apache/ofbiz/base/util/string/UelUtil.java
index 40fefb2,40fefb2..8bc83db
--- a/framework/base/src/main/java/org/apache/ofbiz/base/util/string/UelUtil.java
+++ b/framework/base/src/main/java/org/apache/ofbiz/base/util/string/UelUtil.java
@@@ -62,7 -62,7 +62,7 @@@ public final class UelUtil
}
};
-- private UelUtil () {}
++ private UelUtil() { }
public static String getLocalizedMapLocaleKey() {
return localizedMapLocaleKey;
diff --cc framework/base/src/main/java/org/apache/ofbiz/base/util/string/test/FlexibleStringExpanderTests.java
index 8ad4100,8ad4100..7005dc0
--- a/framework/base/src/main/java/org/apache/ofbiz/base/util/string/test/FlexibleStringExpanderTests.java
+++ b/framework/base/src/main/java/org/apache/ofbiz/base/util/string/test/FlexibleStringExpanderTests.java
@@@ -224,7 -224,7 +224,7 @@@ public class FlexibleStringExpanderTest
}
@SuppressWarnings("serial")
-- public static class ThrowException extends Exception{
++ public static class ThrowException extends Exception {
public Object getValue() throws Exception {
throw new Exception();
}
diff --cc framework/base/src/main/java/org/apache/ofbiz/base/util/template/XslTransform.java
index 7f4ec58,7f4ec58..9c4ed51
--- a/framework/base/src/main/java/org/apache/ofbiz/base/util/template/XslTransform.java
+++ b/framework/base/src/main/java/org/apache/ofbiz/base/util/template/XslTransform.java
@@@ -105,14 -105,14 +105,14 @@@ public final class XslTransform
Document outputDocument = null;
TransformerFactory tFactory = TransformerFactory.newInstance();
Templates translet = null;
-- String templateName = (String)context.get("templateName");
++ String templateName = (String) context.get("templateName");
if (UtilValidate.isNotEmpty(templateName)) {
translet = xslTemplatesCache.get(templateName);
}
if (translet == null) {
-- String templateUrl = (String)context.get("templateUrl");
-- String templateString = (String)context.get("templateString");
++ String templateUrl = (String) context.get("templateUrl");
++ String templateString = (String) context.get("templateString");
Document templateDocument = (Document)context.get("templateDocument");
Source templateSource = getSource(templateDocument, templateUrl, templateString);
translet = tFactory.newTemplates(templateSource);
@@@ -132,8 -132,8 +132,8 @@@
DOMResult outputResult = new DOMResult(UtilXml.makeEmptyXmlDocument());
-- String inputUrl = (String)context.get("inputUrl");
-- String inputString = (String)context.get("inputString");
++ String inputUrl = (String) context.get("inputUrl");
++ String inputString = (String) context.get("inputString");
Document inputDocument = (Document)context.get("inputDocument");
Source inputSource = getSource(inputDocument, inputUrl, inputString);
diff --cc framework/base/src/test/java/org/apache/ofbiz/base/util/UtilCodecTests.java
index f5d3f97,f5d3f97..0dcaa15
--- a/framework/base/src/test/java/org/apache/ofbiz/base/util/UtilCodecTests.java
+++ b/framework/base/src/test/java/org/apache/ofbiz/base/util/UtilCodecTests.java
@@@ -71,7 -71,7 +71,7 @@@ public class UtilCodecTests
"In field [>-not-allowed] less-than (<) and greater-than (>) symbols are not allowed.");
// jleroux: temporarily comments because this test is failing on BuildBot (only) when switching to Gradle
//checkStringForHtmlStrictNone_test("high-ascii", "fÀ®", "f%C0%AE");
-- // this looks like a bug, namely the extra trailing ;
++ // this looks like a bug, namely the extra trailing;
// jacopoc: temporarily commented because this test is failing after the upgrade of owasp-esapi
//checkStringForHtmlStrictNone_test("double-ampersand", "f\";oo", "f%26quot%3boo");
checkStringForHtmlStrictNoneTest("double-encoding", "%2%353Cscript", "%2%353Cscript",
diff --cc framework/catalina/src/main/java/org/apache/ofbiz/catalina/container/CatalinaContainer.java
index fafa9b8,fafa9b8..c05cc9e
--- a/framework/catalina/src/main/java/org/apache/ofbiz/catalina/container/CatalinaContainer.java
+++ b/framework/catalina/src/main/java/org/apache/ofbiz/catalina/container/CatalinaContainer.java
@@@ -106,10 -106,10 +106,10 @@@ public class CatalinaContainer implemen
Host host = prepareHost(tomcat, null);
// add realm and valve for Tomcat SSO
-- if (EntityUtilProperties.propertyValueEquals("security", "security.login.tomcat.sso", "true")){
++ if (EntityUtilProperties.propertyValueEquals("security", "security.login.tomcat.sso", "true")) {
boolean useEncryption = EntityUtilProperties.propertyValueEquals("security", "password.encrypt", "true");
OFBizRealm ofBizRealm = new OFBizRealm();
-- if (useEncryption){
++ if (useEncryption) {
ofBizRealm.setCredentialHandler(new HashedCredentialHandler());
} else {
ofBizRealm.setCredentialHandler(new SimpleCredentialHandler());
diff --cc framework/catalina/src/main/java/org/apache/ofbiz/catalina/container/OFBizRealm.java
index 27f6d70,27f6d70..0b180a7
--- a/framework/catalina/src/main/java/org/apache/ofbiz/catalina/container/OFBizRealm.java
+++ b/framework/catalina/src/main/java/org/apache/ofbiz/catalina/container/OFBizRealm.java
@@@ -40,7 -40,7 +40,7 @@@ public class OFBizRealm extends RealmBa
Delegator delegator = DelegatorFactory.getDelegator(null);
try {
GenericValue userLogin = EntityQuery.use(delegator).from("UserLogin").where("userLoginId", username).queryOne();
-- if (userLogin!=null){
++ if (userLogin!=null) {
return userLogin.getString("currentPassword");
}
} catch (GenericEntityException e) {
diff --cc framework/common/src/main/java/org/apache/ofbiz/common/CommonWorkers.java
index 3ee687b,3ee687b..b67cb79
--- a/framework/common/src/main/java/org/apache/ofbiz/common/CommonWorkers.java
+++ b/framework/common/src/main/java/org/apache/ofbiz/common/CommonWorkers.java
@@@ -42,7 -42,7 +42,7 @@@ public final class CommonWorkers
public final static String MODULE = CommonWorkers.class.getName();
-- private CommonWorkers() {}
++ private CommonWorkers() { }
public static List<GenericValue> getCountryList(Delegator delegator) {
List<GenericValue> geoList = new LinkedList<>();
@@@ -156,7 -156,7 +156,7 @@@
.cache(true)
.queryList()
);
-- } catch (GenericEntityException e){
++ } catch (GenericEntityException e) {
Debug.logError(e, "Cannot lookup Geo", MODULE);
}
diff --cc framework/common/src/main/java/org/apache/ofbiz/common/FindServices.java
index f116105,f116105..62b3d24
--- a/framework/common/src/main/java/org/apache/ofbiz/common/FindServices.java
+++ b/framework/common/src/main/java/org/apache/ofbiz/common/FindServices.java
@@@ -87,7 -87,7 +87,7 @@@ public class FindServices
entityOperators.put("notEqual", EntityOperator.NOT_EQUAL);
}
-- public FindServices() {}
++ public FindServices() { }
/**
* prepareField, analyse inputFields to created normalizedFields a map with field name and operator.
@@@ -288,7 -288,7 +288,7 @@@
if (ObjectType.isEmpty(fieldValue) && !"empty".equals(operation)) {
continue;
}
-- if (UtilValidate.isNotEmpty(currentGroup)){
++ if (UtilValidate.isNotEmpty(currentGroup)) {
List<EntityCondition> groupedConditions = new LinkedList<>();
if (savedGroups.get(currentGroup) != null) {
groupedConditions.addAll(savedGroups.get(currentGroup));
diff --cc framework/common/src/main/java/org/apache/ofbiz/common/KeywordSearchUtil.java
index d7c4741,d7c4741..cf16d59
--- a/framework/common/src/main/java/org/apache/ofbiz/common/KeywordSearchUtil.java
+++ b/framework/common/src/main/java/org/apache/ofbiz/common/KeywordSearchUtil.java
@@@ -57,7 -57,7 +57,7 @@@ public final class KeywordSearchUtil
thesaurusRelsForReplace.add("KWTR_CS");
}
-- private KeywordSearchUtil () {}
++ private KeywordSearchUtil() { }
public static String getSeparators() {
String seps = UtilProperties.getPropertyValue("keywordsearch", "index.keyword.separators", ";: ,.!?\t\"\'\r\n\\/()[]{}*%<>-+_");
diff --cc framework/common/src/main/java/org/apache/ofbiz/common/UrlServletHelper.java
index 8ca6ecb,8ca6ecb..035d986
--- a/framework/common/src/main/java/org/apache/ofbiz/common/UrlServletHelper.java
+++ b/framework/common/src/main/java/org/apache/ofbiz/common/UrlServletHelper.java
@@@ -45,7 -45,7 +45,7 @@@ public final class UrlServletHelper
public final static String MODULE = UrlServletHelper.class.getName();
-- private UrlServletHelper() {}
++ private UrlServletHelper() { }
public static void setRequestAttributes(ServletRequest request, Delegator delegator, ServletContext servletContext) {
HttpServletRequest httpRequest = (HttpServletRequest) request;
@@@ -83,7 -83,7 +83,7 @@@
request.setAttribute("delegator", delegator);
// set the webSiteId in the session
-- if (UtilValidate.isEmpty(httpRequest.getSession().getAttribute("webSiteId"))){
++ if (UtilValidate.isEmpty(httpRequest.getSession().getAttribute("webSiteId"))) {
httpRequest.getSession().setAttribute("webSiteId", httpRequest.getSession().getServletContext().getAttribute("webSiteId"));
}
}
@@@ -133,19 -133,19 +133,19 @@@
}
//Set query string parameters to url
-- if (UtilValidate.isNotEmpty(viewIndex)){
++ if (UtilValidate.isNotEmpty(viewIndex)) {
urlBuilder.append("/~VIEW_INDEX=" + viewIndex);
request.setAttribute("VIEW_INDEX", viewIndex);
}
-- if (UtilValidate.isNotEmpty(viewSize)){
++ if (UtilValidate.isNotEmpty(viewSize)) {
urlBuilder.append("/~VIEW_SIZE=" + viewSize);
request.setAttribute("VIEW_SIZE", viewSize);
}
-- if (UtilValidate.isNotEmpty(viewSort)){
++ if (UtilValidate.isNotEmpty(viewSort)) {
urlBuilder.append("/~VIEW_SORT=" + viewSort);
request.setAttribute("VIEW_SORT", viewSort);
}
-- if (UtilValidate.isNotEmpty(searchString)){
++ if (UtilValidate.isNotEmpty(searchString)) {
urlBuilder.append("/~SEARCH_STRING=" + searchString);
request.setAttribute("SEARCH_STRING", searchString);
}
@@@ -265,13 -265,13 +265,13 @@@
str = str.replace("‘", "-");
str = str.replace("?", "-");
str = str.replace("–", "");
-- while(str.startsWith("-")){
++ while(str.startsWith("-")) {
str = str.substring(1);
}
-- while(str.endsWith("-")){
++ while(str.endsWith("-")) {
str = str.substring(0, str.length() - 1);
}
-- while(str.indexOf("--") != -1){
++ while(str.indexOf("--") != -1) {
str = str.replace("--","-");
}
return str;
diff --cc framework/common/src/main/java/org/apache/ofbiz/common/email/EmailServices.java
index 6968f22,6968f22..112a6b7
--- a/framework/common/src/main/java/org/apache/ofbiz/common/email/EmailServices.java
+++ b/framework/common/src/main/java/org/apache/ofbiz/common/email/EmailServices.java
@@@ -442,7 -442,7 +442,7 @@@ public class EmailServices
if (visualTheme == null) {
visualTheme = ThemeFactory.resolveVisualTheme(null);
}
--
++
List<String> xslfoAttachScreenLocationList = new LinkedList<>();
List<String> attachmentNameList = new LinkedList<>();
if (UtilValidate.isNotEmpty(xslfoAttachScreenLocationParam)) {
@@@ -457,7 -457,7 +457,7 @@@
if (UtilValidate.isNotEmpty(attachmentNameListParam)) {
attachmentNameList.addAll(attachmentNameListParam);
}
--
++
List<String> attachmentTypeList = new LinkedList<>();
String attachmentTypeParam = (String) serviceContext.remove("attachmentType");
List<String> attachmentTypeListParam = UtilGenerics.cast(serviceContext.remove("attachmentTypeList"));
@@@ -467,7 -467,7 +467,7 @@@
if (UtilValidate.isNotEmpty(attachmentTypeListParam)) {
attachmentTypeList.addAll(attachmentTypeListParam);
}
--
++
Locale locale = (Locale) serviceContext.get("locale");
Map<String, Object> bodyParameters = UtilGenerics.cast(serviceContext.remove("bodyParameters"));
if (bodyParameters == null) {
@@@ -485,7 -485,7 +485,7 @@@
String orderId = (String) bodyParameters.get("orderId");
String returnId = (String) serviceContext.get("returnId");
String custRequestId = (String) bodyParameters.get("custRequestId");
--
++
bodyParameters.put("communicationEventId", serviceContext.get("communicationEventId"));
NotificationServices.setBaseUrl(dctx.getDelegator(), webSiteId, bodyParameters);
String contentType = (String) serviceContext.remove("contentType");
@@@ -527,7 -527,7 +527,6 @@@
} else {
bodyParts.add(UtilMisc.<String, Object>toMap("content", bodyWriter.toString(), "type", UtilValidate.isNotEmpty(contentType) ? contentType : "text/html"));
}
--
for (int i = 0; i < xslfoAttachScreenLocationList.size(); i++) {
String xslfoAttachScreenLocation = xslfoAttachScreenLocationList.get(i);
String attachmentName = "Details.pdf";
@@@ -539,17 -539,17 +538,17 @@@
if (UtilValidate.isNotEmpty(attachmentTypeList) && attachmentTypeList.size() >= i) {
attachmentType = attachmentTypeList.get(i);
}
--
++
isMultiPart = true;
// start processing fo pdf attachment
try (Writer writer = new StringWriter(); ByteArrayOutputStream baos = new ByteArrayOutputStream()) {
// substitute the freemarker variables...
ScreenStringRenderer foScreenStringRenderer = null;
-- if (MimeConstants.MIME_PLAIN_TEXT.equals(attachmentType)){
++ if (MimeConstants.MIME_PLAIN_TEXT.equals(attachmentType)) {
foScreenStringRenderer = new MacroScreenRenderer(visualTheme.getModelTheme(), "screentext");
-- }else{
++ } else {
foScreenStringRenderer = new MacroScreenRenderer(visualTheme.getModelTheme(), "screenfop");
-- }
++ }
ScreenRenderer screensAtt = new ScreenRenderer(writer, screenContext, foScreenStringRenderer);
screensAtt.populateContextForService(dctx, bodyParameters);
screensAtt.render(xslfoAttachScreenLocation);
@@@ -669,7 -669,7 +668,6 @@@
serviceContext.put("hideInLog", true);
return sendMailFromScreen(dctx, serviceContext);
}
--
public static void sendFailureNotification(DispatchContext dctx, Map<String, ? extends Object> context, MimeMessage message, List<SMTPAddressFailedException> failures) {
Locale locale = (Locale) context.get("locale");
Map<String, Object> newContext = new LinkedHashMap<>();
diff --cc framework/common/src/main/java/org/apache/ofbiz/common/geo/GeoWorker.java
index 9331c3c,9331c3c..d3ddf8d
--- a/framework/common/src/main/java/org/apache/ofbiz/common/geo/GeoWorker.java
+++ b/framework/common/src/main/java/org/apache/ofbiz/common/geo/GeoWorker.java
@@@ -39,7 -39,7 +39,7 @@@ public final class GeoWorker
private static final String MODULE = GeoWorker.class.getName();
-- private GeoWorker() {}
++ private GeoWorker() { }
public static List<GenericValue> expandGeoGroup(String geoId, Delegator delegator) {
GenericValue geo = null;
diff --cc framework/common/src/main/java/org/apache/ofbiz/common/image/ImageTransform.java
index fdbd693,fdbd693..fe7f2f7
--- a/framework/common/src/main/java/org/apache/ofbiz/common/image/ImageTransform.java
+++ b/framework/common/src/main/java/org/apache/ofbiz/common/image/ImageTransform.java
@@@ -77,12 -77,12 +77,12 @@@ public class ImageTransform
try {
bufImg = ImageIO.read(new File(fileLocation));
} catch (IllegalArgumentException e) {
-- String errMsg = UtilProperties.getMessage(RESOURCE, "ImageTransform.input_is_null", locale) + " : " + fileLocation + " ; " + e.toString();
++ String errMsg = UtilProperties.getMessage(RESOURCE, "ImageTransform.input_is_null", locale) + " : " + fileLocation + "; " + e.toString();
Debug.logError(errMsg, MODULE);
result.put(ModelService.ERROR_MESSAGE, errMsg);
return result;
} catch (IOException e) {
-- String errMsg = UtilProperties.getMessage(RESOURCE, "ImageTransform.error_occurs_during_reading", locale) + " : " + fileLocation + " ; " + e.toString();
++ String errMsg = UtilProperties.getMessage(RESOURCE, "ImageTransform.error_occurs_during_reading", locale) + " : " + fileLocation + "; " + e.toString();
Debug.logError(errMsg, MODULE);
result.put(ModelService.ERROR_MESSAGE, errMsg);
return result;
@@@ -126,7 -126,7 +126,7 @@@
defaultWidth = -1;
}
if (defaultHeight == 0.0 || defaultWidth == 0.0) {
-- String errMsg = UtilProperties.getMessage(RESOURCE, "ImageTransform.one_default_dimension_is_null", locale) + " : defaultHeight = " + defaultHeight + " ; defaultWidth = " + defaultWidth;
++ String errMsg = UtilProperties.getMessage(RESOURCE, "ImageTransform.one_default_dimension_is_null", locale) + " : defaultHeight = " + defaultHeight + "; defaultWidth = " + defaultWidth;
Debug.logError(errMsg, MODULE);
result.put(ModelService.ERROR_MESSAGE, errMsg);
return result;
diff --cc framework/common/src/main/java/org/apache/ofbiz/common/period/PeriodWorker.java
index ff5b0a8,ff5b0a8..d532872
--- a/framework/common/src/main/java/org/apache/ofbiz/common/period/PeriodWorker.java
+++ b/framework/common/src/main/java/org/apache/ofbiz/common/period/PeriodWorker.java
@@@ -32,7 -32,7 +32,7 @@@ import org.apache.ofbiz.entity.conditio
public final class PeriodWorker {
public final static String MODULE = PeriodWorker.class.getName();
-- private PeriodWorker() {}
++ private PeriodWorker() { }
/**
* Method to get a condition that checks that the given fieldName is in a given timePeriod.
diff --cc framework/common/src/main/java/org/apache/ofbiz/common/preferences/PreferenceWorker.java
index 8bf53a6,8bf53a6..f5ce506
--- a/framework/common/src/main/java/org/apache/ofbiz/common/preferences/PreferenceWorker.java
+++ b/framework/common/src/main/java/org/apache/ofbiz/common/preferences/PreferenceWorker.java
@@@ -51,7 -51,7 +51,7 @@@ public final class PreferenceWorker
*/
private static final String DEFAULT_UID = "_NA_";
-- private PreferenceWorker () {}
++ private PreferenceWorker() { }
/**
* Add a UserPreference GenericValue to a Map.
diff --cc framework/common/src/main/java/org/apache/ofbiz/common/qrcode/QRCodeServices.java
index f2e1caf,f2e1caf..2a3a8de
--- a/framework/common/src/main/java/org/apache/ofbiz/common/qrcode/QRCodeServices.java
+++ b/framework/common/src/main/java/org/apache/ofbiz/common/qrcode/QRCodeServices.java
@@@ -145,7 -145,7 +145,6 @@@ public class QRCodeServices
}
logoBufferedImage = defaultLogoImage;
}
--
BufferedImage newBufferedImage = null;
if (UtilValidate.isNotEmpty(logoBufferedImage)) {
if (UtilValidate.isNotEmpty(logoImageMaxWidth) && UtilValidate.isNotEmpty(logoImageMaxHeight) && (logoBufferedImage.getWidth() > logoImageMaxWidth || logoBufferedImage.getHeight() > logoImageMaxHeight)) {
@@@ -165,7 -165,7 +164,6 @@@
graphics.drawImage(logoBufferedImage, new AffineTransformOp(AffineTransform.getTranslateInstance(1, 1), null), (newBufferedImage.getWidth() - logoBufferedImage.getWidth())/2, (newBufferedImage.getHeight() - logoBufferedImage.getHeight())/2);
graphics.dispose();
}
--
if (UtilValidate.isNotEmpty(verifyOutput) && verifyOutput) {
Decoder decoder = new Decoder();
Map<DecodeHintType, Object> decodeHints = new EnumMap<>(DecodeHintType.class);
diff --cc framework/common/src/main/java/org/apache/ofbiz/common/status/StatusWorker.java
index 137b9af,137b9af..57cfb45
--- a/framework/common/src/main/java/org/apache/ofbiz/common/status/StatusWorker.java
+++ b/framework/common/src/main/java/org/apache/ofbiz/common/status/StatusWorker.java
@@@ -36,7 -36,7 +36,7 @@@ public final class StatusWorker
private static final String MODULE = StatusWorker.class.getName();
-- private StatusWorker() {}
++ private StatusWorker() { }
public static void getStatusItems(PageContext pageContext, String attributeName, String statusTypeId) {
Delegator delegator = (Delegator) pageContext.getRequest().getAttribute("delegator");
diff --cc framework/common/src/main/java/org/apache/ofbiz/common/telecom/TelecomServices.java
index 904f580,904f580..2bce922
--- a/framework/common/src/main/java/org/apache/ofbiz/common/telecom/TelecomServices.java
+++ b/framework/common/src/main/java/org/apache/ofbiz/common/telecom/TelecomServices.java
@@@ -52,7 -52,7 +52,6 @@@ public class TelecomServices
String telecomGatewayConfigId = (String) context.get("telecomGatewayConfigId");
List<String> numbers = checkCollection(context.get("numbers"), String.class);
String message = (String) context.get("message");
--
String telecomEnabled = EntityUtilProperties.getPropertyValue("general", "telecom.notifications.enabled", delegator);
if (!"Y".equals(telecomEnabled)) {
Debug.logImportant("Telecom message not sent to " + numbers.toString() +" because telecom.notifications.enabled property is set to N or empty", MODULE);
@@@ -65,7 -65,7 +64,6 @@@
numbers.add(redirectNumber);
}
--
try {
Map<String, Object> createCommEventCtx = new HashMap<>();
createCommEventCtx = ctx.makeValidContext("createCommunicationEvent", ModelService.IN_PARAM, context);
diff --cc framework/common/src/main/java/org/apache/ofbiz/common/uom/UomWorker.java
index 8faf7b5,8faf7b5..bbc5121
--- a/framework/common/src/main/java/org/apache/ofbiz/common/uom/UomWorker.java
+++ b/framework/common/src/main/java/org/apache/ofbiz/common/uom/UomWorker.java
@@@ -38,7 -38,7 +38,7 @@@ public class UomWorker
private static final String MODULE = UomWorker.class.getName();
-- private UomWorker () {}
++ private UomWorker() { }
public static int[] uomTimeToCalTime(String uomId) {
if ("TF_ms".equals(uomId)) {
diff --cc framework/datafile/src/main/java/org/apache/ofbiz/datafile/ModelDataFile.java
index 0a268f5,0a268f5..1236f84
--- a/framework/datafile/src/main/java/org/apache/ofbiz/datafile/ModelDataFile.java
+++ b/framework/datafile/src/main/java/org/apache/ofbiz/datafile/ModelDataFile.java
@@@ -62,7 -62,7 +62,6 @@@ public class ModelDataFile
/** A free form description of the file */
public String description = "";
--
/** file enconding, by default UTF-8 is used */
public String encodingType = "UTF-8";
@@@ -172,7 -172,7 +171,6 @@@
public void setRecords(List<ModelRecord> records) {
this.records = records;
}
--
public String getEncodingType() {
return encodingType;
}
diff --cc framework/entity/src/main/java/org/apache/ofbiz/entity/GenericDelegator.java
index 9f9c5b1,9f9c5b1..18571b3
--- a/framework/entity/src/main/java/org/apache/ofbiz/entity/GenericDelegator.java
+++ b/framework/entity/src/main/java/org/apache/ofbiz/entity/GenericDelegator.java
@@@ -189,7 -189,7 +189,7 @@@ public class GenericDelegator implement
}
/** Only allow creation through the factory method */
-- protected GenericDelegator() {}
++ protected GenericDelegator() { }
/** Only allow creation through the factory method */
protected GenericDelegator(String delegatorFullName) throws GenericEntityException {
diff --cc framework/entity/src/main/java/org/apache/ofbiz/entity/GenericEntity.java
index bd9d07b,bd9d07b..5233c9b
--- a/framework/entity/src/main/java/org/apache/ofbiz/entity/GenericEntity.java
+++ b/framework/entity/src/main/java/org/apache/ofbiz/entity/GenericEntity.java
@@@ -878,7 -878,7 +878,7 @@@ public class GenericEntity implements M
keyBuffer.append('.');
keyBuffer.append(name);
// finish off by adding the values of all PK fields
-- if (modelEntity instanceof ModelViewEntity){
++ if (modelEntity instanceof ModelViewEntity) {
// retrieve pkNames of realEntity
ModelViewEntity modelViewEntity = (ModelViewEntity) modelEntity;
List<String> pkNamesToUse = new LinkedList<>();
@@@ -891,7 -891,7 +891,7 @@@
//search aliasName for pkField of realEntity
while (iterAlias != null && iterAlias.hasNext()) {
ModelAlias aliasField = iterAlias.next();
-- if (aliasField.getField().equals(curField.getName())){
++ if (aliasField.getField().equals(curField.getName())) {
ModelEntity memberModelEntity = modelViewEntity.getMemberModelEntity(aliasField.getEntityAlias());
if (memberModelEntity.getEntityName().equals(modelEntityToUse.getEntityName())) {
pkName = aliasField.getName();
diff --cc framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityClause.java
index b05ffeb,b05ffeb..c90e45b
--- a/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityClause.java
+++ b/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityClause.java
@@@ -41,7 -41,7 +41,7 @@@ public class EntityClause
private EntityOperator<?,?> intraFieldOperation = null;
private Object value = null;
-- public EntityClause() {}
++ public EntityClause() { }
public EntityClause(String firstEntity, String secondEntity, String firstField, String secondField, EntityOperator<?, ?> interFieldOperation, EntityOperator<?, ?> intraFieldOperation) {
this.firstEntity = firstEntity;
diff --cc framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityConditionParam.java
index 22d3d76,22d3d76..448a95b
--- a/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityConditionParam.java
+++ b/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityConditionParam.java
@@@ -31,7 -31,7 +31,7 @@@ public class EntityConditionParam imple
protected ModelField modelField;
protected Object fieldValue;
-- protected EntityConditionParam() {}
++ protected EntityConditionParam() { }
public EntityConditionParam(ModelField modelField, Object fieldValue) {
if (modelField == null) {
diff --cc framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityExpr.java
index 45d890b,45d890b..ac1d500
--- a/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityExpr.java
+++ b/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityExpr.java
@@@ -230,7 -230,7 +230,7 @@@ public final class EntityExpr implement
+ " probably because there is no datasource (helper) setup for the entity group"
+ " that this entity is in: [" + deleg.getEntityGroupName(entityName) + "]");
}
-- if (value instanceof EntityConditionSubSelect){
++ if (value instanceof EntityConditionSubSelect) {
ModelFieldType valueType = null;
try {
ModelEntity valueModelEntity= ((EntityConditionSubSelect) value).getModelEntity();
diff --cc framework/entity/src/main/java/org/apache/ofbiz/entity/finder/EntityFinderUtil.java
index 1f885ba,1f885ba..de28b94
--- a/framework/entity/src/main/java/org/apache/ofbiz/entity/finder/EntityFinderUtil.java
+++ b/framework/entity/src/main/java/org/apache/ofbiz/entity/finder/EntityFinderUtil.java
@@@ -59,7 -59,7 +59,7 @@@ public final class EntityFinderUtil
private static final String MODULE = EntityFinderUtil.class.getName();
-- private EntityFinderUtil () {}
++ private EntityFinderUtil() { }
public static Map<FlexibleMapAccessor<Object>, Object> makeFieldMap(Element element) {
Map<FlexibleMapAccessor<Object>, Object> fieldMap = null;
diff --cc framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/SqlJdbcUtil.java
index bf68eed,bf68eed..670b6a9
--- a/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/SqlJdbcUtil.java
+++ b/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/SqlJdbcUtil.java
@@@ -116,7 -116,7 +116,7 @@@ public final class SqlJdbcUtil
fieldTypeMap.put("java.util.LinkedList", 15);
}
-- private SqlJdbcUtil () {}
++ private SqlJdbcUtil() { }
/** Makes the FROM clause and when necessary the JOIN clause(s) as well */
public static String makeFromClause(ModelEntity modelEntity, ModelFieldTypeReader modelFieldTypeReader, Datasource datasourceInfo) throws GenericEntityException {
StringBuilder sql = new StringBuilder(" FROM ");
diff --cc framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelEntityChecker.java
index 701a189,701a189..56f3679
--- a/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelEntityChecker.java
+++ b/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelEntityChecker.java
@@@ -505,6 -505,6 +505,6 @@@ public class ModelEntityChecker
"ZEROFILL", "ZONE" };
-- private ModelEntityChecker() {}
++ private ModelEntityChecker() { }
}
diff --cc framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelRelation.java
index 05c63f1,05c63f1..3443789
--- a/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelRelation.java
+++ b/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelRelation.java
@@@ -251,7 -251,7 +251,7 @@@ public final class ModelRelation extend
return "";
StringBuilder returnString = new StringBuilder(keyMaps.size() * 10);
-- int i=0;
++ int i = 0;
while (true) {
ModelKeyMap kmap = keyMaps.get(i);
returnString.append(ModelUtil.upperFirstChar(kmap.getFieldName()));
@@@ -274,7 -274,7 +274,7 @@@
return "";
StringBuilder returnString = new StringBuilder(keyMaps.size() * 10);
-- int i=0;
++ int i = 0;
while (true) {
ModelKeyMap kmap = keyMaps.get(i);
returnString.append(ModelUtil.upperFirstChar(kmap.getRelFieldName()));
diff --cc framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelUtil.java
index f90b510,f90b510..77b69d7
--- a/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelUtil.java
+++ b/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelUtil.java
@@@ -37,7 -37,7 +37,7 @@@ public final class ModelUtil
private static final String MODULE = ModelUtil.class.getName();
private static final String vowelBag = "aeiouyAEIOUY";
-- private ModelUtil () {}
++ private ModelUtil() { }
/**
* Changes the first letter of the passed String to upper case.
@@@ -100,7 -100,7 +100,7 @@@
StringBuilder fieldName = new StringBuilder(columnName.length());
boolean toUpper = false;
-- for (int i=0; i < columnName.length(); i++) {
++ for (int i = 0; i < columnName.length(); i++) {
char ch = columnName.charAt(i);
if (ch == '_') {
toUpper = true;
diff --cc framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelViewEntity.java
index 9a92143,9a92143..1fec495
--- a/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelViewEntity.java
+++ b/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelViewEntity.java
@@@ -1066,7 -1066,7 +1066,7 @@@ public class ModelViewEntity extends Mo
public void makeAliasColName(StringBuilder colNameBuffer, StringBuilder fieldTypeBuffer, ModelViewEntity modelViewEntity, ModelReader modelReader) {
if (UtilValidate.isEmpty(entityAlias)
&& UtilValidate.isEmpty(field)
-- && UtilValidate.isNotEmpty(value)){
++ && UtilValidate.isNotEmpty(value)) {
colNameBuffer.append(value);
}
else {
diff --cc framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/DumbTransactionFactory.java
index 12843fb,12843fb..3989267
--- a/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/DumbTransactionFactory.java
+++ b/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/DumbTransactionFactory.java
@@@ -138,5 -138,5 +138,5 @@@ public class DumbTransactionFactory imp
}
@Override
-- public void shutdown() {}
++ public void shutdown() { }
}
diff --cc framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/JNDITransactionFactory.java
index 2c4cc27,2c4cc27..de08de4
--- a/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/JNDITransactionFactory.java
+++ b/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/JNDITransactionFactory.java
@@@ -212,5 -212,5 +212,5 @@@ public class JNDITransactionFactory imp
}
@Override
-- public void shutdown() {}
++ public void shutdown() { }
}
diff --cc framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/TransactionUtil.java
index 86145a2,86145a2..86f0af2
--- a/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/TransactionUtil.java
+++ b/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/TransactionUtil.java
@@@ -78,7 -78,7 +78,7 @@@ public final class TransactionUtil impl
private static Map<Long, Exception> allThreadsTransactionBeginStack = Collections.<Long, Exception>synchronizedMap(new HashMap<>());
private static Map<Long, List<Exception>> allThreadsTransactionBeginStackSave = Collections.<Long, List<Exception>>synchronizedMap(new HashMap<>());
-- private TransactionUtil () {}
++ private TransactionUtil() { }
public static <V> V doNewTransaction(Callable<V> callable, String ifErrorMessage, int timeout, boolean printException) throws GenericEntityException {
return noTransaction(inTransaction(callable, ifErrorMessage, timeout, printException)).call();
}
@@@ -565,7 -565,7 +565,7 @@@
rollback();
num++;
}
-- // no transaction stamps to remember anymore ;-)
++ // no transaction stamps to remember anymore
clearTransactionStartStampStack();
return num;
}
diff --cc framework/entity/src/main/java/org/apache/ofbiz/entity/util/ByteWrapper.java
index af4f8b6,af4f8b6..d64d4d8
--- a/framework/entity/src/main/java/org/apache/ofbiz/entity/util/ByteWrapper.java
+++ b/framework/entity/src/main/java/org/apache/ofbiz/entity/util/ByteWrapper.java
@@@ -32,7 -32,7 +32,7 @@@ import java.io.Serializable
public class ByteWrapper implements Serializable {
protected byte[] bytes;
-- protected ByteWrapper() {}
++ protected ByteWrapper() { }
public ByteWrapper(byte[] bytes) {
this.bytes = bytes;
diff --cc framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityFindOptions.java
index fc6d3b7,fc6d3b7..781bac2
--- a/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityFindOptions.java
+++ b/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityFindOptions.java
@@@ -61,7 -61,7 +61,7 @@@ public class EntityFindOptions implemen
* distinct = false
* maxRows = 0 (all rows)
*/
-- public EntityFindOptions() {}
++ public EntityFindOptions() { }
public EntityFindOptions(boolean specifyTypeAndConcur, int resultSetType, int resultSetConcurrency, int fetchSize, int maxRows, boolean distinct) {
this.specifyTypeAndConcur = specifyTypeAndConcur;
diff --cc framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntitySaxReader.java
index 3fd0fba,3fd0fba..3b363fe
--- a/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntitySaxReader.java
+++ b/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntitySaxReader.java
@@@ -112,7 -112,7 +112,7 @@@ public class EntitySaxReader extends De
private Document documentForTemplate = null;
private Map<String, Object> placeholderValues = null; //contains map of values for corresponding placeholders (eg. ${key}) in the entity xml data file.
-- protected EntitySaxReader() {}
++ protected EntitySaxReader() { }
public EntitySaxReader(Delegator delegator, int transactionTimeout) {
// clone the delegator right off so there is no chance of making change to the initial object
@@@ -211,7 -211,7 +211,7 @@@
SAXParser parser;
try {
parser = SAXParserFactory.newInstance().newSAXParser();
-- } catch(ParserConfigurationException pce) {
++ } catch (ParserConfigurationException pce) {
throw new SAXException("Unable to create the SAX parser", pce);
}
numberRead = 0;
diff --cc framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityTypeUtil.java
index bfa5818,bfa5818..e99bd11
--- a/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityTypeUtil.java
+++ b/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityTypeUtil.java
@@@ -35,7 -35,7 +35,7 @@@ public final class EntityTypeUtil
private static final String MODULE = EntityTypeUtil.class.getName();
-- private EntityTypeUtil() {}
++ private EntityTypeUtil() { }
public static boolean isType(Collection<GenericValue> thisCollection, String typeRelation, GenericValue targetType) {
for (GenericValue value: thisCollection) {
diff --cc framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityUtil.java
index c3dfe38,c3dfe38..ed7c693
--- a/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityUtil.java
+++ b/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityUtil.java
@@@ -61,7 -61,7 +61,7 @@@ public final class EntityUtil
private static final String MODULE = EntityUtil.class.getName();
-- private EntityUtil() {}
++ private EntityUtil() { }
@SafeVarargs
public static <V> Map<String, V> makeFields(V... args) {
diff --cc framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityUtilProperties.java
index f14e878,f14e878..1e6aab6
--- a/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityUtilProperties.java
+++ b/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityUtilProperties.java
@@@ -49,7 -49,7 +49,7 @@@ public final class EntityUtilPropertie
public final static String MODULE = EntityUtilProperties.class.getName();
-- private EntityUtilProperties () {}
++ private EntityUtilProperties() { }
private static Map<String, String> getSystemPropertyValue(String resource, String name, Delegator delegator) {
Map<String, String> results = new HashMap<>();
diff --cc framework/entityext/src/main/java/org/apache/ofbiz/entityext/EntityGroupUtil.java
index 0600949,0600949..ecfa206
--- a/framework/entityext/src/main/java/org/apache/ofbiz/entityext/EntityGroupUtil.java
+++ b/framework/entityext/src/main/java/org/apache/ofbiz/entityext/EntityGroupUtil.java
@@@ -38,7 -38,7 +38,7 @@@ public final class EntityGroupUtil
private static final String MODULE = EntityGroupUtil.class.getName();
-- private EntityGroupUtil () {}
++ private EntityGroupUtil() { }
public static Set<String> getEntityNamesByGroup(String entityGroupId, Delegator delegator, boolean requireStampFields) throws GenericEntityException {
Set<String> entityNames = new HashSet<>();
diff --cc framework/entityext/src/main/java/org/apache/ofbiz/entityext/cache/EntityCacheServices.java
index 988417d,988417d..0fc56c3
--- a/framework/entityext/src/main/java/org/apache/ofbiz/entityext/cache/EntityCacheServices.java
+++ b/framework/entityext/src/main/java/org/apache/ofbiz/entityext/cache/EntityCacheServices.java
@@@ -47,7 -47,7 +47,7 @@@ public class EntityCacheServices implem
protected LocalDispatcher dispatcher = null;
protected String userLoginId = null;
-- public EntityCacheServices() {}
++ public EntityCacheServices() { }
@Override
public void setDelegator(Delegator delegator, String userLoginId) {
diff --cc framework/entityext/src/main/java/org/apache/ofbiz/entityext/data/EntityDataLoadContainer.java
index 4bafbc6,4bafbc6..e44b4bd
--- a/framework/entityext/src/main/java/org/apache/ofbiz/entityext/data/EntityDataLoadContainer.java
+++ b/framework/entityext/src/main/java/org/apache/ofbiz/entityext/data/EntityDataLoadContainer.java
@@@ -150,7 -150,7 +150,7 @@@ public class EntityDataLoadContainer im
private static void loadDataForDelegator(Map<String, String> loadDataProps, Configuration configuration,
Configuration.Property delegatorNameProp, String overrideDelegator)
-- throws ContainerException{
++ throws ContainerException {
// prepare command line properties passed by user
boolean createPks = isPropertySet(loadDataProps, CREATE_P_KEYS);
boolean dropPks = isPropertySet(loadDataProps, DROP_P_KEYS);
@@@ -540,7 -540,7 +540,7 @@@
private static List<URL> retireveDataUrlsFromFileList(List<String> files) throws ContainerException {
List<URL> fileUrls = new ArrayList<>();
-- for(String file: files) {
++ for (String file: files) {
URL url = UtilURL.fromResource(file);
if (url == null) {
throw new ContainerException("Unable to locate data file: " + file);
diff --cc framework/entityext/src/main/java/org/apache/ofbiz/entityext/data/EntityDataServices.java
index dfb7208,dfb7208..2c93935
--- a/framework/entityext/src/main/java/org/apache/ofbiz/entityext/data/EntityDataServices.java
+++ b/framework/entityext/src/main/java/org/apache/ofbiz/entityext/data/EntityDataServices.java
@@@ -468,11 -468,11 +468,11 @@@ public class EntityDataServices
Debug.logInfo("Decrypting with old key: " + oldKey, MODULE);
try {
keyBytes = cipherService.decrypt(keyBytes, Base64.decodeBase64(oldKey)).getBytes();
-- } catch(Exception e) {
++ } catch (Exception e) {
Debug.logInfo("Failed to decrypt with Shiro cipher; trying with old cipher", MODULE);
try {
keyBytes = DesCrypt.decrypt(DesCrypt.getDesKey(Base64.decodeBase64(oldKey)), keyBytes);
-- } catch(Exception e1) {
++ } catch (Exception e1) {
Debug.logError(e1, MODULE);
return ServiceUtil.returnError(e1.getMessage());
}
@@@ -489,7 -489,7 +489,7 @@@
row.setString("keyText", newKeyText);
row.store();
}
-- } catch(GenericEntityException gee) {
++ } catch (GenericEntityException gee) {
Debug.logError(gee, MODULE);
return ServiceUtil.returnError(gee.getMessage());
}
@@@ -528,7 -528,7 +528,7 @@@
row.setString(field.getName(), row.getString(field.getName()));
row.store();
}
-- } catch(GenericEntityException gee) {
++ } catch (GenericEntityException gee) {
return ServiceUtil.returnError(gee.getMessage());
}
}
diff --cc framework/entityext/src/main/java/org/apache/ofbiz/entityext/eca/EntityEcaRule.java
index e73ec10,e73ec10..88b1873
--- a/framework/entityext/src/main/java/org/apache/ofbiz/entityext/eca/EntityEcaRule.java
+++ b/framework/entityext/src/main/java/org/apache/ofbiz/entityext/eca/EntityEcaRule.java
@@@ -132,8 -132,8 +132,8 @@@ public final class EntityEcaRule implem
}
// Are fields tested in a condition missing? If so, we need to load them
List<String> fieldsToLoad = new ArrayList<>();
-- for( String conditionFieldName : conditionFieldNames) {
-- if ( value.get(conditionFieldName) == null) {
++ for (String conditionFieldName : conditionFieldNames) {
++ if (value.get(conditionFieldName) == null) {
fieldsToLoad.add(conditionFieldName);
}
}
diff --cc framework/entityext/src/main/java/org/apache/ofbiz/entityext/eca/EntityEcaUtil.java
index 911b955,911b955..eb6bbe4
--- a/framework/entityext/src/main/java/org/apache/ofbiz/entityext/eca/EntityEcaUtil.java
+++ b/framework/entityext/src/main/java/org/apache/ofbiz/entityext/eca/EntityEcaUtil.java
@@@ -51,7 -51,7 +51,7 @@@ public final class EntityEcaUtil
private static final UtilCache<String, Map<String, Map<String, List<EntityEcaRule>>>> entityEcaReaders = UtilCache.createUtilCache("entity.EcaReaders", 0, 0, false);
-- private EntityEcaUtil () {}
++ private EntityEcaUtil() { }
public static Map<String, Map<String, List<EntityEcaRule>>> getEntityEcaCache(String entityEcaReaderName) {
Map<String, Map<String, List<EntityEcaRule>>> ecaCache = entityEcaReaders.get(entityEcaReaderName);
diff --cc framework/entityext/src/main/java/org/apache/ofbiz/entityext/permission/EntityPermissionChecker.java
index fc97de1,fc97de1..16e20b4
--- a/framework/entityext/src/main/java/org/apache/ofbiz/entityext/permission/EntityPermissionChecker.java
+++ b/framework/entityext/src/main/java/org/apache/ofbiz/entityext/permission/EntityPermissionChecker.java
@@@ -231,8 -231,8 +231,6 @@@ public class EntityPermissionChecker
boolean hasPrivilegeField = false;
if (modelEntity.getField("privilegeEnumId") != null)
hasPrivilegeField = true;
--
--
ModelEntity modelOperationEntity = delegator.getModelEntity(entityName + "PurposeOperation");
if (modelOperationEntity == null) {
modelOperationEntity = delegator.getModelEntity(entityName + "Operation");
@@@ -319,7 -319,7 +317,6 @@@
// check permission for each id in passed list until success.
// Note that "quickCheck" id come first in the list
// Check with no roles or purposes on the chance that the permission fields contain _NA_ s.
--
Map<String, List<String>> purposes = new HashMap<>();
Map<String, List<String>> roles = new HashMap<>();
//List purposeList = null;
@@@ -518,7 -518,7 +515,6 @@@
// Note that "quickCheck" id come first in the list
// Check with no roles or purposes on the chance that the permission fields contain _NA_ s.
String pkFieldName = modelEntity.getFirstPkFieldName();
--
Map<String, GenericValue> entities = new HashMap<>();
//List purposeList = null;
//List roleList = null;
@@@ -852,24 -852,24 +848,24 @@@
*/
public static boolean isGroupMember(Map<String, ?> partyRelationshipValues, Delegator delegator) {
boolean isMember = false;
-- String partyIdFrom = (String)partyRelationshipValues.get("partyIdFrom") ;
-- String partyIdTo = (String)partyRelationshipValues.get("partyIdTo") ;
++ String partyIdFrom = (String)partyRelationshipValues.get("partyIdFrom");
++ String partyIdTo = (String)partyRelationshipValues.get("partyIdTo");
//String roleTypeIdFrom = "PERMISSION_GROUP_MBR";
//String roleTypeIdTo = "PERMISSION_GROUP";
//Timestamp fromDate = UtilDateTime.nowTimestamp();
//Timestamp thruDate = UtilDateTime.getDayStart(UtilDateTime.nowTimestamp(), 1);
//if (partyRelationshipValues.get("roleTypeIdFrom") != null) {
-- // roleTypeIdFrom = (String)partyRelationshipValues.get("roleTypeIdFrom") ;
++ // roleTypeIdFrom = (String)partyRelationshipValues.get("roleTypeIdFrom");
//}
//if (partyRelationshipValues.get("roleTypeIdTo") != null) {
-- // roleTypeIdTo = (String)partyRelationshipValues.get("roleTypeIdTo") ;
++ // roleTypeIdTo = (String)partyRelationshipValues.get("roleTypeIdTo");
//}
//if (partyRelationshipValues.get("fromDate") != null) {
-- // fromDate = (Timestamp)partyRelationshipValues.get("fromDate") ;
++ // fromDate = (Timestamp)partyRelationshipValues.get("fromDate");
//}
//if (partyRelationshipValues.get("thruDate") != null) {
-- // thruDate = (Timestamp)partyRelationshipValues.get("thruDate") ;
++ // thruDate = (Timestamp)partyRelationshipValues.get("thruDate");
//}
//EntityExpr relationExpr = EntityCondition.makeCondition("partyRelationshipTypeId", "CONTENT_PERMISSION");
@@@ -940,10 -940,10 +936,10 @@@
public StdPermissionConditionGetter (String entityName, String operationFieldName, String roleFieldName, String statusFieldName, String auxiliaryFieldName, String privilegeFieldName) {
this.operationFieldName = operationFieldName;
-- this.roleFieldName = roleFieldName ;
-- this.statusFieldName = statusFieldName ;
-- this.privilegeFieldName = privilegeFieldName ;
-- this.auxiliaryFieldName = auxiliaryFieldName ;
++ this.roleFieldName = roleFieldName;
++ this.statusFieldName = statusFieldName;
++ this.privilegeFieldName = privilegeFieldName;
++ this.auxiliaryFieldName = auxiliaryFieldName;
this.entityName = entityName;
}
@@@ -1147,7 -1147,7 +1143,7 @@@
public StdAuxiliaryValueGetter (String entityName, String auxiliaryFieldName, String entityIdName) {
-- this.auxiliaryFieldName = auxiliaryFieldName ;
++ this.auxiliaryFieldName = auxiliaryFieldName;
this.entityName = entityName;
this.entityIdName = entityIdName;
}
@@@ -1234,9 -1234,9 +1230,9 @@@
public StdRelatedRoleGetter (String entityName, String roleTypeFieldName, String roleEntityIdName, String partyFieldName, String ownerEntityFieldName, String roleEntityName) {
-- this.roleTypeFieldName = roleTypeFieldName ;
-- this.partyFieldName = partyFieldName ;
-- this.ownerEntityFieldName = ownerEntityFieldName ;
++ this.roleTypeFieldName = roleTypeFieldName;
++ this.partyFieldName = partyFieldName;
++ this.ownerEntityFieldName = ownerEntityFieldName;
this.entityName = entityName;
this.roleEntityName = roleEntityName;
this.roleEntityIdName = roleEntityIdName;
diff --cc framework/entityext/src/main/java/org/apache/ofbiz/entityext/synchronization/EntitySyncContext.java
index 101026e,101026e..8de124d
--- a/framework/entityext/src/main/java/org/apache/ofbiz/entityext/synchronization/EntitySyncContext.java
+++ b/framework/entityext/src/main/java/org/apache/ofbiz/entityext/synchronization/EntitySyncContext.java
@@@ -409,7 -409,7 +409,6 @@@ public class EntitySyncContext
}
throw new SyncDataErrorException("Error getting values to create from the datasource", e);
}
--
Timestamp nextTxTime;
if (firstVal != null) {
nextTxTime = firstVal.getTimestamp(ModelEntity.CREATE_STAMP_TX_FIELD);
@@@ -421,7 -421,7 +420,6 @@@
this.nextCreateTxTime = nextTxTime;
Debug.logInfo("EntitySync: Set nextCreateTxTime to [" + nextTxTime + "]", MODULE);
}
--
Timestamp curEntityNextTxTime = this.nextEntityCreateTxTime.get(modelEntity.getEntityName());
if (curEntityNextTxTime == null || nextTxTime.before(curEntityNextTxTime)) {
this.nextEntityCreateTxTime.put(modelEntity.getEntityName(), nextTxTime);
@@@ -436,14 -436,14 +434,12 @@@
}
throw new SyncDataErrorException("Caught runtime error while getting values to create", t);
}
--
try {
TransactionUtil.commit(beganTransaction);
} catch (GenericTransactionException e) {
throw new SyncDataErrorException("Commit transaction failed", e);
}
}
--
if (entitiesSkippedForKnownNext > 0) {
if (Debug.infoOn()) Debug.logInfo("In assembleValuesToCreate skipped [" + entitiesSkippedForKnownNext + "/" + entityModelToUseList + "] entities for the time period ending at [" + currentRunEndTime + "] because of next known create times", MODULE);
}
diff --cc framework/minilang/src/main/java/org/apache/ofbiz/minilang/MiniLangUtil.java
index f345fdc,f345fdc..507cb7b
--- a/framework/minilang/src/main/java/org/apache/ofbiz/minilang/MiniLangUtil.java
+++ b/framework/minilang/src/main/java/org/apache/ofbiz/minilang/MiniLangUtil.java
@@@ -68,7 -68,7 +68,7 @@@ public final class MiniLangUtil
SCRIPT_PREFIXES = Collections.unmodifiableSet(scriptPrefixes);
}
-- private MiniLangUtil() {}
++ private MiniLangUtil() { }
/**
* Returns <code>true</code> if <code>str</code> contains a script.
@@@ -301,6 -301,6 +301,6 @@@
}
}
-- public static class PlainString {}
++ public static class PlainString { }
}
diff --cc framework/minilang/src/main/java/org/apache/ofbiz/minilang/MiniLangValidate.java
index 4baa13e,4baa13e..dcbcf81
--- a/framework/minilang/src/main/java/org/apache/ofbiz/minilang/MiniLangValidate.java
+++ b/framework/minilang/src/main/java/org/apache/ofbiz/minilang/MiniLangValidate.java
@@@ -357,6 -357,6 +357,6 @@@ public final class MiniLangValidate
return !"none".equals(UtilProperties.getPropertyValue("minilang", "validation.level"));
}
-- private MiniLangValidate() {}
++ private MiniLangValidate() { }
}
diff --cc framework/minilang/src/main/java/org/apache/ofbiz/minilang/SimpleMethod.java
index bcf35a9,bcf35a9..4c316d8
--- a/framework/minilang/src/main/java/org/apache/ofbiz/minilang/SimpleMethod.java
+++ b/framework/minilang/src/main/java/org/apache/ofbiz/minilang/SimpleMethod.java
@@@ -146,7 -146,7 +146,6 @@@ public final class SimpleMethod extend
if (!"simple-methods".equalsIgnoreCase(rootElement.getTagName())) {
rootElement = UtilXml.firstChildElement(rootElement, "simple-methods");
}
--
compileAllSimpleMethods(rootElement, simpleMethods, xmlURL.toString());
if (MiniLangUtil.isDocumentAutoCorrected(document)) {
MiniLangUtil.writeMiniLangDocument(xmlURL, document);
diff --cc framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/callops/CallScript.java
index ae38ffc,ae38ffc..0ca7312
--- a/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/callops/CallScript.java
+++ b/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/callops/CallScript.java
@@@ -49,7 -49,7 +49,6 @@@ public final class CallScript extends M
}
return false;
}
--
/*
* Developers - the location attribute is a constant for security reasons.
* Script invocations should always be hard-coded.
diff --cc framework/security/src/main/java/org/apache/ofbiz/security/SecurityFactory.java
index 00b8f29,00b8f29..93064b3
--- a/framework/security/src/main/java/org/apache/ofbiz/security/SecurityFactory.java
+++ b/framework/security/src/main/java/org/apache/ofbiz/security/SecurityFactory.java
@@@ -81,7 -81,7 +81,7 @@@ public final class SecurityFactory
return security;
}
-- private SecurityFactory() {}
++ private SecurityFactory() { }
private static final class OFBizSecurity implements Security {
@@@ -92,7 -92,7 +92,7 @@@
"FACILITY", UtilMisc.<String, String>toMap("name", "FacilityParty", "pkey", "facilityId"),
"MARKETING", UtilMisc.<String, String>toMap("name", "MarketingCampaignRole", "pkey", "marketingCampaignId"));
-- private OFBizSecurity() {}
++ private OFBizSecurity() { }
@Override
public void clearUserData(GenericValue userLogin) {
diff --cc framework/service/src/main/java/org/apache/ofbiz/service/GenericAbstractDispatcher.java
index 9eb980e2,9eb980e2..f71b74e
--- a/framework/service/src/main/java/org/apache/ofbiz/service/GenericAbstractDispatcher.java
+++ b/framework/service/src/main/java/org/apache/ofbiz/service/GenericAbstractDispatcher.java
@@@ -44,7 -44,7 +44,7 @@@ public abstract class GenericAbstractDi
protected ServiceDispatcher dispatcher = null;
protected String name = null;
-- public GenericAbstractDispatcher() {}
++ public GenericAbstractDispatcher() { }
@Override
public void schedule(String poolName, String serviceName, Map<String, ? extends Object> context, long startTime, int frequency, int interval, int count, long endTime, int maxRetry) throws GenericServiceException {
diff --cc framework/service/src/main/java/org/apache/ofbiz/service/ModelParam.java
index 8736de2,8736de2..2b93b0c
--- a/framework/service/src/main/java/org/apache/ofbiz/service/ModelParam.java
+++ b/framework/service/src/main/java/org/apache/ofbiz/service/ModelParam.java
@@@ -95,7 -95,7 +95,7 @@@ public class ModelParam implements Seri
/** Is this Parameter set internally? */
public boolean internal = false;
-- public ModelParam() {}
++ public ModelParam() { }
public ModelParam(ModelParam param) {
this.name = param.name;
diff --cc framework/service/src/main/java/org/apache/ofbiz/service/ModelService.java
index d63c0d4,d63c0d4..9a9df53
--- a/framework/service/src/main/java/org/apache/ofbiz/service/ModelService.java
+++ b/framework/service/src/main/java/org/apache/ofbiz/service/ModelService.java
@@@ -214,7 -214,7 +214,7 @@@ public class ModelService extends Abstr
*/
public Metrics metrics = null;
-- public ModelService() {}
++ public ModelService() { }
public ModelService(ModelService model) {
this.name = model.name;
@@@ -670,7 -670,7 +670,7 @@@
for (String key: missing) {
String msg = model.getParam(key).getPrimaryFailMessage(locale);
if (msg == null) {
-- String errMsg = UtilProperties.getMessage(ServiceUtil.getResource(), "ModelService.following_required_parameter_missing", locale) ;
++ String errMsg = UtilProperties.getMessage(ServiceUtil.getResource(), "ModelService.following_required_parameter_missing", locale);
msg = errMsg + " [" + mode + "] [" + model.name + "." + key + "]";
}
missingMsgs.add(msg);
diff --cc framework/service/src/main/java/org/apache/ofbiz/service/ServiceUtil.java
index ed67e53,ed67e53..dacf6fc
--- a/framework/service/src/main/java/org/apache/ofbiz/service/ServiceUtil.java
+++ b/framework/service/src/main/java/org/apache/ofbiz/service/ServiceUtil.java
@@@ -53,7 -53,7 +53,7 @@@ public final class ServiceUtil
private static final String MODULE = ServiceUtil.class.getName();
private static final String resource = "ServiceErrorUiLabels";
-- private ServiceUtil () {}
++ private ServiceUtil() { }
/** A little short-cut method to check to see if a service returned an error */
public static boolean isError(Map<String, ? extends Object> results) {
diff --cc framework/service/src/main/java/org/apache/ofbiz/service/ServiceXaWrapper.java
index 2f927db,2f927db..e0c84c2
--- a/framework/service/src/main/java/org/apache/ofbiz/service/ServiceXaWrapper.java
+++ b/framework/service/src/main/java/org/apache/ofbiz/service/ServiceXaWrapper.java
@@@ -56,7 -56,7 +56,7 @@@ public class ServiceXaWrapper extends G
protected boolean commitAsync = false;
protected boolean commitAsyncPersist = false;
-- protected ServiceXaWrapper() {}
++ protected ServiceXaWrapper() { }
public ServiceXaWrapper(DispatchContext dctx) {
this.dctx = dctx;
}
diff --cc framework/service/src/main/java/org/apache/ofbiz/service/calendar/ExpressionUiHelper.java
index 11ec925,11ec925..699ef89
--- a/framework/service/src/main/java/org/apache/ofbiz/service/calendar/ExpressionUiHelper.java
+++ b/framework/service/src/main/java/org/apache/ofbiz/service/calendar/ExpressionUiHelper.java
@@@ -39,7 -39,7 +39,7 @@@ import com.ibm.icu.util.Calendar
public final class ExpressionUiHelper {
/** An array of valid DayInMonth occurrence values. */
-- private static final int OCCURRENCE[] = {1, 2, 3, 4, 5, -1, -2, -3, -4 -5};
++ private static final int OCCURRENCE[] = {1, 2, 3, 4, 5, -1, -2, -3, -4, -5};
protected ExpressionUiHelper() { }
@@@ -61,7 -61,7 +61,7 @@@
SimpleDateFormat dateFormat = new SimpleDateFormat("EEEE", locale);
List<Map<String, Object>> result = new ArrayList<>(7);
for (int i = 0; i < 7; i++) {
-- result.add(UtilMisc.toMap("description", (Object)dateFormat.format(tempCal.getTime()), "value", tempCal.get(Calendar.DAY_OF_WEEK)));
++ result.add(UtilMisc.toMap("description", (Object) dateFormat.format(tempCal.getTime()), "value", tempCal.get(Calendar.DAY_OF_WEEK)));
tempCal.roll(Calendar.DAY_OF_WEEK, 1);
}
return result;
@@@ -98,7 -98,7 +98,7 @@@
SimpleDateFormat dateFormat = new SimpleDateFormat("MMMM", locale);
List<Map<String, Object>> result = new ArrayList<>(13);
for (int i = Calendar.JANUARY; i <= tempCal.getActualMaximum(Calendar.MONTH); i++) {
-- result.add(UtilMisc.toMap("description", (Object)dateFormat.format(tempCal.getTime()), "value", i));
++ result.add(UtilMisc.toMap("description", (Object) dateFormat.format(tempCal.getTime()), "value", i));
tempCal.roll(Calendar.MONTH, 1);
}
return result;
diff --cc framework/service/src/main/java/org/apache/ofbiz/service/calendar/RecurrenceInfo.java
index 232ad60,232ad60..ce027a3
--- a/framework/service/src/main/java/org/apache/ofbiz/service/calendar/RecurrenceInfo.java
+++ b/framework/service/src/main/java/org/apache/ofbiz/service/calendar/RecurrenceInfo.java
@@@ -19,7 -19,7 +19,6 @@@
package org.apache.ofbiz.service.calendar;
import java.util.ArrayList;
--import java.util.Collections;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
@@@ -350,7 -350,7 +349,7 @@@ public class RecurrenceInfo
@SuppressWarnings("serial")
protected static class RecurrenceWrapper extends TemporalExpression {
protected RecurrenceInfo info;
-- protected RecurrenceWrapper() {}
++ protected RecurrenceWrapper() { }
public RecurrenceWrapper(RecurrenceInfo info) {
this.info = info;
}
diff --cc framework/service/src/main/java/org/apache/ofbiz/service/calendar/RecurrenceUtil.java
index 5f0f935,5f0f935..0344f7a
--- a/framework/service/src/main/java/org/apache/ofbiz/service/calendar/RecurrenceUtil.java
+++ b/framework/service/src/main/java/org/apache/ofbiz/service/calendar/RecurrenceUtil.java
@@@ -31,7 -31,7 +31,7 @@@ import com.ibm.icu.util.Calendar
*/
public final class RecurrenceUtil {
-- private RecurrenceUtil () {}
++ private RecurrenceUtil() { }
/** Returns a Date object from a String. */
public static Date parseDate(String dateStr) {
diff --cc framework/service/src/main/java/org/apache/ofbiz/service/calendar/TemporalExpression.java
index 00103b2,00103b2..73f7c17
--- a/framework/service/src/main/java/org/apache/ofbiz/service/calendar/TemporalExpression.java
+++ b/framework/service/src/main/java/org/apache/ofbiz/service/calendar/TemporalExpression.java
@@@ -37,7 -37,7 +37,7 @@@ public abstract class TemporalExpressio
* persistence classes. */
protected String id = null;
-- protected TemporalExpression() {}
++ protected TemporalExpression() { }
/** Handles a <code>TemporalExpressionVisitor</code> visit.
* @param visitor
diff --cc framework/service/src/main/java/org/apache/ofbiz/service/calendar/TemporalExpressionWorker.java
index f08f7dc,f08f7dc..c4ad3f6
--- a/framework/service/src/main/java/org/apache/ofbiz/service/calendar/TemporalExpressionWorker.java
+++ b/framework/service/src/main/java/org/apache/ofbiz/service/calendar/TemporalExpressionWorker.java
@@@ -55,7 -55,7 +55,7 @@@ public final class TemporalExpressionWo
private final static String EXCLUDE = "EXCLUDE";
private final static String SUBSTITUTE = "SUBSTITUTE";
-- private TemporalExpressionWorker () {}
++ private TemporalExpressionWorker() { }
/** Get a <code>TemporalExpression</code> from persistent storage.
* @param delegator
diff --cc framework/service/src/main/java/org/apache/ofbiz/service/config/ServiceConfigUtil.java
index 96663c5,96663c5..8878f3e
--- a/framework/service/src/main/java/org/apache/ofbiz/service/config/ServiceConfigUtil.java
+++ b/framework/service/src/main/java/org/apache/ofbiz/service/config/ServiceConfigUtil.java
@@@ -52,7 -52,7 +52,7 @@@ public final class ServiceConfigUtil
private static final UtilCache<String, ServiceConfig> serviceConfigCache = UtilCache.createUtilCache("service.ServiceConfig", 0, 0, false);
private static final List<ServiceConfigListener> configListeners = new CopyOnWriteArrayList<>();
-- private ServiceConfigUtil() {}
++ private ServiceConfigUtil() { }
/**
* Returns the specified parameter value from the specified engine, or <code>null</code>
diff --cc framework/service/src/main/java/org/apache/ofbiz/service/eca/ServiceEcaAction.java
index 6d0837c,6d0837c..b77d12e
--- a/framework/service/src/main/java/org/apache/ofbiz/service/eca/ServiceEcaAction.java
+++ b/framework/service/src/main/java/org/apache/ofbiz/service/eca/ServiceEcaAction.java
@@@ -56,7 -56,7 +56,7 @@@ public class ServiceEcaAction implement
protected boolean ignoreError = false;
protected boolean persist = false;
-- protected ServiceEcaAction() {}
++ protected ServiceEcaAction() { }
public ServiceEcaAction(Element action, String event) {
this.eventName = event;
diff --cc framework/service/src/main/java/org/apache/ofbiz/service/eca/ServiceEcaCondition.java
index 6ae4440,6ae4440..2d5c33b
--- a/framework/service/src/main/java/org/apache/ofbiz/service/eca/ServiceEcaCondition.java
+++ b/framework/service/src/main/java/org/apache/ofbiz/service/eca/ServiceEcaCondition.java
@@@ -53,7 -53,7 +53,7 @@@ public class ServiceEcaCondition implem
protected boolean isConstant = false;
protected boolean isService = false;
-- protected ServiceEcaCondition() {}
++ protected ServiceEcaCondition() { }
public ServiceEcaCondition(Element condition, boolean isConstant, boolean isService) {
if (isService) {
diff --cc framework/service/src/main/java/org/apache/ofbiz/service/eca/ServiceEcaUtil.java
index 33676bb,33676bb..c9f5e2e
--- a/framework/service/src/main/java/org/apache/ofbiz/service/eca/ServiceEcaUtil.java
+++ b/framework/service/src/main/java/org/apache/ofbiz/service/eca/ServiceEcaUtil.java
@@@ -53,7 -53,7 +53,7 @@@ public final class ServiceEcaUtil
// using a cache is dangerous here because if someone clears it the ECAs won't run: public static UtilCache ecaCache = new UtilCache("service.ServiceECAs", 0, 0, false);
private static Map<String, Map<String, List<ServiceEcaRule>>> ecaCache = new ConcurrentHashMap<>();
-- private ServiceEcaUtil() {}
++ private ServiceEcaUtil() { }
public static void reloadConfig() {
ecaCache.clear();
diff --cc framework/service/src/main/java/org/apache/ofbiz/service/engine/EntityAutoEngine.java
index 0435065,0435065..3346c85
--- a/framework/service/src/main/java/org/apache/ofbiz/service/engine/EntityAutoEngine.java
+++ b/framework/service/src/main/java/org/apache/ofbiz/service/engine/EntityAutoEngine.java
@@@ -468,13 -468,13 +468,13 @@@ public final class EntityAutoEngine ext
if (modelEntity.getField("changeByUserLoginId") != null ) {
if (modelEntity.getEntityName().endsWith("Status")) {
//Oh update on EntityStatus concept detected ... not possible, return invalid request
-- throw new GenericServiceException("You call a updating operation on entity that track the activity, sorry I can't do that, please amazing developer check your service definition ;)");
++ throw new GenericServiceException("You call a updating operation on entity that track the activity, sorry I can't do that, please amazing developer check your service definition;)");
}
GenericValue userLogin = (GenericValue) parameters.get("userLogin");
if (userLogin != null) {
lookedUpValue.set("changeByUserLoginId", userLogin.get("userLoginId"));
} else {
-- throw new GenericServiceException("You call a updating operation on entity that track the activity, sorry I can't do that, please amazing developer check your service definition ;)");
++ throw new GenericServiceException("You call a updating operation on entity that track the activity, sorry I can't do that, please amazing developer check your service definition;)");
}
}
@@@ -502,7 -502,7 +502,7 @@@
if (modelEntity.getField("changeByUserLoginId") != null ) {
if (modelEntity.getEntityName().endsWith("Status")) {
//Oh update on EntityStatus concept detected ... not possible, return invalid request
-- throw new GenericServiceException("You call a deleting operation on entity that track the activity, sorry I can't do that, please amazing developer check your service definition ;)");
++ throw new GenericServiceException("You call a deleting operation on entity that track the activity, sorry I can't do that, please amazing developer check your service definition;)");
}
}
diff --cc framework/service/src/main/java/org/apache/ofbiz/service/jms/JmsListenerFactory.java
index 0f7ffac,0f7ffac..4bb26e7
--- a/framework/service/src/main/java/org/apache/ofbiz/service/jms/JmsListenerFactory.java
+++ b/framework/service/src/main/java/org/apache/ofbiz/service/jms/JmsListenerFactory.java
@@@ -58,7 -58,7 +58,7 @@@ public class JmsListenerFactory impleme
protected Thread thread;
-- public static JmsListenerFactory getInstance(Delegator delegator){
++ public static JmsListenerFactory getInstance(Delegator delegator) {
JmsListenerFactory instance = jlFactoryRef.get();
if (instance == null) {
instance = new JmsListenerFactory(delegator);
diff --cc framework/service/src/main/java/org/apache/ofbiz/service/job/Job.java
index 21c5340,21c5340..e59d4bb
--- a/framework/service/src/main/java/org/apache/ofbiz/service/job/Job.java
+++ b/framework/service/src/main/java/org/apache/ofbiz/service/job/Job.java
@@@ -29,7 -29,7 +29,7 @@@ import java.util.Date
*/
public interface Job extends Runnable {
-- public static enum State {CREATED, QUEUED, RUNNING, FINISHED, FAILED}
++ public static enum State { CREATED, QUEUED, RUNNING, FINISHED, FAILED }
/**
* Returns the current state of this job.
diff --cc framework/service/src/main/java/org/apache/ofbiz/service/mail/MimeMessageWrapper.java
index 9c192f3,9c192f3..04895dc
--- a/framework/service/src/main/java/org/apache/ofbiz/service/mail/MimeMessageWrapper.java
+++ b/framework/service/src/main/java/org/apache/ofbiz/service/mail/MimeMessageWrapper.java
@@@ -105,7 -105,7 +105,7 @@@ public class MimeMessageWrapper impleme
if (message == null) {
// deserialize the message
if (serializedBytes != null) {
-- try (ByteArrayInputStream bais = new ByteArrayInputStream(serializedBytes)){
++ try (ByteArrayInputStream bais = new ByteArrayInputStream(serializedBytes)) {
message = new MimeMessage(this.getSession(), bais);
} catch (MessagingException | IOException e) {
Debug.logError(e, MODULE);
diff --cc framework/service/src/main/java/org/apache/ofbiz/service/mail/ServiceMcaUtil.java
index d438bb7,d438bb7..d432426
--- a/framework/service/src/main/java/org/apache/ofbiz/service/mail/ServiceMcaUtil.java
+++ b/framework/service/src/main/java/org/apache/ofbiz/service/mail/ServiceMcaUtil.java
@@@ -38,7 -38,7 +38,7 @@@ public final class ServiceMcaUtil
private static final String MODULE = ServiceMcaUtil.class.getName();
private static final UtilCache<String, ServiceMcaRule> mcaCache = UtilCache.createUtilCache("service.ServiceMCAs", 0, 0, false);
-- private ServiceMcaUtil() {}
++ private ServiceMcaUtil() { }
public static void reloadConfig() {
mcaCache.clear();
diff --cc framework/service/src/main/java/org/apache/ofbiz/service/test/ServiceEngineTestPermissionServices.java
index a64c1f0,a64c1f0..39e40d9
--- a/framework/service/src/main/java/org/apache/ofbiz/service/test/ServiceEngineTestPermissionServices.java
+++ b/framework/service/src/main/java/org/apache/ofbiz/service/test/ServiceEngineTestPermissionServices.java
@@@ -33,7 -33,7 +33,7 @@@ public class ServiceEngineTestPermissio
public static Map<String, Object> testPermissionPing(DispatchContext dctx, Map<String, ? extends Object> context) {
Map<String, Object> result = ServiceUtil.returnSuccess();
-- result.put("hasPermission", "Y".equalsIgnoreCase((String)context.get("givePermission")));
++ result.put("hasPermission", "Y".equalsIgnoreCase((String) context.get("givePermission")));
return result;
}
diff --cc framework/service/src/main/java/org/apache/ofbiz/service/test/ServiceEntityAutoTests.java
index 345ec83,345ec83..084e2c9
--- a/framework/service/src/main/java/org/apache/ofbiz/service/test/ServiceEntityAutoTests.java
+++ b/framework/service/src/main/java/org/apache/ofbiz/service/test/ServiceEntityAutoTests.java
@@@ -225,7 -225,7 +225,7 @@@ public class ServiceEntityAutoTests ext
results = dispatcher.runSync("testEntityAutoUpdateTestingStatus", testingStatusUpdateMap, 10, true);
assertTrue(ServiceUtil.isError(results));
} catch (GenericServiceException e) {
-- assertEquals(e.toString(), "You call a updating operation on entity that track the activity, sorry I can't do that, please amazing developer check your service definition ;)");
++ assertEquals(e.toString(), "You call a updating operation on entity that track the activity, sorry I can't do that, please amazing developer check your service definition;)");
}
//test delete testingStatus
@@@ -234,7 -234,7 +234,7 @@@
results = dispatcher.runSync("testEntityAutoDeleteTestingStatus", testingStatusDeleteMap, 10, true);
assertTrue(ServiceUtil.isError(results));
} catch (GenericServiceException e) {
-- assertEquals(e.toString(), "You call a deleting operation on entity that track the activity, sorry I can't do that, please amazing developer check your service definition ;)");
++ assertEquals(e.toString(), "You call a deleting operation on entity that track the activity, sorry I can't do that, please amazing developer check your service definition;)");
}
}
}
diff --cc framework/service/src/main/java/org/apache/ofbiz/service/test/ServicePermissionTests.java
index 09d5fa8,09d5fa8..bdffa4c
--- a/framework/service/src/main/java/org/apache/ofbiz/service/test/ServicePermissionTests.java
+++ b/framework/service/src/main/java/org/apache/ofbiz/service/test/ServicePermissionTests.java
@@@ -75,7 -75,7 +75,7 @@@ public class ServicePermissionTests ext
public void testServicePermissionFailed() throws Exception {
Map<String, Object> testingPermMap = UtilMisc.toMap("userLogin", getUserLogin("permUser2"), "givePermission", "N");
-- try{
++ try {
Map<String, Object> results = dispatcher.runSync("testSimpleServicePermission", testingPermMap);
assertFalse("The service testServicePermission don't raise service exception", ServiceUtil.isError(results));
} catch (ServiceAuthException e) {
@@@ -85,7 -85,7 +85,7 @@@
public void testGroupPermissionFailed() throws Exception {
Map<String, Object> testingPermMap = UtilMisc.toMap("userLogin", getUserLogin("permUser2"), "givePermission", "Y");
-- try{
++ try {
Map<String, Object> results = dispatcher.runSync("testSimpleGroupAndPermission", testingPermMap);
assertFalse("The testGroupPermission don't raise service exception", ServiceUtil.isError(results));
} catch (ServiceAuthException e) {
@@@ -93,7 -93,7 +93,7 @@@
}
testingPermMap = UtilMisc.toMap("userLogin", getUserLogin("permUser1"), "givePermission", "N");
-- try{
++ try {
Map<String, Object> results = dispatcher.runSync("testSimpleGroupOrPermission", testingPermMap);
assertFalse("The testGroupPermission don't raise service exception", ServiceUtil.isError(results));
} catch (ServiceAuthException e) {
diff --cc framework/start/src/main/java/org/apache/ofbiz/base/start/Config.java
index 38e344e,38e344e..1930de5
--- a/framework/start/src/main/java/org/apache/ofbiz/base/start/Config.java
+++ b/framework/start/src/main/java/org/apache/ofbiz/base/start/Config.java
@@@ -126,7 -126,7 +126,7 @@@ public final class Config
.orElse(defaultOffset);
try {
return Integer.parseInt(extractedPortOffset);
-- } catch(NumberFormatException e) {
++ } catch (NumberFormatException e) {
throw new StartupException("invalid portoffset number: " + extractedPortOffset, e);
}
}
diff --cc framework/start/src/main/java/org/apache/ofbiz/base/start/StartupControlPanel.java
index 59c6c3f,59c6c3f..aee59fa
--- a/framework/start/src/main/java/org/apache/ofbiz/base/start/StartupControlPanel.java
+++ b/framework/start/src/main/java/org/apache/ofbiz/base/start/StartupControlPanel.java
@@@ -76,12 -76,12 +76,11 @@@ final class StartupControlPanel
} else {
// Print startup message.
String ls = System.lineSeparator();
-- System.out.println(ls + " ____ __________ _" +
-- ls + " / __ \\/ ____/ __ )(_)___" +
-- ls + " / / / / /_ / __ / /_ /" +
-- ls + "/ /_/ / __/ / /_/ / / / /_" +
-- ls + "\\____/_/ /_____/_/ /___/ is started and ready." +
-- ls);
++ System.out.println(ls + " ____ __________ _" + ls
++ + " / __ \\/ ____/ __ )(_)___" + ls
++ + " / / / / /_ / __ / /_ /" + ls
++ + "/ /_/ / __/ / /_/ / / / /_" + ls
++ + "\\____/_/ /_____/_/ /___/ is started and ready." + ls);
}
}
diff --cc framework/testtools/src/main/java/org/apache/ofbiz/testtools/SimpleMethodTest.java
index 147d138,147d138..199a11b
--- a/framework/testtools/src/main/java/org/apache/ofbiz/testtools/SimpleMethodTest.java
+++ b/framework/testtools/src/main/java/org/apache/ofbiz/testtools/SimpleMethodTest.java
@@@ -46,7 -46,7 +46,6 @@@ public class SimpleMethodTest extends O
protected String methodLocation;
protected String methodName;
--
public static MockHttpServletRequest request = new MockHttpServletRequest();
public static MockHttpServletResponse response = new MockHttpServletResponse();
@@@ -73,7 -73,7 +72,6 @@@
@Override
public void run(TestResult result) {
result.startTest(this);
--
try {
// define request
Security security = SecurityFactory.getInstance(delegator);
diff --cc framework/testtools/src/main/java/org/apache/ofbiz/testtools/TestRunContainer.java
index 21dbd94,21dbd94..00e619b
--- a/framework/testtools/src/main/java/org/apache/ofbiz/testtools/TestRunContainer.java
+++ b/framework/testtools/src/main/java/org/apache/ofbiz/testtools/TestRunContainer.java
@@@ -116,7 -116,7 +116,7 @@@ public class TestRunContainer implement
if (logLevel != null) {
int selectedLogLevel = Debug.getLevelFromString(logLevel);
-- for(int level = Debug.ALWAYS; level <= Debug.FATAL; level++) {
++ for (int level = Debug.ALWAYS; level <= Debug.FATAL; level++) {
boolean isOn = level >= selectedLogLevel;
Debug.set(level, isOn);
}
diff --cc framework/webapp/src/main/java/org/apache/ofbiz/webapp/WebAppUtil.java
index 2ee9ccc,2ee9ccc..737dc69
--- a/framework/webapp/src/main/java/org/apache/ofbiz/webapp/WebAppUtil.java
+++ b/framework/webapp/src/main/java/org/apache/ofbiz/webapp/WebAppUtil.java
@@@ -275,5 -275,5 +275,5 @@@ public final class WebAppUtil
return result;
}
-- private WebAppUtil() {}
++ private WebAppUtil() { }
}
diff --cc framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ContextFilter.java
index 50303cf,50303cf..01daf10
--- a/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ContextFilter.java
+++ b/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ContextFilter.java
@@@ -96,7 -96,7 +96,7 @@@ public class ContextFilter implements F
httpRequest.setAttribute("servletContext", config.getServletContext());
// set the webSiteId in the session
-- if (UtilValidate.isEmpty(httpRequest.getSession().getAttribute("webSiteId"))){
++ if (UtilValidate.isEmpty(httpRequest.getSession().getAttribute("webSiteId"))) {
httpRequest.getSession().setAttribute("webSiteId", WebSiteWorker.getWebSiteId(httpRequest));
}
@@@ -130,7 -130,7 +130,6 @@@
if (UtilValidate.isNotEmpty(tenantDomainName)) {
tenantId = tenantDomainName.getString("tenantId");
}
--
if (UtilValidate.isEmpty(tenantId)) {
tenantId = (String) httpRequest.getAttribute("userTenantId");
}
@@@ -169,7 -169,7 +168,6 @@@
request.setAttribute("delegator", delegator);
request.setAttribute("dispatcher", dispatcher);
request.setAttribute("security", security);
--
request.setAttribute("userTenantId", tenantId);
}
diff --cc framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ControlActivationEventListener.java
index b07357e,b07357e..27e7e5d
--- a/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ControlActivationEventListener.java
+++ b/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ControlActivationEventListener.java
@@@ -32,7 -32,7 +32,7 @@@ public class ControlActivationEventList
// Debug MODULE name
private static final String MODULE = ControlActivationEventListener.class.getName();
-- public ControlActivationEventListener() {}
++ public ControlActivationEventListener() { }
@Override
public void sessionWillPassivate(HttpSessionEvent event) {
@@@ -45,7 -45,7 +45,6 @@@
ControlEventListener.countActivateSession();
Debug.logInfo("Activating session: " + showSessionId(event.getSession()), MODULE);
}
--
public static String showSessionId(HttpSession session) {
boolean showSessionIdInLog = UtilProperties.propertyValueEqualsIgnoreCase("requestHandler", "show-sessionId-in-log", "Y");
if (showSessionIdInLog) {
diff --cc framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ControlEventListener.java
index a188a14,a188a14..382b17a
--- a/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ControlEventListener.java
+++ b/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ControlEventListener.java
@@@ -50,7 -50,7 +50,7 @@@ public class ControlEventListener imple
protected static long totalActiveSessions = 0;
protected static long totalPassiveSessions = 0;
-- public ControlEventListener() {}
++ public ControlEventListener() { }
@Override
public void sessionCreated(HttpSessionEvent event) {
diff --cc framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ExternalLoginKeysManager.java
index e6b7333,e6b7333..0fbcf6f
--- a/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ExternalLoginKeysManager.java
+++ b/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ExternalLoginKeysManager.java
@@@ -158,7 -158,7 +158,6 @@@ public class ExternalLoginKeysManager
// make sure the autoUserLogin is set to the same and that the client cookie has the correct userLoginId
LoginWorker.autoLoginSet(request, response);
--
return "success";
}
@@@ -175,7 -175,7 +174,7 @@@
* Check if using externalLoginKey
* @return
*/
-- public static boolean isExternalLoginKeyEnabled (HttpServletRequest request){
++ public static boolean isExternalLoginKeyEnabled (HttpServletRequest request) {
if (UtilValidate.isEmpty(isExternalLoginKeyEnabled)) {
isExternalLoginKeyEnabled = EntityUtilProperties.getPropertyValue("security",
"security.login.externalLoginKey.enabled", "true",
diff --cc framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/LoginEventListener.java
index b17b004,b17b004..e96f73b
--- a/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/LoginEventListener.java
+++ b/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/LoginEventListener.java
@@@ -30,7 -30,7 +30,7 @@@ public class LoginEventListener impleme
// Debug MODULE name
private static final String MODULE = LoginEventListener.class.getName();
-- public LoginEventListener() {}
++ public LoginEventListener() { }
@Override
public void sessionCreated(HttpSessionEvent event) {
diff --cc framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/LoginWorker.java
index 6bdfb43,6bdfb43..2f47e58
--- a/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/LoginWorker.java
+++ b/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/LoginWorker.java
@@@ -392,12 -392,12 +392,10 @@@ public final class LoginWorker
*/
public static String login(HttpServletRequest request, HttpServletResponse response) {
HttpSession session = request.getSession();
--
// Prevent session fixation by making Tomcat generate a new jsessionId (ultimately put in cookie).
if (!session.isNew()) { // Only do when really signing in.
request.changeSessionId();
}
--
Delegator delegator = (Delegator) request.getAttribute("delegator");
String username = request.getParameter("USERNAME");
String password = request.getParameter("PASSWORD");
@@@ -411,7 -411,7 +409,6 @@@
} catch (EntityCryptoException e1) {
Debug.logError(e1.getMessage(), MODULE);
}
--
if (entityDeCrypto != null && "true".equals(forgotPwdFlag)) {
try {
Object decryptedPwd = entityDeCrypto.decrypt(KEY_VALUE, ModelField.EncryptMethod.TRUE, password);
@@@ -819,7 -819,7 +816,6 @@@
autoLoginSet(request, response);
return autoLoginCheck(request, response);
--
}
public static void doBasicLogin(GenericValue userLogin, HttpServletRequest request) {
@@@ -874,7 -874,7 +870,6 @@@
GenericValue userLogin = (GenericValue) request.getSession().getAttribute("userLogin");
doBasicLogout(userLogin, request, response);
--
if (request.getAttribute("_AUTO_LOGIN_LOGOUT_") == null) {
return autoLoginCheck(request, response);
}
@@@ -913,7 -913,7 +908,7 @@@
session.invalidate();
session = request.getSession(true);
-- if (EntityUtilProperties.propertyValueEquals("security", "security.login.tomcat.sso", "true")){
++ if (EntityUtilProperties.propertyValueEquals("security", "security.login.tomcat.sso", "true")) {
try {
// log out from Tomcat SSO
request.logout();
@@@ -950,7 -950,7 +945,6 @@@
String serverId = (String) request.getServletContext().getAttribute("_serverId");
String applicationName = UtilHttp.getApplicationName(request);
Optional<WebappInfo> webappInfo = WEBAPPS.getWebappInfo(serverId, applicationName);
--
if (userLogin != null &&
// When using an empty mountpoint, ie using root as mountpoint. Beware: works only for 1 webapp!
webappInfo.map(WebappInfo::isAutologinCookieUsed).orElse(!webappInfo.isPresent())) {
@@@ -974,7 -974,7 +968,6 @@@
HttpSession session = request.getSession();
GenericValue userLogin = (GenericValue) session.getAttribute("userLogin");
String applicationName = UtilHttp.getApplicationName(request);
--
if (userLogin != null) {
Cookie securedLoginIdCookie = new Cookie(getSecuredLoginIdCookieName(request), userLogin.getString("userLoginId"));
securedLoginIdCookie.setMaxAge(-1);
@@@ -993,7 -993,7 +986,6 @@@
protected static String getSecuredLoginIdCookieName(HttpServletRequest request) {
return UtilHttp.getApplicationName(request) + ".securedLoginId";
}
--
public static String getAutoUserLoginId(HttpServletRequest request) {
String autoUserLoginId = null;
Cookie[] cookies = request.getCookies();
@@@ -1010,7 -1010,7 +1002,6 @@@
}
return autoUserLoginId;
}
--
public static String getSecuredUserLoginId(HttpServletRequest request) {
String securedUserLoginId = null;
Cookie[] cookies = request.getCookies();
@@@ -1029,16 -1029,16 +1020,13 @@@
return securedUserLoginId;
}
--
public static String autoLoginCheck(HttpServletRequest request, HttpServletResponse response) {
Delegator delegator = (Delegator) request.getAttribute("delegator");
HttpSession session = request.getSession();
--
GenericValue autoUserLogin = (GenericValue) session.getAttribute("autoUserLogin");
-- if (autoUserLogin != null){
++ if (autoUserLogin != null) {
return "success";
}
--
return autoLoginCheck(delegator, session, getAutoUserLoginId(request));
}
@@@ -1096,7 -1096,7 +1084,6 @@@
}
return "success";
}
--
public static boolean isUserLoggedIn(HttpServletRequest request) {
HttpSession session = request.getSession();
GenericValue currentUserLogin = (GenericValue) session.getAttribute("userLogin");
@@@ -1202,7 -1202,7 +1189,6 @@@
return "success";
}
--
// preprocessor method to login a user w/ client certificate see security.properties to configure the pattern of CN
public static String check509CertLogin(HttpServletRequest request, HttpServletResponse response) {
Delegator delegator = (Delegator) request.getAttribute("delegator");
diff --cc framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ProtectViewWorker.java
index d54c006,d54c006..f83c1c9
--- a/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ProtectViewWorker.java
+++ b/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ProtectViewWorker.java
@@@ -47,7 -47,7 +47,7 @@@ public final class ProtectViewWorker
private static final Map<String, Long> durationByViewAccessed = new ConcurrentHashMap<>();
private static final Long one = 1L;
-- private ProtectViewWorker () {}
++ private ProtectViewWorker() { }
/**
* An HTTP WebEvent handler that checks to see if an userLogin should be tarpitted
diff --cc framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java
index 895265b,629b96e..7ee514f
--- a/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java
+++ b/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java
@@@ -112,7 -112,7 +112,6 @@@ public class RequestHandler
this.trackServerHit = !"false".equalsIgnoreCase(context.getInitParameter("track-serverhit"));
this.trackVisit = !"false".equalsIgnoreCase(context.getInitParameter("track-visit"));
--
hostHeadersAllowed = UtilMisc.getHostHeadersAllowed();
}
@@@ -147,7 -147,7 +146,7 @@@
if (requestMapMap.containsKey(requestUri)
// Ensure that overridden view exists.
&& (overrideViewUri == null || viewMapMap.containsKey(overrideViewUri)
-- || ("SOAPService".equals(requestUri) && "wsdl".equalsIgnoreCase(req.getQueryString())))){
++ || ("SOAPService".equals(requestUri) && "wsdl".equalsIgnoreCase(req.getQueryString())))) {
rmaps = requestMapMap.get(requestUri);
req.setAttribute("overriddenView", overrideViewUri);
} else if (defaultRequest != null) {
diff --cc framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/CoreEvents.java
index 1661941,1661941..512c924
--- a/framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/CoreEvents.java
+++ b/framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/CoreEvents.java
@@@ -385,9 -385,9 +385,9 @@@ public class CoreEvents
String[] sp = servicePath.split("\\|\\|");
Object servicePathObject = null;
Map<String, Object> servicePathMap = null;
-- for (int i=0;i<sp.length;i++) {
++ for (int i = 0; i < sp.length; i++) {
String servicePathEntry = sp[i];
-- if (null==servicePathMap) {
++ if (null == servicePathMap) {
servicePathObject = serviceResult.get(servicePathEntry);
} else {
servicePathObject = servicePathMap.get(servicePathEntry);
@@@ -397,7 -397,7 +397,7 @@@
if (servicePathObject instanceof Map<?, ?>) {
servicePathMap = UtilGenerics.cast(servicePathObject);
} else if (servicePathObject instanceof GenericEntity) {
-- GenericEntity servicePathEntity = (GenericEntity)servicePathObject;
++ GenericEntity servicePathEntity = (GenericEntity) servicePathObject;
servicePathMap = new HashMap<>();
for (Map.Entry<String, Object> entry: servicePathEntity.entrySet()) {
servicePathMap.put(entry.getKey(), entry.getValue());
@@@ -407,12 -407,12 +407,12 @@@
int count=0;
servicePathMap = new HashMap<>();
for (Object value: servicePathColl) {
-- servicePathMap.put("_"+count+"_", value);
++ servicePathMap.put("_" + count + "_", value);
count++;
}
}
}
-- if (null==servicePathMap) {
++ if (null == servicePathMap) {
return servicePathObject;
} else {
return servicePathMap;
diff --cc framework/webapp/src/main/java/org/apache/ofbiz/webapp/ftl/OfbizContentTransform.java
index 7a1d4d3,7a1d4d3..72aafef
--- a/framework/webapp/src/main/java/org/apache/ofbiz/webapp/ftl/OfbizContentTransform.java
+++ b/framework/webapp/src/main/java/org/apache/ofbiz/webapp/ftl/OfbizContentTransform.java
@@@ -97,13 -97,13 +97,13 @@@ public class OfbizContentTransform impl
// make the link
StringBuilder newURL = new StringBuilder();
ContentUrlTag.appendContentPrefix(request, newURL);
-- if ((newURL.length() > 0 && newURL.charAt(newURL.length() - 1) != '/')
-- && (requestUrl.length()> 0 && requestUrl.charAt(0) != '/')) {
++ if ((newURL.length() > 0 && newURL.charAt(newURL.length() - 1) != '/')
++ && (requestUrl.length()> 0 && requestUrl.charAt(0) != '/')) {
newURL.append('/');
}
-- if (UtilValidate.isNotEmpty(imgSize)){
-- if (!"/images/defaultImage.jpg".equals(requestUrl)){
++ if (UtilValidate.isNotEmpty(imgSize)) {
++ if (!"/images/defaultImage.jpg".equals(requestUrl)) {
int index = requestUrl.lastIndexOf(".");
if (index > 0) {
String suffix = requestUrl.substring(index);
diff --cc framework/webapp/src/main/java/org/apache/ofbiz/webapp/stats/VisitHandler.java
index 769a71d,769a71d..93e9a83
--- a/framework/webapp/src/main/java/org/apache/ofbiz/webapp/stats/VisitHandler.java
+++ b/framework/webapp/src/main/java/org/apache/ofbiz/webapp/stats/VisitHandler.java
@@@ -163,7 -163,7 +163,6 @@@ public class VisitHandler
GenericValue visitor = (GenericValue) session.getAttribute("visitor");
if (visitor != null) {
String visitorId = visitor.getString("visitorId");
--
// sometimes these values get stale, so check it before we use it
try {
GenericValue checkVisitor = EntityQuery.use(delegator).from("Visitor").where("visitorId", visitorId).queryOne();
@@@ -176,13 -176,13 +175,11 @@@
Debug.logWarning("Problem checking the visitorId: " + e.toString(), MODULE);
}
}
--
// get localhost ip address and hostname to store
if (address != null) {
visit.set("serverIpAddress", address.getHostAddress());
visit.set("serverHostName", address.getHostName());
}
--
try {
visit = delegator.createSetNextSeqId(visit);
session.setAttribute("visit", visit);
@@@ -194,7 -194,7 +191,6 @@@
}
}
}
--
if (visit == null) {
Debug.logWarning("Could not find or create the visit...", MODULE);
}
@@@ -202,13 -202,13 +198,11 @@@
}
return null;
}
--
public static GenericValue getVisitor(HttpServletRequest request, HttpServletResponse response) {
// this defaults to true: ie if anything but "false" it will be true
-- Delegator delegator = (Delegator) request.getAttribute("delegator");
++ Delegator delegator = (Delegator) request.getAttribute("delegator");
if (!EntityUtilProperties.propertyValueEqualsIgnoreCase("serverstats", "stats.persist.visitor", "false", delegator)) {
HttpSession session = request.getSession();
--
GenericValue visitor = (GenericValue) session.getAttribute("visitor");
if (visitor == null) {
synchronized (session) {
diff --cc framework/webapp/src/main/java/org/apache/ofbiz/webapp/view/ApacheFopWorker.java
index 669ff79,669ff79..4a670ae
--- a/framework/webapp/src/main/java/org/apache/ofbiz/webapp/view/ApacheFopWorker.java
+++ b/framework/webapp/src/main/java/org/apache/ofbiz/webapp/view/ApacheFopWorker.java
@@@ -91,7 -91,7 +91,7 @@@ public final class ApacheFopWorker
private static final String fopFontBaseProperty = UtilProperties.getPropertyValue("fop", "fop.font.base.url", "/framework/webapp/config/");
-- private ApacheFopWorker() {}
++ private ApacheFopWorker() { }
/** Returns an instance of the FopFactory class. FOP documentation recommends
* the reuse of the factory instance because of the startup time.
@@@ -247,7 -247,7 +247,7 @@@
private URIResolver defaultResolver;
-- private LocalResolver() {}
++ private LocalResolver() { }
private LocalResolver(URIResolver defaultResolver) {
this.defaultResolver = defaultResolver;
diff --cc framework/webapp/src/main/java/org/apache/ofbiz/webapp/webdav/WebDavServlet.java
index 95c461a,95c461a..b0bacd5
--- a/framework/webapp/src/main/java/org/apache/ofbiz/webapp/webdav/WebDavServlet.java
+++ b/framework/webapp/src/main/java/org/apache/ofbiz/webapp/webdav/WebDavServlet.java
@@@ -57,7 -57,7 +57,7 @@@ public class WebDavServlet extends Gene
protected Security security = null;
@Override
-- public void init(ServletConfig config) throws ServletException{
++ public void init(ServletConfig config) throws ServletException {
try {
super.init(config);
ServletContext context = this.getServletContext();
diff --cc framework/webapp/src/main/java/org/apache/ofbiz/webapp/webdav/WebDavUtil.java
index 26a8b39,26a8b39..9069afe
--- a/framework/webapp/src/main/java/org/apache/ofbiz/webapp/webdav/WebDavUtil.java
+++ b/framework/webapp/src/main/java/org/apache/ofbiz/webapp/webdav/WebDavUtil.java
@@@ -47,7 -47,7 +47,7 @@@ public final class WebDavUtil
private static final TimeZone GMT_TIMEZONE = TimeZone.getTimeZone("GMT");
private static final String RFC1123_DATE_FORMAT = "EEE, dd MMM yyyy HH:mm:ss zzz";
-- private WebDavUtil() {}
++ private WebDavUtil() { }
public static String formatDate(String formatString, Date date) {
DateFormat df = new SimpleDateFormat(formatString);
diff --cc framework/webapp/src/main/java/org/apache/ofbiz/webapp/website/WebSiteProperties.java
index b3d145a,b3d145a..6f6d028
--- a/framework/webapp/src/main/java/org/apache/ofbiz/webapp/website/WebSiteProperties.java
+++ b/framework/webapp/src/main/java/org/apache/ofbiz/webapp/website/WebSiteProperties.java
@@@ -121,7 -121,7 +121,6 @@@ public final class WebSiteProperties
httpsPort = httpsPortValue.toString();
}
}
--
webSiteProps = new WebSiteProperties(httpPort, httpHost, httpsPort, httpsHost, webappPath, enableHttps);
request.setAttribute("_WEBSITE_PROPS_", webSiteProps);
}
@@@ -155,7 -155,7 +154,6 @@@
httpsPortValue += Start.getInstance().getConfig().portOffset; // Here unlike above we trust the user and don't rely on the request, no dontAddPortoffset.
httpsPort = httpsPortValue.toString();
}
--
return new WebSiteProperties(httpPort, httpHost, httpsPort, httpsHost, webappPath, enableHttps);
}
diff --cc framework/webapp/src/main/java/org/apache/ofbiz/webapp/website/WebSiteWorker.java
index 9118ea2,9118ea2..35fa177
--- a/framework/webapp/src/main/java/org/apache/ofbiz/webapp/website/WebSiteWorker.java
+++ b/framework/webapp/src/main/java/org/apache/ofbiz/webapp/website/WebSiteWorker.java
@@@ -34,7 -34,7 +34,7 @@@ public final class WebSiteWorker
private static final String MODULE = WebSiteWorker.class.getName();
-- private WebSiteWorker() {}
++ private WebSiteWorker() { }
public static String getWebSiteId(ServletRequest request) {
ServletContext ctx = request.getServletContext();
diff --cc framework/webtools/src/main/java/org/apache/ofbiz/webtools/UtilCacheEvents.java
index bca0b89,bca0b89..1048e87
--- a/framework/webtools/src/main/java/org/apache/ofbiz/webtools/UtilCacheEvents.java
+++ b/framework/webtools/src/main/java/org/apache/ofbiz/webtools/UtilCacheEvents.java
@@@ -43,7 -43,7 +43,7 @@@ public final class UtilCacheEvents
private static final String MODULE = UtilCacheEvents.class.getName();
-- private UtilCacheEvents() {}
++ private UtilCacheEvents() { }
/** An HTTP WebEvent handler the specified element from the specified cache
* @param request The HTTP request object for the current JSP or Servlet request.
@@@ -175,7 -175,7 +175,6 @@@
request.setAttribute("_EVENT_MESSAGE_", errMsg + " (" + UtilDateTime.nowDateString("yyyy-MM-dd HH:mm:ss") + ").");
return "success";
}
--
/** An HTTP WebEvent handler that clears the selected caches
* @param request The HTTP request object for the current JSP or Servlet request.
* @param response The HTTP response object for the current JSP or Servlet request.
diff --cc framework/webtools/src/main/java/org/apache/ofbiz/webtools/WebToolsServices.java
index 70f41f6,70f41f6..a2dd6e5
--- a/framework/webtools/src/main/java/org/apache/ofbiz/webtools/WebToolsServices.java
+++ b/framework/webtools/src/main/java/org/apache/ofbiz/webtools/WebToolsServices.java
@@@ -111,13 -111,13 +111,13 @@@ public class WebToolsServices
Locale locale = (Locale) context.get("locale");
List<String> messages = new LinkedList<>();
-- String filename = (String)context.get("filename");
-- String fmfilename = (String)context.get("fmfilename");
-- String fulltext = (String)context.get("fulltext");
-- boolean isUrl = (String)context.get("isUrl") != null;
-- String onlyInserts = (String)context.get("onlyInserts");
-- String maintainTimeStamps = (String)context.get("maintainTimeStamps");
-- String createDummyFks = (String)context.get("createDummyFks");
++ String filename = (String) context.get("filename");
++ String fmfilename = (String) context.get("fmfilename");
++ String fulltext = (String) context.get("fulltext");
++ boolean isUrl = (String) context.get("isUrl") != null;
++ String onlyInserts = (String) context.get("onlyInserts");
++ String maintainTimeStamps = (String) context.get("maintainTimeStamps");
++ String createDummyFks = (String) context.get("createDummyFks");
String checkDataOnly = (String) context.get("checkDataOnly");
Map<String, Object> placeholderValues = UtilGenerics.cast(context.get("placeholderValues"));
@@@ -461,8 -461,8 +461,8 @@@
public static Map<String, Object> entityExportAll(DispatchContext dctx, Map<String, ? extends Object> context) {
Delegator delegator = dctx.getDelegator();
Locale locale = (Locale) context.get("locale");
-- String outpath = (String)context.get("outpath"); // mandatory
-- Timestamp fromDate = (Timestamp)context.get("fromDate");
++ String outpath = (String) context.get("outpath"); // mandatory
++ Timestamp fromDate = (Timestamp) context.get("fromDate");
Integer txTimeout = (Integer)context.get("txTimeout");
if (txTimeout == null) {
txTimeout = 7200;
diff --cc framework/webtools/src/main/java/org/apache/ofbiz/webtools/artifactinfo/ArtifactInfoFactory.java
index 7ac52a0,7ac52a0..3f49e0c
--- a/framework/webtools/src/main/java/org/apache/ofbiz/webtools/artifactinfo/ArtifactInfoFactory.java
+++ b/framework/webtools/src/main/java/org/apache/ofbiz/webtools/artifactinfo/ArtifactInfoFactory.java
@@@ -385,7 -385,7 +385,7 @@@ public class ArtifactInfoFactory
return () -> {
try {
getServiceArtifactInfo(serviceName);
-- } catch(Exception exc) {
++ } catch (Exception exc) {
Debug.logWarning(exc, "Error processing service: " + serviceName, MODULE);
}
return null;
diff --cc framework/webtools/src/main/java/org/apache/ofbiz/webtools/artifactinfo/FormWidgetArtifactInfo.java
index d4ac8c3,d4ac8c3..e45157c
--- a/framework/webtools/src/main/java/org/apache/ofbiz/webtools/artifactinfo/FormWidgetArtifactInfo.java
+++ b/framework/webtools/src/main/java/org/apache/ofbiz/webtools/artifactinfo/FormWidgetArtifactInfo.java
@@@ -143,7 -143,7 +143,7 @@@ public class FormWidgetArtifactInfo ext
}
}
-- protected void populateLinkedRequests(Set<String> allRequestUniqueId) throws GeneralException{
++ protected void populateLinkedRequests(Set<String> allRequestUniqueId) throws GeneralException {
for (String requestUniqueId: allRequestUniqueId) {
if (requestUniqueId.contains("${")) {
@@@ -160,7 -160,7 +160,7 @@@
}
}
}
-- protected void populateTargetedRequests(Set<String> allRequestUniqueId) throws GeneralException{
++ protected void populateTargetedRequests(Set<String> allRequestUniqueId) throws GeneralException {
for (String requestUniqueId: allRequestUniqueId) {
if (requestUniqueId.contains("${")) {
diff --cc framework/webtools/src/main/java/org/apache/ofbiz/webtools/artifactinfo/ScreenWidgetArtifactInfo.java
index 33220a1,33220a1..9719163
--- a/framework/webtools/src/main/java/org/apache/ofbiz/webtools/artifactinfo/ScreenWidgetArtifactInfo.java
+++ b/framework/webtools/src/main/java/org/apache/ofbiz/webtools/artifactinfo/ScreenWidgetArtifactInfo.java
@@@ -137,7 -137,7 +137,7 @@@ public class ScreenWidgetArtifactInfo e
}
}
-- protected void populateLinkedRequests(Set<String> allRequestUniqueId) throws GeneralException{
++ protected void populateLinkedRequests(Set<String> allRequestUniqueId) throws GeneralException {
for (String requestUniqueId: allRequestUniqueId) {
if (requestUniqueId.contains("${")) {
diff --cc framework/webtools/src/main/java/org/apache/ofbiz/webtools/print/FoPrintServerEvents.java
index d8a4c9d,d8a4c9d..350c15b
--- a/framework/webtools/src/main/java/org/apache/ofbiz/webtools/print/FoPrintServerEvents.java
+++ b/framework/webtools/src/main/java/org/apache/ofbiz/webtools/print/FoPrintServerEvents.java
@@@ -91,7 -91,7 +91,7 @@@ public class FoPrintServerEvents
VisualTheme visualTheme = (VisualTheme) parameters.get("visualTheme");
if (visualTheme == null) {
visualTheme = ThemeFactory.resolveVisualTheme(null);
-- }
++ }
GenericValue system = null;
try {
system = dctx.getDelegator().findOne("UserLogin", false, "userLoginId", "system");
@@@ -102,7 -102,7 +102,6 @@@
if (!parameters.containsKey("locale")) {
parameters.put("locale", Locale.getDefault());
}
--
// render and obtain the XSL-FO
Writer writer = new StringWriter();
try {
diff --cc framework/widget/src/main/java/org/apache/ofbiz/widget/WidgetFactory.java
index 1de1d1b,1de1d1b..c16dd58
--- a/framework/widget/src/main/java/org/apache/ofbiz/widget/WidgetFactory.java
+++ b/framework/widget/src/main/java/org/apache/ofbiz/widget/WidgetFactory.java
@@@ -133,5 -133,5 +133,5 @@@ public class WidgetFactory
}
}
-- private WidgetFactory() {}
++ private WidgetFactory() { }
}
diff --cc framework/widget/src/main/java/org/apache/ofbiz/widget/WidgetWorker.java
index a09e417,a09e417..4a7b040
--- a/framework/widget/src/main/java/org/apache/ofbiz/widget/WidgetWorker.java
+++ b/framework/widget/src/main/java/org/apache/ofbiz/widget/WidgetWorker.java
@@@ -45,7 -45,7 +45,7 @@@ public final class WidgetWorker
private static final String MODULE = WidgetWorker.class.getName();
-- private WidgetWorker () {}
++ private WidgetWorker() { }
public static void buildHyperlinkUrl(Appendable externalWriter, String target, String targetType, Map<String, String> parameterMap,
String prefix, boolean fullPath, boolean secure, boolean encode, HttpServletRequest request, HttpServletResponse response, Map<String, Object> context) throws IOException {
@@@ -118,7 -118,7 +118,7 @@@
}
String tokenValue = CsrfUtil.generateTokenForNonAjax(request, target);
-- if (UtilValidate.isNotEmpty(tokenValue)){
++ if (UtilValidate.isNotEmpty(tokenValue)) {
String currentString = externalWriter.toString();
if (currentString.startsWith("<form")) {
currentString = currentString.substring(currentString.lastIndexOf("\"")+1);
@@@ -195,7 -195,7 +195,7 @@@
writer.append(modelFormField.getAction(context));
writer.append('"');
}
-- if (UtilValidate.isNotEmpty(confirmation)){
++ if (UtilValidate.isNotEmpty(confirmation)) {
writer.append(" onclick=\"return confirm('");
writer.append(confirmation);
writer.append("')\"");
@@@ -235,7 -235,7 +235,7 @@@
writer.append('"');
}
-- if (UtilValidate.isNotEmpty(confirmation)){
++ if (UtilValidate.isNotEmpty(confirmation)) {
writer.append(" onclick=\"return confirm('");
writer.append(confirmation);
writer.append("')\"");
diff --cc framework/widget/src/main/java/org/apache/ofbiz/widget/cache/WidgetContextCacheKey.java
index 050a67f,050a67f..4d81a36
--- a/framework/widget/src/main/java/org/apache/ofbiz/widget/cache/WidgetContextCacheKey.java
+++ b/framework/widget/src/main/java/org/apache/ofbiz/widget/cache/WidgetContextCacheKey.java
@@@ -35,7 -35,7 +35,7 @@@ public final class WidgetContextCacheKe
private static Set<String> fieldNamesToSkip = createFieldNamesToSkip();
-- private static Set<String> createFieldNamesToSkip(){
++ private static Set<String> createFieldNamesToSkip() {
Set<String> fieldNamesToSkip = new HashSet<>();
fieldNamesToSkip.add("globalContext");
fieldNamesToSkip.add("delegator");
diff --cc framework/widget/src/main/java/org/apache/ofbiz/widget/content/WidgetContentWorker.java
index d37ab78,d37ab78..76049f5
--- a/framework/widget/src/main/java/org/apache/ofbiz/widget/content/WidgetContentWorker.java
+++ b/framework/widget/src/main/java/org/apache/ofbiz/widget/content/WidgetContentWorker.java
@@@ -27,7 -27,7 +27,7 @@@ public final class WidgetContentWorker
private static final String MODULE = WidgetContentWorker.class.getName();
private static ContentWorkerInterface contentWorker = null;
-- private WidgetContentWorker () {}
++ private WidgetContentWorker() { }
static {
try {
diff --cc framework/widget/src/main/java/org/apache/ofbiz/widget/content/WidgetDataResourceWorker.java
index 4a8980a,4a8980a..aa7312a
--- a/framework/widget/src/main/java/org/apache/ofbiz/widget/content/WidgetDataResourceWorker.java
+++ b/framework/widget/src/main/java/org/apache/ofbiz/widget/content/WidgetDataResourceWorker.java
@@@ -25,7 -25,7 +25,7 @@@ import org.apache.ofbiz.base.util.Debug
*/
public final class WidgetDataResourceWorker {
private static final String MODULE = WidgetDataResourceWorker.class.getName();
-- private WidgetDataResourceWorker() {}
++ private WidgetDataResourceWorker() { }
private static DataResourceWorkerInterface dataresourceWorker = null;
static {
try {
diff --cc framework/widget/src/main/java/org/apache/ofbiz/widget/model/AbstractModelAction.java
index c8dc285,c8dc285..d823546
--- a/framework/widget/src/main/java/org/apache/ofbiz/widget/model/AbstractModelAction.java
+++ b/framework/widget/src/main/java/org/apache/ofbiz/widget/model/AbstractModelAction.java
@@@ -856,13 -856,13 +856,13 @@@ public abstract class AbstractModelActi
}
}
}
-- if (!setIfNull && newValue == null){
++ if (!setIfNull && newValue == null) {
if (Debug.warningOn()) {
Debug.logWarning("Field value not found (null) for the field: [" + this.field.getOriginalName() + " and there was no default value, so field was not set", MODULE);
}
return;
}
-- if (!setIfEmpty && ObjectType.isEmpty(newValue)){
++ if (!setIfEmpty && ObjectType.isEmpty(newValue)) {
if (Debug.warningOn()) {
Debug.logWarning("Field value not found (empty) for the field: [" + this.field.getOriginalName() + " and there was no default value, so field was not set", MODULE);
}
diff --cc framework/widget/src/main/java/org/apache/ofbiz/widget/model/MenuFactory.java
index 7281181,7281181..a98c726
--- a/framework/widget/src/main/java/org/apache/ofbiz/widget/model/MenuFactory.java
+++ b/framework/widget/src/main/java/org/apache/ofbiz/widget/model/MenuFactory.java
@@@ -89,7 -89,7 +89,7 @@@ public class MenuFactory
if (!"menus".equalsIgnoreCase(rootElement.getTagName())) {
rootElement = UtilXml.firstChildElement(rootElement, "menus");
}
-- for (Element menuElement: UtilXml.childElementList(rootElement, "menu")){
++ for (Element menuElement: UtilXml.childElementList(rootElement, "menu")) {
ModelMenu modelMenu = new ModelMenu(menuElement, menuLocation, visualTheme);
modelMenuMap.put(modelMenu.getName(), modelMenu);
}
diff --cc framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelActionVisitor.java
index 88c2f41,88c2f41..d1aa15b
--- a/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelActionVisitor.java
+++ b/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelActionVisitor.java
@@@ -4,7 -4,7 +4,7 @@@
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
-- * "License"); you may not use this file except in compliance
++ * "License") you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
diff --cc framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelFieldVisitor.java
index 26ab9c1,26ab9c1..e2badee
--- a/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelFieldVisitor.java
+++ b/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelFieldVisitor.java
@@@ -49,53 -49,53 +49,53 @@@ import org.apache.ofbiz.widget.model.Mo
*/
public interface ModelFieldVisitor {
-- void visit(CheckField checkField) throws Exception ;
++ void visit(CheckField checkField) throws Exception;
-- void visit(ContainerField containerField) throws Exception ;
++ void visit(ContainerField containerField) throws Exception;
-- void visit(DateFindField dateFindField) throws Exception ;
++ void visit(DateFindField dateFindField) throws Exception;
-- void visit(DateTimeField dateTimeField) throws Exception ;
++ void visit(DateTimeField dateTimeField) throws Exception;
-- void visit(DisplayEntityField displayEntityField) throws Exception ;
++ void visit(DisplayEntityField displayEntityField) throws Exception;
-- void visit(DisplayField displayField) throws Exception ;
++ void visit(DisplayField displayField) throws Exception;
-- void visit(DropDownField dropDownField) throws Exception ;
++ void visit(DropDownField dropDownField) throws Exception;
-- void visit(FileField fileField) throws Exception ;
++ void visit(FileField fileField) throws Exception;
-- void visit(FormField formField) throws Exception ;
++ void visit(FormField formField) throws Exception;
-- void visit(GridField gridField) throws Exception ;
++ void visit(GridField gridField) throws Exception;
-- void visit(HiddenField hiddenField) throws Exception ;
++ void visit(HiddenField hiddenField) throws Exception;
-- void visit(HyperlinkField hyperlinkField) throws Exception ;
++ void visit(HyperlinkField hyperlinkField) throws Exception;
-- void visit(IgnoredField ignoredField) throws Exception ;
++ void visit(IgnoredField ignoredField) throws Exception;
-- void visit(ImageField imageField) throws Exception ;
++ void visit(ImageField imageField) throws Exception;
-- void visit(LookupField lookupField) throws Exception ;
++ void visit(LookupField lookupField) throws Exception;
-- void visit(MenuField menuField) throws Exception ;
++ void visit(MenuField menuField) throws Exception;
-- void visit(PasswordField passwordField) throws Exception ;
++ void visit(PasswordField passwordField) throws Exception;
-- void visit(RadioField radioField) throws Exception ;
++ void visit(RadioField radioField) throws Exception;
-- void visit(RangeFindField rangeFindField) throws Exception ;
++ void visit(RangeFindField rangeFindField) throws Exception;
-- void visit(ResetField resetField) throws Exception ;
++ void visit(ResetField resetField) throws Exception;
-- void visit(ScreenField screenField) throws Exception ;
++ void visit(ScreenField screenField) throws Exception;
-- void visit(SubmitField submitField) throws Exception ;
++ void visit(SubmitField submitField) throws Exception;
-- void visit(TextareaField textareaField) throws Exception ;
++ void visit(TextareaField textareaField) throws Exception;
-- void visit(TextField textField) throws Exception ;
++ void visit(TextField textField) throws Exception;
-- void visit(TextFindField textFindField) throws Exception ;
++ void visit(TextFindField textFindField) throws Exception;
}
diff --cc framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelFormField.java
index 15be463,15be463..64b1ed5
--- a/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelFormField.java
+++ b/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelFormField.java
@@@ -690,7 -690,7 +690,7 @@@ public class ModelFormField
// For English, ID is correct abbreviation for identity.
// So if a label ends with " Id", replace with " ID".
// If there is another locale that doesn't follow this rule, we can add condition for this locale to exempt from the change.
-- if (autoTitlewriterString.endsWith(" Id")){
++ if (autoTitlewriterString.endsWith(" Id")) {
autoTitlewriterString = autoTitlewriterString.subSequence(0, autoTitlewriterString.length() - 3) + " ID";
}
@@@ -1179,7 -1179,7 +1179,7 @@@
Map<String, Object> parameters = UtilGenerics.checkMap(context.get("parameters"), String.class, Object.class);
if (UtilValidate.isNotEmpty(parameters)) {
String fieldName = this.getModelFormField().getName();
-- if (parameters.containsKey(fieldName.concat("_fld0_value"))){
++ if (parameters.containsKey(fieldName.concat("_fld0_value"))) {
defaultOption = (String)parameters.get(fieldName.concat("_fld0_op"));
}
}
diff --cc framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelMenuAction.java
index 4bc95d1,4bc95d1..8c938cf
--- a/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelMenuAction.java
+++ b/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelMenuAction.java
@@@ -102,7 -102,7 +102,7 @@@ public abstract class ModelMenuAction
if (this.fromScope != null && "user".equals(this.fromScope)) {
if (!this.fromField.isEmpty()) {
String originalName = this.fromField.getOriginalName();
-- String currentWidgetTrail = (String)context.get("_WIDGETTRAIL_");
++ String currentWidgetTrail = (String) context.get("_WIDGETTRAIL_");
String newKey = currentWidgetTrail + "|" + originalName;
HttpSession session = (HttpSession)context.get("session");
newValue = session.getAttribute(newKey);
@@@ -116,9 -116,9 +116,9 @@@
} else if (this.fromScope != null && "application".equals(this.fromScope)) {
if (!this.fromField.isEmpty()) {
String originalName = this.fromField.getOriginalName();
-- String currentWidgetTrail = (String)context.get("_WIDGETTRAIL_");
++ String currentWidgetTrail = (String) context.get("_WIDGETTRAIL_");
String newKey = currentWidgetTrail + "|" + originalName;
-- ServletContext servletContext = (ServletContext)context.get("application");
++ ServletContext servletContext = (ServletContext) context.get("application");
newValue = servletContext.getAttribute(newKey);
if (Debug.verboseOn()) {
Debug.logVerbose("In application getting value for field from [" + this.fromField.getOriginalName() + "]: " + newValue, MODULE);
@@@ -162,9 -162,9 +162,9 @@@
}
if (this.toScope != null && "user".equals(this.toScope)) {
String originalName = this.field.getOriginalName();
-- String currentWidgetTrail = (String)context.get("_WIDGETTRAIL_");
++ String currentWidgetTrail = (String) context.get("_WIDGETTRAIL_");
String newKey = currentWidgetTrail + "|" + originalName;
-- HttpSession session = (HttpSession)context.get("session");
++ HttpSession session = (HttpSession) context.get("session");
session.setAttribute(newKey, newValue);
if (Debug.verboseOn()) {
Debug.logVerbose("In user setting value for field from [" + this.field.getOriginalName() + "]: " + newValue, MODULE);
@@@ -172,9 -172,9 +172,9 @@@
} else if (this.toScope != null && "application".equals(this.toScope)) {
String originalName = this.field.getOriginalName();
-- String currentWidgetTrail = (String)context.get("_WIDGETTRAIL_");
++ String currentWidgetTrail = (String) context.get("_WIDGETTRAIL_");
String newKey = currentWidgetTrail + "|" + originalName;
-- ServletContext servletContext = (ServletContext)context.get("application");
++ ServletContext servletContext = (ServletContext) context.get("application");
servletContext.setAttribute(newKey, newValue);
if (Debug.verboseOn()) {
Debug.logVerbose("In application setting value for field from [" + this.field.getOriginalName() + "]: " + newValue, MODULE);
diff --cc framework/widget/src/main/java/org/apache/ofbiz/widget/portal/PortalPageWorker.java
index 971bb8f,971bb8f..a0606b1
--- a/framework/widget/src/main/java/org/apache/ofbiz/widget/portal/PortalPageWorker.java
+++ b/framework/widget/src/main/java/org/apache/ofbiz/widget/portal/PortalPageWorker.java
@@@ -113,7 -113,7 +113,7 @@@ public class PortalPageWorker
if (UtilValidate.isNotEmpty(context.get("userLogin"))) { // check if a user is logged in
userLoginId = ((GenericValue)context.get("userLogin")).getString("userLoginId");
}
--
++
// Get the PortalPage ensuring that it is either owned by the user or a system page
EntityCondition cond = EntityCondition.makeCondition(UtilMisc.toList(
EntityCondition.makeCondition("portalPageId", EntityOperator.EQUALS, portalPageId),
@@@ -126,7 -126,7 +126,6 @@@
if (UtilValidate.isNotEmpty(portalPages)) {
portalPage = EntityUtil.getFirst(portalPages);
}
--
// If a derived PortalPage private to the user exists, returns this instead of the system one
cond = EntityCondition.makeCondition(UtilMisc.toList(
EntityCondition.makeCondition("originalPortalPageId", EntityOperator.EQUALS, portalPageId),
diff --cc framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/FormRenderer.java
index d4533b8,d4533b8..36d3ad7
--- a/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/FormRenderer.java
+++ b/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/FormRenderer.java
@@@ -911,7 -911,7 +911,7 @@@ public class FormRenderer
if (!modelForm.getHideHeader() && containsData) {
numOfColumns = this.renderHeaderRow(writer, context);
}
-- if (!containsData){
++ if (!containsData) {
formStringRenderer.renderEmptyFormDataMessage(writer, context, modelForm);
}
// ===== render the item rows =====
@@@ -940,7 -940,7 +940,7 @@@
if (!modelForm.getHideHeader() && containsData) {
numOfColumns = this.renderHeaderRow(writer, context);
}
-- if (!containsData){
++ if (!containsData) {
formStringRenderer.renderEmptyFormDataMessage(writer, context, modelForm);
}
// ===== render the item rows =====
@@@ -1204,7 -1204,7 +1204,7 @@@
if (iter instanceof EntityListIterator) {
EntityListIterator eli = (EntityListIterator) iter;
try {
-- if (eli.getResultsSizeAfterPartialList() > 0){
++ if (eli.getResultsSizeAfterPartialList() > 0) {
itemIndex++;
}
} catch (GenericEntityException gee) {
diff --cc framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/MenuStringRenderer.java
index 3e3283f,3e3283f..2507618
--- a/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/MenuStringRenderer.java
+++ b/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/MenuStringRenderer.java
@@@ -4,7 -4,7 +4,7 @@@
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
-- * "License") throws IOException ; you may not use this file except in compliance
++ * "License") you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
@@@ -30,12 -30,12 +30,12 @@@ import org.apache.ofbiz.widget.model.Mo
* Widget Library - Form String Renderer interface
*/
public interface MenuStringRenderer {
-- public void renderMenuItem(Appendable writer, Map<String, Object> context, ModelMenuItem menuItem) throws IOException ;
-- public void renderMenuOpen(Appendable writer, Map<String, Object> context, ModelMenu menu) throws IOException ;
-- public void renderMenuClose(Appendable writer, Map<String, Object> context, ModelMenu menu) throws IOException ;
-- public void renderFormatSimpleWrapperOpen(Appendable writer, Map<String, Object> context, ModelMenu menu) throws IOException ;
-- public void renderFormatSimpleWrapperClose(Appendable writer, Map<String, Object> context, ModelMenu menu) throws IOException ;
-- public void renderFormatSimpleWrapperRows(Appendable writer, Map<String, Object> context, Object menu) throws IOException ;
-- public void renderLink(Appendable writer, Map<String, Object> context, ModelMenuItem.MenuLink link) throws IOException ;
-- public void renderImage(Appendable writer, Map<String, Object> context, Image image) throws IOException ;
++ public void renderMenuItem(Appendable writer, Map<String, Object> context, ModelMenuItem menuItem) throws IOException;
++ public void renderMenuOpen(Appendable writer, Map<String, Object> context, ModelMenu menu) throws IOException;
++ public void renderMenuClose(Appendable writer, Map<String, Object> context, ModelMenu menu) throws IOException;
++ public void renderFormatSimpleWrapperOpen(Appendable writer, Map<String, Object> context, ModelMenu menu) throws IOException;
++ public void renderFormatSimpleWrapperClose(Appendable writer, Map<String, Object> context, ModelMenu menu) throws IOException;
++ public void renderFormatSimpleWrapperRows(Appendable writer, Map<String, Object> context, Object menu) throws IOException;
++ public void renderLink(Appendable writer, Map<String, Object> context, ModelMenuItem.MenuLink link) throws IOException;
++ public void renderImage(Appendable writer, Map<String, Object> context, Image image) throws IOException;
}
diff --cc framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/Paginator.java
index 359f1fe,359f1fe..c52d358
--- a/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/Paginator.java
+++ b/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/Paginator.java
@@@ -71,10 -71,10 +71,10 @@@ public final class Paginator
} else if (entryList instanceof List<?>) {
List<?> items = (List<?>) entryList;
listSize = items.size();
-- if (context.containsKey("result")){
++ if (context.containsKey("result")) {
Map<String, Object> resultMap = UtilGenerics.cast(context.get("result"));
-- if (resultMap.containsKey("listSize")){
-- listSize = (int)resultMap.get("listSize");
++ if (resultMap.containsKey("listSize")) {
++ listSize = (int) resultMap.get("listSize");
}
}
} else if (entryList instanceof PagedList) {
diff --cc framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/UtilHelpText.java
index 0ed4f70,0ed4f70..1d4a7aa
--- a/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/UtilHelpText.java
+++ b/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/UtilHelpText.java
@@@ -35,7 -35,7 +35,7 @@@ public final class UtilHelpText
private static final String MODULE = UtilHelpText.class.getName();
-- private UtilHelpText () {}
++ private UtilHelpText() { }
/**
* Find the help text associated with an entity field.
diff --cc framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/fo/FoFormRenderer.java
index e6235e3,e6235e3..6cf2837
--- a/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/fo/FoFormRenderer.java
+++ b/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/fo/FoFormRenderer.java
@@@ -70,7 -70,7 +70,7 @@@ public class FoFormRenderer extends Htm
HttpServletRequest request;
HttpServletResponse response;
-- public FoFormRenderer() {}
++ public FoFormRenderer() { }
public FoFormRenderer(HttpServletRequest request, HttpServletResponse response) throws IOException {
this.request = request;
@@@ -245,13 -245,13 +245,11 @@@
writer.append("</fo:table>");
appendWhitespace(writer);
}
--
@Override
public void renderFormatHeaderOpen(Appendable writer, Map<String, Object> context, ModelForm modelForm) throws IOException {
writer.append("<fo:table-header>");
appendWhitespace(writer);
}
--
@Override
public void renderFormatHeaderClose(Appendable writer, Map<String, Object> context, ModelForm modelForm) throws IOException {
writer.append(" </fo:table-header>");
diff --cc framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/fo/ScreenFopViewHandler.java
index 77b8370,77b8370..8c3639f
--- a/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/fo/ScreenFopViewHandler.java
+++ b/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/fo/ScreenFopViewHandler.java
@@@ -112,7 -112,7 +112,6 @@@ public class ScreenFopViewHandler exten
if (UtilValidate.isEmpty(contentType)) {
contentType = modelTheme.getContentType(getName());
}
--
// get encryption related parameters
FOUserAgent foUserAgent = null;
String userPassword = request.getParameter("userPassword");
@@@ -132,13 -132,13 +131,12 @@@
// ignore
}
}
--
++
boolean encryptMetadata = Boolean.parseBoolean(UtilValidate.isEmpty(request.getParameter("encrypt-metadata")) ? ApacheFopWorker.getEncryptMetadataDefault() : request.getParameter("encrypt-metadata"));
boolean allowFillInForms = Boolean.parseBoolean(UtilValidate.isEmpty(request.getParameter("allowFillInForms")) ? ApacheFopWorker.getAllowFillInFormsDefault() : request.getParameter("allowFillInForms"));
boolean allowAccessContent = Boolean.parseBoolean(UtilValidate.isEmpty(request.getParameter("allowAccessContent")) ? ApacheFopWorker.getAllowAccessContentDefault() : request.getParameter("allowAccessContent"));
boolean allowAssembleDocument = Boolean.parseBoolean(UtilValidate.isEmpty(request.getParameter("allowAssembleDocument")) ? ApacheFopWorker.getAllowAssembleDocumentDefault() : request.getParameter("allowAssembleDocument"));
boolean allowPrintHq = Boolean.parseBoolean(UtilValidate.isEmpty(request.getParameter("allowPrintHq")) ? ApacheFopWorker.getAllowPrintHqDefault() : request.getParameter("allowPrintHq"));
--
FopFactory fopFactory = ApacheFopWorker.getFactoryInstance();
foUserAgent = fopFactory.newFOUserAgent();
PDFEncryptionParams pdfEncryptionParams = new PDFEncryptionParams(userPassword, ownerPassword, allowPrint, allowCopyContent, allowEditContent, allowEditAnnotations, encryptMetadata);
@@@ -149,7 -149,7 +147,7 @@@
pdfEncryptionParams.setEncryptionLengthInBits(encryptionLength);
foUserAgent.getRendererOptions().put(PDFEncryptionOption.ENCRYPTION_PARAMS, pdfEncryptionParams);
}
--
++
Reader reader = new StringReader(screenOutString);
StreamSource src = new StreamSource(reader);
ByteArrayOutputStream out = new ByteArrayOutputStream();
diff --cc framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/html/HtmlMenuRenderer.java
index 7028d59,7028d59..09b9e14
--- a/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/html/HtmlMenuRenderer.java
+++ b/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/html/HtmlMenuRenderer.java
@@@ -55,7 -55,7 +55,7 @@@ public class HtmlMenuRenderer extends H
public static final String MODULE = HtmlMenuRenderer.class.getName();
-- protected HtmlMenuRenderer() {}
++ protected HtmlMenuRenderer() { }
public HtmlMenuRenderer(HttpServletRequest request, HttpServletResponse response) {
this.request = request;
diff --cc framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/html/HtmlMenuRendererImage.java
index 4ae96be,4ae96be..1c92f82
--- a/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/html/HtmlMenuRendererImage.java
+++ b/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/html/HtmlMenuRendererImage.java
@@@ -39,7 -39,7 +39,7 @@@ import org.apache.ofbiz.widget.model.Mo
public class HtmlMenuRendererImage extends HtmlMenuRenderer {
-- protected HtmlMenuRendererImage() {}
++ protected HtmlMenuRendererImage() { }
public HtmlMenuRendererImage(HttpServletRequest request, HttpServletResponse response) {
super(request, response);
diff --cc framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/html/HtmlMenuWrapper.java
index 3230e06,3230e06..a90384b
--- a/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/html/HtmlMenuWrapper.java
+++ b/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/html/HtmlMenuWrapper.java
@@@ -55,7 -55,7 +55,7 @@@ public class HtmlMenuWrapper
protected MenuStringRenderer renderer;
protected Map<String, Object> context;
-- protected HtmlMenuWrapper() {}
++ protected HtmlMenuWrapper() { }
public HtmlMenuWrapper(String resourceName, String menuName, HttpServletRequest request, HttpServletResponse response)
throws IOException, SAXException, ParserConfigurationException {
diff --cc framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/html/HtmlMenuWrapperImage.java
index 31dd6bb,31dd6bb..67c43c3
--- a/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/html/HtmlMenuWrapperImage.java
+++ b/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/html/HtmlMenuWrapperImage.java
@@@ -41,7 -41,7 +41,7 @@@ public class HtmlMenuWrapperImage exten
private static final String MODULE = HtmlMenuWrapperImage.class.getName();
-- protected HtmlMenuWrapperImage() {}
++ protected HtmlMenuWrapperImage() { }
public HtmlMenuWrapperImage(String resourceName, String menuName, HttpServletRequest request, HttpServletResponse response)
throws IOException, SAXException, ParserConfigurationException {
diff --cc framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/html/HtmlTreeRenderer.java
index 45976c7,45976c7..270b29e
--- a/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/html/HtmlTreeRenderer.java
+++ b/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/html/HtmlTreeRenderer.java
@@@ -52,7 -52,7 +52,7 @@@ public class HtmlTreeRenderer extends H
ScreenStringRenderer screenStringRenderer = null;
private static final String MODULE = HtmlTreeRenderer.class.getName();
-- public HtmlTreeRenderer() {}
++ public HtmlTreeRenderer() { }
@Override
public void renderNodeBegin(Appendable writer, Map<String, Object> context, ModelTree.ModelNode node, int depth) throws IOException {
diff --cc framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroMenuRenderer.java
index afee332,afee332..b99b7bb
--- a/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroMenuRenderer.java
+++ b/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroMenuRenderer.java
@@@ -307,9 -307,9 +307,9 @@@ public class MacroMenuRenderer implemen
selectedStyle = "selected";
}
if (UtilValidate.isNotEmpty(style)) {
-- style += " " ;
++ style += " ";
}
-- style += selectedStyle ;
++ style += selectedStyle;
}
if (isDisableIfEmpty(menuItem, context)) {
style = menuItem.getDisabledTitleStyle();
diff --cc framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroScreenRenderer.java
index a8cf74e,a8cf74e..886f6f4
--- a/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroScreenRenderer.java
+++ b/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroScreenRenderer.java
@@@ -334,7 -334,7 +334,7 @@@ public class MacroScreenRenderer implem
@Override
public void renderImage(Appendable writer, Map<String, Object> context, ModelScreenWidget.ScreenImage image) throws IOException {
if (image == null) {
-- return ;
++ return;
}
String src = image.getSrc(context);
@@@ -378,7 -378,7 +378,7 @@@
public void renderContentBegin(Appendable writer, Map<String, Object> context, ModelScreenWidget.Content content) throws IOException {
String editRequest = content.getEditRequest(context);
String enableEditName = content.getEnableEditName(context);
-- String enableEditValue = (String)context.get(enableEditName);
++ String enableEditValue = (String) context.get(enableEditName);
if (Debug.verboseOn()) {
Debug.logVerbose("directEditRequest:" + editRequest, MODULE);
@@@ -458,7 -458,7 +458,7 @@@
String editMode = "Edit";
String editRequest = content.getEditRequest(context);
String enableEditName = content.getEnableEditName(context);
-- String enableEditValue = (String)context.get(enableEditName);
++ String enableEditValue = (String) context.get(enableEditName);
String urlString = "";
if (editRequest != null && editRequest.toUpperCase(Locale.getDefault()).indexOf("IMAGE") < 0) {
editMode += " Image";
@@@ -511,7 -511,7 +511,7 @@@
@Override
public void renderSubContentBegin(Appendable writer, Map<String, Object> context, ModelScreenWidget.SubContent content) throws IOException {
String enableEditName = content.getEnableEditName(context);
-- String enableEditValue = (String)context.get(enableEditName);
++ String enableEditValue = (String) context.get(enableEditName);
Map<String, Object> parameters = new HashMap<>();
parameters.put("editContainerStyle", content.getEditContainerStyle(context));
@@@ -567,7 -567,7 +567,7 @@@
String editMode = "Edit";
String editRequest = content.getEditRequest(context);
String enableEditName = content.getEnableEditName(context);
-- String enableEditValue = (String)context.get(enableEditName);
++ String enableEditValue = (String) context.get(enableEditName);
String expandedContentId = content.getContentId(context);
String expandedMapKey = content.getMapKey(context);
String urlString = "";
@@@ -662,12 -662,12 +662,12 @@@
parameters.put("title", title);
parameters.put("collapsible", collapsible);
parameters.put("saveCollapsed", screenlet.saveCollapsed());
-- if (UtilValidate.isNotEmpty (screenlet.getId(context))) {
++ if (UtilValidate.isNotEmpty(screenlet.getId(context))) {
parameters.put("id", screenlet.getId(context));
parameters.put("collapsibleAreaId", screenlet.getId(context) + "_col");
} else {
parameters.put("id", "screenlet_" + screenLetsIdCounter);
-- parameters.put("collapsibleAreaId","screenlet_" + screenLetsIdCounter + "_col");
++ parameters.put("collapsibleAreaId", "screenlet_" + screenLetsIdCounter + "_col");
screenLetsIdCounter++;
}
parameters.put("expandToolTip", expandToolTip);
diff --cc framework/widget/src/main/java/org/apache/ofbiz/widget/test/WidgetMacroLibraryTests.java
index da7d74e,da7d74e..6eccb51
--- a/framework/widget/src/main/java/org/apache/ofbiz/widget/test/WidgetMacroLibraryTests.java
+++ b/framework/widget/src/main/java/org/apache/ofbiz/widget/test/WidgetMacroLibraryTests.java
@@@ -34,7 -34,7 +34,7 @@@ import org.apache.tika.sax.BodyContentH
public class WidgetMacroLibraryTests extends OFBizTestCase {
-- protected String screenUrl = "https://localhost:8443/webtools/control/WebtoolsLayoutDemo" ; //use existing screen to present most of layout use case
++ protected String screenUrl = "https://localhost:8443/webtools/control/WebtoolsLayoutDemo"; //use existing screen to present most of layout use case
protected final String authentificationQuery = "?USERNAME=admin&PASSWORD=ofbiz";
public WidgetMacroLibraryTests(String name) {