← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20359: Minor

 

------------------------------------------------------------
revno: 20359
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2015-09-25 11:54:36 +0200
message:
  Minor
modified:
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/StaticContentController.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SynchronizationController.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/utils/PdfDataEntryFormImportUtil.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/statistics/GetStatisticsAction.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-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/StaticContentController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/StaticContentController.java	2015-09-24 15:09:40 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/StaticContentController.java	2015-09-25 09:54:36 +0000
@@ -159,7 +159,7 @@
             throw new WebMessageException( WebMessageUtils.badRequest( "Missing parameter \"file\"" ) );
         }
 
-        // Only PNG is accepted at the current time
+        // Only PNG accepted currently
         
         if ( !file.getContentType().equalsIgnoreCase( "image/png" ) )
         {
@@ -167,7 +167,7 @@
                 new WebMessage(WebMessageStatus.WARNING, HttpStatus.UNSUPPORTED_MEDIA_TYPE ) );
         }
 
-        // Only keys in the white list is accepted at the current time
+        // Only keys in the white list accepted currently
         
         if ( !KEY_WHITELIST_MAP.containsKey( key ) )
         {

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SynchronizationController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SynchronizationController.java	2015-09-09 19:29:50 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SynchronizationController.java	2015-09-25 09:54:36 +0000
@@ -86,7 +86,7 @@
     }
 
     @RequestMapping( value = "/availability", method = RequestMethod.GET, produces = "application/json" )
-    public @ResponseBody AvailabilityStatus isRemoteServerAvailable()
+    public @ResponseBody AvailabilityStatus remoteServerAvailable()
     {
         return synchronizationManager.isRemoteServerAvailable();
     }

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/utils/PdfDataEntryFormImportUtil.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/utils/PdfDataEntryFormImportUtil.java	2015-09-14 17:57:00 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/utils/PdfDataEntryFormImportUtil.java	2015-09-25 09:54:36 +0000
@@ -118,7 +118,7 @@
         for ( String fldName : fldNames )
         {
             // If the value in the text field is not empty, proceed to add it.
-            if ( !form.getField( fldName ).trim().equals( "" ) )
+            if ( !form.getField( fldName ).trim().isEmpty() )
             {
                 if ( fldName.startsWith( PdfDataEntryFormUtil.LABELCODE_DATADATETEXTFIELD ) )
                 {
@@ -159,16 +159,14 @@
 
             programStageInstance = programStageInstanceService.getProgramStageInstance( programStageInstanceId );
 
-            for ( Map.Entry<Integer, String> dataElementsEntry : programStageInstanceStorage.getDataElementsValue()
-                .entrySet() )
+            for ( Map.Entry<Integer, String> dataElementsEntry : programStageInstanceStorage.getDataElementsValue().entrySet() )
             {
                 Integer dataElementId = dataElementsEntry.getKey();
                 String value = dataElementsEntry.getValue();
 
                 // Step 3. Insert Data
-                insertValue_ProgramStageDataElement( programStageInstance, dataElementId, value );
+                insertValueProgramStageDataElement( programStageInstance, dataElementId, value );
             }
-
         }
 
         reader.close();
@@ -199,8 +197,7 @@
         return programStageInstanceService.addProgramStageInstance( programStageInstance );
     }
 
-    private void insertValue_ProgramStageDataElement( ProgramStageInstance programStageInstance, int dataElementId,
-        String value )
+    private void insertValueProgramStageDataElement( ProgramStageInstance programStageInstance, int dataElementId, String value )
         throws Exception
     {
 
@@ -303,7 +300,6 @@
 
                 programStageInstanceData.put( rowNumber, programStageInstanceStorage );
             }
-
         }
     }
 

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/statistics/GetStatisticsAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/statistics/GetStatisticsAction.java	2015-06-15 13:44:20 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/statistics/GetStatisticsAction.java	2015-09-25 09:54:36 +0000
@@ -134,7 +134,7 @@
         Date lastHour = new DateTime().minusHours( 1 ).toDate();
         
         objects = new EnumMapWrapper<>( Objects.class, counts );
-                
+        
         activeUsers.put( 0, userService.getActiveUsersCount( lastHour ) );
         activeUsers.put( 1, userService.getActiveUsersCount( 0 ) );
         activeUsers.put( 2, userService.getActiveUsersCount( 1 ) );