Uploaded image for project: 'Blog Application'
  1. Blog Application
  2. BLOG-268

Deprecated usage of Document#getName() when displaying a category without a name

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 9.15.15
    • 9.15.14
    • None
    • None
    • Unknown
    • N/A
    • N/A

    Description

      When a blog category has no name property value, displaying it (e.g. in the Categories panel) falls back to the deprecated com.xpn.xwiki.api.Document#getName() getter, which logs:

      WARN o.a.v.introspection - Deprecated usage of getter [com.xpn.xwiki.api.Document.getName] in xwiki:Blog.CategoriesPanel@342,29
      

      The call is in the #getCategoryName macro of Blog.CategoriesCode ($categoryDoc.name). It should use $categoryDoc.documentReference.name instead.

      This warning also makes BlogManagementTest fail on CI (forbidden log content), see https://ci.xwiki.org/job/XWiki%20Contrib/job/application-blog/job/master/525/

      Attachments

        Activity

          People

            vmassol Vincent Massol
            vmassol Vincent Massol
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: