diff --git a/jpalite-core/src/main/java/io/jpalite/EntityMapException.java b/jpalite-core/src/main/java/io/jpalite/EntityMapException.java index 1f03abb..cc63014 100644 --- a/jpalite-core/src/main/java/io/jpalite/EntityMapException.java +++ b/jpalite-core/src/main/java/io/jpalite/EntityMapException.java @@ -19,13 +19,8 @@ import jakarta.persistence.PersistenceException; -import java.io.Serial; - public class EntityMapException extends PersistenceException { - @Serial - private static final long serialVersionUID = -7640891001823058796L; - public EntityMapException(String message) { super(message); diff --git a/jpalite-core/src/main/java/io/jpalite/UnknownFieldException.java b/jpalite-core/src/main/java/io/jpalite/UnknownFieldException.java index daec24a..dbdfee5 100644 --- a/jpalite-core/src/main/java/io/jpalite/UnknownFieldException.java +++ b/jpalite-core/src/main/java/io/jpalite/UnknownFieldException.java @@ -19,13 +19,8 @@ import jakarta.persistence.PersistenceException; -import java.io.Serial; - public class UnknownFieldException extends PersistenceException { - @Serial - private static final long serialVersionUID = -7640891001823058796L; - public UnknownFieldException(String message) { super(message); diff --git a/jpalite-core/src/main/java/io/jpalite/impl/db/PersistenceContextImpl.java b/jpalite-core/src/main/java/io/jpalite/impl/db/PersistenceContextImpl.java index eb3f68e..36000e2 100644 --- a/jpalite-core/src/main/java/io/jpalite/impl/db/PersistenceContextImpl.java +++ b/jpalite-core/src/main/java/io/jpalite/impl/db/PersistenceContextImpl.java @@ -382,7 +382,7 @@ public void setConnectionName(String connectionName) this.connectionName = connectionName; } - @SuppressWarnings({"java:S1141", "java:S2077"}) + @SuppressWarnings({"java:S1141", "java:S2077", "tainting"}) //Having try-resource in a bigger try block is allowed. Dynamically formatted SQL is verified to be safe @Override @Nonnull @@ -413,7 +413,8 @@ public Connection getConnection(String connectionName) if (applicationName.length() > 61) { applicationName = applicationName.substring(0, 61); }//if - writeStmt.execute("set application_name to '" + applicationName + "'"); + String applicationNameQry = "set application_name to '" + applicationName + "'"; + writeStmt.execute(applicationNameQry); }//try catch (SQLException ex) { LOG.error("Error setting the JDBC application name", ex);