tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Eynon (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (TAP5-1860) problems with protected component fields
Date Thu, 12 Apr 2012 03:44:43 GMT

    [ https://issues.apache.org/jira/browse/TAP5-1860?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13252168#comment-13252168

Steve Eynon commented on TAP5-1860:

I believe there *is* a problem with the introduction of protected instance fields, but that
it's different to the one stated.

Protected fields work just fine (and why wouldn't they, it's just Java!) however, T5 annotated
fields are only instrumented within the same class. Meaning if you access an instrumented
protected field from a subclass, it doesn't work.

The problem (as I see it) is that T5 doesn't complain when it instruments a field marked as
protected. I would also like to see the documentation updated to explain this.

We've come a cropper with this a couple of times in work. The nasty gotcha being, if you access
the field in DevMode the field is shadowed, so future protected access works - but fails spectacularly
with NPEs in ProdMode!
> problems with protected component fields
> ----------------------------------------
>                 Key: TAP5-1860
>                 URL: https://issues.apache.org/jira/browse/TAP5-1860
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.3.2
>            Reporter: Olaf Tomczak
>         Attachments: testapp.tgz
> There seems to be a problem with the new feature introduced in 5.3.2 - https://issues.apache.org/jira/browse/TAP5-1801
> When I create a protected field in by base page class, setting the field in a subclass'
event handling method seems to have no effect.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message