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


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]

Reply via email to