Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJayaprakash Arthanareeswaran2014-01-24 04:35:22 +0000
committerJayaprakash Arthanareeswaran2014-01-24 04:35:22 +0000
commit328fb2ac2aedb028037d1ad93f05fcf58a4a2705 (patch)
tree42150d1efb87e52a447242fde57d02705c964395 /org.eclipse.jdt.compiler.tool.tests
parent1394edf1116ec1563c76f21ce03154bae6bb9472 (diff)
downloadeclipse.jdt.core-328fb2ac2aedb028037d1ad93f05fcf58a4a2705.tar.gz
eclipse.jdt.core-328fb2ac2aedb028037d1ad93f05fcf58a4a2705.tar.xz
eclipse.jdt.core-328fb2ac2aedb028037d1ad93f05fcf58a4a2705.zip
Fixed Bug 426480 - EclipseFileManager#getJavaFileObjectsFromFiles allows
directories
Diffstat (limited to 'org.eclipse.jdt.compiler.tool.tests')
-rw-r--r--org.eclipse.jdt.compiler.tool.tests/src/org/eclipse/jdt/compiler/tool/tests/CompilerToolTests.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/org.eclipse.jdt.compiler.tool.tests/src/org/eclipse/jdt/compiler/tool/tests/CompilerToolTests.java b/org.eclipse.jdt.compiler.tool.tests/src/org/eclipse/jdt/compiler/tool/tests/CompilerToolTests.java
index ff0640317f..a291cfee95 100644
--- a/org.eclipse.jdt.compiler.tool.tests/src/org/eclipse/jdt/compiler/tool/tests/CompilerToolTests.java
+++ b/org.eclipse.jdt.compiler.tool.tests/src/org/eclipse/jdt/compiler/tool/tests/CompilerToolTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2013 IBM Corporation and others.
+ * Copyright (c) 2006, 2014 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -878,6 +878,16 @@ static final String[] FAKE_ZERO_ARG_OPTIONS = new String[] {
builder.append(name.substring(lastIndexOf + 1));
}
assertEquals("Wrong contents", "X.java", String.valueOf(builder));
+
+ List<File> files = new ArrayList<File>();
+ files.add(dir);
+ try {
+ fileManager.getJavaFileObjectsFromFiles(files);
+ fail("IllegalArgumentException should be thrown but not");
+ } catch(IllegalArgumentException iae) {
+ // Do nothing
+ }
+
fileManager.close();
} catch (IOException e) {
e.printStackTrace();

Back to the top