Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/scripts/generate-quality-report.py
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,8 @@ def main() -> None:
"SF_SWITCH_NO_DEFAULT",
"DM_DEFAULT_ENCODING",
"EQ_CHECK_FOR_OPERAND_NOT_COMPATIBLE_WITH_THIS",
"IA_AMBIGUOUS_INVOCATION_OF_INHERITED_OR_OUTER_METHOD"
"IA_AMBIGUOUS_INVOCATION_OF_INHERITED_OR_OUTER_METHOD",
"RpC_REPEATED_CONDITIONAL_TEST"
}
violations = [
f for f in spotbugs.findings
Expand Down
2 changes: 1 addition & 1 deletion CodenameOne/src/com/codename1/components/ImageViewer.java
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ public void keyReleased(int key) {
new AnimatePanX(-1, getImageLeft(), getImageLeftPos());
return;
}
if (gk == Display.GAME_RIGHT || gk == Display.GAME_RIGHT && (cycleRight || swipeableImages.getSelectedIndex() < getImageRightPos())) {
if (gk == Display.GAME_RIGHT && (cycleRight || swipeableImages.getSelectedIndex() < getImageRightPos())) {
new AnimatePanX(2, getImageRight(), getImageRightPos());
}
}
Expand Down
6 changes: 2 additions & 4 deletions CodenameOne/src/com/codename1/ui/Container.java
Original file line number Diff line number Diff line change
Expand Up @@ -2975,10 +2975,8 @@ public Component getComponentAt(int x, int y) {

}
}
if (component == null || (!component.respondsToPointerEvents() && top != null)) {
if (top != null) {
return top;
}
if (top != null && (component == null || !component.respondsToPointerEvents())) {
return top;
}

if (component != null) {
Expand Down
8 changes: 3 additions & 5 deletions CodenameOne/src/com/codename1/ui/Form.java
Original file line number Diff line number Diff line change
Expand Up @@ -1462,11 +1462,9 @@ public Container getLayeredPane(Class c, boolean top) {
layeredPaneImpl.add(cnt);
} else {
if (componentCount > 0) {
if (componentCount > 0) {
Integer z = (Integer) children.get(0).getClientProperty(Z_INDEX_PROP);
if (z != null) {
zIndex = z.intValue();
}
Integer z = (Integer) children.get(0).getClientProperty(Z_INDEX_PROP);
if (z != null) {
zIndex = z.intValue();
}
}
layeredPaneImpl.addComponent(0, cnt);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ void verify() throws IllegalArgumentException {
// awt.9C=wrong value of GridBagConstraints: {0}
throw new IllegalArgumentException("wrong value of GridBagConstraints: " + ipady); //$NON-NLS-1$ //$NON-NLS-2$
}
if ((insets == null) || (insets.left < 0) || (insets.left < 0)
|| (insets.left < 0) || (insets.left < 0)) {
if ((insets == null) || (insets.top < 0) || (insets.left < 0)
|| (insets.bottom < 0) || (insets.right < 0)) {
// awt.9C=wrong value of GridBagConstraints: {0}
throw new IllegalArgumentException("wrong value of GridBagConstraints: " + insets); //$NON-NLS-1$ //$NON-NLS-2$
}
Expand Down
2 changes: 1 addition & 1 deletion CodenameOne/src/com/codename1/ui/plaf/CSSBorder.java
Original file line number Diff line number Diff line change
Expand Up @@ -1134,7 +1134,7 @@ public CSSBorder backgroundImage(String cssDirective) {
if (part.indexOf("url(") == 0) {
part = part.substring(4, part.length() - 1);
}
if (part.charAt(0) == '"' || part.charAt(0) == '"') {
if (part.charAt(0) == '"' || part.charAt(0) == '\'') {
part = part.substring(1, part.length() - 1);
}
if (part.indexOf("/") != -1) {
Expand Down
Loading