You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2022/03/16 12:25:18 UTC

[GitHub] [nifi] exceptionfactory opened a new pull request #5870: NIFI-9281 Enable Building on Java 17

exceptionfactory opened a new pull request #5870:
URL: https://github.com/apache/nifi/pull/5870


   #### Description of PR
   
   NIFI-9281 Updates a number of tests and several dependencies to support building the project on Java 17. The majority of the changes involve adjustments to unit tests in order to avoid illegal reflective access, which throws an error by default on Java 17. 
   
   Dependency updates include upgrading the Maven WAR Plugin, the QuestDB driver for NiFi Framework status history, and the version of Groovy used in several Graph Processors. The GitHub actions workflow includes a new build target for Java 17 on Ubuntu Linux.
   
   Although these changes enable a build across the project, some extension components may require further changes for full runtime support. Additional changes for particular components can be addressed in subsequent pull requests.
   
   The following list summarizes the changes:
   
   - Added Ubuntu Zulu JDK 17 GitHub build
   - Adjusted MiNiFi C2 FileSystemConfigurationCache test to avoid using environment variables
   - Adjusted MiNiFi StatusLogger and StatusLoggerTest to avoid overriding private logger
   - Adjusted failure reason attribute check in TestGetIgniteCache
   - Adjusted TestRangerAuthorizer and TestRangerNiFiAuthorizer to avoid checking nested exceptions
   - Adjusted encrypt-config TestUtil to avoid unnecessary comparison of different types
   - Disabled Javascript tests on Java 15 and higher due to removal of Nashorn from the JRE
   - Disabled several Hive 3 tests on Java 17 for StringInternUtils illegal access
   - Refactored nifi-enrich-processors tests to use Mockito without Powermock
   - Refactored nifi-toolkit-tls tests to avoid illegal reflective access
   - Removed deprecated X509Certificate test in CertificateUtilsTest
   - Removed kryo serialization from nifi-site-to-site-client test
   - Updated TestHashContent to use SHA-1 instead of SHA for hash algorithm
   - Upgraded maven-war-plugin from 2.5 to 3.3.2
   - Upgraded nifi-graph-bundle dependencies from Groovy 2.5.14 to 3.0.8
   - Upgraded QuestDB from 4.2.1 to 6.2.1 in nifi-framework-core
   
   In order to streamline the review of the contribution we ask you
   to ensure the following steps have been taken:
   
   ### For all changes:
   - [X] Is there a JIRA ticket associated with this PR? Is it referenced 
        in the commit message?
   
   - [X] Does your PR title start with **NIFI-XXXX** where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
   
   - [X] Has your PR been rebased against the latest commit within the target branch (typically `main`)?
   
   - [X] Is your initial contribution a single, squashed commit? _Additional commits in response to PR reviewer feedback should be made on this branch and pushed to allow change tracking. Do not `squash` or use `--force` when pushing to allow for clean monitoring of changes._
   
   ### For code changes:
   - [X] Have you ensured that the full suite of tests is executed via `mvn -Pcontrib-check clean install` at the root `nifi` folder?
   - [X] Have you written or updated unit tests to verify your changes?
   - [X] Have you verified that the full build is successful on JDK 8?
   - [X] Have you verified that the full build is successful on JDK 11?
   - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)?
   - [ ] If applicable, have you updated the `LICENSE` file, including the main `LICENSE` file under `nifi-assembly`?
   - [ ] If applicable, have you updated the `NOTICE` file, including the main `NOTICE` file found under `nifi-assembly`?
   - [ ] If adding new Properties, have you added `.displayName` in addition to .name (programmatic access) for each of the new properties?
   
   ### For documentation related changes:
   - [ ] Have you ensured that format looks appropriate for the output in which it is rendered?
   
   ### Note:
   Please ensure that once the PR is submitted, you check GitHub Actions CI for build issues and submit an update to your PR as soon as possible.
   


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

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



[GitHub] [nifi] exceptionfactory commented on a change in pull request #5870: NIFI-9281 Enable Building on Java 17

Posted by GitBox <gi...@apache.org>.
exceptionfactory commented on a change in pull request #5870:
URL: https://github.com/apache/nifi/pull/5870#discussion_r828495675



##########
File path: nifi-nar-bundles/nifi-enrich-bundle/nifi-enrich-processors/src/test/java/org/apache/nifi/processors/TestISPEnrichIP.java
##########
@@ -252,8 +240,6 @@ public void whenInetAddressThrowsUnknownHostFlowFileShouldBeSentToNotFound() thr
         final Map<String, String> attributes = new HashMap<>();
         attributes.put("ip", "somenonexistentdomain.comm");
 
