r4fterman/pdf.forms

View on GitHub

Showing 172 of 2,280 total issues

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

            final JLabel labelForTextFieldA,
            final JTextField textFieldA,
            final JLabel labelForTextFieldB,
            final JTextField textFieldB,
            final GroupLayout groupLayout) {

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

                final IWidget widget,
                final Rectangle pageSize,
                final int currentPage,
                final PdfWriter writer,
                final GlobalPdfWriter globalPdfWriter) {
    Severity: Minor
    Found in src/main/java/org/pdf/forms/writer/PdfRadioButtonWriter.java - About 35 mins to fix

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

                  final File fileToWriteTo,
                  final Map<Integer, List<IWidget>> widgetsByPageNumber,
                  final List<org.pdf.forms.model.des.Page> pages,
                  final Optional<String> javaScript,
                  final PdfDocumentLayout pdfDocumentLayout) {
      Severity: Minor
      Found in src/main/java/org/pdf/forms/writer/Writer.java - About 35 mins to fix

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

                    final IWidget widget,
                    final Rectangle pageSize,
                    final int currentPage,
                    final PdfWriter writer,
                    final GlobalPdfWriter globalPdfWriter) throws IOException, DocumentException {
        Severity: Minor
        Found in src/main/java/org/pdf/forms/writer/PdfListBoxWriter.java - About 35 mins to fix

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

                      final IWidget widget,
                      final Rectangle pageSize,
                      final int currentPage,
                      final PdfWriter writer,
                      final GlobalPdfWriter globalPdfWriter) throws IOException, DocumentException {
          Severity: Minor
          Found in src/main/java/org/pdf/forms/writer/PdfButtonWriter.java - About 35 mins to fix

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

                        final PdfDecoder pdfDecoder,
                        final String pdfPath,
                        final int pdfPageNumber,
                        final Page newPage,
                        final List<IWidget> widgetsOnPage) {
            Severity: Minor
            Found in src/main/java/org/pdf/forms/gui/commands/PDFImportWorker.java - About 35 mins to fix

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

                          final PdfWriter writer,
                          final List<IWidget> widgets,
                          final Rectangle pageSize,
                          final int currentPage,
                          final GlobalPdfWriter globalPdfWriter) throws IOException, DocumentException {
              Severity: Minor
              Found in src/main/java/org/pdf/forms/writer/Writer.java - About 35 mins to fix

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

                            final JLabel labelForTextFieldA,
                            final JTextField textFieldA,
                            final JLabel labelForTextFieldB,
                            final JTextField textFieldB,
                            final GroupLayout groupLayout) {

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

                              final IWidget widget,
                              final Rectangle pageSize,
                              final int currentPage,
                              final PdfWriter writer,
                              final GlobalPdfWriter globalPdfWriter) {
                  Severity: Minor
                  Found in src/main/java/org/pdf/forms/writer/PdfTextWriter.java - About 35 mins to fix

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

                                final JList list,
                                final Object value,
                                final int index,
                                final boolean isSelected,
                                final boolean cellHasFocus) {

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

                                  final DropTargetDragEvent e,
                                  final DefaultMutableTreeNode targetNode,
                                  final DefaultMutableTreeNode sourceNode,
                                  final List<TreeNode> flattenedTreeItems,
                                  final Object targetUserObject) {
                      Severity: Minor
                      Found in src/main/java/org/pdf/forms/gui/hierarchy/tree/CDropTargetListener.java - About 35 mins to fix

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

                                    final IWidget widget,
                                    final Rectangle pageSize,
                                    final int currentPage,
                                    final PdfWriter writer,
                                    final GlobalPdfWriter globalPdfWriter) throws IOException, DocumentException {
                        Severity: Minor
                        Found in src/main/java/org/pdf/forms/writer/PdfComboBoxWriter.java - About 35 mins to fix

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

                                      final Graphics graphics,
                                      final String text,
                                      final FontMetrics f,
                                      final int x,
                                      final int y) {
                          Severity: Minor
                          Found in src/main/java/org/pdf/forms/widgets/components/PdfCaption.java - About 35 mins to fix

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

                                        final Graphics graphics,
                                        final String text,
                                        final FontMetrics fontMetrics,
                                        final int x,
                                        final int y) {
                            Severity: Minor
                            Found in src/main/java/org/pdf/forms/widgets/components/PdfButton.java - About 35 mins to fix

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

                                          final Graphics graphics,
                                          final String text,
                                          final FontMetrics f,
                                          final int x,
                                          final int y) {
                              Severity: Minor
                              Found in src/main/java/org/pdf/forms/widgets/components/PdfTextField.java - About 35 mins to fix

                                Method getWidgetsList has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    private List<IWidget> getWidgetsList(
                                            final Object[] objectPath,
                                            final boolean isTarget) {
                                        for (int i = objectPath.length - 1; i >= 0; i--) {
                                            final Object object = objectPath[i];
                                Severity: Minor
                                Found in src/main/java/org/pdf/forms/gui/hierarchy/tree/CDropTargetListener.java - About 35 mins to fix

                                Cognitive Complexity

                                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                A method's cognitive complexity is based on a few simple rules:

                                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                • Code is considered more complex for each "break in the linear flow of the code"
                                • Code is considered more complex when "flow breaking structures are nested"

                                Further reading

                                Method resizeWidgets has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    public void resizeWidgets(
                                            final Set<IWidget> selectedWidgets,
                                            final IDesigner designerPanel,
                                            final int mouseX,
                                            final int mouseY,
                                Severity: Minor
                                Found in src/main/java/org/pdf/forms/widgets/utils/WidgetSelection.java - About 35 mins to fix

                                Cognitive Complexity

                                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                A method's cognitive complexity is based on a few simple rules:

                                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                • Code is considered more complex for each "break in the linear flow of the code"
                                • Code is considered more complex when "flow breaking structures are nested"

                                Further reading

                                Method getSelectedPdfFile has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    private Optional<File> getSelectedPdfFile() {
                                        final Optional<File> pdfFile = choosePdfFile().map(this::ensurePdfFileExtension);
                                        if (pdfFile.isPresent()) {
                                            final File file = pdfFile.get();
                                            if (file.exists()) {
                                Severity: Minor
                                Found in src/main/java/org/pdf/forms/gui/commands/PublishPdfCommand.java - About 35 mins to fix

                                Cognitive Complexity

                                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                A method's cognitive complexity is based on a few simple rules:

                                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                • Code is considered more complex for each "break in the linear flow of the code"
                                • Code is considered more complex when "flow breaking structures are nested"

                                Further reading

                                Method updateRecentDocuments has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    private void updateRecentDocuments(final List<String> recentDocs) {
                                        if (recentDocs.isEmpty()) {
                                            return;
                                        }
                                
                                
                                Severity: Minor
                                Found in src/main/java/org/pdf/forms/gui/commands/OpenDesignerFileCommand.java - About 35 mins to fix

                                Cognitive Complexity

                                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                A method's cognitive complexity is based on a few simple rules:

                                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                • Code is considered more complex for each "break in the linear flow of the code"
                                • Code is considered more complex when "flow breaking structures are nested"

                                Further reading

                                Method write has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    @Override
                                    public PdfFormField write(
                                            final IWidget widget,
                                            final Rectangle pageSize,
                                            final int currentPage,
                                Severity: Minor
                                Found in src/main/java/org/pdf/forms/writer/PdfListBoxWriter.java - About 35 mins to fix

                                Cognitive Complexity

                                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                A method's cognitive complexity is based on a few simple rules:

                                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                • Code is considered more complex for each "break in the linear flow of the code"
                                • Code is considered more complex when "flow breaking structures are nested"

                                Further reading

                                Severity
                                Category
                                Status
                                Source
                                Language