diff options
Diffstat (limited to 'tests/options/deprecated')
-rw-r--r-- | tests/options/deprecated/OldStuff.java | 8 | ||||
-rw-r--r-- | tests/options/deprecated/WarnDeprecated.java | 18 |
2 files changed, 26 insertions, 0 deletions
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); + } + } +} |