Skip to content

Commit c03d9ae

Browse files
Fix SpotBugs SA_FIELD_SELF_ASSIGNMENT warnings in gzip package
- Removed redundant self-assignments in `InfBlocks.java` when restoring state in `case TYPE` and `case DRY`. - Corrected `Inflate.java` to use a conditional assignment for `this.marker` to ensure state is preserved if it changes, while satisfying SpotBugs. - Updated `.github/scripts/generate-quality-report.py` to enforce `SA_FIELD_SELF_ASSIGNMENT` check.
1 parent 3ef6958 commit c03d9ae

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

CodenameOne/src/com/codename1/io/gzip/Inflate.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,9 @@ int inflateSync() {
641641
z.total_in += p - z.next_in_index;
642642
z.next_in_index = p;
643643
z.avail_in = n;
644+
if (this.marker != m) {
645+
this.marker = m;
646+
}
644647

645648
// return no joy or set up to restart on a new block
646649
if (m != 4) {

0 commit comments

Comments
 (0)