Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
5.0.11
-
None
-
None
Description
when displayed exception contains at least one write-only property tapestry failing to render error page.
java.lang.UnsupportedOperationException: Class ui.Exception_detail does not provide an accessor ('getter') method for property 'faultCode'
at org.apache.tapestry.ioc.internal.services.PropertyAdapterImpl.get(PropertyAdapterImpl.java:81)
at org.apache.tapestry.ioc.internal.services.ClassPropertyAdapterImpl.get(ClassPropertyAdapterImpl.java:81)
at org.apache.tapestry.ioc.internal.services.ExceptionAnalyzerImpl.extractInfo(ExceptionAnalyzerImpl.java:105)
at org.apache.tapestry.ioc.internal.services.ExceptionAnalyzerImpl.analyze(ExceptionAnalyzerImpl.java:50)
it seems like error in extractInfo method, which does not analyze can it read property or not before invoking adapter.get(). So, it is simple to patch
Instead of
Object value = adapter.get(t, name);
if (value == null) continue;
Use
PropertyAdapter pa = adapter.getPropertyAdapter(name);
if (!pa.isRead()) continue;
Object value = pa.get(t);
if (value == null) continue;