Showing 24 of 24 total issues

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

      @PathParam("host") String host,
      @PathParam("owner") String owner,
      @PathParam("repo") String repo,
      @PathParam("commit") String commit,
      @PathParam("path") String path,
Severity: Minor
Found in src/main/java/lyang/puml/resources/GitHubResource.java - About 45 mins to fix

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

          @PathParam("owner") String owner,
          @PathParam("repo") String repo,
          @PathParam("commit") String commit,
          @PathParam("path") String path,
          @QueryParam("pumlIndex") @DefaultValue("0") int pumlIndex)
    Severity: Minor
    Found in src/main/java/lyang/puml/resources/GitHubResource.java - About 35 mins to fix

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

            @PathParam("host") String host,
            @PathParam("repo") String repo,
            @PathParam("commit") String commit,
            @PathParam("path") String path,
            @QueryParam("pumlIndex") @DefaultValue("0") int pumlIndex)
      Severity: Minor
      Found in src/main/java/lyang/puml/resources/GitLabResource.java - About 35 mins to fix

        Wrong lexicographical order for 'jakarta.inject.Inject' import. Should be before 'okhttp3.CacheControl.FORCE_NETWORK'.
        Open

        import jakarta.inject.Inject;

        Checks that the groups of import declarations appear in the order specifiedby the user. If there is an import but its group is not specified in theconfiguration such an import should be placed at the end of the import list.

        This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.

        Wrong lexicographical order for 'jakarta.ws.rs.DefaultValue' import. Should be before 'okhttp3.CacheControl.FORCE_NETWORK'.
        Open

        import jakarta.ws.rs.DefaultValue;

        Checks that the groups of import declarations appear in the order specifiedby the user. If there is an import but its group is not specified in theconfiguration such an import should be placed at the end of the import list.

        This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.

        Wrong lexicographical order for 'jakarta.ws.rs.QueryParam' import. Should be before 'okhttp3.CacheControl.FORCE_NETWORK'.
        Open

        import jakarta.ws.rs.QueryParam;

        Checks that the groups of import declarations appear in the order specifiedby the user. If there is an import but its group is not specified in theconfiguration such an import should be placed at the end of the import list.

        This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.

        '}' at column 49 should be alone on a line.
        Open

          class Builder extends RequestMatcher_Builder {}

        Checks the placement of right curly braces ('}') for code blocks.This check supports if-else, try-catch-finally blocks, while-loops, for-loops,method definitions, class definitions, constructor definitions,instance, static initialization blocks, annotation definitions and enum definitions.For right curly brace of expression blocks of arrays, lambdas and class instancesplease follow issue#5945.For right curly brace of enum constant please follow issue#7519.

        This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.

        Wrong lexicographical order for 'jakarta.ws.rs.core.Response' import. Should be before 'okhttp3.CacheControl.FORCE_NETWORK'.
        Open

        import jakarta.ws.rs.core.Response;

        Checks that the groups of import declarations appear in the order specifiedby the user. If there is an import but its group is not specified in theconfiguration such an import should be placed at the end of the import list.

        This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.

        Extra separation in import group before 'jakarta.inject.Inject'
        Open

        import jakarta.inject.Inject;

        Checks that the groups of import declarations appear in the order specifiedby the user. If there is an import but its group is not specified in theconfiguration such an import should be placed at the end of the import list.

        This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.

        Wrong lexicographical order for 'jakarta.ws.rs.GET' import. Should be before 'okhttp3.CacheControl.FORCE_NETWORK'.
        Open

        import jakarta.ws.rs.GET;

        Checks that the groups of import declarations appear in the order specifiedby the user. If there is an import but its group is not specified in theconfiguration such an import should be placed at the end of the import list.

        This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.

        Wrong lexicographical order for 'jakarta.ws.rs.Produces' import. Should be before 'okhttp3.CacheControl.FORCE_NETWORK'.
        Open

        import jakarta.ws.rs.Produces;

        Checks that the groups of import declarations appear in the order specifiedby the user. If there is an import but its group is not specified in theconfiguration such an import should be placed at the end of the import list.

        This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.

        Wrong lexicographical order for 'lyang.puml.utils.Puml' import. Should be before 'okhttp3.CacheControl.FORCE_NETWORK'.
        Open

        import lyang.puml.utils.Puml;

        Checks that the groups of import declarations appear in the order specifiedby the user. If there is an import but its group is not specified in theconfiguration such an import should be placed at the end of the import list.

        This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.

        '}' at column 54 should be alone on a line.
        Open

          class Builder extends AuthorizationHeader_Builder {}

        Checks the placement of right curly braces ('}') for code blocks.This check supports if-else, try-catch-finally blocks, while-loops, for-loops,method definitions, class definitions, constructor definitions,instance, static initialization blocks, annotation definitions and enum definitions.For right curly brace of expression blocks of arrays, lambdas and class instancesplease follow issue#5945.For right curly brace of enum constant please follow issue#7519.

        This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.

        '}' at column 78 should be alone on a line.
        Open

          public void run(PumlConfiguration configuration, Environment environment) {}

        Checks the placement of right curly braces ('}') for code blocks.This check supports if-else, try-catch-finally blocks, while-loops, for-loops,method definitions, class definitions, constructor definitions,instance, static initialization blocks, annotation definitions and enum definitions.For right curly brace of expression blocks of arrays, lambdas and class instancesplease follow issue#5945.For right curly brace of enum constant please follow issue#7519.

        This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.

        Wrong lexicographical order for 'jakarta.ws.rs.PathParam' import. Should be before 'okhttp3.CacheControl.FORCE_NETWORK'.
        Open

        import jakarta.ws.rs.PathParam;

        Checks that the groups of import declarations appear in the order specifiedby the user. If there is an import but its group is not specified in theconfiguration such an import should be placed at the end of the import list.

        This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.

        Wrong lexicographical order for 'java.net.URL' import. Should be before 'okhttp3.CacheControl.FORCE_NETWORK'.
        Open

        import java.net.URL;

        Checks that the groups of import declarations appear in the order specifiedby the user. If there is an import but its group is not specified in theconfiguration such an import should be placed at the end of the import list.

        This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.

        Wrong lexicographical order for 'jakarta.ws.rs.Path' import. Should be before 'okhttp3.CacheControl.FORCE_NETWORK'.
        Open

        import jakarta.ws.rs.Path;

        Checks that the groups of import declarations appear in the order specifiedby the user. If there is an import but its group is not specified in theconfiguration such an import should be placed at the end of the import list.

        This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.

        Wrong lexicographical order for 'java.io.IOException' import. Should be before 'okhttp3.CacheControl.FORCE_NETWORK'.
        Open

        import java.io.IOException;

        Checks that the groups of import declarations appear in the order specifiedby the user. If there is an import but its group is not specified in theconfiguration such an import should be placed at the end of the import list.

        This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.

        Wrong lexicographical order for 'java.util.Objects' import. Should be before 'okhttp3.CacheControl.FORCE_NETWORK'.
        Open

        import java.util.Objects;

        Checks that the groups of import declarations appear in the order specifiedby the user. If there is an import but its group is not specified in theconfiguration such an import should be placed at the end of the import list.

        This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.

        Add a private constructor to hide the implicit public one.
        Open

        public class Puml {

        Utility classes, which are collections of static members, are not meant to be instantiated. Even abstract utility classes, which can be extended, should not have public constructors.

        Java adds an implicit public constructor to every class which does not define at least one explicitly. Hence, at least one non-public constructor should be defined.

        Noncompliant Code Example

        class StringUtils { // Noncompliant
        
          public static String concatenate(String s1, String s2) {
            return s1 + s2;
          }
        
        }
        

        Compliant Solution

        class StringUtils { // Compliant
        
          private StringUtils() {
            throw new IllegalStateException("Utility class");
          }
        
          public static String concatenate(String s1, String s2) {
            return s1 + s2;
          }
        
        }
        

        Exceptions

        When class contains public static void main(String[] args) method it is not considered as utility class and will be ignored by this rule.

        Severity
        Category
        Status
        Source
        Language