chia7712 commented on code in PR #22772:
URL: https://github.com/apache/kafka/pull/22772#discussion_r3553200597
##########
api-checker/core/src/main/java/org/apache/kafka/apicheck/CascadeValidator.java:
##########
@@ -444,8 +444,14 @@ private static void checkBinaryReference(String
binaryName, String violationType
private static PublicApiViolation asSuppression(PublicApiViolation
original, String reason) {
boolean noReason = reason.isEmpty();
String prettyReason = noReason ? PublicApiViolation.NO_REASON_MARKER :
reason;
+ // Class-level cascade findings (e.g. INVALID_SUPERTYPE) carry a null
memberName; only
+ // append "#member" when we actually have one, so class-scope
suppressions render as
+ // "Suppressed INVALID_SUPERTYPE in org.apache.kafka…Owner" rather
than "…Owner#null".
+ String location = original.getMemberName() != null
+ ? original.getClassName() + "#" + original.getMemberName()
+ : original.getClassName();
String description = "Suppressed " + original.getViolationType() + "
in "
- + original.getClassName() + "#" + original.getMemberName()
+ + location
+ " — " + original.getDescription()
Review Comment:
Would you mind using ascii code instead? `—` -> `-`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]