mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-17 15:03:18 +00:00
Refactor to remove deprecation warning for ObjectUtils.equals
This commit is contained in:
@@ -8,6 +8,7 @@
|
|||||||
package org.dspace.authorize;
|
package org.dspace.authorize;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.persistence.CascadeType;
|
import javax.persistence.CascadeType;
|
||||||
import javax.persistence.Column;
|
import javax.persistence.Column;
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
@@ -23,7 +24,6 @@ import javax.persistence.Table;
|
|||||||
import javax.persistence.Temporal;
|
import javax.persistence.Temporal;
|
||||||
import javax.persistence.TemporalType;
|
import javax.persistence.TemporalType;
|
||||||
|
|
||||||
import org.apache.commons.lang3.ObjectUtils;
|
|
||||||
import org.dspace.content.DSpaceObject;
|
import org.dspace.content.DSpaceObject;
|
||||||
import org.dspace.core.Context;
|
import org.dspace.core.Context;
|
||||||
import org.dspace.core.ReloadableEntity;
|
import org.dspace.core.ReloadableEntity;
|
||||||
@@ -123,16 +123,16 @@ public class ResourcePolicy implements ReloadableEntity<Integer> {
|
|||||||
if (getAction() != other.getAction()) {
|
if (getAction() != other.getAction()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!ObjectUtils.equals(getEPerson(), other.getEPerson())) {
|
if (!Objects.equals(getEPerson(), other.getEPerson())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!ObjectUtils.equals(getGroup(), other.getGroup())) {
|
if (!Objects.equals(getGroup(), other.getGroup())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!ObjectUtils.equals(getStartDate(), other.getStartDate())) {
|
if (!Objects.equals(getStartDate(), other.getStartDate())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!ObjectUtils.equals(getEndDate(), other.getEndDate())) {
|
if (!Objects.equals(getEndDate(), other.getEndDate())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@@ -185,7 +185,7 @@ public class ResourcePolicy implements ReloadableEntity<Integer> {
|
|||||||
/**
|
/**
|
||||||
* set the action this policy authorizes
|
* set the action this policy authorizes
|
||||||
*
|
*
|
||||||
* @param myid action ID from {@link org.dspace.core.Constants#Constants Constants}
|
* @param myid action ID from {@link org.dspace.core.Constants Constants}
|
||||||
*/
|
*/
|
||||||
public void setAction(int myid) {
|
public void setAction(int myid) {
|
||||||
this.actionId = myid;
|
this.actionId = myid;
|
||||||
|
Reference in New Issue
Block a user