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

Use StringBuilder in LiteralImpl#asNumber

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • Jena 3.9.0
    • Jena 3.10.0
    • Core
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: