Skip to main content
Last updated November 12, 2012 21:25, by Martijn Verburg
__TOC__ This section takes you through how you can help apply Java 7 project Coin features in the OpenJDK and submit patches, improving the code quality in Java itself! Any questions, comments, feedback etc please send to the '''[ Adopt OpenJDK group]''' (if you have no luck there, try posting to the '''[ JUG leaders list]'''). =Events= See [[GeneralInstructionsForSmallChanges#Events|Events]] = References to previous work = * Stuart Marks [ Applying Project Coin to OpenJDK] =Project Sponsors= The Adopt OpenJDK reviewers will liaise with the following sponsors to get patches into the right groups. * Stuart Marks --> core-libs. * Artem Ananiev --> swing and awt (client) =Instructions for instructors= See [[GeneralInstructionsForSmallChanges#Instructions_for_instructors|Instructions for instructors]] =What fixes are accepted (The barrier for patches)= ==Order to apply project Coin fixes in== You should work on project Coni fixes in the following order (which is basically from safest to more difficult to prove safety). # Diamond Operator # Multi-catch # Strings-in-switch # Everything else (e.g. try-with-resources) The barrier for the OpenJDK committers to accept a patch (even one as seemingly simple as a project coin clean-up) is exceptionally high. The instructors will be checking a wide variety of conditions before your patch can be accepted. Please survey the list below and try to ensure your patch meets the quality bar. '''Main focus:''' simple, minimal, and risk-free project coin fixes. We've listed some gotchas below: == Diamond Operator == * [ Where Diamond can be used] * [ When should Diamond be used] == Strings in Switch == * For strings-in-switch, a null value of the switch expression results in NPE, whereas (depending on the details, of course) a cascade of if-elses may end up handling null differently. == Multi-catch == * In some cases there is a catch of Exception that is better expressed as a multi-catch of several Exception subtypes. This might make for better code, but it subtly changes the behavior of the code. =Hardware Requirements= See [[GeneralInstructionsForSmallChanges#Hardware_Requirements|Hardware Requirements]] =Attendee Instructions= See [[GeneralInstructionsForSmallChanges#Attendee_Instructions|Attendee Instructions]] ==Look for areas to coinify== # See your instructor(s) on the day to co-ordinate this activity or co-ordinate on the adoptopenjdk mailing list ==Fix warnings== Remember not to overlap with other efforts that are going on. If you're part of a global hack day, your instructor(s) will be co-ordinating with other teams. Fix some warnings in the source code (these are mainly under ''$SOURCE_CODE/jdk8_tl/jdk/src/share/classes''). Depending on whether you're using the new or old build system, you'll then want to execute a build. === New Build === cd $SOURCE_CODE/ make images &> build.log tail -f build.log === Old Build === ./ tail -f build.log == Check the log == When the build is done you should see something in the build.log file like: Done Processing SUBDIRS: tools java javax sun com org sunw jpda mkdemo mksample launchers linux i586 1.8.0-internal build finished: 12-04-21 19:08 '''NOTE:''' The build will be much faster the 2nd time around, it only compiles in and around the area that you have changed. ==Run jtreg tests== See [[GeneralInstructionsForSmallChanges#Run_jtreg_tests|Run jtreg tests]] ==Repeat the Process== See [[GeneralInstructionsForSmallChanges#Repeat_the_Process|Repeat the process]] ==Create Patches== See [[GeneralInstructionsForSmallChanges#Create_Patches|Create Patches]] ==Submit Patches== See [[GeneralInstructionsForSmallChanges#Submit_Patches|Submit Patches]] Back to [[Adopt OpenJDK]]
Please Confirm