uschindler commented on a change in pull request #1849:
URL: https://github.com/apache/lucene-solr/pull/1849#discussion_r485711771



##########
File path: 
lucene/core/src/java/org/apache/lucene/codecs/lucene87/BugfixDeflater_JDK8252739.java
##########
@@ -40,7 +42,9 @@ public static Deflater createDeflaterInstance(int level, 
boolean nowrap, int dic
       throw new IllegalArgumentException("dictLength must be >= 0");
     }
     if (IS_BUGGY_JDK) {
-      return new BugfixDeflater_JDK8252739(level, nowrap, dictLength);
+      // Some JDKs need "accessDeclaredMembers" privileges to create a 
Deflater object
+      return AccessController.doPrivileged(
+              (PrivilegedAction<BugfixDeflater_JDK8252739>) () -> new 
BugfixDeflater_JDK8252739(level, nowrap, dictLength));

Review comment:
       At least this should be `PrivilegedAction<Deflater>`, because that's 
what we return.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to