Revision: 7835
Author: r...@google.com
Date: Wed Mar 31 06:57:50 2010
Log: Remove JDK 1.6-isms; fix a checkstyle warning
Review at http://gwt-code-reviews.appspot.com/281801
Review by: sp...@google.com
http://code.google.com/p/google-web-toolkit/source/detail?r=7835
Modified:
/trunk/dev/core/src/com/google/gwt/core/linker/IFrameLinker.java
/trunk/user/test/com/google/gwt/precompress/linker/PrecompressLinkerTest.java
=======================================
--- /trunk/dev/core/src/com/google/gwt/core/linker/IFrameLinker.java Mon
Mar 29 05:13:55 2010
+++ /trunk/dev/core/src/com/google/gwt/core/linker/IFrameLinker.java Wed
Mar 31 06:57:50 2010
@@ -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";
=======================================
---
/trunk/user/test/com/google/gwt/precompress/linker/PrecompressLinkerTest.java
Mon Mar 29 07:02:30 2010
+++
/trunk/user/test/com/google/gwt/precompress/linker/PrecompressLinkerTest.java
Wed Mar 31 06:57:50 2010
@@ -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;
@@ -111,8 +111,6 @@
return jsProgram;
}
}
-
- private static final Charset UTF_8 = Charset.forName("UTF-8");
private static void assertEqualBytes(byte[] expected, byte[] actual) {
assertEquals(expected.length, actual.length);
@@ -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;
- }
- content = updated;
+ try {
+ byte[] content = fooFileContents().getBytes("UTF-8");
+ while (true) {
+ byte[] updated = compress(content);
+ if (updated.length >= content.length) {
+ return content;
+ }
+ content = updated;
+ }
+ } catch (UnsupportedEncodingException e) {
+ throw new RuntimeException(e.getMessage());
}
}
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors