← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 19535: Bugfix: Attribute.toString() was calling Attribute.toString(), which in turn called Attribute.toS...

 

------------------------------------------------------------
revno: 19535
committer: Halvdan Hoem Grelland <halvdanhg@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2015-07-03 13:01:19 +0200
message:
  Bugfix: Attribute.toString() was calling Attribute.toString(), which in turn called Attribute.toString(), causing recursive calls and ultimately a stack overflow. Caused import to fail when AttributeValues were present. Changed AttributeValue.toString() to only use the UID of the associated attribute.
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/attribute/AttributeValue.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/attribute/AttributeValue.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/attribute/AttributeValue.java	2015-01-17 07:41:26 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/attribute/AttributeValue.java	2015-07-03 11:01:19 +0000
@@ -121,7 +121,7 @@
     {
         return "AttributeValue{" +
             "id=" + id +
-            ", attribute=" + attribute +
+            ", attribute=" + ( attribute != null ? attribute.getUid() : "" ) +
             ", value='" + value + '\'' +
             '}';
     }