1
+ /*
2
+ * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.
3
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
+ *
5
+ * This code is free software; you can redistribute it and/or modify it
6
+ * under the terms of the GNU General Public License version 2 only, as
7
+ * published by the Free Software Foundation.
8
+ *
9
+ * This code is distributed in the hope that it will be useful, but WITHOUT
10
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12
+ * version 2 for more details (a copy is included in the LICENSE file that
13
+ * accompanied this code).
14
+ *
15
+ * You should have received a copy of the GNU General Public License version
16
+ * 2 along with this work; if not, write to the Free Software Foundation,
17
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18
+ *
19
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20
+ * or visit www.oracle.com if you need additional information or have any
21
+ * questions.
22
+ */
1
23
package xpath ;
2
24
3
25
import java .util .List ;
@@ -60,7 +82,8 @@ private static Stream<Arguments> testData() {
60
82
* @param propertyValue the property value
61
83
* @param expected the expected result
62
84
* @param expectedType the expected throw type
63
- * @throws Exception if the test fails other than the expected Exception
85
+ * @throws Exception if the test fails other than the expected Exception, which
86
+ * would indicate an issue in configuring the test
64
87
*/
65
88
@ ParameterizedTest
66
89
@ MethodSource ("testData" )
@@ -122,6 +145,7 @@ Document getDocument(String xmlFile)
122
145
return null ;
123
146
}
124
147
148
+ // XPathFunctionResolver customized for the FindFunction
125
149
class FunctionResolver implements XPathFunctionResolver {
126
150
private final Document doc ;
127
151
@@ -139,6 +163,7 @@ public XPathFunction resolveFunction(QName functionName, int arity) {
139
163
}
140
164
}
141
165
166
+ // The Find function
142
167
class FindFunction implements XPathFunction {
143
168
private final Document doc ;
144
169
0 commit comments