This is an automated email from the ASF dual-hosted git repository.

exceptionfactory pushed a commit to branch support/nifi-1.x
in repository https://gitbox.apache.org/repos/asf/nifi.git


The following commit(s) were added to refs/heads/support/nifi-1.x by this push:
     new 98b0ceffd8 NIFI-12516 Corrected String.isEmpty() check for Java 8
98b0ceffd8 is described below

commit 98b0ceffd8ed4d38b7cdf513ae6890a51b2c600d
Author: exceptionfactory <[email protected]>
AuthorDate: Fri Dec 15 13:57:53 2023 -0600

    NIFI-12516 Corrected String.isEmpty() check for Java 8
    
    Signed-off-by: David Handermann <[email protected]>
---
 .../src/main/java/org/apache/nifi/web/StandardNiFiContentAccess.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiContentAccess.java
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiContentAccess.java
index 7271b7ffaa..628817c731 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiContentAccess.java
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiContentAccess.java
@@ -172,7 +172,7 @@ public class StandardNiFiContentAccess implements 
ContentAccess {
      * @return the value of the first header with the given name, or 
<code>null</code> if the header is not found
      */
     private String getHeader(final MultivaluedMap<String, String> headers, 
final String headerName) {
-        if (headers == null || headers.isEmpty() || headerName == null || 
headerName.isBlank()) {
+        if (headers == null || headers.isEmpty() || headerName == null || 
headerName.trim().isEmpty()) {
             return null;
         }
 

Reply via email to