diff --git a/.github/scripts/generate-quality-report.py b/.github/scripts/generate-quality-report.py index c5c028bc26..0fa29d4732 100755 --- a/.github/scripts/generate-quality-report.py +++ b/.github/scripts/generate-quality-report.py @@ -769,11 +769,13 @@ def main() -> None: "RpC_REPEATED_CONDITIONAL_TEST", "ES_COMPARING_PARAMETER_STRING_WITH_EQ", "FE_FLOATING_POINT_EQUALITY", - "FE_TEST_IF_EQUAL_TO_NOT_A_NUMBER" + "FE_TEST_IF_EQUAL_TO_NOT_A_NUMBER", + "SA_FIELD_SELF_ASSIGNMENT" } violations = [ f for f in spotbugs.findings if f.rule in forbidden_rules + and not (f.rule == "SA_FIELD_SELF_ASSIGNMENT" and "InfBlocks.java" in f.location) ] if violations: print("\n❌ Build failed due to forbidden SpotBugs violations:") diff --git a/CodenameOne/src/com/codename1/io/gzip/Inflate.java b/CodenameOne/src/com/codename1/io/gzip/Inflate.java index fc367225e3..a1fc728a0c 100644 --- a/CodenameOne/src/com/codename1/io/gzip/Inflate.java +++ b/CodenameOne/src/com/codename1/io/gzip/Inflate.java @@ -623,15 +623,14 @@ int inflateSync() { return Z_BUF_ERROR; p = z.next_in_index; - m = this.marker; // search - while (n != 0 && m < 4) { - if (z.next_in[p] == mark[m]) { - m++; + while (n != 0 && this.marker < 4) { + if (z.next_in[p] == mark[this.marker]) { + this.marker++; } else if (z.next_in[p] != 0) { - m = 0; + this.marker = 0; } else { - m = 4 - m; + this.marker = 4 - this.marker; } p++; n--; @@ -641,10 +640,9 @@ int inflateSync() { z.total_in += p - z.next_in_index; z.next_in_index = p; z.avail_in = n; - this.marker = m; // return no joy or set up to restart on a new block - if (m != 4) { + if (this.marker != 4) { return Z_DATA_ERROR; } r = z.total_in;