Anonymous | Login | Signup for a new account | 12-17-2024 12:03 PST |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Advanced Details [ Jump to Notes ] | [ View Simple ] [ Issue History ] [ Print ] | ||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
0004883 | [Resin] | minor | always | 11-29-11 03:01 | 11-30-11 15:56 | ||||
Reporter | andreaskaltenbach | View Status | public | ||||||
Assigned To | ferg | ||||||||
Priority | normal | Resolution | fixed | Platform | |||||
Status | closed | OS | |||||||
Projection | none | OS Version | |||||||
ETA | none | Fixed in Version | 4.0.25 | Product Version | 4.0.23 | ||||
Product Build | |||||||||
Summary | 0004883: Resin generates uncompilable code for interceptors which contain enum array elements | ||||||||
Description |
Suppose the following enumeration: public enum Direction { LEFT, MIDDLE, RIGHT; } which is used in an annotation @Directions; @InterceptorBinding @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) public @interface Directions { Direction[] value(); } Furthermore have we a stateless session bean with an JavaEE interceptor defined: @Named @Stateless @Interceptors(DirectionAware.class) public class ServiceImpl implements Service {} If we now annotate a method of the session bean with e.g. @Directions(value = Direction.RIGHT) , Resin will generate invalid Java code for the session bean's proxy class. Attached, you find a little maven project to reproduce the bug. |
||||||||
Steps To Reproduce | |||||||||
Additional Information |
Example output from a Resin start: ServiceImpl__StatelessProxy.java:90: illegal start of expression public com.stendahls.interceptors.MyEnum[] value() { return [Lcom.stendahls.interceptors.MyEnum;@1d1c0f9c; } The following, uncompilable Java code is generated: ... _doSomething_AROUND_INVOKE_0_objectIndexChain = com.caucho.config.gen.CandiUtil.createInterceptors( __caucho_manager, __caucho_interceptor_static_beans, __caucho_interceptor_beans, _doSomething_AROUND_INVOKE_0_objectIndexStaticChain, javax.enterprise.inject.spi.InterceptionType.AROUND_INVOKE, new javax.enterprise.util.AnnotationLiteral<com.stendahls.interceptors.Directions>() { public com.stendahls.interceptors.MyEnum[] value() { return [Lcom.stendahls.interceptors.MyEnum;@734d9f9f; } }); ... [Lcom.stendahls.interceptors.MyEnum;@734d9f9f; in this case is unable to compile. |
||||||||
Attached Files | bugreport.zip [^] (20,014 bytes) 11-29-11 03:01 | ||||||||
|
Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
30 total queries executed. 26 unique queries executed. |