Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Methods do not declare that they throw IOException #8
I noticed the other day that an IOException can be thrown by certain methods, but on the Java side the methods are not declared as throwing an IOException.
We have a few options:
Related to not throwing IOException, we can throw an IOException if we mess up something on the JNI side - if we can't find our handle we will throw an IOException, whereas we should really throw something like BadProgrammingException(subclass of RuntimeException).
java.net.Socket can throw an IOException when creating, so simply changing all of the method signatures should work fine. It's a little ugly at that point unfortunately. :(
Since all of our