aboutsummaryrefslogtreecommitdiff
path: root/java/src/test/java/com/google/protobuf/TextFormatTest.java
diff options
context:
space:
mode:
authorTamir Duberstein <tamird@gmail.com>2015-03-31 20:01:43 -0700
committerTamir Duberstein <tamird@gmail.com>2015-04-02 15:06:00 -0700
commit210de285d7ca5e4d4e96867c1c04308d68c5d4dd (patch)
tree983ab06e7e3a37e38a5d6c1768c15f50246df5d3 /java/src/test/java/com/google/protobuf/TextFormatTest.java
parente84893f6768f136cc86e2db69fc1d40ff2be7e3b (diff)
downloadprotobuf-210de285d7ca5e4d4e96867c1c04308d68c5d4dd.tar.gz
protobuf-210de285d7ca5e4d4e96867c1c04308d68c5d4dd.tar.bz2
protobuf-210de285d7ca5e4d4e96867c1c04308d68c5d4dd.zip
DRY: Use `Charset` statics to eliminate exceptions
Diffstat (limited to 'java/src/test/java/com/google/protobuf/TextFormatTest.java')
-rw-r--r--java/src/test/java/com/google/protobuf/TextFormatTest.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/java/src/test/java/com/google/protobuf/TextFormatTest.java b/java/src/test/java/com/google/protobuf/TextFormatTest.java
index 07c2b833..5d846646 100644
--- a/java/src/test/java/com/google/protobuf/TextFormatTest.java
+++ b/java/src/test/java/com/google/protobuf/TextFormatTest.java
@@ -243,8 +243,8 @@ public class TextFormatTest extends TestCase {
* characters. The characters are converted directly to bytes, *not*
* encoded using UTF-8.
*/
- private ByteString bytes(String str) throws Exception {
- return ByteString.copyFrom(str.getBytes("ISO-8859-1"));
+ private ByteString bytes(String str) {
+ return ByteString.copyFrom(str.getBytes(Internal.ISO_8859_1));
}
/**