Re: Java standard library retypings.
Daniel Bonniot <[email protected]> Sun, 27 Mar 2005 09:38:24 +0200
| Newsgroups | gmane.comp.lang.nice.devel |
|---|---|
| Message-ID | <[email protected]> |
> The lack of standard library retypings is exposed from time to time. > For example, recently I've found the following retypings missing: > > ?Throwable getCause(Throwable) = native Throwable Throwable.getCause(); Just to make things clear: you want this retyping to make sure that the result of getCause is tested against null? > ?java.io.InputStream getResourceAsStream(ClassLoader, String name) = > native java.io.InputStream ClassLoader.getResourceAsStream(String); Idem, and to make sure null is not passed as a name? > It seems practical to me to add such retypings into the standart library > as soon as they are discovered (without looking what other retypings > might be used for Throwable or ClassLoader). I have no problem with that. > The question is, if it is > okay to add them in such a way, then where should i place them? Is > "java.nice" sufficient to keep random dissimilar retypings? Yes. java-io.nice has been created to create some organization, it could be done for other packages if they need lots of retypings. Inside a retyping file, please try to keep things organized, and in particular to regroup all retypings for a class together. Daniel ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click