On 11/23/05, Martin Cooper <[EMAIL PROTECTED]> wrote: > On 11/22/05, Niall Pemberton <[EMAIL PROTECTED]> wrote: > > > > I've refreshed the Commons Resources site, sorted most the checkstyle > > issues > > and sorted a couple of build issues. AFAIK its pretty much ready for a > > release. except for a couple of things: > > > > 1) Quite a few methods are declaring in the javadoc that they throw > > RuntimeExceptions, which are coming out on the checkstyle: > > http://jakarta.apache.org/commons/resources/checkstyle-report.html > > > > My preferenc is to removed these, but I can understand why they were put > > in. > > Opinions? > > > I think the code should say what it means. ;-) Looking at Resources.java, > the init() and destroy() methods declare that they throw ResourcesException > (and Javadoc that). All of the other methods do not declare that they throw > that exception, but the Javadocs say they do. If they really do (or can), > then they should declare that. If they don't, then we should remove the > Javadocs. > <snip/>
IMO, the public contract implied by the Resources interface means its only fitting that all get*() methods in that interface as well as all interface implementations declare that they throw ResourcesKeyException. I think that the more generic ResourcesException was meant to wrap any underlying RuntimeException (other than MissingResourceException), and I've no preference about declaring that. Indeed, there is only one place where a ResourcesException is ever thrown in the (non-test) codebase [1], and that behavior will need to be consistently applied elsewhere as appropriate, or the single occurence removed. As I was looking at ResourcesException, I also find that it redundantly implements Serializable [2], since all Throwable's are (expected to be) Serializable anyway. Unfortunately, given the long weekend, I'm about to step out and I won't have access to a development machine for almost a week, so sorry about not being able to immediately help in any of the things I've pointed out. If these or other things (including item 2 below) need any attention after I'm back, I'd be happy to join the fun via proposed Bugzilla patches. -Rahul [1] http://jakarta.apache.org/commons/resources/xref/org/apache/commons/resources/impl/ResourceBundleResources.html#342 [2] http://jakarta.apache.org/commons/resources/xref/org/apache/commons/resources/ResourcesException.html#32 > My tuppence. > > -- > Martin Cooper > > > 2) Rahul raised an issue with JDBCResources on the commons-user list: > > > > > > http://www.mail-archive.com/commons-user%40jakarta.apache.org/msg13618.html > > > > Is there anything else needs doing before cutting a release candidate? > > Would > > it be useful to provide a more detailled description of the changes I've > > made? > > > > Niall > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]