test/tools/javac/6508981/TestInferBinaryName.java

changeset 882
3d45cc94ee0f
parent 554
9d9f26857129
child 923
6970d9fb8e02
equal deleted inserted replaced
881:4ce95dc0b908 882:3d45cc94ee0f
1 /* 1 /*
2 * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2008, 2011 Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
136 JavaFileManager getFileManager(String classpathProperty, 136 JavaFileManager getFileManager(String classpathProperty,
137 boolean symFileKind, 137 boolean symFileKind,
138 boolean zipFileIndexKind) 138 boolean zipFileIndexKind)
139 throws IOException { 139 throws IOException {
140 Context ctx = new Context(); 140 Context ctx = new Context();
141 Options options = Options.instance(ctx);
141 // uugh, ugly back door, should be cleaned up, someday 142 // uugh, ugly back door, should be cleaned up, someday
142 if (zipFileIndexKind == USE_ZIP_FILE_INDEX) 143 if (zipFileIndexKind == USE_ZIP_FILE_INDEX)
143 System.clearProperty("useJavaUtilZip"); 144 options.put("useOptimizedZip", "true");
144 else 145
145 System.setProperty("useJavaUtilZip", "true");
146 Options options = Options.instance(ctx);
147 if (symFileKind == IGNORE_SYMBOL_FILE) 146 if (symFileKind == IGNORE_SYMBOL_FILE)
148 options.put("ignore.symbol.file", "true"); 147 options.put("ignore.symbol.file", "true");
149 JavacFileManager fm = new JavacFileManager(ctx, false, null); 148 JavacFileManager fm = new JavacFileManager(ctx, false, null);
150 List<File> path = getPath(System.getProperty(classpathProperty)); 149 List<File> path = getPath(System.getProperty(classpathProperty));
151 fm.setLocation(CLASS_PATH, path); 150 fm.setLocation(CLASS_PATH, path);

mercurial