mirror of https://github.com/apache/cloudstack.git
Fix findbugs SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING warning in Upgrade2214to30.java There was no risk of sql injection here, nor any need to use PreparedStatement, still this fixes the warninG
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com> This closes #441
This commit is contained in:
parent
7a57ce3334
commit
869cc0c9f2
|
|
@ -272,7 +272,8 @@ public class Upgrade2214to30 extends Upgrade30xBase implements DbUpgrade {
|
|||
addDefaultSGProvider(conn, physicalNetworkId, zoneId, networkType, false);
|
||||
//for all networks with this tag, add physical_network_id
|
||||
|
||||
PreparedStatement pstmt3 = conn.prepareStatement("SELECT network_id FROM `cloud`.`network_tags` where tag = '" + guestNetworkTag + "'");
|
||||
PreparedStatement pstmt3 = conn.prepareStatement("SELECT network_id FROM `cloud`.`network_tags` where tag= ?");
|
||||
pstmt3.setString(1,guestNetworkTag);
|
||||
ResultSet rsNet = pstmt3.executeQuery();
|
||||
s_logger.debug("Adding PhysicalNetwork to VLAN");
|
||||
s_logger.debug("Adding PhysicalNetwork to user_ip_address");
|
||||
|
|
|
|||
Loading…
Reference in New Issue