Request for Review: Warnings cleanup in java.lang.*, java.util.**
Alan.Bateman at oracle.com
Fri Dec 2 12:18:41 UTC 2011
cc'ing core-libs-dev as that is the place to discuss these changes. I
see on the sign-up sheet  that omajid has signed up for java.lang,
maybe you are working together? I'll leave it to Stuart to say whether
he wants to refactor/other changes separated from the warnings changes.
One thing I'm curious about is
@SuppressWarnings("BooleanConstructorCall") as it suggests that some
other compiler, or maybe an extension in the NetBeans javac?
On 02/12/2011 11:06, David Schlosnagle wrote:
> I didn't have a chance to sign-up or submit during the official
> warnings cleanup day, but I'm hoping that you'll still accept patches.
> I do not have a bug number for this change.
> The webrev  below should resolve 208 warnings in the java.lang.*
> and java.util.** packages. I tried to stick to fixing warnings, but
> OCD kicked in while editing in NetBeans, so there are a few additional
> IDE warnings fixed as well for the modified files. For example, adding
> @Override on the relevant methods, removals of dead stores, conversion
> to Strings in switch, StringBuffer -> StringBuilder where localized (I
> realize lock elision in HotSpot and JRockit should make them
> practically equivalent, but NetBeans still complains and I assume
> there is still some unnecessary synchronization overhead).
> ConditionalSpecialCasing.java also has some slight refactoring to
> utilize the updated parameterized types.
> Additionally, there was one change to
> java.util.regex.Pattern#subFlag() that I'd like someone to review more
> carefully as it was previously falling through the last case, but I
> believe the last case should have had a break; to properly handle
> other flags.
> *** 3006,3015 ****
> --- 3014,3024 ----
> case 'x':
> flags&= ~COMMENTS;
> case 'U':
> flags&= ~(UNICODE_CHARACTER_CLASS | UNICODE_CASE);
> + break;
> If you want any of the additional cleanup removed from the patch or
> other changes, please let me know.
> : http://dl.dropbox.com/u/23832908/openjdk/2011-12-01/index.html
> Files modified:
More information about the core-libs-dev