@@ -81,8 +81,9 @@ public Optional<AuditableBeanWrapper> getBeanWrapperFor(Object source) {
81
81
MappingAuditingMetadata metadata = metadataCache .computeIfAbsent (type ,
82
82
key -> new MappingAuditingMetadata (entity ));
83
83
84
- return Optional .<AuditableBeanWrapper > ofNullable (metadata .isAuditable ()
85
- ? new MappingMetadataAuditableBeanWrapper (entity .getPropertyAccessor (it ), metadata ) : null );
84
+ return Optional .<AuditableBeanWrapper > ofNullable (
85
+ metadata .isAuditable () ? new MappingMetadataAuditableBeanWrapper (entity .getPropertyAccessor (it ), metadata )
86
+ : null );
86
87
87
88
}).orElseGet (() -> super .getBeanWrapperFor (source ));
88
89
});
@@ -190,8 +191,7 @@ public Object setLastModifiedBy(Object value) {
190
191
*/
191
192
@ Override
192
193
public Optional <TemporalAccessor > getLastModifiedDate () {
193
- return getAsTemporalAccessor (metadata .lastModifiedDateProperty .map (accessor ::getProperty ),
194
- LocalDateTime .class );
194
+ return getAsTemporalAccessor (metadata .lastModifiedDateProperty .map (accessor ::getProperty ), LocalDateTime .class );
195
195
}
196
196
197
197
/*
@@ -205,16 +205,16 @@ public TemporalAccessor setLastModifiedDate(TemporalAccessor value) {
205
205
206
206
private <T , P extends PersistentProperty <?>> T setProperty (Optional <P > property , T value ) {
207
207
208
- property .ifPresent (it -> this .accessor .setProperty (it , Optional . of ( value ) ));
208
+ property .ifPresent (it -> this .accessor .setProperty (it , value ));
209
209
210
210
return value ;
211
211
}
212
212
213
213
private <P extends PersistentProperty <?>> TemporalAccessor setDateProperty (Optional <P > property ,
214
214
TemporalAccessor value ) {
215
215
216
- property . ifPresent (
217
- it -> this .accessor .setProperty (it , getDateValueToSet (value , it .getType (), accessor .getBean ())));
216
+ property
217
+ . ifPresent ( it -> this .accessor .setProperty (it , getDateValueToSet (value , it .getType (), accessor .getBean ())));
218
218
219
219
return value ;
220
220
}
0 commit comments