Skip to content

Commit 7e044df

Browse files
Fix IA_AMBIGUOUS_INVOCATION_OF_INHERITED_OR_OUTER_METHOD warnings.
Resolve SpotBugs warnings by explicitly qualifying method calls using `super.` or `Outer.this.` where inner classes inherit methods that shadow outer class methods. Update quality report script to enforce this check.
1 parent fa07a26 commit 7e044df

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

CodenameOne/src/com/codename1/components/ToastBar.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1021,7 +1021,7 @@ public ToastBarComponent() {
10211021
this.getAllStyles().setBgColor(0x0);
10221022
this.getAllStyles().setBackgroundType(Style.BACKGROUND_NONE);
10231023
this.getAllStyles().setBgTransparency(128);
1024-
this.setVisible(false);
1024+
super.setVisible(false);
10251025
label = new TextArea();
10261026
label.setUIID(defaultMessageUIID);
10271027
label.setEditable(false);

CodenameOne/src/com/codename1/properties/UiBinding.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ class BindingImpl extends Binding
295295
private boolean lock;
296296

297297
public void actionPerformed(ActionEvent evt) {
298-
if (this.isAutoCommit()) {
298+
if (super.isAutoCommit()) {
299299
if (lock) {
300300
return;
301301
}
@@ -306,7 +306,7 @@ public void actionPerformed(ActionEvent evt) {
306306
}
307307

308308
public void propertyChanged(PropertyBase p) {
309-
if (this.isAutoCommit()) {
309+
if (super.isAutoCommit()) {
310310
if (lock) {
311311
return;
312312
}
@@ -318,15 +318,15 @@ public void propertyChanged(PropertyBase p) {
318318

319319
@Override
320320
public void commit() {
321-
if (this.isAutoCommit()) {
321+
if (super.isAutoCommit()) {
322322
throw new RuntimeException("Can't commit in autocommit mode");
323323
}
324324
((Property) prop).set(adapt.getFrom(cmp));
325325
}
326326

327327
@Override
328328
public void rollback() {
329-
if (this.isAutoCommit()) {
329+
if (super.isAutoCommit()) {
330330
throw new RuntimeException("Can't rollback in autocommit mode");
331331
}
332332
adapt.assignTo(prop.get(), cmp);

CodenameOne/src/com/codename1/ui/Form.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1552,10 +1552,10 @@ public Container getFormLayeredPane(Class c, boolean top) {
15521552
@Override
15531553
protected void paintBackground(Graphics g) {
15541554
if (getComponentCount() > 0) {
1555-
if (isVisible()) {
1556-
this.setVisible(false);
1555+
if (super.isVisible()) {
1556+
super.setVisible(false);
15571557
Form.this.paint(g);
1558-
setVisible(true);
1558+
super.setVisible(true);
15591559
}
15601560
}
15611561
}

CodenameOne/src/com/codename1/ui/scene/Node.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ void render(Graphics g) {
626626
paint(g);
627627
paintBorder(g);
628628
g.setColor(0xff0000);
629-
int alpha = g.concatenateAlpha(this.getStyle().getFgAlpha());
629+
int alpha = g.concatenateAlpha(super.getStyle().getFgAlpha());
630630
g.drawRect(getX(), getY(), getWidth() - 1, getHeight() - 1);
631631
g.setAlpha(alpha);
632632
} catch (Throwable t) {

0 commit comments

Comments
 (0)