FoliaLib icon indicating copy to clipboard operation
FoliaLib copied to clipboard

JavaDoc Deprecation is misleading.

Open creatorfromhell opened this issue 7 months ago • 3 comments

For reference: https://github.com/TechnicallyCoded/FoliaLib/blob/5aea0f866df57ca03d00f5b199e89934f75f0989/common/src/main/java/com/tcoded/folialib/FoliaLib.java#L66

The method getImpl() was deprecated as of 0.3.5, but in the JavaDocs it points to getImplType, which doesn't return PlatformScheduler as getImpl did, instead getScheduler. This could be misleading to some folks looking at the docs.

creatorfromhell avatar Apr 11 '25 22:04 creatorfromhell

Are you suggesting that getImplType be deprecated and replaced by getPlatformType or similar?

TechnicallyCoded avatar Apr 13 '25 08:04 TechnicallyCoded

Are you suggesting that getImplType be deprecated and replaced by getPlatformType or similar?

No I'm suggesting that the javadoc could be misleading if someone used getImpl() to get the platform scheduler. The JavaDoc points them to the getImplType, which is pointed to the ImplementationType enum instead of PlatformScheduler. Unless the original return type was incorrect the entire time.

@SuppressWarnings("unused")
    public ImplementationType getImplType() {
        return implementationType;
    }

    /**
     * @deprecated Use {@link #getImplType()} instead. (forRemoval = true, since = "0.3.5")
     */
    @Deprecated
    @SuppressWarnings("unused")
    public PlatformScheduler getImpl() {
        return getScheduler();
    }

    public PlatformScheduler getScheduler() {
        return scheduler;
    }

creatorfromhell avatar Apr 13 '25 11:04 creatorfromhell

Oh wait what, I just realized what you're pointing out... how did that get in there

TechnicallyCoded avatar Apr 13 '25 12:04 TechnicallyCoded

I'm pretty sure this was updated, at least in development since then

TechnicallyCoded avatar Sep 14 '25 10:09 TechnicallyCoded