@@ -53,7 +53,7 @@ public final class WhitelistLoader {
5353 * a Painless type name with the exception that any dollar symbols used as part of inner classes will
5454 * be replaced with dot symbols. </li>
5555 * <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
5757 * as described later. </li>
5858 * </ul>
5959 *
@@ -65,7 +65,7 @@ public final class WhitelistLoader {
6565 * <li> Primitive types may be specified starting with 'class' and followed by the Java type name,
6666 * an opening bracket, a newline, a closing bracket, and a final newline. </li>
6767 * <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,
6969 * constructor/method/field specifications, a closing bracket, and a final newline. Within a complex
7070 * type the following may be parsed:
7171 * <ul>
@@ -109,7 +109,7 @@ public final class WhitelistLoader {
109109 *
110110 * # complex types
111111 *
112- * class my.package.Example only_fqn {
112+ * class my.package.Example no_import {
113113 * # constructors
114114 * ()
115115 * (int)
@@ -145,7 +145,7 @@ public static Whitelist loadFromResourceFiles(Class<?> resource, String... filep
145145
146146 String whitelistClassOrigin = null ;
147147 String javaClassName = null ;
148- boolean onlyFQNJavaClassName = false ;
148+ boolean noImport = false ;
149149 List <WhitelistConstructor > whitelistConstructors = null ;
150150 List <WhitelistMethod > whitelistMethods = null ;
151151 List <WhitelistField > whitelistFields = null ;
@@ -160,7 +160,7 @@ public static Whitelist loadFromResourceFiles(Class<?> resource, String... filep
160160 }
161161
162162 // 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'
164164 if (line .startsWith ("class " )) {
165165 // Ensure the final token of the line is '{'.
166166 if (line .endsWith ("{" ) == false ) {
@@ -172,8 +172,8 @@ public static Whitelist loadFromResourceFiles(Class<?> resource, String... filep
172172 String [] tokens = line .substring (5 , line .length () - 1 ).trim ().split ("\\ s+" );
173173
174174 // 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 ;
177177 } else if (tokens .length != 1 ) {
178178 throw new IllegalArgumentException ("invalid class definition: failed to parse class name [" + line + "]" );
179179 }
@@ -194,13 +194,13 @@ public static Whitelist loadFromResourceFiles(Class<?> resource, String... filep
194194 throw new IllegalArgumentException ("invalid class definition: extraneous closing bracket" );
195195 }
196196
197- whitelistClasses .add (new WhitelistClass (whitelistClassOrigin , javaClassName , onlyFQNJavaClassName ,
197+ whitelistClasses .add (new WhitelistClass (whitelistClassOrigin , javaClassName , noImport ,
198198 whitelistConstructors , whitelistMethods , whitelistFields ));
199199
200200 // Set all the variables to null to ensure a new class definition is found before other parsable values.
201201 whitelistClassOrigin = null ;
202202 javaClassName = null ;
203- onlyFQNJavaClassName = false ;
203+ noImport = false ;
204204 whitelistConstructors = null ;
205205 whitelistMethods = null ;
206206 whitelistFields = null ;
0 commit comments