ilscipio/scipio-erp

View on GitHub
framework/start/src/org/ofbiz/base/start/Config.java

Summary

Maintainability
B
5 hrs
Test Coverage

Config has 22 methods (exceeds 20 allowed). Consider refactoring.
Open

public class Config {

    public final InetAddress adminAddress;
    public final String adminKey;
    public final int adminPort;
Severity: Minor
Found in framework/start/src/org/ofbiz/base/start/Config.java - About 2 hrs to fix

    Avoid deeply nested control flow statements.
    Open

                            if ("dir".equals(type.getNodeValue())) {
                                classpath.addComponent(path.toString());
                            }
    Severity: Major
    Found in framework/start/src/org/ofbiz/base/start/Config.java - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                              for (File file: path.listFiles()) {
                                  String fileName = file.getName().toLowerCase();
                                  if (fileName.endsWith(".jar") || fileName.endsWith(".zip")) {
                                      classpath.addComponent(file);
                                  } else if (fileName.endsWith(nativeLibExt)) {
      Severity: Major
      Found in framework/start/src/org/ofbiz/base/start/Config.java - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                if (containsNativeLibs) {
                                    libraryPath.addComponent(path);
                                }
        Severity: Major
        Found in framework/start/src/org/ofbiz/base/start/Config.java - About 45 mins to fix

          Consider simplifying this complex logical expression.
          Open

                  if ("start-batch".equalsIgnoreCase(firstArg)
                          || "start-debug".equalsIgnoreCase(firstArg)
                          || "stop".equalsIgnoreCase(firstArg)
                          || "-shutdown".equalsIgnoreCase(firstArg) // shutdown & status hack (was pre-existing to portoffset introduction, also useful with it)
                          || "-shutdown-wait".equalsIgnoreCase(firstArg) // shutdown & status hack (SCIPIO)
          Severity: Major
          Found in framework/start/src/org/ofbiz/base/start/Config.java - About 40 mins to fix

            There are no issues that match your filters.

            Category
            Status