getSone(id, true) can still return null if the ID is obviously invalid,
e.g. an empty String.
*/
public void followSone(Sone sone, String soneId) {
Validation.begin().isNotNull("Sone", sone).isNotNull("Sone ID", soneId).check();
*/
public void followSone(Sone sone, String soneId) {
Validation.begin().isNotNull("Sone", sone).isNotNull("Sone ID", soneId).check();
- Sone followedSone = getSone(soneId);
+ Sone followedSone = getSone(soneId, true);
if (followedSone == null) {
logger.log(Level.INFO, String.format("Ignored Sone with invalid ID: %s", soneId));
return;
if (followedSone == null) {
logger.log(Level.INFO, String.format("Ignored Sone with invalid ID: %s", soneId));
return;