Bug 1193113

Summary: Annotation Scanning is Broken by the Use of Java 8 Syntax
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Jimmy Wilson <jawilson>
Component: OtherAssignee: Kabir Khan <kkhan>
Status: CLOSED ERRATA QA Contact: Jan Martiska <jmartisk>
Severity: unspecified Docs Contact: Tom WELLS <twells>
Priority: unspecified    
Version: 6.3.3CC: cdewolf, emajorsi, fnasser, jason.greene, jmartisk, lcarlon, pcheung
Target Milestone: post-GA   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
If a deployment is compiled with Java 8 and uses classes that use Java 8 features, it will log a warning, but may work depending on whether or not that classes functionality depends on annotations. If a deployment is compiled with Java 8 and uses Java 8 features in the same class as one with EE annotations, the deployment will not be recognized and will fail to deploy. With this change, Java 8 syntax and annotations in same class will not cause deployment warnings or problems.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-10 18:15:30 UTC Type: Support Patch
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1148021    
Bug Blocks: 1195283    
Attachments:
Description Flags
jdk8-with-failure.tar.gz
none
jdk8-with-warning.tar.gz
none
warning.txt none

Description Jimmy Wilson 2015-02-16 15:23:49 UTC
Created attachment 992247 [details]
jdk8-with-failure.tar.gz

If a deployment is compiled with Java 8 and uses classes that use Lambda's (a Java 8 feature), it will log a warning, but still work.

If a deployment is compiled with Java 8 and uses Lambda's in the same class as one with EE annotations, the deployment will not be recognized.  See attached jdk8-with-failure.zip.

This happens regardless of ZIP or RPM install because scanning is done on deployment.

Comment 2 Jimmy Wilson 2015-02-16 15:28:03 UTC
Attaching jdk8-with-warning.tar.gz that demonstrates the warning attached as warning.txt for the cases where EE annotated classes use other classes that use Java 8 syntax.

Comment 3 Jimmy Wilson 2015-02-16 15:28:31 UTC
Created attachment 992249 [details]
jdk8-with-warning.tar.gz

Comment 4 Jimmy Wilson 2015-02-16 15:29:13 UTC
Created attachment 992250 [details]
warning.txt

Comment 16 Jan Martiska 2015-03-06 09:11:37 UTC
This is fixed via individual patch in BZ 1195283. For details see that bugzilla.

Comment 18 errata-xmlrpc 2015-03-10 18:15:30 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-0673.html