basil opened a new pull request, #309: URL: https://github.com/apache/commons-fileupload/pull/309
Not sure why this API has calling conventions that vary so drastically from method to method. Since this is still in M2 stage, it seems like it is still not too late to fix this. One problem with the existing code is that it violates [Effective Java 3rd Edition §74](https://books.google.com/books?id=BIpDDwAAQBAJ), which says: > Use the Javadoc `@throws` tag to document each exception that a method can throw, but do _not_ use the `throws` keyword on unchecked exceptions. Another problem with the existing code is that `FileItem#getString(Charset)` is inconsistent with `FileItem#getString()`—one declares `throws IOException` while the other does not, yet it is not obvious how the presence of a `Charset` argument should cause any difference in calling convention. Yet another problem with the existing code is that `DiskFileItem#getString(java.nio.charset.Charset)` claims to throw `IOException` but is actually implemented with `DiskFileItem#get()` which actually throws `UncheckedIOException`. This PR fixes all of these problems by eliminating any usages of `UncheckedIOException` in favor of simple usages of `throws IOException`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org