20
Aug
11

OpenJDK Contributions

After i have contributed to openjdk7 same time ago and followed the JAVA 7 Launch i decided to continue contributing to openjdk.

But where to start. I didn’t followed openjdk developement since my contribution. So i started reading the mailing-lists.

After some minor reviews and comments i started some small projects to start contributing code again.

  1. Chain Exceptions more consequently
  2. Reduce Warnings
  3. and maybe Iterable support for Enumerations

While Project 3 is not yet started. Project 1 and 2 are running.

Chain Exceptions more consequently

I started with InternalError because i found some amount of places where new InternalError().initCause(ex) is used instead of chaining rootcause via ctor-parameter. After i changed InternalError and it’s supertyp itself i changed the places where initCause where called. After that i searched for every instantiation of InternalError with the “old” ctors and looked if i can chain with some root-cause. This is not an really complex task but it takes some time to do it.

After that i started over with RuntimeException. Again search instantiation with the old ctors. Chain Exception where possible. Maybe i introduce some performance issues with this. But i don’t really think so.

While checking if all is compiling after my changes i ran into an problem with new warnings. But after some questions in the mailing list and a clean make it was gone. I checked if i introduce new warnings through my changes and found that there a some warnings in existing code that can be fixes without much effort.

Reduce Warnings

There where places where a varargs argument doen’t match Object[] or Object. Example: if you submit String[] to an vararg-argument you can some warnings, because the compiler can not figure out if you want to submit an simgle Object or if you want to submit various String to the varargs-argument. An cast to Object or Object[] does the trick.

The second warning type that can be fixed easily is unnecessary cast. Just remove the cast and it’s done.

How to submit to openjdk?

I created a free hosting account. And uploaded the webrevs to it. Here are my actual webrevs for openjdk

Contributions run running thought the mailing list with public review. I hope to get some good feedback.


0 Responses to “OpenJDK Contributions”



  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.