Commit 632d44e9 authored by liaozan's avatar liaozan 🏀

Direct return if entity is null

parent 801608a3
......@@ -25,6 +25,9 @@ public class BaseServiceExtImpl<M extends BaseMapper<Source>, Source extends Bas
}
protected Target toTarget(Source source, Target target) {
if (target == null) {
return null;
}
editTarget(source, target);
return target;
}
......@@ -43,6 +46,9 @@ public class BaseServiceExtImpl<M extends BaseMapper<Source>, Source extends Bas
}
protected Source fromTarget(Source source, Target target) {
if (target == null) {
return null;
}
editSource(source, target);
return source;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment