Uploaded image for project: 'Apache Jena'
  1. Apache Jena
  2. JENA-1654

Use StringBuilder in LiteralImpl#asNumber

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: Jena 3.9.0
    • Fix Version/s: Jena 3.10.0
    • Component/s: Core
    • Labels:
      None
    • Flags:
      Patch

      Description

      Trivial fix, but replaces strings concatenations by a StringBuilder. Another change (which originated this work) is the removal of the unused local variable "type".

      Added a unit test for asNumber (working branch), and another when the value of the literal is not a Number. Also verified that the exception contains parts of the text expected in the error message. The test runs fine before the patch, and after the patch.

        Attachments

          Activity

            People

            • Assignee:
              kinow Bruno P. Kinoshita
              Reporter:
              kinow Bruno P. Kinoshita
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: