Uploaded image for project: 'DSpace'
  1. DSpace
  2. DS-2222 Fix DSpace code via FindBugs
  3. DS-2919

Return value of String.substring(int, int) ignored in RDFizer

    XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.0
    • Component/s: RDF
    • Labels:
      None
    • Attachments:
      0
    • Comments:
      3
    • Documentation Status:
      Not Required

      Description

      String argumentsLine = builder.toString().trim();
      argumentsLine.substring(0, argumentsLine.length() - 1);
      System.err.print("Cannot recognize the following argument");
      if (remainingArgs.length >= 2) System.err.print("s");
      System.err.println(": " + argumentsLine + ".");
      System.exit(1);
      

      The substring return is ignored & findBugs has detected this as a "Scariest" bug, see: http://findbugs.sourceforge.net/bugDescriptions.html#RV_RETURN_VALUE_IGNORED

        Attachments

          Activity

            People

            Assignee:
            pbecker Pascal-Nicolas Becker
            Reporter:
            kevin van de velde Kevin Van de Velde (Atmire)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: