Convert to legacy Throwable.initCause()

This commit is contained in:
Ruben Dijkstra
2016-03-12 21:58:27 +01:00
parent 755d5f77ea
commit f9014dbab3

View File

@@ -1152,7 +1152,7 @@ public class GHRepository extends GHObject {
try {
payload = content.getBytes("UTF-8");
} catch (UnsupportedEncodingException ex) {
throw new IOException("UTF-8 encoding is not supported", ex);
throw (IOException) new IOException("UTF-8 encoding is not supported").initCause(ex);
}
return createContent(payload, commitMessage, path, branch);
}