False positive in «"static" base class members should not be accessed via derived types»

Please provide

  • Operating system: Linux CachyOS
  • Programming language you’re coding in: Java
IntelliJ IDEA 2026.1.3
Build #IU-261.25134.95, built on June 3, 2026
Source revision: adfd17059a568
Licensed to JB Alumni / Pasha Finkelshteyn
You have a perpetual fallback license for this version.
Subscription is active until December 31, 2029.
Runtime version: 25.0.3+9-b329.124 amd64137.0.17-261-b86
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.awt.wl.WLToolkit
Linux 7.0.10-2-cachyos
CachyOS; glibc: 2.43; desktop: KDE (plasmashell 6.6.5)
Exception reporter ID: 2026-04-11_0f2ae742-e8de-4a5d-a94d-806de8a9e7d0
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 2048M
Cores: 16
Registry:
  ide.experimental.ui=true
  llm.chat.default.agent.rollout.enabled=true
  editor.ux.survey.enabled=false
  trace.state.event.service.url=https://api.jetbrains.cloud/trace-status
Non-Bundled Plugins:
  org.jetbrains.junie (261.1831.36)
  org.jetbrains.completion.full.line (261.25134.95)
  Subversion (261.25134.104)
  hg4idea (261.23567.28)
  com.jonnyzzz.mcp-steroid (0.100-409f23a2)
  com.intellij.wiremock (261.1.0)
  PerforceDirectPlugin (261.25134.10)
  com.intellij.spring.debugger (261.25134.10)
  com.intellij.spring.websocket (261.22158.182)
  com.intellij.ml.llm (261.25134.95)
  com.intellij.nativeDebug (261.25134.12)
  com.intellij.reactivestreams (261.22158.182)
  com.github.lipiridi.spotless-applier (1.2.3)
  org.sonarlint.idea (12.3.0.84775)
Kotlin: 261.25134.95-IJ
Current Desktop: KDE

And a thorough description of the problem/question:

The following Quarkus code:

    @GET
    @Path("/availability")
    @Produces(MediaType.TEXT_HTML)
    public TemplateInstance availability() {
        return Templates.availability(
                AvailabilityRule.listAll(),
                MeetingType.listAll(), Layout.CSS);
    }

Where MeetingType is a Panache Entity like this:

@Entity
@Table(name = "meeting_type")
public class MeetingType extends PanacheEntityBase {

    public enum LocationType { GOOGLE_MEET, PHONE, IN_PERSON, CUSTOM }

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public Long id;

I’m getting a warning ““static” base class members should not be accessed via derived types”, which is incorrect in case of Quarkus and Panache — it should be an exception from the rules.

Thanks for the report.

We implemented a fix for this. It should be available in SonarQube Cloud soon and in SonarQube Server in the next release.