report more insistently when the wrong field name was passed to resetField()
authorAlexey Kudravtsev <cdr@intellij.com>
Tue, 20 Apr 2021 12:03:34 +0000 (14:03 +0200)
committerintellij-monorepo-bot <intellij-monorepo-bot-no-reply@jetbrains.com>
Wed, 21 Apr 2021 12:34:02 +0000 (15:34 +0300)
GitOrigin-RevId: 029b5edb412cf29b89ab539451f15fa86e5216b3

platform/util/src/com/intellij/util/ReflectionUtil.java

index 5d2e807482a1ac43c5ead46e833db7abcc5e1f6a..7ec7b39093b0b3bc155c2a34b3335a9e91eaf2d4 100644 (file)
@@ -189,7 +189,7 @@ public final class ReflectionUtil {
       resetField(null, findField(clazz, type, name));
     }
     catch (NoSuchFieldException e) {
-      LOG.info(e);
+      throw new RuntimeException(e);
     }
   }
 
@@ -198,7 +198,7 @@ public final class ReflectionUtil {
       resetField(object, findField(object.getClass(), null, name));
     }
     catch (NoSuchFieldException e) {
-      LOG.info(e);
+      throw new RuntimeException(e);
     }
   }
 
@@ -225,7 +225,7 @@ public final class ReflectionUtil {
       }
     }
     catch (IllegalAccessException e) {
-      LOG.info(e);
+      throw new RuntimeException(e);
     }
   }
 
@@ -671,7 +671,7 @@ public final class ReflectionUtil {
   }
 
   /**
-   * Use {@link java.lang.invoke.VarHandle} or {@link java.util.concurrent.ConcurrentHashMap} or other standard JDK concurrent facilities
+   * @deprecated Use {@link java.lang.invoke.VarHandle} or {@link java.util.concurrent.ConcurrentHashMap} or other standard JDK concurrent facilities
    */
   @ApiStatus.Internal
   @Deprecated