XStream
  1. XStream
  2. XSTR-125

core.DefaultClassMapper.mapNameFromXML(String) has problems with '_'

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.1
    • Component/s: None
    • Labels:
      None

      Description

      Thanx for sharing XStream. Thanx for sharing it w/ BSD license.

      I tried to invoke <XStream instance>.fromXML(Reader) with classes named PL_Group, PL_System, etc.

      I got ArrayIndexOutOfBoundException inside core.DefaultClassMapper.mapNameFromXML(String). Apparently, when mapNameFromXML() is trying to do
      <code>
      xmlName.substring(i + 1, i + 8).equals("DOLLAR_")
      </code>
      XStream assumes incorrectly that the String will be longer than 8.

      I propose surrounding the block with try/catch.

      Regards,

      -Eddy

        People

        • Assignee:
          Unassigned
          Reporter:
          Eddy Mulyono
        • Votes:
          0 Vote for this issue
          Watchers:
          0 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved: