176 StandardJavaFileManager fm = createFileManager(fk == FileKind.ZIP); |
176 StandardJavaFileManager fm = createFileManager(fk == FileKind.ZIP); |
177 fm.setLocation(StandardLocation.CLASS_PATH, Arrays.asList(classpath)); |
177 fm.setLocation(StandardLocation.CLASS_PATH, Arrays.asList(classpath)); |
178 return fm; |
178 return fm; |
179 } |
179 } |
180 |
180 |
181 JavacFileManager createFileManager(boolean useOptimedZipIndex) { |
181 JavacFileManager createFileManager(boolean useOptimizedZip) { |
182 Context ctx = new Context(); |
182 Context ctx = new Context(); |
183 if (useOptimedZipIndex) { |
183 Options options = Options.instance(ctx); |
184 Options options = Options.instance(ctx); |
184 options.put("useOptimizedZip", Boolean.toString(useOptimizedZip)); |
185 options.put("useOptimizedZip", "true"); |
|
186 } |
|
187 return new JavacFileManager(ctx, false, null); |
185 return new JavacFileManager(ctx, false, null); |
188 } |
186 } |
189 |
187 |
190 // create a directory containing a given set of paths |
188 // create a directory containing a given set of paths |
191 void createTestDir(File dir, String[] paths) throws IOException { |
189 void createTestDir(File dir, String[] paths) throws IOException { |