framework/base/src/org/ofbiz/base/util/UtilProperties.java
UtilProperties
has 151 methods (exceeds 20 allowed). Consider refactoring. Open
Open
@SuppressWarnings("serial")
public final class UtilProperties implements Serializable {
private static final Debug.OfbizLogger module = Debug.getOfbizLogger(java.lang.invoke.MethodHandles.lookup().lookupClass());
Method putPropertiesWithPrefixSuffix
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static <M extends Map<String, ?>> M putPropertiesWithPrefixSuffix(M out, Map<String, ?> properties, String prefix, String suffix, boolean allowDots, boolean returnPrefix, boolean returnSuffix) {
Method putPropertiesWithPrefixSuffix
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static <M extends Map<String, ? super String>> M putPropertiesWithPrefixSuffix(M out, Properties properties, String prefix, String suffix, boolean allowDots, boolean returnPrefix, boolean returnSuffix) {
Method getPropertyNamesWithPrefixSuffix
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static <C extends Collection<String>> C getPropertyNamesWithPrefixSuffix(C out, Properties properties, String prefix, String suffix, boolean allowDots, boolean returnPrefix, boolean returnSuffix) {
Avoid deeply nested control flow statements. Open
Open
if (!prevValue.equals(value)) {
Debug.logWarning("GlobalResourceBundle (" + locale + "): Duplicate differing property [" + name + "] detected in resource [" +
resource + "] [" + resourceURL + "]", module);
} else if (Debug.verboseOn()) {
Debug.logWarning("GlobalResourceBundle (" + locale + "): Duplicate identical property [" + name + "] detected in resource [" +
Avoid deeply nested control flow statements. Open
Open
if (value != null) {
String name = propertyElem.getAttribute("key");
String localeString = valueElem.getAttribute("xml:lang");
if (localeString.isEmpty()) {
entryProperties.put(name, value);
Method getBundle
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static UtilResourceBundle getBundle(String resource, Locale locale, ClassLoader loader, boolean optional, boolean useCache, boolean log) throws MissingResourceException {
Method getPropertyNamesWithPrefixSuffix
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static Set<String> getPropertyNamesWithPrefixSuffix(Properties properties, String prefix, String suffix, boolean allowDots, boolean returnPrefix, boolean returnSuffix) {
Avoid deeply nested control flow statements. Open
Open
if (mergedProperties == null) { // for now: require at least one valid Properties
mergedProperties = new ExtendedProperties();
}
Avoid deeply nested control flow statements. Open
Open
if (useCache) {
bundleCache.putIfAbsent(lookupName, bundle);
}
Method getPropertiesWithPrefixSuffix
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static Map<String, String> getPropertiesWithPrefixSuffix(Map<String, ?> properties, String prefix, String suffix, boolean allowDots, boolean returnPrefix, boolean returnSuffix) {
Method getPropertiesWithPrefixSuffix
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static Map<String, String> getPropertiesWithPrefixSuffix(Properties properties, String prefix, String suffix, boolean allowDots, boolean returnPrefix, boolean returnSuffix) {
Method getPropertyAsLongInRange
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static Long getPropertyAsLongInRange(String resource, String name, Long minValue, Long maxValue, Long defaultNumber) {
Method getMessage
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static <E> String getMessage(String resource, String name, List<E> arguments, Locale locale, boolean optional) {
Method getPropertyAsIntegerInRange
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static Integer getPropertyAsIntegerInRange(String resource, String name, Integer minValue, Integer maxValue, Integer defaultNumber) {
Method getMessageNoTrim
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static <E> String getMessageNoTrim(String resource, String name, List<E> arguments, Locale locale, boolean optional) {
Method putPropertiesWithPrefix
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static <M extends Map<String, ? super String>> M putPropertiesWithPrefix(M out, Properties properties, String prefix, boolean allowDots, boolean returnPrefix) {
Method getMessage
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static String getMessage(String resource, String name, Map<String, ? extends Object> context, Locale locale, boolean optional) {
Method entityResourceToLocalePropertyMap
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static Map<String, Map<String, String>> entityResourceToLocalePropertyMap(String resourceName, boolean sort, Object delegator, boolean useCache, Map<String, Map<String, String>> out) throws IOException, InvalidPropertiesFormatException {
Method entityResourceToProperties
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
private static Properties entityResourceToProperties(String resourceName, Locale locale, Properties properties, Object delegator, boolean useCache) {
Method putPropertiesWithPrefix
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static <M extends Map<String, ? super String>> M putPropertiesWithPrefix(M out, Map<String, ?> properties, String prefix, boolean allowDots, boolean returnPrefix) {
Method getMessageNoTrim
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static String getMessageNoTrim(String resource, String name, Map<String, ? extends Object> context, Locale locale, boolean optional) {
Method getMessage
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static String getMessage(String resource, String name, Object[] arguments, Locale locale, boolean optional) {
Avoid too many return
statements within this method. Open
Open
return url;
Avoid too many return
statements within this method. Open
Open
return url;
Avoid too many return
statements within this method. Open
Open
return null;
Avoid too many return
statements within this method. Open
Open
return name;