dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #35684
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18263: Minor
------------------------------------------------------------
revno: 18263
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2015-02-14 13:53:03 +0100
message:
Minor
modified:
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/DefaultMetaDataDependencyService.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-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/DefaultMetaDataDependencyService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/DefaultMetaDataDependencyService.java 2015-02-14 12:29:29 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/DefaultMetaDataDependencyService.java 2015-02-14 12:53:03 +0000
@@ -105,11 +105,13 @@
{
Map<String, List<IdentifiableObject>> identifiableObjectMap = new HashMap<>();
+ List<Schema> schemas = schemaService.getMetadataSchemas();
+
for ( Map.Entry<String, Object> identifiableObjectUidEntry : identifiableObjectUidMap.entrySet() )
{
String className = identifiableObjectUidEntry.getKey();
- for ( Schema schema : schemaService.getMetadataSchemas() )
+ for ( Schema schema : schemas )
{
if ( className.equals( (schema.getPlural() + "_all") ) )
{
@@ -239,10 +241,12 @@
{
List<IdentifiableObject> dependencies = new ArrayList<>();
List<Field> fields = ReflectionUtils.getAllFields( identifiableObject.getClass() );
-
+
+ List<Schema> schemas = schemaService.getMetadataSchemas();
+
for ( Field field : fields )
{
- for ( Schema schema : schemaService.getMetadataSchemas() )
+ for ( Schema schema : schemas )
{
if ( ReflectionUtils.isType( field, schema.getKlass() ) )
{