dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #03259
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1096: Fixed issues reported by FindBugs
------------------------------------------------------------
revno: 1096
committer: Lars Helge Oeverland larshelge@xxxxxxxxx
branch nick: trunk
timestamp: Mon 2009-11-23 18:27:52 +0100
message:
Fixed issues reported by FindBugs
modified:
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/OrganisationUnitHierarchyConverter.java
dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/jdbc/JDBCReportTableManager.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription.
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/OrganisationUnitHierarchyConverter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/OrganisationUnitHierarchyConverter.java 2009-03-09 14:11:42 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/OrganisationUnitHierarchyConverter.java 2009-11-23 17:27:52 +0000
@@ -139,7 +139,7 @@
Integer parentId = organisationUnitMapping.get( Integer.parseInt( values.get( FIELD_PARENT ) ) );
Integer childId = organisationUnitMapping.get( Integer.parseInt( values.get( FIELD_CHILD ) ) );
- if ( parentId != null && childId != null && parentId != childId ) // Parent id equals child id for root
+ if ( parentId != null && childId != null && parentId.equals( childId ) ) // Parent id equals child id for root
{
association.setGroupId( parentId );
association.setMemberId( childId );
=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/jdbc/JDBCReportTableManager.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/jdbc/JDBCReportTableManager.java 2009-10-06 00:20:18 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/jdbc/JDBCReportTableManager.java 2009-11-23 17:27:52 +0000
@@ -94,11 +94,13 @@
ReportTableStatement statement = new CreateReportTableStatement( reportTable, statementBuilder );
- log.debug( "Creating report table with SQL statement: '" + statement.getStatement() + "'" );
+ final String sql = statement.getStatement();
+
+ log.debug( "Creating report table with SQL statement: '" + sql + "'" );
try
{
- holder.getStatement().executeUpdate( statement.getStatement() );
+ holder.getStatement().executeUpdate( sql );
}
catch ( Exception ex )
{
@@ -115,10 +117,12 @@
StatementHolder holder = statementManager.getHolder();
ReportTableStatement statement = new RemoveReportTableStatement( reportTable );
+
+ final String sql = statement.getStatement();
try
{
- holder.getStatement().executeUpdate( statement.getStatement() );
+ holder.getStatement().executeUpdate( sql );
}
catch ( Exception ex )
{