Commit 6a949cda authored by Feng Xiao's avatar Feng Xiao

Remove usage of features not supported in Java 1.6.

parent 0eaae1e6
...@@ -38,7 +38,6 @@ import junit.framework.TestCase; ...@@ -38,7 +38,6 @@ import junit.framework.TestCase;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.io.IOException; import java.io.IOException;
import java.nio.charset.StandardCharsets;
/** /**
* Tests for {@link UnknownFieldSetLite}. * Tests for {@link UnknownFieldSetLite}.
...@@ -228,9 +227,9 @@ public class UnknownFieldSetLiteTest extends TestCase { ...@@ -228,9 +227,9 @@ public class UnknownFieldSetLiteTest extends TestCase {
assertEquals(foo, copyOfCopy); assertEquals(foo, copyOfCopy);
} }
public void testMalformedBytes() { public void testMalformedBytes() throws Exception {
try { try {
Foo.parseFrom("this is a malformed protocol buffer".getBytes(StandardCharsets.UTF_8)); Foo.parseFrom("this is a malformed protocol buffer".getBytes("UTF-8"));
fail(); fail();
} catch (InvalidProtocolBufferException e) { } catch (InvalidProtocolBufferException e) {
// Expected. // Expected.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment