mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +00:00
[DURACOM-318] improve code
(cherry picked from commit 8e0ca2e6f88b0251edf8a840f65135590c65f088)
(cherry picked from commit 4270170d40
)
This commit is contained in:

committed by
max.nuding

parent
a24340a197
commit
2104d605bd
@@ -549,4 +549,5 @@ public final class Utils {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -11,6 +11,7 @@ import java.io.Serializable;
|
||||
import java.sql.SQLException;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.apache.commons.lang.math.NumberUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.dspace.app.rest.model.ResourcePolicyRest;
|
||||
import org.dspace.app.rest.utils.ContextUtil;
|
||||
@@ -69,7 +70,7 @@ public class ResourcePolicyAdminPermissionEvalutatorPlugin extends RestObjectPer
|
||||
|
||||
try {
|
||||
DSpaceObject dso = null;
|
||||
if (Utils.isConvertibleToInt(targetId.toString())) {
|
||||
if (NumberUtils.isNumber(targetId.toString())) {
|
||||
var id = Integer.parseInt(targetId.toString());
|
||||
dso = getDSO(context, id);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user