[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jboss-cvs-commits
Subject:    [jboss-cvs] jboss-aop/src/main/org/jboss/aop/standalone  ...
From:       Kabir Khan <kkhan () jboss ! com>
Date:       2005-11-30 22:44:19
Message-ID: E1EhagV-0000K6-FN () committer01 ! frg ! pub ! inap ! atl ! jboss ! com
[Download RAW message or body]

  User: kkhan   
  Date: 05/11/30 17:44:19

  Modified:    src/main/org/jboss/aop/standalone  Tag: Branch_AOP_1_3
                        Compiler.java
  Log:
  [JBAOP-64] Change way path is decoded from url before creating a file (the old way \
caused some problems in the bytecode annotation compiler)  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.12.2.4  +25 -15    jboss-aop/src/main/org/jboss/aop/standalone/Compiler.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Compiler.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-aop/src/main/org/jboss/aop/standalone/Compiler.java,v
  retrieving revision 1.12.2.3
  retrieving revision 1.12.2.4
  diff -u -b -r1.12.2.3 -r1.12.2.4
  --- Compiler.java	24 Aug 2005 13:56:42 -0000	1.12.2.3
  +++ Compiler.java	30 Nov 2005 22:44:19 -0000	1.12.2.4
  @@ -19,6 +19,7 @@
   import java.net.URI;
   import java.net.URL;
   import java.net.URLClassLoader;
  +import java.net.URLDecoder;
   import java.util.ArrayList;
   import java.util.HashMap;
   import java.util.Iterator;
  @@ -32,7 +33,7 @@
    * takes jar or class files and adds needed jboss bytecode
    *
    * @author <a href="mailto:bill@jboss.org">Bill Burke</a>
  - * @version $Revision: 1.12.2.3 $
  + * @version $Revision: 1.12.2.4 $
    */
   public class Compiler
   {
  @@ -296,6 +297,8 @@
   
      public void compileFile(CompilerClassInfo info) throws Exception
      {
  +         System.out.println("DDDDD");
  +         System.err.println("DDDDD");
         if (info.isCompiled())
         {
            return;
  @@ -316,10 +319,17 @@
            System.out.println("[warning] Unable to find " + info.getFile() + " \
within classpath.  Make sure all transforming classes are within classpath.");  \
return;  }
  -      URI uri = new URI(classUrl.toString());
  -      if (!uri.equals(info.getFile().toURI()))
  +
  +      String classUrlPath = URLDecoder.decode(classUrl.getFile(), "UTF-8");
  +      String infoPath = URLDecoder.decode(info.getFile().toString(), "UTF-8");
  +
  +      if (!classUrlPath.equals(infoPath))
         {
  -         System.out.println("[warning] Trying to compile " + info.getFile() + " \
and found it also within " + uri + " will not proceed. ");  +         \
System.out.println();  +         System.out.println("--------------------");
  +         System.out.println(classUrlPath);
  +         System.out.println(infoPath);
  +         System.out.println("[warning] Trying to compile " + info.getFile() + " \
and found it also within " + classUrl.getFile() + " will not proceed. ");  return;
         }
         byte[] bytes = AspectManager.instance().transform(loader, \
info.getClassName(), null, null, null);  @@ -328,7 +338,7 @@
            if (verbose) System.out.println("[no comp needed] " + info.getFile());
            return;
         }
  -      FileOutputStream os = new FileOutputStream(info.getFile());
  +      FileOutputStream os = new FileOutputStream(infoPath);
         os.write(bytes);
         os.close();
         info.setCompiled(true);
  
  
  


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
jboss-cvs-commits mailing list
jboss-cvs-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-cvs-commits


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic