Test whether the argument is a Java keyword. @param key The name @return true if the name is a java identifier
(String key)
| 905 | * @return <code>true</code> if the name is a java identifier |
| 906 | */ |
| 907 | public static boolean isJavaKeyword(String key) { |
| 908 | int i = 0; |
| 909 | int j = javaKeywords.length; |
| 910 | while (i < j) { |
| 911 | int k = (i + j) >>> 1; |
| 912 | int result = javaKeywords[k].compareTo(key); |
| 913 | if (result == 0) { |
| 914 | return true; |
| 915 | } |
| 916 | if (result < 0) { |
| 917 | i = k + 1; |
| 918 | } else { |
| 919 | j = k; |
| 920 | } |
| 921 | } |
| 922 | return false; |
| 923 | } |
| 924 | |
| 925 | static InputStreamReader getReader(String fname, String encoding, Jar jar, JspCompilationContext ctxt, |
| 926 | ErrorDispatcher err) throws JasperException, IOException { |
no test coverage detected