=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/Schema.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/Schema.java 2015-09-23 10:48:14 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/Schema.java 2015-09-24 03:20:17 +0000 @@ -447,7 +447,7 @@ @JsonProperty @JacksonXmlElementWrapper( localName = "references", namespace = DxfNamespaces.DXF_2_0 ) @JacksonXmlProperty( localName = "reference", namespace = DxfNamespaces.DXF_2_0 ) - @SuppressWarnings("rawtypes") + @SuppressWarnings( "rawtypes" ) public Set getReferences() { return getProperties().stream() @@ -461,13 +461,8 @@ { persistedProperties = new HashMap<>(); - for ( Map.Entry entry : getPropertyMap().entrySet() ) - { - if ( entry.getValue().isPersisted() ) - { - persistedProperties.put( entry.getKey(), entry.getValue() ); - } - } + getPropertyMap().entrySet().stream().filter( entry -> entry.getValue().isPersisted() ) + .forEach( entry -> persistedProperties.put( entry.getKey(), entry.getValue() ) ); } return persistedProperties; @@ -479,13 +474,8 @@ { nonPersistedProperties = new HashMap<>(); - for ( Map.Entry entry : getPropertyMap().entrySet() ) - { - if ( !entry.getValue().isPersisted() ) - { - nonPersistedProperties.put( entry.getKey(), entry.getValue() ); - } - } + getPropertyMap().entrySet().stream().filter( entry -> !entry.getValue().isPersisted() ) + .forEach( entry -> nonPersistedProperties.put( entry.getKey(), entry.getValue() ) ); } return nonPersistedProperties; @@ -533,13 +523,8 @@ { List authorityList = Lists.newArrayList(); - for ( Authority authority : authorities ) - { - if ( type.equals( authority.getType() ) ) - { - authorityList.addAll( authority.getAuthorities() ); - } - } + authorities.stream().filter( authority -> type.equals( authority.getType() ) ) + .forEach( authority -> authorityList.addAll( authority.getAuthorities() ) ); authorityMap.put( type, authorityList ); }