Repository navigation
Conversation
jzheaux
left a comment
There was a problem hiding this comment.
@nenaraab Thank you for addressing all these items. There are two that I think I miscommunicated on, so I've tried clarifying that in one more review.
Once you have this commit ready, would you squash your commits, please? Thanks again for the PR!
|
Sorry, i was not sure how to correct a pull request best... If i would have squashed it, would it then look prettier, i.e. better readable for review? The additional String identifier was introduced by intention, to make sure that the String2String (and not only LongAsString2String) conversion works as expected. Thanks for your time, help and review :-) |
โฆl_object_identity.object_id_identity Co-Authored-By: nenaraab <nenaraab@users.noreply.github.com>
|
@nenaraab Squashing helps with backpatches mostly, but yes it also helps a bit with the review process. |
|
@jzheaux Before I'v started with the code change, i created the test to simulate the issues i've seen within my application when not specifying any ConversionService. Before of this pull request: this test case would have been green. @Test
public void shouldReturnStringWhenStringClassIdType() throws SQLException {
// given
String identifier = DEFAULT_IDENTIFIER_AS_STRING;
// when
Serializable newIdentifier = aclClassIdUtils.identifierFrom(identifier, resultSet);
...
}...as โ999โ can be transformed to Long 999L. But the one below not: @Test
public void shouldReturnStringWhenStringClassIdType() throws SQLException {
// given
String identifier = "MY_STRING_IDENTIFIER";
// when
Serializable newIdentifier = aclClassIdUtils.identifierFrom(identifier, resultSet);
....
}It gives me an That's why i've decided to use a real "String" Identifier ... |
|
So, the commits are squashed... anything else to change :-) |
|
Thanks again, @nenaraab for the PR! This is now merged into |
Motivation
As of now only
acl_object_identity.object_id_identityof typejava.util.Longare supported. In case you use identifiers of typejava.lang.Stringorjava.util.UUIDthe application needs to provide a ConversionService. This commit comes with two default Converters to support Strings and UUIDs.related commit
pwheel@8efec02
related issue(s)