Object ID Identicy conversion to long fails on old schema

This change fixed a bug which tried to convert non-string object as string

Fixes gh-7621
This commit is contained in:
Dávid Kovács
2020-05-16 14:33:53 +02:00
committed by Rob Winch
parent 21c1d98f64
commit eaaee899fc
2 changed files with 12 additions and 1 deletions

View File

@@ -118,7 +118,7 @@ class AclClassIdUtils {
*/
private Long convertToLong(Serializable identifier) {
Long idAsLong;
if (canConvertFromStringTo(Long.class)) {
if (conversionService.canConvert(identifier.getClass(), Long.class)) {
idAsLong = conversionService.convert(identifier, Long.class);
} else {
idAsLong = Long.valueOf(identifier.toString());