ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sbaill...@apache.org
Subject cvs commit: jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/optional/sitraka ClassFileTest.java
Date Mon, 28 Jan 2002 16:32:06 GMT
sbailliez    02/01/28 08:32:06

  Modified:    src/testcases/org/apache/tools/ant/taskdefs/optional/sitraka
                        ClassFileTest.java
  Log:
  - Get the class from the caller classloader.
  
  Revision  Changes    Path
  1.3       +2 -1      jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/optional/sitraka/ClassFileTest.java
  
  Index: ClassFileTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/optional/sitraka/ClassFileTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ClassFileTest.java	18 Nov 2001 01:09:41 -0000	1.2
  +++ ClassFileTest.java	28 Jan 2002 16:32:06 -0000	1.3
  @@ -72,7 +72,8 @@
   
       public void testVector() throws IOException {
           String classname = ClassTest.class.getName().replace('.', '/') + ".class";
  -        InputStream is = ClassLoader.getSystemResourceAsStream(classname);
  +        InputStream is = getClass().getClassLoader().getResourceAsStream(classname);
  +		assertNotNull("Unable to find resource " + classname + "in caller classloader");
           ClassFile clazzfile = new ClassFile(is);
           assertEquals("ClassTest", clazzfile.getName());
           assertEquals("ClassFileTest.java", clazzfile.getSourceFile());
  
  
  

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


Mime
View raw message