aboutsummaryrefslogtreecommitdiffstats
path: root/tests/options
diff options
context:
space:
mode:
Diffstat (limited to 'tests/options')
-rw-r--r--tests/options/WarnDeprecated.java13
-rw-r--r--tests/options/deprecated/OldStuff.java8
-rw-r--r--tests/options/deprecated/WarnDeprecated.java18
3 files changed, 26 insertions, 13 deletions
diff --git a/tests/options/WarnDeprecated.java b/tests/options/WarnDeprecated.java
deleted file mode 100644
index e86b79522..000000000
--- a/tests/options/WarnDeprecated.java
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-public class WarnDeprecated {
-
- /** */
- public static void main(String[] args) {
- if (null == args) {
- String s = new String(new byte[] {}, 0); // CE 10 deprecated if warn:deprecated
- }
- }
-}
diff --git a/tests/options/deprecated/OldStuff.java b/tests/options/deprecated/OldStuff.java
new file mode 100644
index 000000000..4179ebf26
--- /dev/null
+++ b/tests/options/deprecated/OldStuff.java
@@ -0,0 +1,8 @@
+class OldStuff {
+
+ /**
+ * @deprecated
+ */
+ public static void foo() {}
+
+} \ No newline at end of file
diff --git a/tests/options/deprecated/WarnDeprecated.java b/tests/options/deprecated/WarnDeprecated.java
new file mode 100644
index 000000000..ac2a02226
--- /dev/null
+++ b/tests/options/deprecated/WarnDeprecated.java
@@ -0,0 +1,18 @@
+
+
+
+
+public class WarnDeprecated {
+
+ /** */
+ public static void main(String[] args) {
+ if (null == args) {
+ OldStuff.foo(); // CE 10 deprecated if warn:deprecated
+
+ // This is only picked up as a deprecation error when compiling against developer
+ // libraries, it will be ignored if compiling against the user jre libraries.
+ // We're not going to include this in the test suite for robustness of the suite.
+ //"hello".getBytes(0, 1, new byte[10], 0);
+ }
+ }
+}