Skip to content

Commit af1e1d5

Browse files
authored
Remove japicmp special case (#6933)
1 parent 2378076 commit af1e1d5

File tree

1 file changed

+0
-47
lines changed

1 file changed

+0
-47
lines changed

buildSrc/src/main/kotlin/otel.japicmp-conventions.gradle.kts

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -47,55 +47,8 @@ class AllowNewAbstractMethodOnAutovalueClasses : AbstractRecordingSeenMembers()
4747
}
4848

4949
class SourceIncompatibleRule : AbstractRecordingSeenMembers() {
50-
51-
fun ignoreAddLogRecordProcessorCustomizerReturnTypeChange(member: JApiCompatibility): Violation? {
52-
if (member is JApiClass &&
53-
member.newClass.get().name.equals("io.opentelemetry.sdk.autoconfigure.AutoConfiguredOpenTelemetrySdkBuilder") &&
54-
member.isChangeCausedByClassElement
55-
) {
56-
// member.isChangeCausedByClassElement check above
57-
// limits source of changes to fields, methods and constructors
58-
59-
for (method in member.methods) {
60-
if (!method.isSourceCompatible()) {
61-
// addLogRecordProcessorCustomizer method had a return type change from base to impl class,
62-
// japicmp (correctly) doesn't consider it as a METHOD_RETURN_TYPE_CHANGED
63-
// compatibility issue. But still thinks that something wrong.
64-
// Since it thinks that method did not change, it reports it as class-level violation,
65-
// and we need to suppress it, but keep other checks on.
66-
if (method.name.equals("addLogRecordProcessorCustomizer") &&
67-
method.compatibilityChanges.isEmpty() &&
68-
method.changeStatus == JApiChangeStatus.UNCHANGED) {
69-
return null;
70-
}
71-
return Violation.error(method, "Method is not source compatible: $method")
72-
}
73-
}
74-
75-
for (field in member.fields) {
76-
if (!field.isSourceCompatible()) {
77-
return Violation.error(field, "Field is not source compatible: $field")
78-
}
79-
}
80-
81-
for (constructor in member.constructors) {
82-
if (!constructor.isSourceCompatible()) {
83-
return Violation.error(constructor, "Constructor is not source compatible: $constructor")
84-
}
85-
}
86-
}
87-
88-
return Violation.error(member, "Not source compatible: $member")
89-
}
90-
9150
override fun maybeAddViolation(member: JApiCompatibility): Violation? {
9251
if (!member.isSourceCompatible()) {
93-
// TODO: remove after 1.36.0 is released, see https://github.com/open-telemetry/opentelemetry-java/pull/6248
94-
if (member.compatibilityChanges.isEmpty()) {
95-
return ignoreAddLogRecordProcessorCustomizerReturnTypeChange(member)
96-
}
97-
// end of suppression
98-
9952
return Violation.error(member, "Not source compatible: $member")
10053
}
10154
return null

0 commit comments

Comments
 (0)