cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bernhard Huber <berni_hu...@a1.net>
Subject Re: [BUG] very weird NPE in JXTemplateTransformer
Date Tue, 29 Apr 2003 19:20:12 GMT
Hi,

i faced some NPE problems as i was using the JXTemplateGenerator, and 
JXTemplateTransformer in the linotype web application.

at the end i patched JXTemplateGenerator, somehow the location object is 
null,
i didn't devled into the code further why location object is null, just 
fixing the symptom,
the patch:

Index: JXTemplateGenerator.java
===================================================================
RCS file: 
/home/cvs/cocoon-2.1/src/scratchpad/src/org/apache/cocoon/generation/J
XTemplateGenerator.java,v
retrieving revision 1.1
diff -r1.1 JXTemplateGenerator.java
813a814,815
 > //HB 20030427: fix NPE
 > if (location != null) {
814a817,819
 > } else {
 >   this.location = new LocatorImpl();
 > }
1510a1516,1517
 > //HB 20030427: fix NPE
 > if (locator != null) {
1511a1519,1521
 > } else {
 >   charLocation = new LocatorImpl();
 > }
1616a1627,1628
 > //HB 20030427: fix NPE
 > if (locator != null) {
1617a1630,1632
 > } else {
 >   this.locator = new LocatorImpl();
 > }

hope it helps



Mime
View raw message