Unverified Commit 12b4f7de authored by Neil C Smith's avatar Neil C Smith Committed by GitHub
Browse files

Merge pull request #2720 from jlahoda/fod-openjdk-project

Fixing a mistake in ergonomics project detection, so that it can detect OpenJDK projects.
parents 53f76f45 b3072599
......@@ -150,6 +150,8 @@ implements ProjectFactory, PropertyChangeListener, Runnable {
return false;
}
relative = relative.substring(pos);
if (relative.contains("*")) {
for (String segment : relative.split("/")) {
FOUND: if (segment.contains("*")) {
......
......@@ -43,6 +43,20 @@ public class FeatureProjectFactoryTest {
assertTrue(isProject(yes1, relative));
}
@Test
public void recognizeParentPath() throws IOException {
FileObject root = FileUtil.createMemoryFileSystem().getRoot();
FileObject src = FileUtil.createFolder(root, "src");
FileObject marker = FileUtil.createFolder(src, "marker");
FileObject other = FileUtil.createFolder(src, "other");
final String relative = "../marker";
assertFalse(isProject(src, relative));
assertTrue(isProject(marker, relative));
assertTrue(isProject(other, relative));
}
private static FileObject prj(FileObject root, String base, String mx, String file) throws IOException {
return root.createFolder(base).createFolder(mx).createData(file).getParent().getParent();
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment