Examples of errors detected by the V6023 diagnostic


V6023. Parameter 'A' is always rewritten in method body before being used.


CUBA Platform

V6023 Parameter 'salt' is always rewritten in method body before being used. BCryptEncryptionModule.java(47)


@Override
public String getHash(String content, String salt) {
  salt = BCrypt.gensalt();
  return BCrypt.hashpw(content, salt);
}

CUBA Platform

V6023 Parameter 'offsetWidth' is always rewritten in method body before being used. CubaSuggestionFieldWidget.java(433)


@Override
public void setPosition(int offsetWidth, int offsetHeight) {
  offsetHeight = getOffsetHeight();
  ....
  if (offsetHeight + getPopupTop() > ....)) {
    ....
  }
  ....
  offsetWidth = containerFirstChild.getOffsetWidth();
  if (offsetWidth + getPopupLeft() > ....)) {
      ....
  } else {
      left = getPopupLeft();
  }
  setPopupPosition(left, top);
}

Similar errors can be found in some other places:

  • V6023 Parameter 'offsetHeight' is always rewritten in method body before being used. CubaSuggestionFieldWidget.java(433)


Bugs Found

Checked Projects
354
Collected Errors
13 290