Remove JDK 1.6-isms; fix a checkstyle warning

Review at http://gwt-code-reviews.appspot.com/281801

Review by: spoon@google.com

git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@7835 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/dev/core/src/com/google/gwt/core/linker/IFrameLinker.java b/dev/core/src/com/google/gwt/core/linker/IFrameLinker.java
index ccc283c..bde9dd6 100644
--- a/dev/core/src/com/google/gwt/core/linker/IFrameLinker.java
+++ b/dev/core/src/com/google/gwt/core/linker/IFrameLinker.java
@@ -58,7 +58,7 @@
 
   /**
    * A configuration property that can be used to have the linker load from
-   * somewhere other than {@link #FRAGMENT_SUBDIR}
+   * somewhere other than {@link #FRAGMENT_SUBDIR}.
    */
   private static final String PROP_FRAGMENT_SUBDIR_OVERRIDE = "iframe.linker.deferredjs.subdir";
 
diff --git a/user/test/com/google/gwt/precompress/linker/PrecompressLinkerTest.java b/user/test/com/google/gwt/precompress/linker/PrecompressLinkerTest.java
index 2c96f21..ddd9a53 100644
--- a/user/test/com/google/gwt/precompress/linker/PrecompressLinkerTest.java
+++ b/user/test/com/google/gwt/precompress/linker/PrecompressLinkerTest.java
@@ -30,7 +30,7 @@
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
-import java.nio.charset.Charset;
+import java.io.UnsupportedEncodingException;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
@@ -112,8 +112,6 @@
     }
   }
 
-  private static final Charset UTF_8 = Charset.forName("UTF-8");
-
   private static void assertEqualBytes(byte[] expected, byte[] actual) {
     assertEquals(expected.length, actual.length);
     for (int i = 0; i < expected.length; i++) {
@@ -173,7 +171,11 @@
   }
 
   private static SyntheticArtifact emit(String path, String contents) {
-    return emit(path, contents.getBytes(UTF_8));
+    try {
+      return emit(path, contents.getBytes("UTF-8"));
+    } catch (UnsupportedEncodingException e) {
+      throw new RuntimeException(e.getMessage());
+    }
   }
 
   private static SyntheticArtifact emitPrivate(String string, String contents) {
@@ -204,13 +206,17 @@
   }
 
   private static byte[] uncompressibleContent() {
-    byte[] content = fooFileContents().getBytes(UTF_8);
-    while (true) {
-      byte[] updated = compress(content);
-      if (updated.length >= content.length) {
-        return content;
+    try {
+      byte[] content = fooFileContents().getBytes("UTF-8");
+      while (true) {
+        byte[] updated = compress(content);
+        if (updated.length >= content.length) {
+          return content;
+        }
+        content = updated;
       }
-      content = updated;
+    } catch (UnsupportedEncodingException e) {
+      throw new RuntimeException(e.getMessage());
     }
   }