[OpenJDK 2D-Dev] JDK 9 RFR of JDK-8039862: Fix fallthrough lint warnings in 2d
Joe Darcy
joe.darcy at oracle.com
Thu Apr 10 02:51:16 UTC 2014
Hello,
Please review these fixes for
JDK-8039862: Fix fallthrough lint warnings in 2d
http://cr.openjdk.java.net/~darcy/8039862.0/
In particular, it wasn't entirely clear that the fall through cases in
src/share/classes/sun/font/TrueTypeGlyphMapper.java were intended.
Thanks,
-Joe
--- old/src/share/classes/sun/font/SunFontManager.java 2014-04-09
19:47:22.000000000 -0700
+++ new/src/share/classes/sun/font/SunFontManager.java 2014-04-09
19:47:22.000000000 -0700
@@ -1160,6 +1160,7 @@
case FONTFORMAT_NATIVE:
NativeFont nf = new NativeFont(fileName, false);
physicalFont = addToFontList(nf, fontRank);
+ break;
default:
}
--- old/src/share/classes/sun/font/TrueTypeGlyphMapper.java 2014-04-09
19:47:23.000000000 -0700
+++ new/src/share/classes/sun/font/TrueTypeGlyphMapper.java 2014-04-09
19:47:23.000000000 -0700
@@ -109,6 +109,7 @@
cmap = CMap.theNullCmap;
}
+ @SuppressWarnings("fallthrough")
private final char remapJAChar(char unicode) {
switch (unicode) {
case REVERSE_SOLIDUS:
@@ -120,9 +121,11 @@
if (remapJAWaveDash) {
return JA_FULLWIDTH_TILDE_CHAR;
}
+ // Fall through okay?
default: return unicode;
}
}
+ @SuppressWarnings("fallthrough")
private final int remapJAIntChar(int unicode) {
switch (unicode) {
case REVERSE_SOLIDUS:
@@ -134,6 +137,7 @@
if (remapJAWaveDash) {
return JA_FULLWIDTH_TILDE_CHAR;
}
+ // Fall through okay?
default: return unicode;
}
}
--- old/src/solaris/classes/sun/java2d/x11/X11SurfaceData.java
2014-04-09 19:47:23.000000000 -0700
+++ new/src/solaris/classes/sun/java2d/x11/X11SurfaceData.java
2014-04-09 19:47:23.000000000 -0700
@@ -515,6 +515,7 @@
return getSurfaceType(gc, transparency, false);
}
+ @SuppressWarnings("fallthrough")
public static SurfaceType getSurfaceType(X11GraphicsConfig gc,
int transparency,
boolean pixmapSurface)
More information about the 2d-dev
mailing list