Thread: [Attrib4j-devel] problem when arg to attribute is a string which contains spaces
Status: Beta
Brought to you by:
markpollack
|
From: <jo...@co...> - 2003-08-30 19:36:00
|
Hey guys.
I have started to use attrib4j for a thing in AspectWerkz.
Thanks for a great tool which works fine so far, at least up to this point.
The problem I have is that I need to pass a string to the attribute that
consists of spaces and when I do it fails. The implementation does not
seem to be able to handle that. Is there a workaround for that?
E.g. when I have the attribute:
/**
* @Pointcut("* *.set*(..)")
*/
Then it interprets this as the attribute
Pointcut("*
and then the text
*.set*(..)")
Thanks.
Ps. It also seems to have problems when the string contains '(' or ')' Ds.
--
Jonas
http://blogs.codehaus.org/people/jboner/index.html
|
|
From: Mark P. <Mar...@Co...> - 2003-08-31 14:48:12
|
Hi,
Thanks for trying out attrib4j for AspectWerkz...I really better get off
my you know what and make some changes that have been long outstanding...
both for the SpringFramework project and now yours.
Anyway, about your problem, off the top of my head I do not know of a
workaround that would keep your exact syntax....which is probably very
important to you.
I guess the only suggestion is to use something like this
@PointCut("*","*.set*")
which would require changing your pointcut constructor, at least until I
fix the bug. But I guess you realized that already....
The parsing code is actually something that I hadn't touched from the
original version Ted Neward gave me, it clearly needs to be made more
robust.
Let me look into it and get back to you.
Cheers,
Mark
> Hey guys.
>
> I have started to use attrib4j for a thing in AspectWerkz.
>
> Thanks for a great tool which works fine so far, at least up to this
> point.
>
> The problem I have is that I need to pass a string to the attribute that
> consists of spaces and when I do it fails. The implementation does not
> seem to be able to handle that. Is there a workaround for that?
>
> E.g. when I have the attribute:
> /**
> * @Pointcut("* *.set*(..)")
> */
>
> Then it interprets this as the attribute
> Pointcut("*
> and then the text
> *.set*(..)")
>
> Thanks.
>
> Ps. It also seems to have problems when the string contains '(' or ')' Ds.
>
> --
> Jonas
> http://blogs.codehaus.org/people/jboner/index.html
>
>
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Attrib4j-devel mailing list
> Att...@li...
> https://lists.sourceforge.net/lists/listinfo/attrib4j-devel
>
>
|
|
From: <jo...@co...> - 2003-08-31 15:40:20
|
Hi Mark.
Thanks for you response and suggestion.
But I would really like to be able to keep my syntax.
Is there any way that I can help you?
What is the status of the migration with commons-attributes and the
codehaus discussion?
It seems to be a problem with having parenthesis in the string arg as well.
QDox might help with the parsing, don't know.
Thanks.
/Jonas
Mark Pollack wrote:
> Hi,
>
> Thanks for trying out attrib4j for AspectWerkz...I really better get off
> my you know what and make some changes that have been long outstanding...
> both for the SpringFramework project and now yours.
>
> Anyway, about your problem, off the top of my head I do not know of a
> workaround that would keep your exact syntax....which is probably very
> important to you.
>
> I guess the only suggestion is to use something like this
>
> @PointCut("*","*.set*")
>
> which would require changing your pointcut constructor, at least until I
> fix the bug. But I guess you realized that already....
>
> The parsing code is actually something that I hadn't touched from the
> original version Ted Neward gave me, it clearly needs to be made more
> robust.
>
> Let me look into it and get back to you.
>
> Cheers,
> Mark
>
>
>
>
>
>
>
>
>>Hey guys.
>>
>>I have started to use attrib4j for a thing in AspectWerkz.
>>
>>Thanks for a great tool which works fine so far, at least up to this
>>point.
>>
>>The problem I have is that I need to pass a string to the attribute that
>>consists of spaces and when I do it fails. The implementation does not
>>seem to be able to handle that. Is there a workaround for that?
>>
>>E.g. when I have the attribute:
>> /**
>> * @Pointcut("* *.set*(..)")
>> */
>>
>>Then it interprets this as the attribute
>> Pointcut("*
>>and then the text
>> *.set*(..)")
>>
>>Thanks.
>>
>>Ps. It also seems to have problems when the string contains '(' or ')' Ds.
>>
>>--
>>Jonas
>>http://blogs.codehaus.org/people/jboner/index.html
>>
>>
>>
>>
>>
>>-------------------------------------------------------
>>This sf.net email is sponsored by:ThinkGeek
>>Welcome to geek heaven.
>>http://thinkgeek.com/sf
>>_______________________________________________
>>Attrib4j-devel mailing list
>>Att...@li...
>>https://lists.sourceforge.net/lists/listinfo/attrib4j-devel
>>
>>
>
>
>
>
--
Jonas
http://blogs.codehaus.org/people/jboner/index.html
|
|
From: Mark P. <Mar...@Co...> - 2003-09-02 05:01:36
|
Hi,
I have fixed the bug, you can get the new release, 0.8.9 from the download
section. You should put a space after the attribute classname and the
constructor parenthesis, for example
/**
* @Pointcut ("* *set*(..)")
*/
What you observed stemed from the treatment of how the "name" and "text"
parts of the Javadoc comment are parsed. The first space in the @tag is
used to separate name and text, with a truncating of extraneous spaces.
I saw a bit of this is the last release but didn't think it through. It
so happens all my examples and testcases didn't have any spaces in the
@tag...
There is a test case now for your exact syntax.
Hope this helps....off to tackle other issues...
Cheers,
Mark
|
|
From: <jo...@co...> - 2003-09-02 06:10:25
|
Hi Mark.
Thanks a lot for the fast fix.
I will try it out later this morning.
/Jonas
Mark Pollack wrote:
> Hi,
>
> I have fixed the bug, you can get the new release, 0.8.9 from the download
> section. You should put a space after the attribute classname and the
> constructor parenthesis, for example
> /**
> * @Pointcut ("* *set*(..)")
> */
>
> What you observed stemed from the treatment of how the "name" and "text"
> parts of the Javadoc comment are parsed. The first space in the @tag is
> used to separate name and text, with a truncating of extraneous spaces.
> I saw a bit of this is the last release but didn't think it through. It
> so happens all my examples and testcases didn't have any spaces in the
> @tag...
>
> There is a test case now for your exact syntax.
>
> Hope this helps....off to tackle other issues...
>
> Cheers,
> Mark
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Attrib4j-devel mailing list
> Att...@li...
> https://lists.sourceforge.net/lists/listinfo/attrib4j-devel
>
>
--
Jonas
http://blogs.codehaus.org/people/jboner/index.html
|