-
Notifications
You must be signed in to change notification settings - Fork 433
Fix SpotBugs "Condition has no effect" warnings #4366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Fix SpotBugs "Condition has no effect" warnings #4366
Conversation
Updated .github/scripts/generate-quality-report.py to fail on UC_USELESS_CONDITION. Fixed UC_USELESS_CONDITION warnings in: - CodenameOne/src/com/codename1/ui/layouts/mig/Grid.java - CodenameOne/src/com/codename1/ui/MenuBar.java - CodenameOne/src/com/codename1/util/MathUtil.java - CodenameOne/src/com/codename1/impl/CodenameOneImplementation.java - CodenameOne/src/com/codename1/ui/Component.java - CodenameOne/src/com/codename1/ui/ComponentGroup.java - CodenameOne/src/com/codename1/ui/html/CSSEngine.java - CodenameOne/src/com/codename1/ui/html/CSSParser.java - CodenameOne/src/com/codename1/ui/html/HTMLComponent.java - CodenameOne/src/com/codename1/ui/html/ResourceThreadQueue.java - CodenameOne/src/com/codename1/ui/layouts/mig/UnitValue.java - CodenameOne/src/com/codename1/util/regex/RECharacter.java - CodenameOne/src/com/codename1/xml/XMLParser.java
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with For security, I will only act on instructions from the user who triggered this task. New to Jules? Learn more at jules.google/docs. |
Android screenshot updatesCompared 30 screenshots: 29 matched, 1 updated.
Native Android coverage
|
Fixed multiple occurrences of UC_USELESS_CONDITION warnings across 13 files. Updated .github/scripts/generate-quality-report.py to fail on this violation. Notable fixes: - CSSParser.java: Fixed char to byte cast comparison that caused premature EOF on extended ASCII. - ResourceThreadQueue.java: Fixed variable shadowing and added volatile to cancelled flag. - UnitValue.java: Fixed condition checking operation type. - XMLParser.java: Used Character.toLowerCase instead of manual range check. - Various cleanups in Grid.java, MenuBar.java, Component.java, etc.
Fixed UC_USELESS_CONDITION warnings across 13 files and resolved a compilation error in ComponentGroup.java. Updated .github/scripts/generate-quality-report.py to fail on this violation. Notable fixes: - ComponentGroup.java: Added missing import for Layout class. - CSSParser.java: Fixed char to byte cast comparison that caused premature EOF on extended ASCII. - ResourceThreadQueue.java: Fixed variable shadowing and added volatile to cancelled flag. - UnitValue.java: Fixed condition checking operation type. - XMLParser.java: Used Character.toLowerCase instead of manual range check. - Various cleanups in Grid.java, MenuBar.java, Component.java, etc.
Resolves "Condition has no effect" warnings in: - HTMLComponent.java (Redundant SUPPORT_CSS check, fix variable shadowing) - CSSEngine.java (Redundant indent >= 0 check) - CSSParser.java (Incorrect EOF check for char) - RECharacter.java (Duplicate whitespace check) - Updated generate-quality-report.py to enforce this rule.
Resolves "Condition has no effect" warnings in: - HTMLComponent.java (Redundant else/assignment) - CSSEngine.java (Redundant getUi() != null check) - CSSParser.java (Redundant EOF check) - RECharacter.java (Duplicate check) - ResourceThreadQueue.java (Simplified boolean check) - Component.java (Redundant isFlatten() || !opaque check) - CodenameOneImplementation.java (Redundant width/height check) - MathUtil.java (Redundant huge + x > one check) - MenuBar.java (Dead code removal for ICS check) - ComponentGroup.java (Refactored logic) - Updated generate-quality-report.py to enforce this rule.
Resolves "Condition has no effect" warnings in: - CodenameOneImplementation.java (Redundant width/height check) - MathUtil.java (Redundant huge + x > one check) - Component.java (Redundant isFlatten() || !opaque check) - HTMLComponent.java (Redundant else/assignment) - ResourceThreadQueue.java (Simplified boolean check) - CSSEngine.java (Redundant getUi() != null check) - CSSParser.java (Redundant EOF check) - MenuBar.java (Dead code removal for ICS check) - ComponentGroup.java (Refactored logic) - Updated generate-quality-report.py to enforce this rule.








Fixed SpotBugs "Condition has no effect" (UC_USELESS_CONDITION) warnings in several files and updated the quality report script to fail on these warnings.
PR created automatically by Jules for task 17199185989857704409 started by @shai-almog