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

dpogue pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-android.git


The following commit(s) were added to refs/heads/master by this push:
     new 373fd9c5 Fix some static analysis warnings in Java code (#2015)
373fd9c5 is described below

commit 373fd9c53ec5ace6a8fe775750954c32b5003761
Author: Darryl Pogue <[email protected]>
AuthorDate: Tue Sep 8 20:32:43 2026 -0700

    Fix some static analysis warnings in Java code (#2015)
---
 framework/src/org/apache/cordova/PluginManager.java                   | 4 ++--
 framework/src/org/apache/cordova/engine/SystemWebChromeClient.java    | 2 +-
 .../src/androidTest/java/org/apache/cordova/unittests/IFrameTest.java | 3 +++
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/framework/src/org/apache/cordova/PluginManager.java 
b/framework/src/org/apache/cordova/PluginManager.java
index 762c7cba..448ba3eb 100755
--- a/framework/src/org/apache/cordova/PluginManager.java
+++ b/framework/src/org/apache/cordova/PluginManager.java
@@ -560,10 +560,10 @@ public class PluginManager {
         CordovaPlugin ret = null;
         try {
             Class<?> c = null;
-            if ((className != null) && !("".equals(className))) {
+            if (className != null && !className.isBlank()) {
                 c = Class.forName(className);
             }
-            if (c != null & CordovaPlugin.class.isAssignableFrom(c)) {
+            if (c != null && CordovaPlugin.class.isAssignableFrom(c)) {
                 ret = (CordovaPlugin) c.getDeclaredConstructor().newInstance();
             }
         } catch (Exception e) {
diff --git a/framework/src/org/apache/cordova/engine/SystemWebChromeClient.java 
b/framework/src/org/apache/cordova/engine/SystemWebChromeClient.java
index c10c666d..a77d1bb8 100755
--- a/framework/src/org/apache/cordova/engine/SystemWebChromeClient.java
+++ b/framework/src/org/apache/cordova/engine/SystemWebChromeClient.java
@@ -231,7 +231,7 @@ public class SystemWebChromeClient extends WebChromeClient {
         Intent fileIntent = fileChooserParams.createIntent();
 
         // Check if multiple-select is specified
-        Boolean selectMultiple = false;
+        boolean selectMultiple = false;
         if (fileChooserParams.getMode() == 
WebChromeClient.FileChooserParams.MODE_OPEN_MULTIPLE) {
             selectMultiple = true;
         }
diff --git 
a/test/androidx/app/src/androidTest/java/org/apache/cordova/unittests/IFrameTest.java
 
b/test/androidx/app/src/androidTest/java/org/apache/cordova/unittests/IFrameTest.java
index c79ead6c..f20dcc3a 100644
--- 
a/test/androidx/app/src/androidTest/java/org/apache/cordova/unittests/IFrameTest.java
+++ 
b/test/androidx/app/src/androidTest/java/org/apache/cordova/unittests/IFrameTest.java
@@ -71,6 +71,7 @@ public class IFrameTest {
         onWebView().withElement(findElement(Locator.ID, 
"google_maps")).perform(webClick());
         sleep(WEBVIEW_LOAD_DELAY);
         mActivityRule.runOnUiThread(new Runnable() {
+            @Override
             public void run()
             {
                 String url = cordovaWebView.getUrl();
@@ -80,6 +81,7 @@ public class IFrameTest {
         sleep(WEBVIEW_LOAD_DELAY);
         onWebView().withElement(findElement(Locator.ID, 
"javascript_load")).perform(webClick());
         mActivityRule.runOnUiThread(new Runnable() {
+            @Override
             public void run()
             {
                 String url = cordovaWebView.getUrl();
@@ -90,6 +92,7 @@ public class IFrameTest {
         //Espresso will kill the application and not trigger the backHistory 
method, which correctly
         //navigates the iFrame history.  backHistory is tied to the back 
button.
         mActivityRule.runOnUiThread(new Runnable() {
+            @Override
             public void run()
             {
                 assertTrue(cordovaWebView.backHistory());


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to