groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sun...@apache.org
Subject [groovy] 05/07: Java 8 refactor
Date Sat, 02 Nov 2019 20:29:17 GMT
This is an automated email from the ASF dual-hosted git repository.

sunlan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit 727bfb0d913efee4233c439ce8de0eea3913fea4
Author: Daniel Sun <sunlan@apache.org>
AuthorDate: Sun Nov 3 01:42:19 2019 +0800

    Java 8 refactor
---
 src/main/java/org/codehaus/groovy/reflection/ReflectionUtils.java | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/src/main/java/org/codehaus/groovy/reflection/ReflectionUtils.java b/src/main/java/org/codehaus/groovy/reflection/ReflectionUtils.java
index 0b8200f..64ec613 100644
--- a/src/main/java/org/codehaus/groovy/reflection/ReflectionUtils.java
+++ b/src/main/java/org/codehaus/groovy/reflection/ReflectionUtils.java
@@ -184,11 +184,7 @@ public class ReflectionUtils {
     }
 
     public static Optional<AccessibleObject> makeAccessibleInPrivilegedAction(final
AccessibleObject ao) {
-        return AccessController.doPrivileged(new PrivilegedAction<Optional<AccessibleObject>>()
{
-            public Optional<AccessibleObject> run() {
-                return makeAccessible(ao);
-            }
-        });
+        return AccessController.doPrivileged((PrivilegedAction<Optional<AccessibleObject>>)
() -> makeAccessible(ao));
     }
 
     // to be run in PrivilegedAction!


Mime
View raw message