commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Syte Beimin <sbei...@betterbe.com>
Subject Re: [beanutils] How to get PropertyUtils.getProperty to thrown a IllegalAccessException
Date Fri, 25 May 2007 09:42:48 GMT
Adrian Mitev wrote:
> Try defining the getter method as private.
That throws a NoSuchMethodException not an IllegalAccessException.
>
> 2007/5/25, Syte Beimin <sbeimin@betterbe.com>:
>>
>> I've been trying to write unit tests for a lib we've
>> build at my work and i ran into a small problem. The method
>> PropertyUtils.getProperty(Object object, String propertyName) can throw
>> a IllegalAccessException. In our library we catch the exception an take
>> appropriate action. However I can't seem to write a unit test that
>> checks if all is well because I can't get the exception thrown :)
>> I've been browsing through the unit tests included with the beanutils
>> source but can't seem to find a test that gets the
>> PropertyUtils.getProperty to throw the IllegalAccessException.
>> Does any of you know of a way to get this method to throw the exception?
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>>
>>
>


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


Mime
View raw message