[VIVO-1737] Update Error Prone (#131)

Resolves: https://jira.lyrasis.org/browse/VIVO-1737
This commit is contained in:
Graham Triggs 2020-01-23 18:12:03 +00:00 committed by Andrew Woods
parent 87e55f063c
commit 6d64d27fe4
4 changed files with 33 additions and 12 deletions

View file

@ -20,6 +20,7 @@ import edu.cornell.mannlib.vitro.webapp.filestorage.model.ImageInfo;
/**
* Represents a single entity record.
*/
@SuppressWarnings("ComparableType")
public class IndividualImpl extends BaseResourceBean implements Individual, Comparable<Individual> {
/**
* This can be used as a "not initialized" indicator for a property that

View file

@ -469,7 +469,7 @@ public class JSONReconcileServlet extends VitroHttpServlet {
return queryStr.replaceAll("\\s+", "\\\\ ");
}
public class SearchResult implements Comparable<Object> {
public class SearchResult implements Comparable<SearchResult> {
private String label;
private String uri;
@ -493,7 +493,7 @@ public class JSONReconcileServlet extends VitroHttpServlet {
return map;
}
public int compareTo(Object o) throws ClassCastException {
public int compareTo(SearchResult o) throws ClassCastException {
if ( !(o instanceof SearchResult) ) {
throw new ClassCastException("Error in SearchResult.compareTo(): expected SearchResult object.");
}

View file

@ -311,7 +311,7 @@ public class AutocompleteController extends VitroAjaxController {
return RDFServiceUtils.getRDFService(new VitroRequest(req));
}
public class SearchResult implements Comparable<Object> {
public class SearchResult implements Comparable<SearchResult> {
private String label;
private String uri;
private String msType;
@ -375,7 +375,7 @@ public class AutocompleteController extends VitroAjaxController {
return jsonObj;
}
public int compareTo(Object o) throws ClassCastException {
public int compareTo(SearchResult o) throws ClassCastException {
if ( !(o instanceof SearchResult) ) {
throw new ClassCastException("Error in SearchResult.compareTo(): expected SearchResult object.");
}