Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Not A Problem
-
None
-
None
-
None
Description
Below code demonstrates the issue.
ByteArrayOutputStream baos = new ByteArrayOutputStream();
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("sentence", "split words test");
XQJGenerator generator = new XQJGenerator(this.getClass().getResource("/xquery/splitstring.xquery"));
generator.setXQDataSource(xqds);
generator.setup(parameters); // set parameters for this specific pipeline component [1]
Pipeline<SAXPipelineComponent> pipeline = new NonCachingPipeline<SAXPipelineComponent>();
pipeline.addComponent(generator);
pipeline.addComponent(new XMLSerializer());
pipeline.setup(baos); // this overrides the parameters set in [1] resulting in nullpointer exception
pipeline.execute();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("sentence", "split words test");
XQJGenerator generator = new XQJGenerator(this.getClass().getResource("/xquery/splitstring.xquery"));
generator.setXQDataSource(xqds);
generator.setup(parameters); // set parameters for this specific pipeline component [1]
Pipeline<SAXPipelineComponent> pipeline = new NonCachingPipeline<SAXPipelineComponent>();
pipeline.addComponent(generator);
pipeline.addComponent(new XMLSerializer());
pipeline.setup(baos); // this overrides the parameters set in [1] resulting in nullpointer exception
pipeline.execute();