Macro for Backward Compatibility Reports

Last modified by Vincent Massol on 2023/05/25

Example 1

  • NamespaceURLClassLoader no longer inherits from URIClassLoader since this one is now deprecated.
    • Violation type:
      java.class.noLongerInheritsFromClass
    • Code:
      ## Old:
      class org.xwiki.classloader.NamespaceURLClassLoader

      ## New:
      class org.xwiki.classloader.NamespaceURLClassLoader
  • Not a binary breakage (no API breakage), only source level.
    • Violation type:
      java\.generics\.elementNowParameterized
    • Code:
      ## Old:
      .*org\.xwiki\.component\.annotation\.ComponentDescriptorFactory::createComponentDescriptors.*

      ## New:
      .*org\.xwiki\.component\.annotation\.ComponentDescriptorFactory::createComponentDescriptors.*
  • Not a breakage for using the User Avatar macro.
    • Violation type:
      java.annotation.added
    • Code:
      ## Old:
      method void org.xwiki.rendering.macro.useravatar.UserAvatarMacroParameters::setUsername(java.lang.String)

      ## New:
      method void org.xwiki.rendering.macro.useravatar.UserAvatarMacroParameters::setUsername(java.lang.String)
  • Not a breakage. Old deprecated method that has been moved to legacy.
    • Violation type:
      java.method.removed
    • Code:
      ## Old:
      method void com.xpn.xwiki.doc.XWikiDocument::rename(java.lang.String, java.util.List<java.lang.String>, com.xpn.xwiki.XWikiContext) throws com.xpn.xwiki.XWikiException
  • Not a breakage. Old deprecated method that has been moved to legacy.
    • Violation type:
      java.method.removed
    • Code:
      ## Old:
      method void com.xpn.xwiki.doc.XWikiDocument::rename(java.lang.String, java.util.List<java.lang.String>, java.util.List<java.lang.String>, com.xpn.xwiki.XWikiContext) throws com.xpn.xwiki.XWikiException
  • Not a breakage. Old deprecated method that has been moved to legacy.
    • Violation type:
      java.method.removed
    • Code:
      ## Old:
      method void com.xpn.xwiki.doc.XWikiDocument::rename(java.lang.String, com.xpn.xwiki.XWikiContext) throws com.xpn.xwiki.XWikiException
  • Young API
    • Violation type:
      java.method.addedToInterface
    • Code:
      ## Old:


      ## New:
      method void org.xwiki.search.solr.SolrUtils::setAtomic(java.lang.String, java.lang.String, java.lang.Object, org.apache.solr.common.SolrInputDocument)
  • Not a breakage. Added a new property to the Page REST resource.
    • Violation type:
      java.annotation.attributeValueChanged
    • Code:
      ## Old:
      class org.xwiki.rest.model.jaxb.PageSummary

      ## New:
      class org.xwiki.rest.model.jaxb.PageSummary
  • TargetableNotificationPreferenceBuilder is meant to be a builder but the API wasn't following the builder pattern. This change is not breaking for using that component, but it is breaking if you implemented the TargetableNotificationPreferenceBuilder interface.
    • Violation type:
      java.method.returnTypeChanged
    • Code:
      ## Old:
      method void org.xwiki.notifications.preferences.TargetableNotificationPreferenceBuilder::.+(.+)

      ## New:
      method org.xwiki.notifications.preferences.TargetableNotificationPreferenceBuilder org.xwiki.notifications.preferences.TargetableNotificationPreferenceBuilder::.+(.+)

Example 2

No breakage!

Tags:
   

Get Connected