exclude classes with KinesisClientInternalApi annotation from backwards compatibility check
This commit is contained in:
parent
5471c75077
commit
668d59a4b0
1 changed files with 6 additions and 3 deletions
|
|
@ -31,10 +31,13 @@ diff <(echo "$LATEST_PACKAGES") <(echo "$CURRENT_PACKAGES") | grep '^<' && REMOV
|
||||||
echo "Checking if methods in $LATEST_VERSION were removed in $CURRENT_VERSION"
|
echo "Checking if methods in $LATEST_VERSION were removed in $CURRENT_VERSION"
|
||||||
for package in $LATEST_PACKAGES
|
for package in $LATEST_PACKAGES
|
||||||
do
|
do
|
||||||
# Get the second line of the output which indicates whether a class is public. Only classes that
|
# Skip classes which are not public. Only public class should be checked since other classes will not break backwards compatibility.
|
||||||
# are public should be checked; other classes will not break backwards compatibility.
|
|
||||||
CLASS_DEFINITION=$(javap -classpath $LATEST_JAR $package | head -2 | tail -1)
|
CLASS_DEFINITION=$(javap -classpath $LATEST_JAR $package | head -2 | tail -1)
|
||||||
if [[ $CLASS_DEFINITION != *"public"* ]]
|
|
||||||
|
# Skip classes with the KinesisClientInternalApi annotation. These classes are subject to breaking backwards compatibility.
|
||||||
|
INTERNAL_API_RESULT=$(javap -v -classpath $LATEST_JAR $package | grep KinesisClientInternalApi)
|
||||||
|
|
||||||
|
if [[ $CLASS_DEFINITION != *"public"* || $INTERNAL_API_RESULT != "" ]]
|
||||||
then
|
then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue