Back to Intellij Community

DefaultAnnotationParam

java/java-impl/resources/inspectionDescriptions/DefaultAnnotationParam.html

2025.3-rc-2294 B
Original Source

Reports annotation parameters that are assigned to their default value.

Example:

@interface Test {
      Class<?> expected() default Throwable.class;
  }

  @Test(expected = Throwable.class)
  void testSmth() {}

After the quick-fix is applied:

@Test()
  void testSmth() {}