I've been noted by Sonar that this is a smelly code. How could I fix it?
invokeFieldAccessor(property.getField(), this.instance, theValue,
new FieldAccessorHandler() {
@Override
public synchronized Object accessField(
final Field field, final Object objectInstance,
final Object value) {
try {
field.set(objectInstance, value);
} catch (Exception e) {
return null;
}
return null;
}
});
Aucun commentaire:
Enregistrer un commentaire