]> source.dussan.org Git - aspectj.git/commitdiff
pr 46671 ensure we don't look for source on the claspath (Andy's fix)
authoracolyer <acolyer>
Fri, 9 Jan 2004 09:52:07 +0000 (09:52 +0000)
committeracolyer <acolyer>
Fri, 9 Jan 2004 09:52:07 +0000 (09:52 +0000)
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java

index fb763ff6b0b91de21aa3e1511a4564d15a947285..79ba22f5f20ae1a112f6bc27dda650d6403754da 100644 (file)
@@ -271,7 +271,13 @@ public class AjBuildManager {
                String defaultEncoding = (String) buildConfig.getJavaOptions().get(CompilerOptions.OPTION_Encoding);
                if ("".equals(defaultEncoding)) //$NON-NLS-1$
                        defaultEncoding = null; //$NON-NLS-1$   
-               return new FileSystem(classpaths, filenames, defaultEncoding);
+               // Bug 46671: We need an array as long as the number of elements in the classpath - *even though* not every
+               // element of the classpath is likely to be a directory.  If we ensure every element of the array is set to
+               // only look for BINARY, then we make sure that for any classpath element that is a directory, we won't build
+               // a classpathDirectory object that will attempt to look for source when it can't find binary.
+               int[] classpathModes = new int[classpaths.length];
+               for (int i =0 ;i<classpaths.length;i++) classpathModes[i]=ClasspathDirectory.BINARY;
+               return new FileSystem(classpaths, filenames, defaultEncoding,classpathModes);
        }
        
        public IProblemFactory getProblemFactory() {