Skip to content

Commit 385f72f

Browse files
committed
Refactor
1 parent 687a1b6 commit 385f72f

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

sdk1/src/test/java/com/amazonaws/services/dynamodbv2/datamodeling/internal/AttributeValueMarshallerTest.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -266,13 +266,12 @@ public void testSimpleMapWithNull() {
266266
marshall(av);
267267
Assert.fail("Unexpected success");
268268
} catch (final NullPointerException npe) {
269-
// Map entries may permute under nondeterministic Java API
269+
// Map entries may permute under nondeterministic JAVA API
270270
String npeMessage = npe.getMessage();
271271
String common = "Encountered null map value for key NullKeyValue while marshalling attribute value";
272-
String permutation1 = common + " {M: {KeyValue={S: ValueValue,}, NullKeyValue=null},}";
273-
String permutation2 = common + " {M: {NullKeyValue=null, KeyValue={S: ValueValue,}},}";
274-
boolean flag = ((permutation1.equals(npeMessage)) || (permutation2.equals(npeMessage)));
275-
Assert.assertTrue(flag);
272+
String case1 = common + " {M: {KeyValue={S: ValueValue,}, NullKeyValue=null},}";
273+
String case2 = common + " {M: {NullKeyValue=null, KeyValue={S: ValueValue,}},}";
274+
Assert.assertTrue((case1.equals(npeMessage)) || (case2.equals(npeMessage)));
276275
}
277276
}
278277

0 commit comments

Comments
 (0)