Hello, I think I found an issue with the IDE plugi...
# intellij-plugins
y
Hello, I think I found an issue with the IDE plugin. In hibernate, the is an interface
MultiTenantConnectionProvider
, and 2 of it's functions (
isUnwrappableAs
and
unwrap
) get the wrong overrides generated for them, and, when fixing the overrides (e.g. the compiler is happy), the IDE plugin says that the functions are not overriding anything, and that the class is missing some overrides (for the 2 functions). The 2 overrides look like this in Java:
Copy code
@Override
    public boolean isUnwrappableAs(@NotNull Class<?> unwrapType) {
        return false;
    }

    @Override
    public <T> T unwrap(@NotNull Class<T> unwrapType) {
        return null;
    }
and the generated one are:
Copy code
override fun isUnwrappableAs(unwrapType: Class): Boolean {
        TODO("Not yet implemented")
    }

    override fun <T : Any?> unwrap(unwrapType: Class): T {
        TODO("Not yet implemented")
    }
which make the compiler unhappy, since the
Class
is missing the generic type argument. The ones that I found to work are:
Copy code
override fun isUnwrappableAs(@NotNull unwrapType: Class<*>): Boolean {
        return false
    }

    override fun <T> unwrap(@NotNull unwrapType: Class<T>): T? {
        return null
    }
But those make the IDE/plugin unhappy. Any idea on what could be wrong, or if I'm doing something wrong? 🤔