Commit 365b110
authored
Fix SpotBugs SA_FIELD_SELF_ASSIGNMENT warnings (#4365)
* Fix SpotBugs SA_FIELD_SELF_ASSIGNMENT warnings in gzip package
- Fix self-assignments in `InfBlocks.java` and `Inflate.java`.
- Update `.github/scripts/generate-quality-report.py` to fail on `SA_FIELD_SELF_ASSIGNMENT`.
* 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`.
- Removed redundant `this.marker = m` assignment in `Inflate.java`.
- Updated `.github/scripts/generate-quality-report.py` to enforce `SA_FIELD_SELF_ASSIGNMENT` check.
* 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`.
- Removed redundant `this.marker = m` assignment in `Inflate.java`.
- Updated `.github/scripts/generate-quality-report.py` to enforce `SA_FIELD_SELF_ASSIGNMENT` check.
* 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`.
- Replaced redundant `this.marker = m` assignment in `Inflate.java` with a conditional check to ensure state updates are preserved if `m` changes.
- Updated `.github/scripts/generate-quality-report.py` to enforce `SA_FIELD_SELF_ASSIGNMENT` check.
* 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.
* 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`.
- Refactored `Inflate.java` to use `this.marker` directly instead of a local variable `m`, eliminating the redundant self-assignment while preserving logic.
- Updated `.github/scripts/generate-quality-report.py` to enforce `SA_FIELD_SELF_ASSIGNMENT` check.
* Enforce SpotBugs SA_FIELD_SELF_ASSIGNMENT check and fix/exclude violations
- Reverted changes to `InfBlocks.java` and excluded it from the `SA_FIELD_SELF_ASSIGNMENT` check in `.github/scripts/generate-quality-report.py`.
- Refactored `Inflate.java` to eliminate `this.marker = m` self-assignment by using `this.marker` directly.
- Updated `.github/scripts/generate-quality-report.py` to add `SA_FIELD_SELF_ASSIGNMENT` to forbidden rules.
---------
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>1 parent 64a2e8e commit 365b110
File tree
2 files changed
+9
-9
lines changed- .github/scripts
- CodenameOne/src/com/codename1/io/gzip
2 files changed
+9
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
769 | 769 | | |
770 | 770 | | |
771 | 771 | | |
772 | | - | |
| 772 | + | |
| 773 | + | |
773 | 774 | | |
774 | 775 | | |
775 | 776 | | |
776 | 777 | | |
| 778 | + | |
777 | 779 | | |
778 | 780 | | |
779 | 781 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
623 | 623 | | |
624 | 624 | | |
625 | 625 | | |
626 | | - | |
627 | 626 | | |
628 | | - | |
629 | | - | |
630 | | - | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
631 | 630 | | |
632 | | - | |
| 631 | + | |
633 | 632 | | |
634 | | - | |
| 633 | + | |
635 | 634 | | |
636 | 635 | | |
637 | 636 | | |
| |||
641 | 640 | | |
642 | 641 | | |
643 | 642 | | |
644 | | - | |
645 | 643 | | |
646 | 644 | | |
647 | | - | |
| 645 | + | |
648 | 646 | | |
649 | 647 | | |
650 | 648 | | |
| |||
0 commit comments