← Back to team overview

dhis2-devs team mailing list archive

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

 

------------------------------------------------------------
revno: 21852
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2016-02-02 23:45:48 +0100
message:
  Minor
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/preheat/Preheat.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/userkeyjsonvalue/UserKeyJsonValue.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/userkeyjsonvalue/UserKeyJsonValueService.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/query/QueryUtils.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/userkeyjsonvalue/DefaultUserKeyJsonValueService.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/userkeyjsonvalue/hibernate/HibernateUserKeyJsonValueStore.java
  dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/userkeyjsonvalue/UserKeyJsonValueStoreTest.java
  dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/dbms/HibernateDbmsManager.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/preheat/Preheat.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/preheat/Preheat.java	2016-02-01 10:27:53 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/preheat/Preheat.java	2016-02-02 22:45:48 +0000
@@ -56,7 +56,6 @@
         return (T) map.get( identifier ).get( klass ).get( key );
     }
 
-    @SuppressWarnings( "unchecked" )
     public <T extends IdentifiableObject> T get( PreheatIdentifier identifier, T object )
     {
         if ( object == null )

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/userkeyjsonvalue/UserKeyJsonValue.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/userkeyjsonvalue/UserKeyJsonValue.java	2016-02-02 15:41:15 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/userkeyjsonvalue/UserKeyJsonValue.java	2016-02-02 22:45:48 +0000
@@ -49,7 +49,7 @@
     private String key;
 
     /**
-     * A value referenced by a key and user, json-formatted data stored as a string.
+     * A value referenced by a key and user, JSON-formatted data stored as a string.
      */
     private String value;
 

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/userkeyjsonvalue/UserKeyJsonValueService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/userkeyjsonvalue/UserKeyJsonValueService.java	2016-02-02 15:41:15 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/userkeyjsonvalue/UserKeyJsonValueService.java	2016-02-02 22:45:48 +0000
@@ -37,7 +37,6 @@
  */
 public interface UserKeyJsonValueService
 {
-
     /**
      * Retrieves a list of keys from a user
      * @param user the namespace to retrieve keys from

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/query/QueryUtils.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/query/QueryUtils.java	2016-01-08 16:26:00 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/query/QueryUtils.java	2016-02-02 22:45:48 +0000
@@ -43,7 +43,6 @@
  */
 public final class QueryUtils
 {
-    @SuppressWarnings( { "rawtypes", "unchecked" } )
     static public <T> T getValue( Class<T> klass, Object objectValue )
     {
         return getValue( klass, null, objectValue );

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/userkeyjsonvalue/DefaultUserKeyJsonValueService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/userkeyjsonvalue/DefaultUserKeyJsonValueService.java	2016-02-02 15:41:15 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/userkeyjsonvalue/DefaultUserKeyJsonValueService.java	2016-02-02 22:45:48 +0000
@@ -47,7 +47,8 @@
         this.userKeyJsonValueStore = userKeyJsonValueStore;
     }
 
-    public UserKeyJsonValueStore getUserKeyJsonValueStore() {
+    public UserKeyJsonValueStore getUserKeyJsonValueStore()
+    {
         return this.userKeyJsonValueStore;
     }
 
@@ -86,5 +87,4 @@
     {
         userKeyJsonValueStore.delete( userKeyJsonValue );
     }
-
 }

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/userkeyjsonvalue/hibernate/HibernateUserKeyJsonValueStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/userkeyjsonvalue/hibernate/HibernateUserKeyJsonValueStore.java	2016-02-02 15:41:15 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/userkeyjsonvalue/hibernate/HibernateUserKeyJsonValueStore.java	2016-02-02 22:45:48 +0000
@@ -45,11 +45,12 @@
     implements UserKeyJsonValueStore
 {
     @Override
+    @SuppressWarnings("unchecked")
     public List<String> getKeysByUser( User user )
     {
         return (List<String>) getCriteria(
-            Restrictions.eq( "user", user )
-        ).list().stream().map( o -> ((UserKeyJsonValue) o).getKey() ).collect( Collectors.toList());
+            Restrictions.eq( "user", user ) ).list().stream().
+            map( o -> ((UserKeyJsonValue) o).getKey() ).collect( Collectors.toList() );
     }
 
     @Override
@@ -57,16 +58,14 @@
     {
         return (UserKeyJsonValue) getCriteria(
             Restrictions.eq( "user", user ),
-            Restrictions.eq( "key", key )
-        ).uniqueResult();
+            Restrictions.eq( "key", key ) ).uniqueResult();
     }
 
     @Override
+    @SuppressWarnings("unchecked")
     public List<UserKeyJsonValue> getUserKeyJsonValueByUser( User user )
     {
         return getCriteria(
-            Restrictions.eq( "user", user )
-        ).list();
+            Restrictions.eq( "user", user ) ).list();
     }
-
 }

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/userkeyjsonvalue/UserKeyJsonValueStoreTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/userkeyjsonvalue/UserKeyJsonValueStoreTest.java	2016-02-02 16:38:55 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/userkeyjsonvalue/UserKeyJsonValueStoreTest.java	2016-02-02 22:45:48 +0000
@@ -40,9 +40,9 @@
 /**
  * @author Stian Sandvold.
  */
-public class UserKeyJsonValueStoreTest extends DhisSpringTest
+public class UserKeyJsonValueStoreTest 
+    extends DhisSpringTest
 {
-
     @Autowired
     private UserKeyJsonValueStore userKeyJsonValueStore;
 
@@ -66,7 +66,6 @@
     @Test
     public void testAddUserKeyJsonValuesAndGetKeysByUser()
     {
-
         UserKeyJsonValue userKeyJsonValueA = new UserKeyJsonValue();
 
         userKeyJsonValueA.setValue( "{}" );
@@ -88,7 +87,6 @@
     @Test
     public void testAddUserKeyJsonValuesAndGetUserKEyJsonValuesByUser()
     {
-
         UserKeyJsonValue userKeyJsonValueA = new UserKeyJsonValue();
 
         userKeyJsonValueA.setValue( "{}" );

=== modified file 'dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/dbms/HibernateDbmsManager.java'
--- dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/dbms/HibernateDbmsManager.java	2016-01-04 02:27:49 +0000
+++ dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/dbms/HibernateDbmsManager.java	2016-02-02 22:45:48 +0000
@@ -39,7 +39,6 @@
 
 /**
  * @author Lars Helge Overland
- * @version $Id$
  */
 public class HibernateDbmsManager
     implements DbmsManager