-        when(InetAddress.getByName("somenonexistentdomain.comm")).thenThrow(UnknownHostException.class);

Review comment:
       The purpose of this mock was to ensure that this lookup would always throw an `UnknownHostException`.  Unfortunately, static mocking can be problematic in some cases.  Removing the mock resulted in the expected exception being thrown.




-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

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



[GitHub] [nifi] greyp9 commented on a change in pull request #5870: NIFI-9281 Enable Building on Java 17

Posted by GitBox <gi...@apache.org>.
greyp9 commented on a change in pull request #5870:
URL: https://github.com/apache/nifi/pull/5870#discussion_r828322872



##########
File path: nifi-commons/nifi-site-to-site-client/src/test/java/org/apache/nifi/remote/client/socket/TestSiteToSiteClient.java
##########
@@ -16,89 +16,18 @@
  */
 package org.apache.nifi.remote.client.socket;
 
-import com.esotericsoftware.kryo.Kryo;
-import com.esotericsoftware.kryo.io.Input;
-import com.esotericsoftware.kryo.io.Output;
-import org.apache.nifi.components.state.StateManager;
 import org.apache.nifi.remote.client.SiteToSiteClient;
 import org.apache.nifi.remote.client.SiteToSiteClientConfig;
 import org.junit.jupiter.api.Test;
-import org.mockito.Mockito;
 
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
 import java.util.LinkedHashSet;
 import java.util.Set;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertNotNull;
-import static org.junit.jupiter.api.Assertions.assertNull;
 
 public class TestSiteToSiteClient {
 
-    @Test
-    public void testSerialization() {
-        final SiteToSiteClientConfig clientConfig = new SiteToSiteClient.Builder()
-                .url("http://localhost:8080/nifi")
-                .portName("input")
-                .buildConfig();
-
-        final Kryo kryo = new Kryo();
-
-        final ByteArrayOutputStream out = new ByteArrayOutputStream();
-        final Output output = new Output(out);
-
-        try {
-            kryo.writeObject(output, clientConfig);
-        } finally {
-            output.close();
-        }
-
-        final ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());
-        final Input input = new Input(in);
-
-        try {
-            SiteToSiteClientConfig clientConfig2 = kryo.readObject(input, SiteToSiteClient.StandardSiteToSiteClientConfig.class);
-            assertEquals(clientConfig.getUrls(), clientConfig2.getUrls());
-        } finally {
-            input.close();
-        }
-    }
-
-    @Test
-    public void testSerializationWithStateManager() {
-        final StateManager stateManager = Mockito.mock(StateManager.class);
-        final SiteToSiteClientConfig clientConfig = new SiteToSiteClient.Builder()
-            .url("http://localhost:8080/nifi")
-            .portName("input")
-            .stateManager(stateManager)
-            .buildConfig();
-
-        final Kryo kryo = new Kryo();
-
-        final ByteArrayOutputStream out = new ByteArrayOutputStream();
-        final Output output = new Output(out);
-
-        try {
-            kryo.writeObject(output, clientConfig);
-        } finally {
-            output.close();
-        }
-
-        final ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());
-        final Input input = new Input(in);
-
-        try {
-            SiteToSiteClientConfig clientConfig2 = kryo.readObject(input, SiteToSiteClient.StandardSiteToSiteClientConfig.class);
-            assertEquals(clientConfig.getUrls(), clientConfig2.getUrls());
-            // Serialization works, but the state manager is not serialized.
-            assertNotNull(clientConfig.getStateManager());
-            assertNull(clientConfig2.getStateManager());
-        } finally {
-            input.close();
-        }
-    }
-
+    @SuppressWarnings("deprecation")

Review comment:
       There seems to be a good deal of alternate test coverage for the three nifi classes under test here.  But another option would be to replace the problematic `com.esotericsoftware` usage.  (just making notes...)

##########
File path: nifi-nar-bundles/nifi-hive-bundle/nifi-hive3-processors/src/test/java/org/apache/hive/streaming/TestNiFiRecordSerDe.java
##########
@@ -43,6 +45,7 @@
 import static org.junit.jupiter.api.Assertions.assertArrayEquals;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 
+@DisabledOnJre(value = JRE.JAVA_17, disabledReason = "Hive3 StringInternUtils illegal reflective access")

Review comment:
       Definitely a benefit of moving to junit 5!

