Skip to content

Commit 95d3cbc

Browse files
BananeweizenCalixte
authored andcommitted
ClassCastException in "Apply all fixes"
The code contained an unchecked cast, and the declaration of the called method had changed in the past, therefore making this incompatible. java.lang.ClassCastException: class [Lorg.eclipse.ui.IMarkerResolution; cannot be cast to class [Lnet.sf.eclipsecs.ui.quickfixes.ICheckstyleMarkerResolution; ([Lorg.eclipse.ui.IMarkerResolution; is in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @6be67f3a; [Lnet.sf.eclipsecs.ui.quickfixes.ICheckstyleMarkerResolution; is in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @138bfa5) at net.sf.eclipsecs.ui.quickfixes.FixCheckstyleMarkersJob.runInUIThread(FixCheckstyleMarkersJob.java:68) at org.eclipse.ui.progress.UIJob.lambda$0(UIJob.java:95)
1 parent 06c2ac8 commit 95d3cbc

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

net.sf.eclipsecs.ui/src/net/sf/eclipsecs/ui/quickfixes/FixCheckstyleMarkersJob.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@ public IStatus runInUIThread(IProgressMonitor monitor) {
6565

6666
for (int i = 0; i < markers.length; i++) {
6767

68-
ICheckstyleMarkerResolution[] resolutions = (ICheckstyleMarkerResolution[]) generator
69-
.getResolutions(markers[i]);
68+
var resolutions = generator.getResolutions(markers[i]);
7069

7170
if (resolutions.length > 0) {
7271
// only run the first fix for this marker

0 commit comments

Comments
 (0)