Added suppress statements to avoid IDEA complaints.

This commit is contained in:
Tom Vahlman 2012-03-24 15:02:14 +01:00
parent 1a363128ac
commit e6490d31a3

@ -275,6 +275,7 @@ public class SupervisorUnmatchedThesisPanel extends Panel {
return new CompareToBuilder().append(o1.getKeyword().toLowerCase(), o2.getKeyword().toLowerCase()).toComparison();
}
});
//noinspection unchecked
((ListView) keyWordsContainer.get("keywordList")).setModelObject(keywords);
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append("Added the keyword ").append(newSelection).append(" (").append(newSelection.getType().getName()).append(") to the search terms.");
@ -331,7 +332,7 @@ public class SupervisorUnmatchedThesisPanel extends Panel {
protected void onClick(AjaxRequestTarget target) {
keywordListItem.remove();
Session.get().info("Removed the keyword " + keyword + " from the search terms.");
final List<Keyword> keywordList = ((ListView) keyWordsContainer.get("keywordList")).getModelObject();
@SuppressWarnings("unchecked") final List<Keyword> keywordList = ((ListView) keyWordsContainer.get("keywordList")).getModelObject();
if(keywordList.contains(keyword)) {
keywordList.remove(keyword);
}
@ -415,7 +416,7 @@ public class SupervisorUnmatchedThesisPanel extends Panel {
private static final long serialVersionUID = 443680343329839590L;
@Override
protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
List<Keyword> keywordList = ((ListView) keyWordsContainer.get("keywordList")).getModelObject();
@SuppressWarnings("unchecked") List<Keyword> keywordList = ((ListView) keyWordsContainer.get("keywordList")).getModelObject();
if(keywordList != null && !keywordList.isEmpty()) {
keywordList.clear();
}