You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hivemind.apache.org by "Leonardo Quijano Vincenzi (JIRA)" <hi...@jakarta.apache.org> on 2006/03/21 16:37:05 UTC

[jira] Created: (HIVEMIND-172) Allow escaping of commas in Hivemind PropertyUtils.configureProperties (and ClassAdaptor)

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

         Key: HIVEMIND-172
         URL: http://issues.apache.org/jira/browse/HIVEMIND-172
     Project: HiveMind
        Type: Improvement
  Components: library  
    Versions: 1.1    
    Reporter: Leonardo Quijano Vincenzi
    Priority: Minor


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.



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org


[jira] Commented: (HIVEMIND-172) Allow escaping of commas in Hivemind PropertyUtils.configureProperties (and ClassAdaptor)

Posted by "Jesse Kuhnert (JIRA)" <hi...@jakarta.apache.org>.
    [ http://issues.apache.org/jira/browse/HIVEMIND-172?page=comments#action_12372883 ] 

Jesse Kuhnert commented on HIVEMIND-172:
----------------------------------------

Not sure if this is the way you guys want to go with it, but maybe we can trade. I'll work on the tapestry servlet filter if you'll work on this (seems like a bum trade since your issue has a patch though.. heh ) ?



> Allow escaping of commas in Hivemind PropertyUtils.configureProperties (and ClassAdaptor)
> -----------------------------------------------------------------------------------------
>
>          Key: HIVEMIND-172
>          URL: http://issues.apache.org/jira/browse/HIVEMIND-172
>      Project: HiveMind
>         Type: Improvement

>   Components: library
>     Versions: 1.1
>     Reporter: Leonardo Quijano Vincenzi
>     Priority: Minor
>  Attachments: HIVEMIND-172.patch
>
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org


[jira] Commented: (HIVEMIND-172) Allow escaping of commas in Hivemind PropertyUtils.configureProperties (and ClassAdaptor)

Posted by "Leonardo Quijano Vincenzi (JIRA)" <hi...@jakarta.apache.org>.
    [ http://issues.apache.org/jira/browse/HIVEMIND-172?page=comments#action_12371247 ] 

Leonardo Quijano Vincenzi commented on HIVEMIND-172:
----------------------------------------------------

This is a framework issue, rather than a library one, I think.

> Allow escaping of commas in Hivemind PropertyUtils.configureProperties (and ClassAdaptor)
> -----------------------------------------------------------------------------------------
>
>          Key: HIVEMIND-172
>          URL: http://issues.apache.org/jira/browse/HIVEMIND-172
>      Project: HiveMind
>         Type: Improvement
>   Components: library
>     Versions: 1.1
>     Reporter: Leonardo Quijano Vincenzi
>     Priority: Minor

>
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org


[jira] Updated: (HIVEMIND-172) Allow escaping of commas in Hivemind PropertyUtils.configureProperties (and ClassAdaptor)

Posted by "Leonardo Quijano Vincenzi (JIRA)" <hi...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/HIVEMIND-172?page=all ]

Leonardo Quijano Vincenzi updated HIVEMIND-172:
-----------------------------------------------

    Attachment: HIVEMIND-172.patch

New StringUtils.escapedSplit method. ClassAdapter uses this to tokenize its initializer string.

> Allow escaping of commas in Hivemind PropertyUtils.configureProperties (and ClassAdaptor)
> -----------------------------------------------------------------------------------------
>
>          Key: HIVEMIND-172
>          URL: http://issues.apache.org/jira/browse/HIVEMIND-172
>      Project: HiveMind
>         Type: Improvement
>   Components: library
>     Versions: 1.1
>     Reporter: Leonardo Quijano Vincenzi
>     Priority: Minor
>  Attachments: HIVEMIND-172.patch
>
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org