[PR] XBEAN-453 revision - don't alter property order in case -insensitive mode [geronimo-xbean]
jungm (via GitHub) <[email protected]>
| Newsgroups | gmane.comp.java.geronimo.devel |
|---|---|
| Message-ID | <[email protected]> |
jungm opened a new pull request, #50:
URL: https://github.com/apache/geronimo-xbean/pull/50
#47 changed the behavior of ObjectRecipe to copy all properties into a TreeMap, this obviously caused the original order to be lost and a case like this (happens regularly in TomEE) is broken because the last property `properties` is processed too early:
```
@Test
public void testPropertyOrderNotAlteredCaseInsensitive() {
ObjectRecipe recipe = new ObjectRecipe(CatchAll.class);
recipe.allow(Option.CASE_INSENSITIVE_PROPERTIES);
recipe.setProperty("123", "a");
recipe.setProperty("zzz", 1);
recipe.setProperty("aaa", 2);
recipe.setProperty("properties", new UnsetPropertiesRecipe());
CatchAll catchAll = (CatchAll) recipe.create();
assertEquals(3, catchAll.properties.size());
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe-nmThH5wfGryY1pf4d8vP8EB+6BGkLq7r@public.gmane.org
For queries about this service, please contact Infrastructure at:
users-pF6z+fRhj9EyzMRdD/[email protected]