< prev index next >

src/java.desktop/share/classes/sun/font/CMap.java

Print this page
rev 60042 : 8248802: Add log helper methods to FontUtilities.java

@@ -399,13 +399,11 @@
             subtableLength = buffer.getChar(offset+2);
         } else {
             subtableLength = buffer.getInt(offset+4) & INTMASK;
         }
         if (offset+subtableLength > buffer.capacity()) {
-            if (FontUtilities.isLogging()) {
-                FontUtilities.getLogger().warning("Cmap subtable overflows buffer.");
-            }
+            FontUtilities.logWarning("Cmap subtable overflows buffer.");
         }
         switch (subtableFormat) {
         case 0:  return new CMapFormat0(buffer, offset);
         case 2:  return new CMapFormat2(buffer, offset, xlat);
         case 4:  return new CMapFormat4(buffer, offset, xlat);

@@ -421,14 +419,11 @@
     private void createUVS(ByteBuffer buffer, int offset) {
         int subtableFormat = buffer.getChar(offset);
         if (subtableFormat == 14) {
             long subtableLength = buffer.getInt(offset + 2) & INTMASK;
             if (offset + subtableLength > buffer.capacity()) {
-                if (FontUtilities.isLogging()) {
-                    FontUtilities.getLogger()
-                            .warning("Cmap UVS subtable overflows buffer.");
-                }
+                FontUtilities.logWarning("Cmap UVS subtable overflows buffer.");
             }
             try {
                 this.uvs = new UVS(buffer, offset);
             } catch (Throwable t) {
                 t.printStackTrace();
< prev index next >