Skip to content
Snippets Groups Projects
Commit 0d40f72f authored by felmer's avatar felmer
Browse files

bug in AtomicEntityOperationDetails.appendTo() fixed

parent b69a791c
No related branches found
No related tags found
No related merge requests found
...@@ -289,16 +289,18 @@ public class AtomicEntityOperationDetails implements Serializable ...@@ -289,16 +289,18 @@ public class AtomicEntityOperationDetails implements Serializable
{ {
object = ((Map<?, ?>) object).entrySet(); object = ((Map<?, ?>) object).entrySet();
} }
if (object instanceof Collection<?> == false) if (object instanceof Collection<?>)
{ {
builder.append(name, object); Collection<?> collection = (Collection<?>) object;
} if (collection.isEmpty())
Collection<?> collection = (Collection<?>) object; {
if (collection.isEmpty()) return;
}
builder.append(name, CollectionUtils.abbreviate(collection, 100));
} else
{ {
return; builder.append(name, object);
} }
builder.append(name, CollectionUtils.abbreviate(collection, 100));
} }
} }
...@@ -107,7 +107,7 @@ public class AtomicEntityOperationDetailsTest extends AssertJUnit ...@@ -107,7 +107,7 @@ public class AtomicEntityOperationDetailsTest extends AssertJUnit
List<VocabularyUpdatesDTO> vocabularyUpdates = Collections.emptyList(); List<VocabularyUpdatesDTO> vocabularyUpdates = Collections.emptyList();
AtomicEntityOperationDetails details = AtomicEntityOperationDetails details =
new AtomicEntityOperationDetails(null, null, spaceRegistrations, new AtomicEntityOperationDetails(new TechId(42), null, spaceRegistrations,
projectRegistrations, projectUpdates, experimentRegistrations, projectRegistrations, projectUpdates, experimentRegistrations,
experimentUpdates, sampleUpdates, sampleRegistrations, experimentUpdates, sampleUpdates, sampleRegistrations,
materialRegistrations, materialUpdates, materialRegistrations, materialUpdates,
...@@ -119,7 +119,8 @@ public class AtomicEntityOperationDetailsTest extends AssertJUnit ...@@ -119,7 +119,8 @@ public class AtomicEntityOperationDetailsTest extends AssertJUnit
// Then // Then
assertEquals( assertEquals(
"AtomicEntityOperationDetails[spaceRegistrations=[S0, S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11, " "AtomicEntityOperationDetails[registrationIdOrNull=42,"
+ "spaceRegistrations=[S0, S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11, "
+ "S12, S13, S14, S15, S16, S17, S18, S19, S20, S21, S22, S23, S24, S25, S26, S27, S28, S29, " + "S12, S13, S14, S15, S16, S17, S18, S19, S20, S21, S22, S23, S24, S25, S26, S27, S28, S29, "
+ "S30, S31, S32, S33, S34, S35, S36, S37, S38, S39, S40, S41, S42, S43, S44, S45, S46, S47, " + "S30, S31, S32, S33, S34, S35, S36, S37, S38, S39, S40, S41, S42, S43, S44, S45, S46, S47, "
+ "S48, S49, S50, S51, S52, S53, S54, S55, S56, S57, S58, S59, S60, S61, S62, S63, S64, S65, " + "S48, S49, S50, S51, S52, S53, S54, S55, S56, S57, S58, S59, S60, S61, S62, S63, S64, S65, "
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment