commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hamm...@apache.org
Subject cvs commit: jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/server/impl/classretrievers PlainClassRetriever.java
Date Tue, 02 Apr 2002 22:04:49 GMT
hammant     02/04/02 14:04:49

  Modified:    altrmi/src/java/org/apache/commons/altrmi/server/impl/classretrievers
                        PlainClassRetriever.java
  Log:
  Patch for null stream from Vinay
  
  Revision  Changes    Path
  1.4       +5 -6      jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/server/impl/classretrievers/PlainClassRetriever.java
  
  Index: PlainClassRetriever.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/server/impl/classretrievers/PlainClassRetriever.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- PlainClassRetriever.java	27 Jan 2002 15:47:40 -0000	1.3
  +++ PlainClassRetriever.java	2 Apr 2002 22:04:49 -0000	1.4
  @@ -20,7 +20,8 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.3 $
  + * @author Vinay Chandrasekharan <a href="mailto:vinay_chandran@users.sourceforge.net">vinay_chandran@users.sourceforge.net</a>
  + * @version $Revision: 1.4 $
    */
   public class PlainClassRetriever extends AbstractClassRetriever {
   
  @@ -50,11 +51,9 @@
   
           InputStream is = null;
   
  -        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 ");
           }
   
           ByteArrayOutputStream baos = new ByteArrayOutputStream();
  
  
  

--
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