Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile with 1.6+ and run with 1.5+ #41

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kedarmhaswade
Copy link

This commit makes sure that we compile with 1.6+ and can run with 1.5+ JRE.

Please see the commit comments.

http://groups.google.com/group/asynchttpclient/browse_thread/thread/ad594c12c9fc498d?hl=en

In summary:
1. We now "require" JDK 1.6 for "compilation". This ensures we use recent compiler.
2. We produce byte code compatible with JRE 1.5. Thus, if any user is using JRE 1.5 s/he does not need to upgrade to 1.6+.
3. Source is 1.5 and so is target. This means we treat the source code to be compatible with 1.5.
4. Any 1.6 language constructs (e.g. @OverRide on interface methods) and library constructs (e.g. any 1.6-only JDK classes/methods)
   are detected at compile time and build fails if any are found. This ensures that the 1.6 compiled sources will
   run on JRE 1.5 (and not fail with RuntimeException). Use of animal sniffer enables this.

Tested on Linux.
@jfarcand
Copy link
Contributor

Thanks for the contribution! I will do some test and integrate!

@kedarmhaswade
Copy link
Author

Thanks. I think I need to change the POM to add a repo. Will do that or you can do that after pulling it in.

@jfarcand
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants