Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-5690

ConfigurationHandler should support ignoring whitespace between property key/equal sign & equal sign/property value

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Reopened
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Configuration Admin
    • Labels:

      Description

      ConfigurationHandler.read(InputStream ins) should properly parse input streams that have whitespace between key/equals sign and the equals sign/value.

      A situation like
      `service.pid ="com.adobe.granite.foo.Bar"`
      causes a single extra space to be included with the key's String
      (i.e. dictionary.get("service.pid" + " ") == "com.adobe.granite.foo.Bar")
      And a situation like
      `service.pid= "com.adobe.granite.foo.Bar"`
      causes the value read to be null and thus the entry not added to the dictionary
      (i.e. dictionary.size() == 0 and dictionary.get("service.pid") == null)

      The class inherently supports spaces before the property name (i.e. ` service.pid=...`) with the ignorableWhiteSpace call in nextToken. The class should be adjusted to similarly ignore whitespace between the key and equals sign as well as between the equals sign and the value.

        Attachments

        1. FELIX-5690.patch
          4 kB
          Joshua Mack

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                mackncheesiest Joshua Mack
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: