< prev index next >

src/java.base/share/classes/jdk/internal/reflect/MethodHandleShortFieldAccessorImpl.java

Print this page
@@ -72,11 +72,11 @@
              if (isStatic()) {
                  return (short) getter.invokeExact();
              } else {
                  return (short) getter.invokeExact(obj);
              }
-         } catch (IllegalArgumentException|NullPointerException e) {
+         } catch (IllegalArgumentException|IllegalStateException|NullPointerException e) {
              throw e;
          } catch (ClassCastException e) {
              throw newGetIllegalArgumentException(obj);
          } catch (Throwable e) {
              throw new InternalError(e);

@@ -151,11 +151,11 @@
              if (isStatic()) {
                  setter.invokeExact(s);
              } else {
                  setter.invokeExact(obj, s);
              }
-         } catch (IllegalArgumentException|NullPointerException e) {
+         } catch (IllegalArgumentException|IllegalStateException|NullPointerException e) {
              throw e;
          } catch (ClassCastException e) {
              // receiver is of invalid type
              throw newSetIllegalArgumentException(obj);
          } catch (Throwable e) {
< prev index next >