[
https://issues.apache.org/jira/browse/JSPWIKI-644?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12853052#action_12853052
]
Fabian Haupt commented on JSPWIKI-644:
--------------------------------------
I've added a simple check to suppress the calling so it works for us, but I'm
not familiar enough with the JSPWiki core to assess any implication that might
have...
### Eclipse Workspace Patch 1.0
#P JSPWiki-2.8
Index: src/com/ecyrd/jspwiki/WikiEngine.java
===================================================================
--- src/com/ecyrd/jspwiki/WikiEngine.java (revision 930452)
+++ src/com/ecyrd/jspwiki/WikiEngine.java (working copy)
@@ -1637,7 +1637,7 @@
StopWatch sw = new StopWatch();
sw.start();
- if( runFilters )
+ if( runFilters && (m_filterManager != null) )
pagedata = m_filterManager.doPreTranslateFiltering( context,
pagedata );
MarkupParser mp = m_renderingManager.getParser( context, pagedata
);
> When a page was modified externally and is read by a plugin via
> WikiEngine.getPage(..) during intialization a NPE is thrown
> ---------------------------------------------------------------------------------------------------------------------------
>
> Key: JSPWIKI-644
> URL: https://issues.apache.org/jira/browse/JSPWIKI-644
> Project: JSPWiki
> Issue Type: Bug
> Components: Core & storage, Plugins
> Affects Versions: 2.8.3
> Environment: This happens on all kinds of plattforms (tested on MacOS
> 10/Gentoo/Debian/Windows)
> Reporter: Fabian Haupt
> Priority: Minor
>
> 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.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.