View | Details | Raw Unified | Return to bug 33657
Collapse All | Expand All

(-)java/src/org/apache/xindice/core/query/XPathQueryResolver.java (-1 / +15 lines)
Lines 18-23 Link Here
18
18
19
package org.apache.xindice.core.query;
19
package org.apache.xindice.core.query;
20
20
21
import java.lang.reflect.Constructor;
21
import java.util.ArrayList;
22
import java.util.ArrayList;
22
import java.util.Iterator;
23
import java.util.Iterator;
23
import java.util.List;
24
import java.util.List;
Lines 25-30 Link Here
25
import java.util.TreeSet;
26
import java.util.TreeSet;
26
27
27
import javax.xml.transform.ErrorListener;
28
import javax.xml.transform.ErrorListener;
29
import javax.xml.transform.SourceLocator;
28
import javax.xml.transform.TransformerException;
30
import javax.xml.transform.TransformerException;
29
31
30
import org.apache.commons.logging.Log;
32
import org.apache.commons.logging.Log;
Lines 160-166 Link Here
160
                }
162
                }
161
163
162
                XPathParser parser = new XPathParser(errorListener, null);
164
                XPathParser parser = new XPathParser(errorListener, null);
163
                cmp = new Compiler(errorListener, null);
165
                
166
                try {
167
                	Constructor c = Compiler.class.getConstructor(
168
                    	new Class[]
169
                	    	{ ErrorListener.class, SourceLocator.class, FunctionTable.class });
170
                	cmp = (Compiler)c.newInstance(new Object[] {errorListener, null, null});
171
                } catch (NoSuchMethodException nsme) {
172
					Constructor c = Compiler.class.getConstructor(
173
                    	new Class[]
174
                	    	{ ErrorListener.class, SourceLocator.class });
175
                	cmp = (Compiler)c.newInstance(new Object[] {errorListener, null});
176
                }
177
                
164
                parser.initXPath(cmp, query, pr);
178
                parser.initXPath(cmp, query, pr);
165
                ex = cmp.compile(0);
179
                ex = cmp.compile(0);
166
180

Return to bug 33657