<Swing Dev> Fixing compiler warnings in src/demo/share/jfc

Marc Hoffmann hoffmann at mountainminds.com
Wed Nov 13 12:00:34 UTC 2019


Hello Swing Commiters,

any chance that I find a sponsor here to get rid of the compiler warnings in the JDK build?

Thanks for any hints how to move forward with this.

-marc


> On 31. Oct 2019, at 19:56, Marc Hoffmann <hoffmann at mountainminds.com> wrote:
> 
> Dear Swing maintainers,
> 
> I was referred to this mailing list from build-dev. I would like to fix the compiler warnings caused by the Swing demo code. Please find original posting below.
> 
> As I learned that attachments might be stripped please find my patches also in this gist: https://gist.github.com/marchof/59923f8e2ebab0768ed76ffb5315a2c7
> 
> Best regards,
> -marc
> 
> 
> 
> MOTIVATION
> 
> As a developer of the JaCoCo code coverage library I do lots of JDK builds. JDK
> builds are simple, fast and produce minimal log output. Nice! What annoys me
> though are plenty of compiler warnings at the end of the build caused by the
> example code in src/demo/share/jfc
> 
> FIX
> 
> I propose a series of 3 patches (based on each other) which fixes all compiler
> warnings for the demos:
> 
> patch1.txt - Fix compiler warnings in demos: raw types
> patch2.txt - Fix compiler warnings in demos: deprecated APIs
> patch3.txt - Fix compiler warnings in demos: deprecated Applet APIs
> 
> While patch 1 & 2 do not change functionality patch 3 actually removes the
> Applet versions of some of the demos. The java main versions of the same demos
> are still intact.
> 
> The patches are based on changeset 56699:70e6b0d8db13.
> 
> They have been tested from this clone: 
> https://github.com/marchof/jdk/tree/fix-compiler-warnings-in-demos
> 
> 
> RESULT
> 
> All compiler warnings on demo code during JDK build are removed
> 
> TESTING
> 
> I haven't found any automated tests so I manually launched all the demos. From
> what I can say they are still functional.
> 
> SCOPE
> 
> I applied minimal changes to remove compiler warnings only. There are many more
> cleanup opportunities in the demo code. Also there is (dead?) code in
> src/demo/share/java2d which has similar issues. Both are not on scope of these
> patches.
> 
> NEXT STEPS
> 
> I’m have no experience with OpenJDK patches. If you’re interested in getting these warnings fixed please
> let me know how I can submit these patches properly.
> 
> 
> 
> <patch1.txt><patch2.txt><patch3.txt>
> 



More information about the swing-dev mailing list