commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vinaysahil chandran <sahilvi...@yahoo.com>
Subject [ALTRMI] ClassRetriever patch
Date Tue, 02 Apr 2002 19:30:21 GMT
Paul,
Patch to generate the exception correctly from
classretrievers.
[
getResourceStream does NOT raise any exception but
returns a 'null' InputStream on failure to find a
resource
]
Regards,
V i n a y


Index: PlainClassRetriever.java
===================================================================
RCS file:
/home/cvspublic/jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/server/impl/classretrievers/PlainClassRetriever.java,v
retrieving revision 1.3
diff -r1.3 PlainClassRetriever.java
53,58c53,56
<         try {
<             is =
mClassLoader.getResourceAsStream(thingName);
<         } catch (Exception e) {
<             throw new ClassRetrievalException(
<                 "Generated class not found in
classloader specified : " + e.getMessage());
<         }
---
>         is =
mClassLoader.getResourceAsStream(thingName);
> 		if(is==null)
>             throw new
ClassRetrievalException("Generated class for
"+thingName+" not found in specified classloader "  );
> 




__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://http://taxes.yahoo.com/

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message