Skip to content
Permalink
Browse files
minor refactor: remove some deprecation warnings
  • Loading branch information
paulk-asert committed Apr 18, 2022
1 parent 0a45799 commit c38a78c371cbed1280d92e9481c306b8822e4fae
Showing 2 changed files with 2 additions and 0 deletions.
@@ -392,6 +392,7 @@ private static void validate(GroovyCodeSource codeSource) {
}
}

@SuppressWarnings("deprecation") // TODO replace getPackage with getDefinedPackage once min JDK version >= 9
private void definePackageInternal(String className) {
int i = className.lastIndexOf('.');
if (i != -1) {
@@ -211,6 +211,7 @@ public static Optional<AccessibleObject> makeAccessibleInPrivilegedAction(final
}

// to be run in PrivilegedAction!
@SuppressWarnings("deprecation") // replace isAccessible with canAccess once min JDK version >= 9
public static Optional<AccessibleObject> makeAccessible(final AccessibleObject ao) {
try {
if (ao.isAccessible() || trySetAccessible(ao)) {

0 comments on commit c38a78c

Please sign in to comment.