Skip to content

Commit

Permalink
Fixed Qodana warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Eddie Carpenter committed Jul 1, 2024
1 parent cf2fca9 commit 9563d9d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
5 changes: 0 additions & 5 deletions jpalite-core/src/main/java/io/jpalite/EntityMapException.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 9563d9d

Please sign in to comment.