Skip to content
4 changes: 3 additions & 1 deletion .github/scripts/generate-quality-report.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:")
Expand Down
14 changes: 6 additions & 8 deletions CodenameOne/src/com/codename1/io/gzip/Inflate.java
Original file line number Diff line number Diff line change
Expand Up @@ -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--;
Expand All @@ -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;
Expand Down
Loading