comparison graal/com.oracle.max.base/src/com/sun/max/ide/JavaProject.java @ 4142:bc8527f3071c

Adjust code base to new level of warnings.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Sun, 18 Dec 2011 05:24:06 +0100
parents e233f5660da4
children fa6b78681c54
comparison
equal deleted inserted replaced
4141:04d21be7a24f 4142:bc8527f3071c
64 * class files produced by each of the projects that the current 64 * class files produced by each of the projects that the current
65 * project depends upon 65 * project depends upon
66 */ 66 */
67 public static Classpath getClassPath(Class projClass, boolean includeDependencies) { 67 public static Classpath getClassPath(Class projClass, boolean includeDependencies) {
68 String classfile = projClass.getName().replace('.', '/') + ".class"; 68 String classfile = projClass.getName().replace('.', '/') + ".class";
69 ArrayList<Entry> classPathEntries = new ArrayList<Entry>(); 69 ArrayList<Entry> classPathEntries = new ArrayList<>();
70 Entry projEntry = null; 70 Entry projEntry = null;
71 for (Entry entry : Classpath.fromSystem().entries()) { 71 for (Entry entry : Classpath.fromSystem().entries()) {
72 if (entry.contains(classfile)) { 72 if (entry.contains(classfile)) {
73 projEntry = entry; 73 projEntry = entry;
74 classPathEntries.add(entry); 74 classPathEntries.add(entry);
160 * Java source files for each of the projects that the current 160 * Java source files for each of the projects that the current
161 * project depends upon 161 * project depends upon
162 */ 162 */
163 public static Classpath getSourcePath(Class projClass, boolean includeDependencies) { 163 public static Classpath getSourcePath(Class projClass, boolean includeDependencies) {
164 final Classpath classPath = getClassPath(projClass, includeDependencies); 164 final Classpath classPath = getClassPath(projClass, includeDependencies);
165 final List<String> sourcePath = new LinkedList<String>(); 165 final List<String> sourcePath = new LinkedList<>();
166 for (Entry entry : classPath.entries()) { 166 for (Entry entry : classPath.entries()) {
167 WorkspaceFinder finder = new WorkspaceFinder(); 167 WorkspaceFinder finder = new WorkspaceFinder();
168 finder.deriveWorkspace(entry.file()); 168 finder.deriveWorkspace(entry.file());
169 final File projectDirectory = finder.project; 169 final File projectDirectory = finder.project;
170 if (projectDirectory != null) { 170 if (projectDirectory != null) {