Skip to content

Commit

Permalink
Generate metadata for reflection on method parameters (#3378)
Browse files Browse the repository at this point in the history
Fixes #3342
  • Loading branch information
joschi committed May 30, 2023
1 parent 5a08140 commit 809e967
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package io.dropwizard.metrics5;

import org.junit.jupiter.api.Test;

import static org.assertj.core.api.Assertions.assertThat;

public class ClassMetadataTest {
@Test
public void testParameterMetadataIsAvailable() throws NoSuchMethodException {
assertThat(DefaultSettableGauge.class.getConstructor(Object.class).getParameters())
.allSatisfy(parameter -> assertThat(parameter.isNamePresent()).isTrue());
}
}
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<compilerId>javac-with-errorprone</compilerId>
<forceJavacCompilerUse>true</forceJavacCompilerUse>
Expand Down Expand Up @@ -207,7 +206,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<fork>true</fork>
<compilerArgs>
Expand Down Expand Up @@ -361,6 +359,8 @@
<configuration>
<source>1.8</source>
<target>1.8</target>
<fork>true</fork>
<parameters>true</parameters>
<showWarnings>true</showWarnings>
<compilerArgs>
<arg>-Xlint:all</arg>
Expand Down

0 comments on commit 809e967

Please sign in to comment.