44import java .lang .reflect .InvocationTargetException ;
55import java .lang .reflect .Method ;
66
7- import com .google .common .base .Throwables ;
8-
97import de .odysseus .el .tree .impl .Scanner ;
108
119public class ExtendedScanner extends Scanner {
@@ -57,23 +55,23 @@ protected boolean isWhitespace(char c) {
5755 POSITION_FIELD = Scanner .class .getDeclaredField ("position" );
5856 POSITION_FIELD .setAccessible (true );
5957 } catch (NoSuchFieldException | SecurityException | NoSuchMethodException e ) {
60- throw Throwables . propagate (e );
58+ throw new RuntimeException (e );
6159 }
6260 }
6361
6462 protected static void addKeyToken (Token token ) {
6563 try {
6664 ADD_KEY_TOKEN_METHOD .invoke (null , token );
6765 } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e ) {
68- throw Throwables . propagate (e );
66+ throw new RuntimeException (e );
6967 }
7068 }
7169
7270 protected void setToken (Token token ) {
7371 try {
7472 TOKEN_FIELD .set (this , token );
7573 } catch (IllegalArgumentException | IllegalAccessException e ) {
76- throw Throwables . propagate (e );
74+ throw new RuntimeException (e );
7775 }
7876 }
7977
@@ -82,7 +80,7 @@ protected void incrPosition(int n) {
8280 try {
8381 POSITION_FIELD .set (this , getPosition () + n );
8482 } catch (IllegalArgumentException | IllegalAccessException e ) {
85- throw Throwables . propagate (e );
83+ throw new RuntimeException (e );
8684 }
8785 }
8886
0 commit comments