You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm observing lot of warnings reported in Eclipse 4.17+ running on Java 11 (and Java project JLS level set to 11), all similar to the below one.
Spotbugs 4.1.4.202009290501-7a891fe
Spotbugs (VolatileUsage detector) should simply ignore the synthetic code in general or this concrete $SWITCH_TABLE field.
eclipse.buildId=4.18.0.I20200928-1800
java.version=11.0.8
java.vendor=N/A
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Command-line arguments: -data /data/4x_platform_workspace -os linux -ws gtk -arch x86_64
com.github.spotbugs.plugin.eclipse
Warning
Tue Sep 29 10:12:46 CEST 2020
Can not complete field annotation Field edu.umd.cs.findbugs.workflow.CopyBuggySource.$SWITCH_TABLE$edu$umd$cs$findbugs$workflow$CopyBuggySource$SrcKind for the field: $SWITCH_TABLE$edu$umd$cs$findbugs$workflow$CopyBuggySource$SrcKind (not open) [in CopyBuggySource [in CopyBuggySource.java [in edu.umd.cs.findbugs.workflow [in src/main/java [in spotbugs-spotbugs]]]]] in class: edu.umd.cs.findbugs.workflow.CopyBuggySource, type CopyBuggySource (not open) [in CopyBuggySource.java [in edu.umd.cs.findbugs.workflow [in src/main/java [in spotbugs-spotbugs]]]], bug VO: A volatile reference to an array doesn't treat the array elements as volatile
Java Model Exception: Java Model Status [$SWITCH_TABLE$edu$umd$cs$findbugs$workflow$CopyBuggySource$SrcKind [in CopyBuggySource [in CopyBuggySource.java [in edu.umd.cs.findbugs.workflow [in src/main/java [in spotbugs-spotbugs]]]]] does not exist]
at org.eclipse.jdt.internal.core.JavaElement.newNotPresentException(JavaElement.java:573)
at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:616)
at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:326)
at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:312)
at org.eclipse.jdt.internal.core.Member.getNameRange(Member.java:353)
at de.tobject.findbugs.reporter.MarkerUtil.completeFieldInfo(MarkerUtil.java:350)
at de.tobject.findbugs.reporter.MarkerUtil.getJavaElement(MarkerUtil.java:331)
at de.tobject.findbugs.reporter.MarkerUtil.createMarkerParameter(MarkerUtil.java:182)
at de.tobject.findbugs.reporter.MarkerUtil.createBugParameters(MarkerUtil.java:170)
at de.tobject.findbugs.reporter.MarkerUtil.createMarkers(MarkerUtil.java:124)
at de.tobject.findbugs.builder.FindBugsWorker.updateBugCollection(FindBugsWorker.java:358)
at de.tobject.findbugs.builder.FindBugsWorker.work(FindBugsWorker.java:227)
at de.tobject.findbugs.builder.FindBugsBuilder$StartedFromBuilderJob.runWithProgress(FindBugsBuilder.java:219)
at de.tobject.findbugs.FindBugsJob.run(FindBugsJob.java:142)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
The text was updated successfully, but these errors were encountered:
fix for issue 1313, do not report volatile problems in synthetic code
With the fix for Eclipse bug 544521,
https://bugs.eclipse.org/bugs/show_bug.cgi?id=544521, the Eclipse 4.17+
Java compiler will generate synthetic code for switch expressions.
spotbugs reports VO_VOLATILE_REFERENCE_TO_ARRAY issues in this synthetic
code.
This changes makes spotbugs ignore synthetic fields during
VO_VOLATILE_REFERENCE_TO_ARRAY analysis.
fix for issue 1313, do not report volatile problems in synthetic code
With the fix for Eclipse bug 544521,
https://bugs.eclipse.org/bugs/show_bug.cgi?id=544521, the Eclipse 4.17+
Java compiler will generate synthetic code for switch expressions.
spotbugs reports VO_VOLATILE_REFERENCE_TO_ARRAY issues in this synthetic
code.
This changes makes spotbugs ignore synthetic fields during
VO_VOLATILE_REFERENCE_TO_ARRAY analysis.
I'm observing lot of warnings reported in Eclipse 4.17+ running on Java 11 (and Java project JLS level set to 11), all similar to the below one.
Spotbugs 4.1.4.202009290501-7a891fe
This is caused by recent (4.17) Eclipse compiler changes, where the
$SWITCH_TABLE
field created for enums by compiler is marked as volatile, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=544521Spotbugs (
VolatileUsage
detector) should simply ignore the synthetic code in general or this concrete$SWITCH_TABLE
field.The text was updated successfully, but these errors were encountered: