'The method orElse(PersistentProperty<?>) in the type Optional<PersistentProperty<?>> is not applicable for the arguments(Object)
Any help or hint would be greatly appreciated it!!! I am using open jdk 11. Based o this line 65:
I am getting this error: The method orElse(PersistentProperty) in the type Optional> is not applicable for the arguments(Object)
This is the code:
private void processResourceId(MongoPersistentEntity<?> entity, PersistentPropertyAccessor<Object> sourceAccessor, UUID uuid) {
// PersistentProperty<?> resProperty = (PersistentProperty)this.getGeneratedResourceIdProperty(entity.getType(), entity).orElse((Object)null);
PersistentProperty<?> resProperty = (PersistentProperty)this.getGeneratedResourceIdProperty(entity.getType(), entity).orElse((Object)null);
if (resProperty != null && resProperty.getType() == String.class) {
if (this.isStringPropertyHasText(sourceAccessor, resProperty)) {
Object id = this.getUuidString(uuid);
sourceAccessor.setProperty(resProperty, id);
}
}
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

