Skip to content

Commit f41a023

Browse files
shai-almogclaude
andcommitted
fix(Graphics): satisfy PMD - split declarations, log caught fallback exception
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 9ebe6c2 commit f41a023

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
package com.codename1.ui;
2525

2626
import com.codename1.impl.CodenameOneImplementation;
27+
import com.codename1.io.Log;
2728
import com.codename1.ui.geom.GeneralPath;
2829
import com.codename1.ui.geom.Rectangle;
2930
import com.codename1.ui.geom.Shape;
@@ -470,8 +471,10 @@ public boolean isVisible(int x, int y, int w, int h) {
470471
x, y + h
471472
};
472473
t.transformPoints(2, pts, 0, pts, 0, 4);
473-
float minX = pts[0], maxX = pts[0];
474-
float minY = pts[1], maxY = pts[1];
474+
float minX = pts[0];
475+
float maxX = pts[0];
476+
float minY = pts[1];
477+
float maxY = pts[1];
475478
for (int i = 2; i < pts.length; i += 2) {
476479
float px = pts[i];
477480
float py = pts[i + 1];
@@ -492,6 +495,7 @@ public boolean isVisible(int x, int y, int w, int h) {
492495
} catch (RuntimeException err) {
493496
// Some ports throw when the transform isn't backed natively;
494497
// fall back to the untransformed rectangle test below.
498+
Log.e(err);
495499
}
496500
}
497501
}

0 commit comments

Comments
 (0)