Uploaded image for project: 'Batik'
  1. Batik
  2. BATIK-683

Parse error for integers >= 2**31 in attributes

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Resolution: Fixed
    • 1.6
    • None
    • CSS
    • None
    • Operating System: other
      Platform: Other

    Description

      stroke-width="10000000000" or similar gives a parse error:

              • CSSEngine: exception
                property.syntax.error:java.lang.NumberFormatException: For input string:
                "10000000000"

      AttrValue:10000000000

      Exception:java.lang.NumberFormatException
      java.lang.NumberFormatException: For input string: "10000000000"
      at
      java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
      at java.lang.Integer.parseInt(Integer.java:459)
      at java.lang.Integer.parseInt(Integer.java:497)
      at org.apache.batik.css.parser.Parser.parseTerm(Unknown Source)
      at org.apache.batik.css.parser.Parser.parseExpression(Unknown Source)
      at org.apache.batik.css.parser.Parser.parsePropertyValueInternal(Unknown
      Source)
      at org.apache.batik.css.parser.Parser.parsePropertyValue(Unknown Source)
      at org.apache.batik.css.engine.CSSEngine.getCascadedStyleMap(Unknown Source)
      at org.apache.batik.css.engine.CSSEngine.getComputedStyle(Unknown Source)
      at org.apache.batik.bridge.CSSUtilities.getComputedStyle(Unknown Source)
      at org.apache.batik.bridge.CSSUtilities.convertDisplay(Unknown Source)
      at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source)
      at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
      at org.apache.batik.bridge.GVTBuilder.build(Unknown Source)
      at org.apache.batik.swing.svg.GVTTreeBuilder.run(Unknown Source)

      There's no problem if a ".0" or "px" is added.

      Attachments

        1. t.svg
          0.2 kB
          x00000000

        Activity

          People

            batik-dev@xmlgraphics.apache.org Batik Developer's Mailing list
            x00000000@freenet.de x00000000
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: