Uploaded image for project: 'HiveMind'
  1. HiveMind
  2. HIVEMIND-172

Allow escaping of commas in Hivemind PropertyUtils.configureProperties (and ClassAdaptor)

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.1
    • None
    • library
    • None

    Description

      Recently I filled an issue in Tapestry for NumberTranslator, that it didn't allow for the comma (",") to be specified in the initializer. Turns out there's no way of escaping this character, as StringTokenizer is used on hivemind-lib to separate the characters.

      http://issues.apache.org/jira/browse/TAPESTRY-887

      This can be fixed in PropertyUtils / ClassAdaptor by adding a filter to this:

      StringTokenizer tokenizer = new StringTokenizer(initializer, ",");

      while (tokenizer.hasMoreTokens())

      { configurePropertyFromToken(target, tokenizer.nextToken()); }

      It's possible to iterate over the tokenizer and check if the last character of a token is "\", skipping the delimiter in that case.

      Attachments

        1. HIVEMIND-172.patch
          7 kB
          Leonardo Quijano Vincenzi

        Issue Links

          Activity

            People

              Unassigned Unassigned
              lquijano Leonardo Quijano Vincenzi
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: