[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-2d-dev
Subject:    Re: [OpenJDK 2D-Dev] JDK 9 RFR of JDK-8039862: Fix fallthrough lint warnings in 2d
From:       Joe Darcy <joe.darcy () oracle ! com>
Date:       2014-04-15 17:35:03
Message-ID: 534D6DC7.3050401 () oracle ! com
[Download RAW message or body]

*ping*

On 04/09/2014 07:51 PM, Joe Darcy wrote:
> 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)
>

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic