Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTill Brychcy2019-03-01 20:46:10 +0000
committerTill Brychcy2019-03-26 20:13:24 +0000
commit716dc3e8bf36c9398625bc368b0e0fde4379794d (patch)
tree416271f0e84ac6e1840bb6a480fe7fc48ea86fa8 /org.eclipse.jdt.core.tests.compiler/src
parent3ae0f22df2dfdbd07a2f7c334d93801236b377de (diff)
downloadeclipse.jdt.core-716dc3e8bf36c9398625bc368b0e0fde4379794d.tar.gz
eclipse.jdt.core-716dc3e8bf36c9398625bc368b0e0fde4379794d.tar.xz
eclipse.jdt.core-716dc3e8bf36c9398625bc368b0e0fde4379794d.zip
Bug 541772 - In Eclipse 2018-09, Maven "runtime" scoped dependenciesI20190326-2305I20190326-1800
cause compilation errors even when not used Change-Id: I6689dbe42f75bc8285449b44e7e67db049ecca2f
Diffstat (limited to 'org.eclipse.jdt.core.tests.compiler/src')
-rw-r--r--org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java77
1 files changed, 77 insertions, 0 deletions
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java
index de0df414ab..6a2b6438dc 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java
@@ -52421,4 +52421,81 @@ public void testBug532653() {
});
}
}
+public void testBug541772() {
+ runConformTest(
+ new String[] {
+ "bug541772Runtime/GeneratedMessage.java",
+ "package bug541772Runtime;\n" +
+ "\n" +
+ "public class GeneratedMessage {\n" +
+ " public class Builder<T> {\n" +
+ " }\n" +
+ "}\n" +
+ "",
+ },
+ "",
+ getCompilerOptions()
+ );
+
+ runConformTest(
+ new String[] {
+ "token/Token.java",
+ "package token;\n" +
+ "\n" +
+ "public class Token {\n" +
+ " \n" +
+ " public Token() {\n" +
+ " }\n" +
+ "\n" +
+ " public Token(TokenProto tokenPB) {\n" +
+ " tokenPB.hashCode();\n" +
+ " }\n" +
+ " public Token(String x) {\n" +
+ " x.hashCode();\n" +
+ " }\n" +
+ "}\n" +
+ "",
+ "token/TokenProto.java",
+ "package token;\n" +
+ "\n" +
+ "import bug541772Runtime.GeneratedMessage;\n" +
+ "\n" +
+ "public class TokenProto {\n" +
+ "\n" +
+ " public TokenProto(GeneratedMessage.Builder<?> builder) {\n" +
+ " builder.hashCode();\n" +
+ " }\n" +
+ "}\n" +
+ "",
+ },
+ "",
+ null /*classLibraries*/,
+ false /*shouldFlushOutputDirectory*/,
+ null /*vmArguments*/,
+ getCompilerOptions(),
+ null /*customRequestor*/);
+
+ Util.flushDirectoryContent(new File(OUTPUT_DIR + File.separator + "bug541772Runtime"));
+
+ runConformTest(
+ new String[] {
+ "pkg/Example.java",
+ "package pkg;\n" +
+ "\n" +
+ "import token.Token;\n" +
+ "\n" +
+ "public abstract class Example {\n" +
+ " public static void setConnectorInfo() {\n" +
+ " new Token(\"\");\n" +
+ " }\n" +
+ "}\n" +
+ "",
+ },
+ "",
+ null /*classLibraries*/,
+ false /*shouldFlushOutputDirectory*/,
+ null /*vmArguments*/,
+ getCompilerOptions(),
+ null /*customRequestor*/);
+}
}

Back to the top