mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-13 04:53:16 +00:00
First batch of errorprone fixes. #3061
This commit is contained in:
@@ -24,7 +24,6 @@ import javax.persistence.Table;
|
||||
import javax.persistence.Transient;
|
||||
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.content.comparator.NameAscendingComparator;
|
||||
import org.dspace.content.factory.ContentServiceFactory;
|
||||
import org.dspace.content.service.CommunityService;
|
||||
@@ -42,18 +41,12 @@ import org.hibernate.proxy.HibernateProxyHelper;
|
||||
* <code>update</code> is called.
|
||||
*
|
||||
* @author Robert Tansley
|
||||
* @version $Revision$
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "community")
|
||||
@Cacheable
|
||||
@org.hibernate.annotations.Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE, include = "non-lazy")
|
||||
public class Community extends DSpaceObject implements DSpaceObjectLegacySupport {
|
||||
/**
|
||||
* log4j category
|
||||
*/
|
||||
private static final Logger log = org.apache.logging.log4j.LogManager.getLogger(Community.class);
|
||||
|
||||
@Column(name = "community_id", insertable = false, updatable = false)
|
||||
private Integer legacyId;
|
||||
|
||||
@@ -215,7 +208,7 @@ public class Community extends DSpaceObject implements DSpaceObjectLegacySupport
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object other) {
|
||||
if (other == null) {
|
||||
if (!(other instanceof Community)) {
|
||||
return false;
|
||||
}
|
||||
Class<?> objClass = HibernateProxyHelper.getClassWithoutInitializingProxy(other);
|
||||
@@ -223,11 +216,7 @@ public class Community extends DSpaceObject implements DSpaceObjectLegacySupport
|
||||
return false;
|
||||
}
|
||||
final Community otherCommunity = (Community) other;
|
||||
if (!this.getID().equals(otherCommunity.getID())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
return this.getID().equals(otherCommunity.getID());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user