Visitar URL original
Reporting issue for nonFinalClassInheritsFromNewClass · Issue #235 · revapi/revapi · GitHub
Skip to content

Reporting issue for nonFinalClassInheritsFromNewClass #235

Open

Description

@vmassol

This is what we did:

It's a false positive in our case so we needed to add an ignore. This is what revapi told us to add:

                <item>
                  <code>java.class.nonFinalClassInheritsFromNewClass</code>
                  <old>class org.xwiki.wysiwyg.filter.XWikiContextInitializationFilter</old>
                  <new>class org.xwiki.wysiwyg.filter.XWikiContextInitializationFilter</new>
                  <justification>Not a breakage, the old XWikiContextInitializationFilter content has been moved to a new class of the same name in a new package and old class now inherits from the new one</justification>
                </item>

The issue is that the new class is not in org.xwiki.wysiwyg.filter.XWikiContextInitializationFilter but in com.xpn.xwiki.web.XWikiContextInitializationFilter.

Thx

Activity

  1. metlos commented on May 8, 2021

    @metlos
    Member

    This is reported on the class that has a new super class. I.e. in xwiki-platform-13.3 org.xwiki.wysiwyg.filter.XWikiContextInitializationFilter only inherited from java.lang.Object but in 13.4-SNAPSHOT it now inherits from com.xpn.xwiki.web.XWikiContextInitializationFilter.

    https://revapi.org/revapi-java/0.24.1/differences.html#_non_final_class_inherits_from_new_class_java_class_nonfinalclassinheritsfromnewclass states that this change is usually ok, but might not be in the presence of final methods. The check doesn't perform the analysis of the methods of the class so it cannot tell if that can actually be the case or not.

    That's something we could try to improve.

    If you let Revapi also report on non-identifying info about the differences (outputNonIdentifyingDifferenceInfo in the maven plugin config), it'd even tell you that the new superclass is com.xpn.xwiki.web.XWikiContextInitializationFilter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions