ilscipio/scipio-erp

View on GitHub
framework/base/src/org/ofbiz/base/util/UtilProperties.java

Summary

Maintainability
F
5 days
Test Coverage

UtilProperties has 151 methods (exceeds 20 allowed). Consider refactoring.
Open

@SuppressWarnings("serial")
public final class UtilProperties implements Serializable {

    private static final Debug.OfbizLogger module = Debug.getOfbizLogger(java.lang.invoke.MethodHandles.lookup().lookupClass());

Severity: Major
Found in framework/base/src/org/ofbiz/base/util/UtilProperties.java - About 2 days to fix

    Method putPropertiesWithPrefixSuffix has 7 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        public static <M extends Map<String, ?>> M putPropertiesWithPrefixSuffix(M out, Map<String, ?> properties, String prefix, String suffix, boolean allowDots, boolean returnPrefix, boolean returnSuffix) {
    Severity: Major
    Found in framework/base/src/org/ofbiz/base/util/UtilProperties.java - About 50 mins to fix

      Method putPropertiesWithPrefixSuffix has 7 arguments (exceeds 4 allowed). Consider refactoring.
      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) {
      Severity: Major
      Found in framework/base/src/org/ofbiz/base/util/UtilProperties.java - About 50 mins to fix

        Method getPropertyNamesWithPrefixSuffix has 7 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            public static <C extends Collection<String>> C getPropertyNamesWithPrefixSuffix(C out, Properties properties, String prefix, String suffix, boolean allowDots, boolean returnPrefix, boolean returnSuffix) {
        Severity: Major
        Found in framework/base/src/org/ofbiz/base/util/UtilProperties.java - About 50 mins to fix

          Avoid deeply nested control flow statements.
          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 [" +
          Severity: Major
          Found in framework/base/src/org/ofbiz/base/util/UtilProperties.java - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                            if (value != null) {
                                                String name = propertyElem.getAttribute("key");
                                                String localeString = valueElem.getAttribute("xml:lang");
                                                if (localeString.isEmpty()) {
                                                    entryProperties.put(name, value);
            Severity: Major
            Found in framework/base/src/org/ofbiz/base/util/UtilProperties.java - About 45 mins to fix

              Method getBundle has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                      public static UtilResourceBundle getBundle(String resource, Locale locale, ClassLoader loader, boolean optional, boolean useCache, boolean log) throws MissingResourceException {
              Severity: Minor
              Found in framework/base/src/org/ofbiz/base/util/UtilProperties.java - About 45 mins to fix

                Method getPropertyNamesWithPrefixSuffix has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    public static Set<String> getPropertyNamesWithPrefixSuffix(Properties properties, String prefix, String suffix, boolean allowDots, boolean returnPrefix, boolean returnSuffix) {
                Severity: Minor
                Found in framework/base/src/org/ofbiz/base/util/UtilProperties.java - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                          if (mergedProperties == null) { // for now: require at least one valid Properties
                                              mergedProperties = new ExtendedProperties();
                                          }
                  Severity: Major
                  Found in framework/base/src/org/ofbiz/base/util/UtilProperties.java - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                                if (useCache) {
                                                    bundleCache.putIfAbsent(lookupName, bundle);
                                                }
                    Severity: Major
                    Found in framework/base/src/org/ofbiz/base/util/UtilProperties.java - About 45 mins to fix

                      Method getPropertiesWithPrefixSuffix has 6 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          public static Map<String, String> getPropertiesWithPrefixSuffix(Map<String, ?> properties, String prefix, String suffix, boolean allowDots, boolean returnPrefix, boolean returnSuffix) {
                      Severity: Minor
                      Found in framework/base/src/org/ofbiz/base/util/UtilProperties.java - About 45 mins to fix

                        Method getPropertiesWithPrefixSuffix has 6 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            public static Map<String, String> getPropertiesWithPrefixSuffix(Properties properties, String prefix, String suffix, boolean allowDots, boolean returnPrefix, boolean returnSuffix) {
                        Severity: Minor
                        Found in framework/base/src/org/ofbiz/base/util/UtilProperties.java - About 45 mins to fix

                          Method getPropertyAsLongInRange has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              public static Long getPropertyAsLongInRange(String resource, String name, Long minValue, Long maxValue, Long defaultNumber) {
                          Severity: Minor
                          Found in framework/base/src/org/ofbiz/base/util/UtilProperties.java - About 35 mins to fix

                            Method getMessage has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                public static <E> String getMessage(String resource, String name, List<E> arguments, Locale locale, boolean optional) {
                            Severity: Minor
                            Found in framework/base/src/org/ofbiz/base/util/UtilProperties.java - About 35 mins to fix

                              Method getPropertyAsIntegerInRange has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                  public static Integer getPropertyAsIntegerInRange(String resource, String name, Integer minValue, Integer maxValue, Integer defaultNumber) {
                              Severity: Minor
                              Found in framework/base/src/org/ofbiz/base/util/UtilProperties.java - About 35 mins to fix

                                Method getMessageNoTrim has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                    public static <E> String getMessageNoTrim(String resource, String name, List<E> arguments, Locale locale, boolean optional) {
                                Severity: Minor
                                Found in framework/base/src/org/ofbiz/base/util/UtilProperties.java - About 35 mins to fix

                                  Method putPropertiesWithPrefix has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                      public static <M extends Map<String, ? super String>> M putPropertiesWithPrefix(M out, Properties properties, String prefix, boolean allowDots, boolean returnPrefix) {
                                  Severity: Minor
                                  Found in framework/base/src/org/ofbiz/base/util/UtilProperties.java - About 35 mins to fix

                                    Method getMessage has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                        public static String getMessage(String resource, String name, Map<String, ? extends Object> context, Locale locale, boolean optional) {
                                    Severity: Minor
                                    Found in framework/base/src/org/ofbiz/base/util/UtilProperties.java - About 35 mins to fix

                                      Method entityResourceToLocalePropertyMap has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                      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 {
                                      Severity: Minor
                                      Found in framework/base/src/org/ofbiz/base/util/UtilProperties.java - About 35 mins to fix

                                        Method entityResourceToProperties has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                        Open

                                            private static Properties entityResourceToProperties(String resourceName, Locale locale, Properties properties, Object delegator, boolean useCache) {
                                        Severity: Minor
                                        Found in framework/base/src/org/ofbiz/base/util/UtilProperties.java - About 35 mins to fix

                                          Method putPropertiesWithPrefix has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                          Open

                                              public static <M extends Map<String, ? super String>> M putPropertiesWithPrefix(M out, Map<String, ?> properties, String prefix, boolean allowDots, boolean returnPrefix) {
                                          Severity: Minor
                                          Found in framework/base/src/org/ofbiz/base/util/UtilProperties.java - About 35 mins to fix

                                            Method getMessageNoTrim has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                            Open

                                                public static String getMessageNoTrim(String resource, String name, Map<String, ? extends Object> context, Locale locale, boolean optional) {
                                            Severity: Minor
                                            Found in framework/base/src/org/ofbiz/base/util/UtilProperties.java - About 35 mins to fix

                                              Method getMessage has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                              Open

                                                  public static String getMessage(String resource, String name, Object[] arguments, Locale locale, boolean optional) {
                                              Severity: Minor
                                              Found in framework/base/src/org/ofbiz/base/util/UtilProperties.java - About 35 mins to fix

                                                Avoid too many return statements within this method.
                                                Open

                                                                return url;
                                                Severity: Major
                                                Found in framework/base/src/org/ofbiz/base/util/UtilProperties.java - About 30 mins to fix

                                                  Avoid too many return statements within this method.
                                                  Open

                                                                  return url;
                                                  Severity: Major
                                                  Found in framework/base/src/org/ofbiz/base/util/UtilProperties.java - About 30 mins to fix

                                                    Avoid too many return statements within this method.
                                                    Open

                                                            return null;
                                                    Severity: Major
                                                    Found in framework/base/src/org/ofbiz/base/util/UtilProperties.java - About 30 mins to fix

                                                      Avoid too many return statements within this method.
                                                      Open

                                                                  return name;
                                                      Severity: Major
                                                      Found in framework/base/src/org/ofbiz/base/util/UtilProperties.java - About 30 mins to fix

                                                        There are no issues that match your filters.

                                                        Category
                                                        Status