##########
File path: nifi-registry/nifi-registry-extensions/nifi-registry-ranger/nifi-registry-ranger-plugin/src/test/java/org/apache/nifi/registry/ranger/TestRangerAuthorizer.java
##########
@@ -220,26 +204,7 @@ public void testKerberosEnabledWithoutKeytabOrPrincipal() {
         when(registryProperties.getKerberosServiceKeytabLocation()).thenReturn("");
         when(registryProperties.getKerberosServicePrincipal()).thenReturn("");
 
-        try {
-            setup(registryProperties, mock(UserGroupProvider.class), configurationContext);
-            Assert.fail("Should have thrown exception");
-        } catch (SecurityProviderCreationException e) {
-            // want to make sure this exception is from our authorizer code
-            verifyOnlyAuthorizeCreationExceptions(e);
-        }
-    }
-
-    private void verifyOnlyAuthorizeCreationExceptions(SecurityProviderCreationException e) {
-        boolean foundOtherException = false;
-        Throwable cause = e.getCause();
-        while (cause != null) {
-            if (!(cause instanceof SecurityProviderCreationException)) {
-                foundOtherException = true;
-                break;
-            }
-            cause = cause.getCause();
-        }
-        assertFalse(foundOtherException);
+        assertThrows(SecurityProviderCreationException.class, () -> setup(registryProperties, mock(UserGroupProvider.class), configurationContext));

Review comment:
       Are we losing anything significant here?

##########
File path: nifi-nar-bundles/nifi-enrich-bundle/nifi-enrich-processors/src/test/java/org/apache/nifi/processors/TestISPEnrichIP.java
##########
@@ -252,8 +240,6 @@ public void whenInetAddressThrowsUnknownHostFlowFileShouldBeSentToNotFound() thr
         final Map<String, String> attributes = new HashMap<>();
         attributes.put("ip", "somenonexistentdomain.comm");
 
-        when(InetAddress.getByName("somenonexistentdomain.comm")).thenThrow(UnknownHostException.class);

Review comment:
       Why don't we need the `Mockito.when` anymore?

##########
File path: nifi-nar-bundles/nifi-ranger-bundle/nifi-ranger-plugin/src/test/java/org/apache/nifi/ranger/authorization/TestRangerNiFiAuthorizer.java
##########
@@ -200,19 +181,7 @@ public void testKerberosEnabled() {
         authorizer = new MockRangerNiFiAuthorizer(rangerBasePlugin);
         authorizer.setNiFiProperties(nifiProperties);
 
-        AuthorizerCreationException e = assertThrows(AuthorizerCreationException.class,
-                () -> authorizer.onConfigured(configurationContext));
-        // getting a LoginException here means we attempted to login which is what we want
-        boolean foundLoginException = false;
-        Throwable cause = e.getCause();
-        while (cause != null) {
-            if (cause instanceof LoginException) {
-                foundLoginException = true;
-                break;
-            }
-            cause = cause.getCause();
-        }
-        assertTrue(foundLoginException);
+        assertThrows(AuthorizerCreationException.class, () -> authorizer.onConfigured(configurationContext));

Review comment:
       Not sure how important it is, but we're losing some precision here.

##########
File path: nifi-toolkit/nifi-toolkit-tls/src/test/java/org/apache/nifi/toolkit/tls/util/TlsHelperTest.java
##########
@@ -108,37 +95,16 @@
 
     private KeyPairGenerator keyPairGenerator;
 
-    private KeyStore keyStore;
-
-    private String password = "changeit";
-
-    @Mock
-    KeyStoreSpi keyStoreSpi;
+    private final String password = "changeit";
 
-    @Mock
-    Provider keyStoreProvider;
-
-    @Mock
+    @Mock(lenient = true)
     OutputStreamFactory outputStreamFactory;
 
-    @Rule
-    public TemporaryFolder tempFolder = new TemporaryFolder();
-
     private ByteArrayOutputStream tmpFileOutputStream;
 
     private File file;
 
-    private static void setUnlimitedCrypto(boolean value) {

Review comment:
       Does this removal imply that the unlimited strength crypto is expected, or are we saying that it shouldn't matter?

##########
File path: nifi-toolkit/nifi-toolkit-tls/src/test/java/org/apache/nifi/toolkit/tls/util/PasswordUtilTest.java
##########
@@ -17,47 +17,28 @@
 
 package org.apache.nifi.toolkit.tls.util;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-import java.math.BigInteger;
-import java.nio.ByteBuffer;
 import java.security.SecureRandom;
-import java.util.Arrays;
-import java.util.Base64;
 import java.util.function.Supplier;
 
-import static org.junit.Assert.assertEquals;
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.Mockito.doAnswer;
-import static org.mockito.Mockito.mock;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
 
 public class PasswordUtilTest {
     @Test
     public void testGeneratePassword() {
-        SecureRandom secureRandom = mock(SecureRandom.class);
+        SecureRandom secureRandom = new SecureRandom();
         PasswordUtil passwordUtil = new PasswordUtil(secureRandom);
-        int value = 8675309;

Review comment:
       !

##########
File path: nifi-nar-bundles/nifi-ignite-bundle/nifi-ignite-processors/src/test/java/org/apache/nifi/processors/ignite/cache/TestGetIgniteCache.java
##########
@@ -142,9 +142,8 @@ protected Ignite getIgnite() {
         List<MockFlowFile> getFailureFlowFiles = getRunner.getFlowFilesForRelationship(GetIgniteCache.REL_FAILURE);
         assertEquals(1, getFailureFlowFiles.size());
 
-        final MockFlowFile getOut = getRunner.getFlowFilesForRelationship(GetIgniteCache.REL_FAILURE).get(0);
-        getOut.assertAttributeEquals(GetIgniteCache.IGNITE_GET_FAILED_REASON_ATTRIBUTE_KEY,

Review comment:
       ```
      Assertions.assertTrue(getOut.getAttribute(GetIgniteCache.IGNITE_GET_FAILED_REASON_ATTRIBUTE_KEY).contains(
                   GetIgniteCache.IGNITE_GET_FAILED_MESSAGE_PREFIX + "java.lang.NullPointerException"));
   ```
   Looks like the new exception is purely additive, so we could constrain the value safely.




-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

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



[GitHub] [nifi] exceptionfactory commented on a change in pull request #5870: NIFI-9281 Enable Building on Java 17

Posted by GitBox <gi...@apache.org>.
exceptionfactory commented on a change in pull request #5870:
URL: https://github.com/apache/nifi/pull/5870#discussion_r828496874



##########
File path: nifi-nar-bundles/nifi-ranger-bundle/nifi-ranger-plugin/src/test/java/org/apache/nifi/ranger/authorization/TestRangerNiFiAuthorizer.java
##########
@@ -200,19 +181,7 @@ public void testKerberosEnabled() {
         authorizer = new MockRangerNiFiAuthorizer(rangerBasePlugin);
         authorizer.setNiFiProperties(nifiProperties);
 
-        AuthorizerCreationException e = assertThrows(AuthorizerCreationException.class,
-                () -> authorizer.onConfigured(configurationContext));
-        // getting a LoginException here means we attempted to login which is what we want
-        boolean foundLoginException = false;
-        Throwable cause = e.getCause();
-        while (cause != null) {
-            if (cause instanceof LoginException) {
-                foundLoginException = true;
-                break;
-            }
-            cause = cause.getCause();
-        }
-        assertTrue(foundLoginException);
+        assertThrows(AuthorizerCreationException.class, () -> authorizer.onConfigured(configurationContext));

Review comment:
       Yes, this does make the test looser in terms of expected exception checking. There appear to be other issues with Ranger and Java 17, so the other option is marking several of these methods as ignored on Java 17, but it seemed better to make the tests somewhat more general in this scenario.




-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

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



[GitHub] [nifi] MikeThomsen commented on pull request #5870: NIFI-9281 Enable Building on Java 17

Posted by GitBox <gi...@apache.org>.
MikeThomsen commented on pull request #5870:
URL: https://github.com/apache/nifi/pull/5870#issuecomment-1069649369


   I'll try to review this later tonight or tomorrow morning. Would love to have an excuse to go to Java 17 on the job :-D


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

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



[GitHub] [nifi] exceptionfactory commented on a change in pull request #5870: NIFI-9281 Enable Building on Java 17

Posted by GitBox <gi...@apache.org>.
exceptionfactory commented on a change in pull request #5870:
URL: https://github.com/apache/nifi/pull/5870#discussion_r828494756



##########
File path: nifi-commons/nifi-site-to-site-client/src/test/java/org/apache/nifi/remote/client/socket/TestSiteToSiteClient.java
##########
@@ -16,89 +16,18 @@
  */
 package org.apache.nifi.remote.client.socket;
 
-import com.esotericsoftware.kryo.Kryo;
-import com.esotericsoftware.kryo.io.Input;
-import com.esotericsoftware.kryo.io.Output;
-import org.apache.nifi.components.state.StateManager;
 import org.apache.nifi.remote.client.SiteToSiteClient;
 import org.apache.nifi.remote.client.SiteToSiteClientConfig;
 import org.junit.jupiter.api.Test;
-import org.mockito.Mockito;
 
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
 import java.util.LinkedHashSet;
 import java.util.Set;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertNotNull;
-import static org.junit.jupiter.api.Assertions.assertNull;
 
 public class TestSiteToSiteClient {
 
-    @Test
-    public void testSerialization() {
-        final SiteToSiteClientConfig clientConfig = new SiteToSiteClient.Builder()
-                .url("http://localhost:8080/nifi")
-                .portName("input")
-                .buildConfig();
-
-        final Kryo kryo = new Kryo();
-
-        final ByteArrayOutputStream out = new ByteArrayOutputStream();
-        final Output output = new Output(out);
-
-        try {
-            kryo.writeObject(output, clientConfig);
-        } finally {
-            output.close();
-        }
-
-        final ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());
-        final Input input = new Input(in);
-
-        try {
-            SiteToSiteClientConfig clientConfig2 = kryo.readObject(input, SiteToSiteClient.StandardSiteToSiteClientConfig.class);
-            assertEquals(clientConfig.getUrls(), clientConfig2.getUrls());
-        } finally {
-            input.close();
-        }
-    }
-
-    @Test
-    public void testSerializationWithStateManager() {
-        final StateManager stateManager = Mockito.mock(StateManager.class);
-        final SiteToSiteClientConfig clientConfig = new SiteToSiteClient.Builder()
-            .url("http://localhost:8080/nifi")
-            .portName("input")
-            .stateManager(stateManager)
-            .buildConfig();
-
-        final Kryo kryo = new Kryo();
-
-        final ByteArrayOutputStream out = new ByteArrayOutputStream();
-        final Output output = new Output(out);
-
-        try {
-            kryo.writeObject(output, clientConfig);
-        } finally {
-            output.close();
-        }
-
-        final ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());
-        final Input input = new Input(in);
-
-        try {
-            SiteToSiteClientConfig clientConfig2 = kryo.readObject(input, SiteToSiteClient.StandardSiteToSiteClientConfig.class);
-            assertEquals(clientConfig.getUrls(), clientConfig2.getUrls());
-            // Serialization works, but the state manager is not serialized.
-            assertNotNull(clientConfig.getStateManager());
-            assertNull(clientConfig2.getStateManager());
-        } finally {
-            input.close();
-        }
-    }
-
+    @SuppressWarnings("deprecation")

Review comment:
       The `kryo` dependency did not have any direct runtime references, as indicated by the test scope, so other than rewriting the tests using standard Java Obejct serialization, I'm not sure what would be considered a comparable approach.




-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

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



[GitHub] [nifi] exceptionfactory commented on a change in pull request #5870: NIFI-9281 Enable Building on Java 17

Posted by GitBox <gi...@apache.org>.
exceptionfactory commented on a change in pull request #5870:
URL: https://github.com/apache/nifi/pull/5870#discussion_r828497992



##########
File path: nifi-registry/nifi-registry-extensions/nifi-registry-ranger/nifi-registry-ranger-plugin/src/test/java/org/apache/nifi/registry/ranger/TestRangerAuthorizer.java
##########
@@ -220,26 +204,7 @@ public void testKerberosEnabledWithoutKeytabOrPrincipal() {
         when(registryProperties.getKerberosServiceKeytabLocation()).thenReturn("");
         when(registryProperties.getKerberosServicePrincipal()).thenReturn("");
 
-        try {
-            setup(registryProperties, mock(UserGroupProvider.class), configurationContext);
-            Assert.fail("Should have thrown exception");
-        } catch (SecurityProviderCreationException e) {
-            // want to make sure this exception is from our authorizer code
-            verifyOnlyAuthorizeCreationExceptions(e);
-        }
-    }
-
-    private void verifyOnlyAuthorizeCreationExceptions(SecurityProviderCreationException e) {
-        boolean foundOtherException = false;
-        Throwable cause = e.getCause();
-        while (cause != null) {
-            if (!(cause instanceof SecurityProviderCreationException)) {
-                foundOtherException = true;
-                break;
-            }
-            cause = cause.getCause();
-        }
-        assertFalse(foundOtherException);
+        assertThrows(SecurityProviderCreationException.class, () -> setup(registryProperties, mock(UserGroupProvider.class), configurationContext));

Review comment:
       As mentioned in relation to the other Ranger test changes, this does make the exception checking looser, trading off some precision for general test execution on all platforms.




-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

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



[GitHub] [nifi] exceptionfactory commented on a change in pull request #5870: NIFI-9281 Enable Building on Java 17

Posted by GitBox <gi...@apache.org>.
exceptionfactory commented on a change in pull request #5870:
URL: https://github.com/apache/nifi/pull/5870#discussion_r828497424



##########
File path: nifi-toolkit/nifi-toolkit-tls/src/test/java/org/apache/nifi/toolkit/tls/util/TlsHelperTest.java
##########
@@ -108,37 +95,16 @@
 
     private KeyPairGenerator keyPairGenerator;
 
-    private KeyStore keyStore;
-
-    private String password = "changeit";
-
-    @Mock
-    KeyStoreSpi keyStoreSpi;
+    private final String password = "changeit";
 
-    @Mock
-    Provider keyStoreProvider;
-
-    @Mock
+    @Mock(lenient = true)
     OutputStreamFactory outputStreamFactory;
 
-    @Rule
-    public TemporaryFolder tempFolder = new TemporaryFolder();
-
     private ByteArrayOutputStream tmpFileOutputStream;
 
     private File file;
 
-    private static void setUnlimitedCrypto(boolean value) {

Review comment:
       Good question, this change implies that unlimited strength cryptography support is expected.  Java 8 Update 171 introduced this by default, so there should be a separate effort to remove all checks for unlimited strength cryptography.




-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

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



[GitHub] [nifi] greyp9 commented on a change in pull request #5870: NIFI-9281 Enable Building on Java 17

Posted by GitBox <gi...@apache.org>.
greyp9 commented on a change in pull request #5870:
URL: https://github.com/apache/nifi/pull/5870#discussion_r828548683



##########
File path: nifi-toolkit/nifi-toolkit-tls/src/test/java/org/apache/nifi/toolkit/tls/util/TlsHelperTest.java
##########
@@ -108,37 +95,16 @@
 
     private KeyPairGenerator keyPairGenerator;
 
-    private KeyStore keyStore;
-
-    private String password = "changeit";
-
-    @Mock
-    KeyStoreSpi keyStoreSpi;
+    private final String password = "changeit";
 
-    @Mock
-    Provider keyStoreProvider;
-
-    @Mock
+    @Mock(lenient = true)
     OutputStreamFactory outputStreamFactory;
 
-    @Rule
-    public TemporaryFolder tempFolder = new TemporaryFolder();
-
     private ByteArrayOutputStream tmpFileOutputStream;
 
     private File file;
 
-    private static void setUnlimitedCrypto(boolean value) {

Review comment:
       Yep, you're right!  I remember both policies being included in the distribution, but was fuzzy on the details.
   
   https://bugs.openjdk.java.net/browse/JDK-8170157




-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

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



[GitHub] [nifi] asfgit closed pull request #5870: NIFI-9281 Enable Building on Java 17

Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #5870:
URL: https://github.com/apache/nifi/pull/5870


   


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

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



[GitHub] [nifi] MikeThomsen commented on pull request #5870: NIFI-9281 Enable Building on Java 17

Posted by GitBox <gi...@apache.org>.
MikeThomsen commented on pull request #5870:
URL: https://github.com/apache/nifi/pull/5870#issuecomment-1071166877


   > I imagine there will be runtime rough spots around the edges, but this is a solid start. LGTM.
   
   Same here. Going to merge because nothing jumped out at me as problematic with the changes, and it appears to run the whole test suite just fine w/ Java 17. Anything we find problematic going forward that's broken will probably be found through live trial and error.


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

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



[GitHub] [nifi] MikeThomsen commented on pull request #5870: NIFI-9281 Enable Building on Java 17

Posted by GitBox <gi...@apache.org>.
MikeThomsen commented on pull request #5870:
URL: https://github.com/apache/nifi/pull/5870#issuecomment-1071166877


   > I imagine there will be runtime rough spots around the edges, but this is a solid start. LGTM.
   
   Same here. Going to merge because nothing jumped out at me as problematic with the changes, and it appears to run the whole test suite just fine w/ Java 17. Anything we find problematic going forward that's broken will probably be found through live trial and error.


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

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



[GitHub] [nifi] asfgit closed pull request #5870: NIFI-9281 Enable Building on Java 17

Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #5870:
URL: https://github.com/apache/nifi/pull/5870


   


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

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