Uploaded image for project: 'JSPWiki'
  1. JSPWiki
  2. JSPWIKI-644

When a page was modified externally and is read by a plugin via WikiEngine.getPage(..) during intialization a NPE is thrown

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.8.3
    • 2.8.4, 3.0
    • Core & storage, Plugins
    • This happens on all kinds of plattforms (tested on MacOS 10/Gentoo/Debian/Windows)

    Description

      Our plugin extends BasicPageFilter and implements WikiPlugin and WikiEventListener. During the initialisation of the wikisystem we are getting the source of a specific page. (some settings are stored there).
      This works quite well most of the time. But when this page was externally modified (by editor...) the call to getPage(..) results in a null result. I've traced it down to the location of it happening: in the class WikiEngine, the methoed

      private String textToHTML( WikiContext context, String pagedata, StringTransmutator localLinkHook,
      StringTransmutator extLinkHook, StringTransmutator attLinkHook, boolean parseAccessRules,
      boolean justParse )

      calls
      pagedata = m_filterManager.doPreTranslateFiltering( context, pagedata );
      in line 1615

      at this point the m_filterManager isn't initialized yet, therefore resulting in an NPE.

      Attachments

        Activity

          People

            metskem Harry Metske
            kazamatzuri Fabian Haupt
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: