Upfront adoption & migration of applications to latest jdk
1. Upfront Adoption & Migration of
Applications to latest JDKs
Narendran Solai Sridharan
12-Sep-2015
2. Common Complaints that stops us
from Migration
• Business / Products which is in production
should not break due to Migration.
• One will not be able to test all the Business /
Product features post migration.
• No proof that the new Libraries do not have
any issues.
• Low Tool support for new changes in
language.
3. What we loose without Migration
• A lot of Secure & Performing Programming
opportunity.
• New Programming Paradigms
• SOLIDfied libraries & new libraries
• Programming a resilient design &
Architecture.
• Evading lot of redundant code and coming up
with a maintainable code.
5. Analysis: Changes to be under Scan
• Types of Release
• Types of Compatibility
• Features – Depreciated, Removed and
Enhanced
• List of Bugs Reported & their Fixes
P.S. – Not all changes can be monitored. Most relevant changes required
only to be monitored and incrementally the product should be enhanced.
6. Analysis: Type of Compatibility
• Every Projects has dependents Jars (from other projects), the upgrade should not affect binary
(class file) compatibility. i.e dependent Jars should work without upgrade with the upgraded
version of our Code.
• Source Compatibility states that old code should not produce any compilation Issues after JDK
upgrade.
• Methods & Classes of JDK used should behave in the same way, any change in behavior
introduced in the upgrade will lead to incapability and will lead to run time issues.
For Every change, JDK comes with classification based on the type of compatibility, otherwise we
may require to do the classification.
7. Analysis: Type of Releases
• Platform – all binary, behavioral & source compatibility are allowed to
get affected.
• Update – Security and bug fixes – only behavioral & Source
compatibility are allowed to get affected
• Maintenance – large bug fixes, update in larger scale
8. Analysis: Features
• Deprecated Features will get removed sooner, so they need
to removed in the code.
• Enhanced features increases efficiency and productivity, so
they need to be recommended.
• Removed Features should be removed from code
mandatorily.
9. Analysis: References
For each JDK release there used to be a Adoption GUIDES – They will serve as good first hand
references.
They provide type of compatibility issue anticipated, Features deprecated, enhanced and removed.
JDK 6 - Adoption Guide
http://www.oracle.com/technetwork/java/javase/adoptionguide-137484.html
JDK 7 - Adoption Guide
http://docs.oracle.com/javase/7/docs/webnotes/adoptionGuide/
JDK 8 - Adoption Guide
http://www.oracle.com/technetwork/java/javase/jdk8-adoption-guide-2157601.html
Know How Open JDK are developed
http://cr.openjdk.java.net/~darcy/OpenJdkDevGuide/OpenJdkDevelopersGuide.v0.777.html
10. Analysis: Present tools for JDK
Migration
Eclipse IDE
http://eclipsesource.com/blogs/2014/03/25/eclipse-support-for-java-8/
Netbeans IDE – Reference Slide & Video
http://www.slideshare.net/GeertjanWielenga/smart-migration-to-jdk-8
https://netbeans.org/kb/docs/java/jdk8-migration-screencast.html
Eclipse
Netbeans
11. Analysis: Opportunities
• Code Quality Tools like PMD, Findbugs,
checklist, Sonar which usually works based on
Heuristics.
• A Heuristics tool as for migration will be very
helpful.
• Heuristic tool can be extended for refactoring
and migration.
• Writing own rules if no one is found.