@@ -53,7 +53,7 @@ public final class WhitelistLoader {
53
53
* a Painless type name with the exception that any dollar symbols used as part of inner classes will
54
54
* be replaced with dot symbols. </li>
55
55
* <li> short Java type name - The text after the final dot symbol of any specified Java class. A
56
- * short type Java name may be excluded by using the 'only_fqn ' token during Painless class parsing
56
+ * short type Java name may be excluded by using the 'no_import ' token during Painless class parsing
57
57
* as described later. </li>
58
58
* </ul>
59
59
*
@@ -65,7 +65,7 @@ public final class WhitelistLoader {
65
65
* <li> Primitive types may be specified starting with 'class' and followed by the Java type name,
66
66
* an opening bracket, a newline, a closing bracket, and a final newline. </li>
67
67
* <li> Complex types may be specified starting with 'class' and followed the fully-qualified Java
68
- * class name, optionally followed by an 'only_fqn ' token, an opening bracket, a newline,
68
+ * class name, optionally followed by an 'no_import ' token, an opening bracket, a newline,
69
69
* constructor/method/field specifications, a closing bracket, and a final newline. Within a complex
70
70
* type the following may be parsed:
71
71
* <ul>
@@ -109,7 +109,7 @@ public final class WhitelistLoader {
109
109
*
110
110
* # complex types
111
111
*
112
- * class my.package.Example only_fqn {
112
+ * class my.package.Example no_import {
113
113
* # constructors
114
114
* ()
115
115
* (int)
@@ -145,7 +145,7 @@ public static Whitelist loadFromResourceFiles(Class<?> resource, String... filep
145
145
146
146
String whitelistClassOrigin = null ;
147
147
String javaClassName = null ;
148
- boolean onlyFQNJavaClassName = false ;
148
+ boolean noImport = false ;
149
149
List <WhitelistConstructor > whitelistConstructors = null ;
150
150
List <WhitelistMethod > whitelistMethods = null ;
151
151
List <WhitelistField > whitelistFields = null ;
@@ -160,7 +160,7 @@ public static Whitelist loadFromResourceFiles(Class<?> resource, String... filep
160
160
}
161
161
162
162
// Handle a new class by resetting all the variables necessary to construct a new WhitelistClass for the whitelist.
163
- // Expects the following format: 'class' ID 'only_fqn '? '{' '\n'
163
+ // Expects the following format: 'class' ID 'no_import '? '{' '\n'
164
164
if (line .startsWith ("class " )) {
165
165
// Ensure the final token of the line is '{'.
166
166
if (line .endsWith ("{" ) == false ) {
@@ -172,8 +172,8 @@ public static Whitelist loadFromResourceFiles(Class<?> resource, String... filep
172
172
String [] tokens = line .substring (5 , line .length () - 1 ).trim ().split ("\\ s+" );
173
173
174
174
// Ensure the correct number of tokens.
175
- if (tokens .length == 2 && "only_fqn " .equals (tokens [1 ])) {
176
- onlyFQNJavaClassName = true ;
175
+ if (tokens .length == 2 && "no_import " .equals (tokens [1 ])) {
176
+ noImport = true ;
177
177
} else if (tokens .length != 1 ) {
178
178
throw new IllegalArgumentException ("invalid class definition: failed to parse class name [" + line + "]" );
179
179
}
@@ -194,13 +194,13 @@ public static Whitelist loadFromResourceFiles(Class<?> resource, String... filep
194
194
throw new IllegalArgumentException ("invalid class definition: extraneous closing bracket" );
195
195
}
196
196
197
- whitelistClasses .add (new WhitelistClass (whitelistClassOrigin , javaClassName , onlyFQNJavaClassName ,
197
+ whitelistClasses .add (new WhitelistClass (whitelistClassOrigin , javaClassName , noImport ,
198
198
whitelistConstructors , whitelistMethods , whitelistFields ));
199
199
200
200
// Set all the variables to null to ensure a new class definition is found before other parsable values.
201
201
whitelistClassOrigin = null ;
202
202
javaClassName = null ;
203
- onlyFQNJavaClassName = false ;
203
+ noImport = false ;
204
204
whitelistConstructors = null ;
205
205
whitelistMethods = null ;
206
206
whitelistFields = null ;
0 commit comments