Examples of errors detected by the V6014 diagnostic


V6014. It's odd that this method always returns one and the same value of NN.


CUBA Platform

V6014 It's odd that this method always returns one and the same value. DefaultExceptionHandler.java(40)


@Override
public boolean handle(ErrorEvent event, App app) {
  Throwable t = event.getThrowable();
  if (t instanceof SocketException
      || ExceptionUtils.getRootCause(t) instanceof SocketException) {
    return true;
  }
  if (ExceptionUtils.getThrowableList(t).stream()
      .anyMatch(o -> o.getClass().getName().equals("...."))) {
    return true;
  }
  if (StringUtils.contains(ExceptionUtils.getMessage(t), "....")) {
    return true;
  }
  AppUI ui = AppUI.getCurrent();
  if (ui == null) {
    return true;
  }
  if (t != null) {
    if (app.getConnection().getSession() != null) {
      showDialog(app, t);
    } else {
      showNotification(app, t);
    }
  }
  return true;
}

Similar errors can be found in some other places:

  • V6014 It's odd that this method always returns one and the same value. ErrorNodesFinder.java(31)
  • V6014 It's odd that this method always returns one and the same value. FileDownloadController.java(69)
  • V6014 It's odd that this method always returns one and the same value. IdVarSelector.java(73)
  • And 4 additional diagnostic messages.


Bugs Found

Checked Projects
354
Collected Errors
13 290