jspwiki-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From juanpa...@apache.org
Subject svn commit: r1589237 - /jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/parser/PluginContent.java
Date Tue, 22 Apr 2014 18:23:05 GMT
Author: juanpablo
Date: Tue Apr 22 18:23:05 2014
New Revision: 1589237

URL: http://svn.apache.org/r1589237
Log:
JSPWIKI-822 - NPE thrown by PluginContext#getText()

Modified:
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/parser/PluginContent.java

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/parser/PluginContent.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/parser/PluginContent.java?rev=1589237&r1=1589236&r2=1589237&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/parser/PluginContent.java (original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/parser/PluginContent.java Tue
Apr 22 18:23:05 2014
@@ -146,6 +146,11 @@ public class PluginContent extends Text 
         }
 
         WikiContext context = doc.getContext();
+        
+        if( context == null ) {
+            log.info( "WikiContext garbage-collected, cannot proceed" );
+            return getPluginName();
+        }
 
         Boolean wysiwygVariable = (Boolean) context.getVariable(RenderingManager.WYSIWYG_EDITOR_MODE);
         boolean wysiwygEditorMode = false;



Mime
View raw message