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

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


The following commit(s) were added to refs/heads/master by this push:
     new b882e4421e SonarQube bug fixes
b882e4421e is described below

commit b882e4421ef980851aa2bcd3ef330971ec9f01f7
Author: James Bognar <[email protected]>
AuthorDate: Fri Feb 6 09:44:12 2026 -0500

    SonarQube bug fixes
---
 .../src/main/java/org/apache/juneau/swap/MapSwap.java        | 10 ----------
 .../src/main/java/org/apache/juneau/swap/StringSwap.java     | 10 ----------
 .../java/org/apache/juneau/rest/servlet/RestServlet.java     |  2 +-
 scripts/prompt-pgp-passphrase.py                             |  2 +-
 scripts/push.py                                              | 12 ++++++------
 5 files changed, 8 insertions(+), 28 deletions(-)

diff --git 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/MapSwap.java 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/MapSwap.java
index 4ec5fe636f..324bdbedd0 100644
--- 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/MapSwap.java
+++ 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/MapSwap.java
@@ -50,14 +50,4 @@ import org.apache.juneau.collections.*;
  * @param <T> The normal form of the class.
  */
 public abstract class MapSwap<T> extends ObjectSwap<T,JsonMap> {
-
-       @Override /* Overridden from ObjectSwap */
-       public JsonMap swap(BeanSession session, T o) throws Exception {
-               return super.swap(session, o);
-       }
-
-       @Override /* Overridden from ObjectSwap */
-       public T unswap(BeanSession session, JsonMap f, ClassMeta<?> hint) 
throws Exception {
-               return super.unswap(session, f, hint);
-       }
 }
\ No newline at end of file
diff --git 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/StringSwap.java
 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/StringSwap.java
index f7abe14882..a85a2c5fef 100644
--- 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/StringSwap.java
+++ 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/StringSwap.java
@@ -63,14 +63,4 @@ public abstract class StringSwap<T> extends 
ObjectSwap<T,String> {
        protected StringSwap(Class<T> normalClass) {
                super(normalClass, String.class);
        }
-
-       @Override /* Overridden from ObjectSwap */
-       public String swap(BeanSession session, T o) throws Exception {
-               return super.swap(session, o);
-       }
-
-       @Override /* Overridden from ObjectSwap */
-       public T unswap(BeanSession session, String f, ClassMeta<?> hint) 
throws Exception {
-               return super.unswap(session, f, hint);
-       }
 }
\ No newline at end of file
diff --git 
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/servlet/RestServlet.java
 
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/servlet/RestServlet.java
index 65044ff89e..a51c3feaf8 100644
--- 
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/servlet/RestServlet.java
+++ 
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/servlet/RestServlet.java
@@ -243,7 +243,7 @@ public abstract class RestServlet extends HttpServlet {
         * @param context Sets the context object on this servlet.
         * @throws ServletException If error occurred during initialization.
         */
-       protected void setContext(RestContext context) throws ServletException {
+       protected synchronized void setContext(RestContext context) throws 
ServletException {
                if (this.context.get() == null) {
                        super.init(context.getBuilder());
                        this.context.set(context);
diff --git a/scripts/prompt-pgp-passphrase.py b/scripts/prompt-pgp-passphrase.py
index 0c5bc1af51..87e241d7d8 100755
--- a/scripts/prompt-pgp-passphrase.py
+++ b/scripts/prompt-pgp-passphrase.py
@@ -60,7 +60,7 @@ def prompt_pgp_passphrase():
                 os.unlink(tmp_path)
                 if os.path.exists(tmp_path + ".asc"):
                     os.unlink(tmp_path + ".asc")
-            except:
+            except OSError:
                 pass
             print("✅ PGP passphrase entered successfully")
             return True
diff --git a/scripts/push.py b/scripts/push.py
index b31a7b7d3a..7ce24642a4 100755
--- a/scripts/push.py
+++ b/scripts/push.py
@@ -113,7 +113,7 @@ def play_sound(success=True):
                         capture_output=True,
                         timeout=5
                     )
-                except:
+                except OSError:
                     # Fallback to speaker-test
                     subprocess.run(
                         ["speaker-test", "-t", "sine", "-f", "1000", "-l", 
"1"],
@@ -127,7 +127,7 @@ def play_sound(success=True):
                         capture_output=True,
                         timeout=5
                     )
-                except:
+                except OSError:
                     # Fallback to speaker-test with lower frequency
                     subprocess.run(
                         ["speaker-test", "-t", "sine", "-f", "400", "-l", "1"],
@@ -180,7 +180,7 @@ def play_sound(success=True):
                         capture_output=True,
                         timeout=5
                     )
-                except:
+                except OSError:
                     # Fallback to speaker-test
                     subprocess.run(
                         ["speaker-test", "-t", "sine", "-f", "1000", "-l", 
"1"],
@@ -194,7 +194,7 @@ def play_sound(success=True):
                         capture_output=True,
                         timeout=5
                     )
-                except:
+                except OSError:
                     # Fallback to speaker-test with lower frequency
                     subprocess.run(
                         ["speaker-test", "-t", "sine", "-f", "400", "-l", "1"],
@@ -263,7 +263,7 @@ def play_sound(success=True):
                         capture_output=True,
                         timeout=5
                     )
-                except:
+                except OSError:
                     # Fallback to speaker-test
                     subprocess.run(
                         ["speaker-test", "-t", "sine", "-f", "1000", "-l", 
"1"],
@@ -277,7 +277,7 @@ def play_sound(success=True):
                         capture_output=True,
                         timeout=5
                     )
-                except:
+                except OSError:
                     # Fallback to speaker-test with lower frequency
                     subprocess.run(
                         ["speaker-test", "-t", "sine", "-f", "400", "-l", "1"],

Reply via email to