[
https://issues.apache.org/jira/browse/VELOCITY-544?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jarkko Viinamäki updated VELOCITY-544:
--------------------------------------
Attachment: velocity-1.6-dev-544-patch-and-testcase.patch
I can confirm that there's a bug in current SVN head.
Velocity fails to detect methods of type public Boolean isXXXX(). The fix
suggested in this issue works so I included that and a test case in the
attached patch.
> BooleanPropertyExecutor refers to primitive boolean not object Boolean
> ----------------------------------------------------------------------
>
> Key: VELOCITY-544
> URL: https://issues.apache.org/jira/browse/VELOCITY-544
> Project: Velocity
> Issue Type: Bug
> Components: Engine
> Affects Versions: 1.5
> Reporter: Will Glass-Husain
> Priority: Minor
> Attachments: velocity-1.6-dev-544-patch-and-testcase.patch
>
>
> note from Will: not sure if this is an actual bug or just a confusion re: the
> source. need to investigate.
> an example of a user-visible symptom would be helpful. see Christopher's
> note.
> ---------- Forwarded message ----------
> From: Adam Bishop (DSLWN) <[EMAIL PROTECTED]>
> Date: May 3, 2007 10:15 PM
> Subject: BooleanPropertyExecutor bug
> To: [email protected]
> getMethod().getReturnType() != Boolean.TYPE
> returns true if the method return type is Boolean rather than boolean.
> (i.e. it doesn't like the Boolean class, just the boolean primitive)
> the line should be
> getMethod().getReturnType() != Boolean.TYPE &&
> getMethod().getReturnType()!=Boolean.class
> bug exists in 1.3.1 and 1.5
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> ---------- Forwarded message ----------
> From: Christopher Schultz <[EMAIL PROTECTED]>
> Date: May 4, 2007 9:59 AM
> Subject: Re: BooleanPropertyExecutor bug
> To: Velocity Developers List <[email protected]>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> All,
> I haven't looked at the code, but introspection often has special cases
> for primitive types, whereas their wrapper types (java.lang.Boolean, in
> this case) are handled generically as Objects.
> Are we sure that java.lang.Boolean.class is appropriate to check in this
> case?
> Adam did not provide an example of how to demonstrate the existence of
> the bug... just an assertion that the code was not sufficient.
> - -chris
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]