*/
private String getSoneId(String phrase) {
String soneId = phrase.startsWith("sone://") ? phrase.substring(7) : phrase;
- return (webInterface.getCore().getSone(soneId) != null) ? soneId : null;
+ return (webInterface.getCore().getSone(soneId).isPresent()) ? soneId : null;
}
/**
@Override
public boolean apply(Hit<?> hit) {
- return hit.getScore() > 0;
+ return (hit == null) ? false : hit.getScore() > 0;
}
};