Merge pull request #6434 from vector-im/feature/bca/check_serialized_frozen

Simple check to prevent frozen class modificaiton
This commit is contained in:
Benoit Marty 2022-07-01 18:01:08 +02:00 committed by GitHub
commit 93b7e1094c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 0 deletions

1
changelog.d/6434.misc Normal file
View file

@ -0,0 +1 @@
Add code check to prevent modification of frozen class

View file

@ -16,6 +16,21 @@
# limitations under the License.
#
#######################################################################################################################
# Check frozen class modification
#######################################################################################################################
echo "Check if frozen class modified"
git diff "HEAD@{1}" --name-only | grep -e OlmInboundGroupSessionWrapper.kt -e OlmInboundGroupSessionWrapper2.kt
FROZEN_CHANGED=$?
if [ ${FROZEN_CHANGED} -eq 0 ]; then
echo "❌ FROZEN CLASS CHANGED ERROR"
exit 1
else
echo "Frozen check OK"
fi
#######################################################################################################################
# Check drawable quantity
#######################################################################################################################