← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20251: Code style

 

------------------------------------------------------------
revno: 20251
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2015-09-21 12:09:44 +0200
message:
  Code style
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/fileresource/FileResource.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/fileresource/DefaultFileResourceService.java
  dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/fileresource/hibernate/FileResource.hbm.xml
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/DataValueController.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-api/src/main/java/org/hisp/dhis/fileresource/FileResource.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/fileresource/FileResource.java	2015-09-18 16:29:32 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/fileresource/FileResource.java	2015-09-21 10:09:44 +0000
@@ -57,7 +57,7 @@
     /**
      * MD5 digest of content
      */
-    private String contentMD5;
+    private String contentMd5;
 
     /**
      * Key used for content storage at external location
@@ -84,12 +84,12 @@
     {
     }
 
-    public FileResource( String name, String contentType, long contentLength, String contentMD5, FileResourceDomain domain )
+    public FileResource( String name, String contentType, long contentLength, String contentMd5, FileResourceDomain domain )
     {
         this.name = name;
         this.contentType = contentType;
         this.contentLength = contentLength;
-        this.contentMD5 = contentMD5;
+        this.contentMd5 = contentMd5;
         this.domain = domain;
         this.storageKey = generateStorageKey();
     }
@@ -150,14 +150,14 @@
     @JsonProperty
     @JsonView( { DetailedView.class, ExportView.class } )
     @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
-    public String getContentMD5()
+    public String getContentMd5()
     {
-        return contentMD5;
+        return contentMd5;
     }
 
-    public void setContentMD5( String contentMD5 )
+    public void setContentMd5( String contentMd5 )
     {
-        this.contentMD5 = contentMD5;
+        this.contentMd5 = contentMd5;
     }
 
     public String getStorageKey()

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/fileresource/DefaultFileResourceService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/fileresource/DefaultFileResourceService.java	2015-09-19 08:23:14 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/fileresource/DefaultFileResourceService.java	2015-09-21 10:09:44 +0000
@@ -79,7 +79,7 @@
         String storageKey = getRelativeStorageKey( fileResource );
 
         String key = fileResourceContentStore.saveFileResourceContent(
-            storageKey, content, fileResource.getContentLength(), fileResource.getContentMD5() );
+            storageKey, content, fileResource.getContentLength(), fileResource.getContentMd5() );
 
         if ( key == null )
         {

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/fileresource/hibernate/FileResource.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/fileresource/hibernate/FileResource.hbm.xml	2015-09-16 15:10:50 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/fileresource/hibernate/FileResource.hbm.xml	2015-09-21 10:09:44 +0000
@@ -22,7 +22,7 @@
 
     <property name="contentLength" column="contentlength" not-null="true" unique="false" />
 
-    <property name="contentMD5" column="contentmd5" not-null="true" length="32" />
+    <property name="contentMd5" column="contentmd5" not-null="true" length="32" />
 
     <property name="storageKey" column="storagekey" not-null="true" unique="true" length="1024" />
 

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/DataValueController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/DataValueController.java	2015-09-18 15:47:54 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/DataValueController.java	2015-09-21 10:09:44 +0000
@@ -413,7 +413,6 @@
         HttpServletResponse response )
         throws WebMessageException, IOException
     {
-
         boolean strictPeriods = (Boolean) systemSettingManager.getSystemSetting( KEY_DATA_IMPORT_STRICT_PERIODS, false );
         boolean strictCategoryOptionCombos = (Boolean) systemSettingManager.getSystemSetting( KEY_DATA_IMPORT_STRICT_CATEGORY_OPTION_COMBOS, false );
         boolean strictOrgUnits = (Boolean) systemSettingManager.getSystemSetting( KEY_DATA_IMPORT_STRICT_ORGANISATION_UNITS, false );
@@ -427,7 +426,7 @@
 
         DataElementCategoryOptionCombo categoryOptionCombo = getAndValidateCategoryOptionCombo( co, requireCategoryOptionCombo );
 
-        DataElementCategoryOptionCombo attributeOptionCombo = getAndValidateAttributeOptionCombo( cc, cp );
+        getAndValidateAttributeOptionCombo( cc, cp );
 
         Period period = getAndValidatePeriod( pe );