From 15066db87fe7072ede65b3deb80fd2cdb2771538 Mon Sep 17 00:00:00 2001 From: Vinu Maddumage Date: Mon, 31 Oct 2022 11:38:21 +0530 Subject: [PATCH] fix prepare statement app Id as integer type --- .../application/dao/impl/OrgApplicationMgtDAOImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/org.wso2.carbon.identity.organization.management.application/src/main/java/org/wso2/carbon/identity/organization/management/application/dao/impl/OrgApplicationMgtDAOImpl.java b/components/org.wso2.carbon.identity.organization.management.application/src/main/java/org/wso2/carbon/identity/organization/management/application/dao/impl/OrgApplicationMgtDAOImpl.java index f3fc39c3c..29fbf1e05 100644 --- a/components/org.wso2.carbon.identity.organization.management.application/src/main/java/org/wso2/carbon/identity/organization/management/application/dao/impl/OrgApplicationMgtDAOImpl.java +++ b/components/org.wso2.carbon.identity.organization.management.application/src/main/java/org/wso2/carbon/identity/organization/management/application/dao/impl/OrgApplicationMgtDAOImpl.java @@ -193,7 +193,7 @@ public boolean isFragmentApplication(int applicationId) throws OrganizationManag String prepStmt = JdbcUtils.isH2DB() ? IS_FRAGMENT_APPLICATION_H2 : IS_FRAGMENT_APPLICATION; int isFragment = namedJdbcTemplate.fetchSingleRecord(prepStmt, (resultSet, rowNumber) -> resultSet.getInt(1), namedPreparedStatement -> { - namedPreparedStatement.setString(DB_SCHEMA_COLUMN_NAME_SP_ID, Integer.toString(applicationId)); + namedPreparedStatement.setInt(DB_SCHEMA_COLUMN_NAME_SP_ID, applicationId); namedPreparedStatement.setString(DB_SCHEMA_COLUMN_NAME_METADATA_NAME, IS_FRAGMENT_APP); namedPreparedStatement.setString(DB_SCHEMA_COLUMN_NAME_METADATA_VALUE, Boolean.TRUE.toString()); });