Skip to content
Snippets Groups Projects
Verified Commit 0d7e4fea authored by akwizgran's avatar akwizgran
Browse files

Throw AssertionError to make intent clearer.

parent eb3983f6
No related branches found
No related tags found
No related merge requests found
...@@ -47,7 +47,7 @@ public class StringUtils { ...@@ -47,7 +47,7 @@ public class StringUtils {
try { try {
return s.getBytes("UTF-8"); return s.getBytes("UTF-8");
} catch (UnsupportedEncodingException e) { } catch (UnsupportedEncodingException e) {
throw new RuntimeException(e); throw new AssertionError(e);
} }
} }
...@@ -63,7 +63,7 @@ public class StringUtils { ...@@ -63,7 +63,7 @@ public class StringUtils {
try { try {
return decoder.decode(buffer).toString(); return decoder.decode(buffer).toString();
} catch (CharacterCodingException e) { } catch (CharacterCodingException e) {
throw new RuntimeException(e); throw new AssertionError(e);
} }
} }
......
...@@ -476,7 +476,7 @@ class ModemImpl implements Modem, WriteHandler, SerialPortEventListener { ...@@ -476,7 +476,7 @@ class ModemImpl implements Modem, WriteHandler, SerialPortEventListener {
try { try {
return decoder.decode(buffer).toString(); return decoder.decode(buffer).toString();
} catch (CharacterCodingException e) { } catch (CharacterCodingException e) {
throw new RuntimeException(e); throw new AssertionError(e);
} }
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment