← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 17386: Data approval, fixed nullpointer vulnerability. Caused npe when loading data entry forms. Reduced...

 

------------------------------------------------------------
revno: 17386
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2014-11-07 18:22:17 +0100
message:
  Data approval, fixed nullpointer vulnerability. Caused npe when loading data entry forms. Reduced log level of sql statement.
modified:
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/hibernate/HibernateDataApprovalStore.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-core/src/main/java/org/hisp/dhis/dataapproval/hibernate/HibernateDataApprovalStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/hibernate/HibernateDataApprovalStore.java	2014-11-07 01:55:41 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/hibernate/HibernateDataApprovalStore.java	2014-11-07 17:22:17 +0000
@@ -373,7 +373,7 @@
                      ( attributeOptionCombo == null ? "" : "and cocco.categoryoptioncomboid = " + attributeOptionCombo.getId() + " " ) +
                 ") as a";
 
-        log.info( "Get approval SQL: " + sql );
+        log.debug( "Get approval SQL: " + sql );
 
         SqlRowSet rowSet = jdbcTemplate.queryForRowSet( sql );
 
@@ -430,10 +430,10 @@
 
                 statusList.add( new DataApprovalStatus( state, da, statusLevel, null ) );
 
-                log.debug( "Get approval result: level " + level + " dataApprovalLevel " + daLevel.getLevel()
+                log.debug( "Get approval result: level " + level + " dataApprovalLevel " + ( daLevel != null ? daLevel.getLevel() : "[none]" )
                         + " approved " + ( statusLevel != null )
                         + " readyBelow " + readyBelow + " approvedAbove " + approvedAbove
-                        + " accepted " + accepted + " state " + state.name() + " " + da );
+                        + " accepted " + accepted + " state " + ( state != null ? state.name() : "[none]" ) + " " + da );
             }
         }
         catch ( ExecutionException ex )