I had to add a bunch of `public` modifiers to a mo...
# eap
j
I had to add a bunch of
public
modifiers to a module using
explicitApi()
after updating to 1.9 beta, The classes were public before but had no modifiers, which seems like a bug in previous versions? I've not used this mode before so I'm not sure, but the docs seem to indicate this should have been required before:
Visibility modifiers are required for declarations if the default visibility exposes them to the public API
t
Yes, there was a bug in previous releases that was fixed in 1.9.0
j
perfect! 💯
j
On this topic, I've been using
explicitApiWarning()
and I noticed at some point recently the IDE warns
Redundant visibility modifier
all over for my
public
modifiers. Are you finding this to be the case too? I've been using 1.9.0 beta and RC builds, but I tried reverting to 1.8.x and still experienced it there too. I'm seeing this on IJ 2023.1.2 as well as AS Flamingo 2022.2.1. I know this used to work months ago, but I'm not sure what specific change broke it recently.
t
@Jeff Lockhart could you also check with IDEA 2023.2 EAP? If it is still the case - could you open an issue?
j
That seems to be describing another issue, where they expect the IDE to report a redundant visibility modifier and it's not. In my case, the IDE is reporting redundant visibility modifier for all my explicitly
public
APIs, when it shouldn't when using
explicitApiWarning()
. I'll test this on IDEA 2023.2 EAP.