r4fterman/pdf.forms

View on GitHub
src/main/java/org/pdf/forms/widgets/GroupWidget.java

Summary

Maintainability
B
6 hrs
Test Coverage
F
20%

GroupWidget has 47 methods (exceeds 20 allowed). Consider refactoring.
Open

public class GroupWidget implements IWidget {

    private static int groupNextWidgetNumber = 1;

    private static final int TYPE = IWidget.GROUP;
Severity: Minor
Found in src/main/java/org/pdf/forms/widgets/GroupWidget.java - About 6 hrs to fix

    Add a nested comment explaining why this method is empty, throw an UnsupportedOperationException or complete the implementation.
    Open

        public void setResizeFromTopRatio(final double resizeHeightRatio) {

    There are several reasons for a method not to have a method body:

    • It is an unintentional omission, and should be fixed to prevent an unexpected behavior in production.
    • It is not yet, or never will be, supported. In this case an UnsupportedOperationException should be thrown.
    • The method is an intentionally-blank override. In this case a nested comment should explain the reason for the blank override.

    Noncompliant Code Example

    public void doSomething() {
    }
    
    public void doSomethingElse() {
    }
    

    Compliant Solution

    @Override
    public void doSomething() {
      // Do nothing because of X and Y.
    }
    
    @Override
    public void doSomethingElse() {
      throw new UnsupportedOperationException();
    }
    

    Exceptions

    Default (no-argument) constructors are ignored when there are other constructors in the class, as are empty methods in abstract classes.

    public abstract class Animal {
      void speak() {  // default implementation ignored
      }
    }
    

    Add a nested comment explaining why this method is empty, throw an UnsupportedOperationException or complete the implementation.
    Open

        public void setObjectProperties() {

    There are several reasons for a method not to have a method body:

    • It is an unintentional omission, and should be fixed to prevent an unexpected behavior in production.
    • It is not yet, or never will be, supported. In this case an UnsupportedOperationException should be thrown.
    • The method is an intentionally-blank override. In this case a nested comment should explain the reason for the blank override.

    Noncompliant Code Example

    public void doSomething() {
    }
    
    public void doSomethingElse() {
    }
    

    Compliant Solution

    @Override
    public void doSomething() {
      // Do nothing because of X and Y.
    }
    
    @Override
    public void doSomethingElse() {
      throw new UnsupportedOperationException();
    }
    

    Exceptions

    Default (no-argument) constructors are ignored when there are other constructors in the class, as are empty methods in abstract classes.

    public abstract class Animal {
      void speak() {  // default implementation ignored
      }
    }
    

    Add a nested comment explaining why this method is empty, throw an UnsupportedOperationException or complete the implementation.
    Open

        public void setResizeFromLeftRatio(final double resizeWidthRation) {

    There are several reasons for a method not to have a method body:

    • It is an unintentional omission, and should be fixed to prevent an unexpected behavior in production.
    • It is not yet, or never will be, supported. In this case an UnsupportedOperationException should be thrown.
    • The method is an intentionally-blank override. In this case a nested comment should explain the reason for the blank override.

    Noncompliant Code Example

    public void doSomething() {
    }
    
    public void doSomethingElse() {
    }
    

    Compliant Solution

    @Override
    public void doSomething() {
      // Do nothing because of X and Y.
    }
    
    @Override
    public void doSomethingElse() {
      throw new UnsupportedOperationException();
    }
    

    Exceptions

    Default (no-argument) constructors are ignored when there are other constructors in the class, as are empty methods in abstract classes.

    public abstract class Animal {
      void speak() {  // default implementation ignored
      }
    }
    

    Add a nested comment explaining why this method is empty, throw an UnsupportedOperationException or complete the implementation.
    Open

        public void setLastY(final int lastY) {

    There are several reasons for a method not to have a method body:

    • It is an unintentional omission, and should be fixed to prevent an unexpected behavior in production.
    • It is not yet, or never will be, supported. In this case an UnsupportedOperationException should be thrown.
    • The method is an intentionally-blank override. In this case a nested comment should explain the reason for the blank override.

    Noncompliant Code Example

    public void doSomething() {
    }
    
    public void doSomethingElse() {
    }
    

    Compliant Solution

    @Override
    public void doSomething() {
      // Do nothing because of X and Y.
    }
    
    @Override
    public void doSomethingElse() {
      throw new UnsupportedOperationException();
    }
    

    Exceptions

    Default (no-argument) constructors are ignored when there are other constructors in the class, as are empty methods in abstract classes.

    public abstract class Animal {
      void speak() {  // default implementation ignored
      }
    }
    

    Add a nested comment explaining why this method is empty, throw an UnsupportedOperationException or complete the implementation.
    Open

        public void setResizeWidthRatio(final double resizeWidthRation) {

    There are several reasons for a method not to have a method body:

    • It is an unintentional omission, and should be fixed to prevent an unexpected behavior in production.
    • It is not yet, or never will be, supported. In this case an UnsupportedOperationException should be thrown.
    • The method is an intentionally-blank override. In this case a nested comment should explain the reason for the blank override.

    Noncompliant Code Example

    public void doSomething() {
    }
    
    public void doSomethingElse() {
    }
    

    Compliant Solution

    @Override
    public void doSomething() {
      // Do nothing because of X and Y.
    }
    
    @Override
    public void doSomethingElse() {
      throw new UnsupportedOperationException();
    }
    

    Exceptions

    Default (no-argument) constructors are ignored when there are other constructors in the class, as are empty methods in abstract classes.

    public abstract class Animal {
      void speak() {  // default implementation ignored
      }
    }
    

    Add a nested comment explaining why this method is empty, throw an UnsupportedOperationException or complete the implementation.
    Open

        public void setLastX(final int lastX) {

    There are several reasons for a method not to have a method body:

    • It is an unintentional omission, and should be fixed to prevent an unexpected behavior in production.
    • It is not yet, or never will be, supported. In this case an UnsupportedOperationException should be thrown.
    • The method is an intentionally-blank override. In this case a nested comment should explain the reason for the blank override.

    Noncompliant Code Example

    public void doSomething() {
    }
    
    public void doSomethingElse() {
    }
    

    Compliant Solution

    @Override
    public void doSomething() {
      // Do nothing because of X and Y.
    }
    
    @Override
    public void doSomethingElse() {
      throw new UnsupportedOperationException();
    }
    

    Exceptions

    Default (no-argument) constructors are ignored when there are other constructors in the class, as are empty methods in abstract classes.

    public abstract class Animal {
      void speak() {  // default implementation ignored
      }
    }
    

    Add a nested comment explaining why this method is empty, throw an UnsupportedOperationException or complete the implementation.
    Open

        public void setResizeHeightRatio(final double resizeHeightRatio) {

    There are several reasons for a method not to have a method body:

    • It is an unintentional omission, and should be fixed to prevent an unexpected behavior in production.
    • It is not yet, or never will be, supported. In this case an UnsupportedOperationException should be thrown.
    • The method is an intentionally-blank override. In this case a nested comment should explain the reason for the blank override.

    Noncompliant Code Example

    public void doSomething() {
    }
    
    public void doSomethingElse() {
    }
    

    Compliant Solution

    @Override
    public void doSomething() {
      // Do nothing because of X and Y.
    }
    
    @Override
    public void doSomethingElse() {
      throw new UnsupportedOperationException();
    }
    

    Exceptions

    Default (no-argument) constructors are ignored when there are other constructors in the class, as are empty methods in abstract classes.

    public abstract class Animal {
      void speak() {  // default implementation ignored
      }
    }
    

    Add a nested comment explaining why this method is empty, throw an UnsupportedOperationException or complete the implementation.
    Open

        public void setBorderAndBackgroundProperties() {

    There are several reasons for a method not to have a method body:

    • It is an unintentional omission, and should be fixed to prevent an unexpected behavior in production.
    • It is not yet, or never will be, supported. In this case an UnsupportedOperationException should be thrown.
    • The method is an intentionally-blank override. In this case a nested comment should explain the reason for the blank override.

    Noncompliant Code Example

    public void doSomething() {
    }
    
    public void doSomethingElse() {
    }
    

    Compliant Solution

    @Override
    public void doSomething() {
      // Do nothing because of X and Y.
    }
    
    @Override
    public void doSomethingElse() {
      throw new UnsupportedOperationException();
    }
    

    Exceptions

    Default (no-argument) constructors are ignored when there are other constructors in the class, as are empty methods in abstract classes.

    public abstract class Animal {
      void speak() {  // default implementation ignored
      }
    }
    

    Line is longer than 100 characters (found 120).
    Open

     * Special widget object that represents a group of widgets. Although this class implements IWidget (as all widgets must

    Checks for long lines.

    Rationale: Long lines are hard to read in printouts or if developershave limited screen space for the source code, e.g. if the IDEdisplays additional information like project tree, class hierarchy,etc.

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

    Parameter name 'x' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'.
    Open

                final int x,

    Checks that method parameter names conform to a specified pattern.By using accessModifiers property it is possibleto specify different formats for methods at different visibility levels.

    To validate catch parameters please useCatchParameterName.

    To validate lambda parameters please useLambdaParameterName.

    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.List' import. Should be before 'java.util.stream.Collectors.toList'.
    Open

    import java.util.List;

    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.HashSet' import. Should be before 'java.util.stream.Collectors.toList'.
    Open

    import java.util.HashSet;

    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.

    Using the '.*' form of import should be avoided - java.awt.*.
    Open

    import java.awt.*;

    Checks that there are no import statements that use the * notation.

    Rationale: Importing all classes from a package or staticmembers from a class leads to tight coupling between packagesor classes and might lead to problems when a new version of alibrary introduces name clashes.

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

    Parameter name 'x' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'.
    Open

        public void setX(final int x) {

    Checks that method parameter names conform to a specified pattern.By using accessModifiers property it is possibleto specify different formats for methods at different visibility levels.

    To validate catch parameters please useCatchParameterName.

    To validate lambda parameters please useLambdaParameterName.

    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 'javax.swing.*'
    Open

    import javax.swing.*;

    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.

    Using the '.*' form of import should be avoided - javax.swing.*.
    Open

    import javax.swing.*;

    Checks that there are no import statements that use the * notation.

    Rationale: Importing all classes from a package or staticmembers from a class leads to tight coupling between packagesor classes and might lead to problems when a new version of alibrary introduces name clashes.

    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 'org.pdf.forms.model.des.JavaScriptContent'
    Open

    import org.pdf.forms.model.des.JavaScriptContent;

    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.

    Parameter name 'y' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'.
    Open

        public void setY(final int y) {

    Checks that method parameter names conform to a specified pattern.By using accessModifiers property it is possibleto specify different formats for methods at different visibility levels.

    To validate catch parameters please useCatchParameterName.

    To validate lambda parameters please useLambdaParameterName.

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

    Parameter name 'y' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'.
    Open

                final int y) {

    Checks that method parameter names conform to a specified pattern.By using accessModifiers property it is possibleto specify different formats for methods at different visibility levels.

    To validate catch parameters please useCatchParameterName.

    To validate lambda parameters please useLambdaParameterName.

    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.awt.*' import. Should be before 'java.util.stream.Collectors.toList'.
    Open

    import java.awt.*;

    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 'java.awt.*'
    Open

    import java.awt.*;

    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.

    There are no issues that match your filters.

    Category
    Status