Hi Mitch,

I've spent some time trying to reproduce that with a unit test and
with a specific GAE project, no luck.
All I can see is that Field.isAccessible() consistently returns false
on public fields.
As long as we know that, we can then call Field.setAccessible() and
that works without generating exceptions.

Our previous code would call methods in this order:

1. if( !Field.isAccessible())
2.   Field.setAccessible(true);
3. Field.set( object, val );

In some cases I believe that isAccessible() would return true but then
then call to Field.set() would fail.
Maybe that was somehow related to our library (Siena) caching fields
in a list.

I've changed the Siena code to call things in a different order:

1. try{
2.   Field.set( object, val );
3. catch( Exception e1 ){
5.      Field.setAccessible( true );  // this could throw an exception
6.      Field.set( object, val );
7. }

This so far seems to work for me.
I wonder whether that exception might also depend on the Java Library
version I'm linking to.
As a general rule, how can we make sure that the two are as similar as
possible?
What's the specific Java library version we should link to during
development?

Thanks,
Emanuele

On Feb 10, 6:45 pm, Mitch Rudominer <[email protected]> wrote:
> Emanuele,
>
> Yes if you could provide me with sample code the produces the problem you
> are describing that would be very helpful.
>
> thanks,
> Mitch

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to