ilscipio/scipio-erp

View on GitHub
framework/webapp/src/org/ofbiz/webapp/control/RequestLinkUtil.java

Summary

Maintainability
F
3 days
Test Coverage

RequestLinkUtil has 52 methods (exceeds 20 allowed). Consider refactoring.
Open

public final class RequestLinkUtil {

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

    private static final Pattern jsessionIdPat = Pattern.compile("((;jsessionid=)([^\\?#]*))");
Severity: Major
Found in framework/webapp/src/org/ofbiz/webapp/control/RequestLinkUtil.java - About 7 hrs to fix

    Method makeLinkAuto has 11 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        public static String makeLinkAuto(ServletContext servletContext, HttpServletRequest request, HttpServletResponse response,
                String uri, Boolean absPath, Boolean interWebapp, String webSiteId, Boolean controller, Boolean fullPath, Boolean secure, Boolean encode) {
    Severity: Major
    Found in framework/webapp/src/org/ofbiz/webapp/control/RequestLinkUtil.java - About 1 hr to fix

      Method buildLinkHostPartAndEncodeSafe has 10 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          public static String buildLinkHostPartAndEncodeSafe(Delegator delegator, Locale locale, FullWebappInfo targetWebappInfo, String url,
                  Boolean fullPath, Boolean secure, Boolean encode, boolean includeWebappPathPrefix, FullWebappInfo currentWebappInfo,
                  Map<String, Object> context) {
      Severity: Major
      Found in framework/webapp/src/org/ofbiz/webapp/control/RequestLinkUtil.java - About 1 hr to fix

        Method makeLinkAuto has 10 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            public static String makeLinkAuto(HttpServletRequest request, HttpServletResponse response,
                    String uri, Boolean absPath, Boolean interWebapp, String webSiteId, Boolean controller, Boolean fullPath, Boolean secure, Boolean encode) {
        Severity: Major
        Found in framework/webapp/src/org/ofbiz/webapp/control/RequestLinkUtil.java - About 1 hr to fix

          Method buildLinkHostPartAndEncode has 10 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              public static String buildLinkHostPartAndEncode(Delegator delegator, Locale locale, FullWebappInfo targetWebappInfo, String url,
                      Boolean fullPath, Boolean secure, Boolean encode, boolean includeWebappPathPrefix, FullWebappInfo currentWebappInfo,
                      Map<String, Object> context) {
          Severity: Major
          Found in framework/webapp/src/org/ofbiz/webapp/control/RequestLinkUtil.java - About 1 hr to fix

            Method buildLinkHostPartAndEncodeSafe has 9 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                public static String buildLinkHostPartAndEncodeSafe(HttpServletRequest request, HttpServletResponse response, Locale locale, FullWebappInfo targetWebappInfo, String url,
                        Boolean fullPath, Boolean secure, Boolean encode, boolean includeWebappPathPrefix) {
            Severity: Major
            Found in framework/webapp/src/org/ofbiz/webapp/control/RequestLinkUtil.java - About 1 hr to fix

              Method buildLinkHostPartAndEncode has 9 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  public static String buildLinkHostPartAndEncode(HttpServletRequest request, HttpServletResponse response, Locale locale, FullWebappInfo targetWebappInfo, String url,
                          Boolean fullPath, Boolean secure, Boolean encode, boolean includeWebappPathPrefix) throws IllegalArgumentException {
              Severity: Major
              Found in framework/webapp/src/org/ofbiz/webapp/control/RequestLinkUtil.java - About 1 hr to fix

                Method doLinkURLEncode has 8 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    public static String doLinkURLEncode(HttpServletRequest request, HttpServletResponse response, StringBuilder newURL, boolean interWebapp,
                            FullWebappInfo targetWebappInfo, FullWebappInfo currentWebappInfo, boolean didFullStandard, boolean didFullSecure) {
                Severity: Major
                Found in framework/webapp/src/org/ofbiz/webapp/control/RequestLinkUtil.java - About 1 hr to fix

                  Method rebuildOriginalRequestURL has 8 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      public static String rebuildOriginalRequestURL(HttpServletRequest request, HttpServletResponse response, Locale locale,
                              Boolean secure, Boolean staticHost, boolean includeWebappPathPrefix, boolean useQueryString, boolean handleErrors) throws IllegalStateException {
                  Severity: Major
                  Found in framework/webapp/src/org/ofbiz/webapp/control/RequestLinkUtil.java - About 1 hr to fix

                    Method doLinkURLEncode has 8 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        public static String doLinkURLEncode(Delegator delegator, Locale locale, StringBuilder newURL, FullWebappInfo targetWebappInfo, FullWebappInfo currentWebappInfo,
                                boolean didFullStandard, boolean didFullSecure, Map<String, Object> context) {
                    Severity: Major
                    Found in framework/webapp/src/org/ofbiz/webapp/control/RequestLinkUtil.java - About 1 hr to fix

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

                          public static String buildLinkHostPartAndEncode(HttpServletRequest request, HttpServletResponse response, FullWebappInfo targetWebappInfo, String url,
                                  Boolean fullPath, Boolean secure, Boolean encode) throws WebAppConfigurationException, IOException {
                      Severity: Major
                      Found in framework/webapp/src/org/ofbiz/webapp/control/RequestLinkUtil.java - About 50 mins to fix

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

                            public static String buildLinkHostPartAndEncode(Delegator delegator, String webSiteId, String url,
                                    Boolean fullPath, Boolean secure, Boolean encode, Map<String, Object> context) {
                        Severity: Major
                        Found in framework/webapp/src/org/ofbiz/webapp/control/RequestLinkUtil.java - About 50 mins to fix

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

                              public static String makeLinkAuto(ServletContext servletContext, HttpServletRequest request, HttpServletResponse response,
                                      String uri, Boolean fullPath, Boolean secure, Boolean encode) {
                          Severity: Major
                          Found in framework/webapp/src/org/ofbiz/webapp/control/RequestLinkUtil.java - About 50 mins to fix

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

                                public static Boolean checkFullSecureOrStandard(Delegator delegator, String webSiteId,
                                        Boolean interWebapp, Boolean fullPath, Boolean secure, Map<String, Object> context) {
                            Severity: Minor
                            Found in framework/webapp/src/org/ofbiz/webapp/control/RequestLinkUtil.java - About 45 mins to fix

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

                                  public static String makeLinkAuto(HttpServletRequest request, HttpServletResponse response,
                                          String uri, Boolean fullPath, Boolean secure, Boolean encode) {
                              Severity: Minor
                              Found in framework/webapp/src/org/ofbiz/webapp/control/RequestLinkUtil.java - About 45 mins to fix

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

                                    public static Boolean checkFullSecureOrStandard(Delegator delegator, WebSiteProperties webSiteProps,
                                            Boolean interWebapp, Boolean fullPath, Boolean secure, Map<String, Object> context) {
                                Severity: Minor
                                Found in framework/webapp/src/org/ofbiz/webapp/control/RequestLinkUtil.java - About 45 mins to fix

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

                                      public static String buildLinkHostPart(Delegator delegator, Locale locale, String webSiteId, Boolean secure,
                                              boolean includeWebappPathPrefix, FullWebappInfo.Cache webappInfoCache) {
                                  Severity: Minor
                                  Found in framework/webapp/src/org/ofbiz/webapp/control/RequestLinkUtil.java - About 45 mins to fix

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

                                        public static Boolean checkFullSecureOrStandard(HttpServletRequest request, HttpServletResponse response,
                                                Boolean interWebapp, Boolean fullPath, Boolean secure) {
                                    Severity: Minor
                                    Found in framework/webapp/src/org/ofbiz/webapp/control/RequestLinkUtil.java - About 35 mins to fix

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

                                          public static String buildLinkHostPart(HttpServletRequest request, Locale locale, String webSiteId, Boolean secure, boolean includeWebappPathPrefix) {
                                      Severity: Minor
                                      Found in framework/webapp/src/org/ofbiz/webapp/control/RequestLinkUtil.java - About 35 mins to fix

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

                                            public static String buildLinkHostPartSafe(HttpServletRequest request, Locale locale, String webSiteId, Boolean secure, boolean includeWebappPathPrefix) {
                                        Severity: Minor
                                        Found in framework/webapp/src/org/ofbiz/webapp/control/RequestLinkUtil.java - About 35 mins to fix

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

                                              public static String buildLinkHostPartSafe(Delegator delegator, Locale locale, String webSiteId, Boolean secure, boolean includeWebappPathPrefix) {
                                          Severity: Minor
                                          Found in framework/webapp/src/org/ofbiz/webapp/control/RequestLinkUtil.java - About 35 mins to fix

                                            Avoid too many return statements within this method.
                                            Open

                                                    return !isUrlDelim(path.charAt(0));
                                            Severity: Major
                                            Found in framework/webapp/src/org/ofbiz/webapp/control/RequestLinkUtil.java - About 30 mins to fix

                                              There are no issues that match your filters.

                                              Category
                                              Status