You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During a recent code review for a PR in Liberty Tools for IntelliJ (OpenLiberty/liberty-tools-intellij#1037) we noticed a comment in the code "A single field cannot have the same" which we couldn't make sense of and started to wonder whether the constraint being checked is correct. A diagnostic is reported if both the "jakarta.persistence.MapKey" and "jakarta.persistence.MapKeyClass" are present. We should check if that's actually correct and if it is, update this comment to accurately state what the constraint is. It would be best if it contained a link / reference to the relevant portion of the Jakarta Persistence spec.
if (hasMapKeyAnnotation && hasMapKeyClassAnnotation) {
// A single field cannot have the same
Range range = PositionUtils.toNameRange(method, context.getUtils());
diagnostics.add(context.createDiagnostic(uri,
Messages.getMessage("MapKeyAnnotationsNotOnSameMethod"), range,
Constants.DIAGNOSTIC_SOURCE, null,
ErrorCode.InvalidMapKeyAnnotationsOnSameMethod, DiagnosticSeverity.Error));
}
The text was updated successfully, but these errors were encountered:
During a recent code review for a PR in Liberty Tools for IntelliJ (OpenLiberty/liberty-tools-intellij#1037) we noticed a comment in the code "A single field cannot have the same" which we couldn't make sense of and started to wonder whether the constraint being checked is correct. A diagnostic is reported if both the "jakarta.persistence.MapKey" and "jakarta.persistence.MapKeyClass" are present. We should check if that's actually correct and if it is, update this comment to accurately state what the constraint is. It would be best if it contained a link / reference to the relevant portion of the Jakarta Persistence spec.
The text was updated successfully, but these errors were encountered: