Skip to content

Commit 61341a7

Browse files
committed
java compiler warning cleanup
* disabled annotation processor from log4j2-core by disabling all annotations processors in modules with a log42-core dependency * mockito-core configured as java agent for tests in modules where needed * added missing deprecation annotations * fixed bad method signatures in classes implementing HAPIs IValidationSupport interface * removed not needed method with potentially unsafe var-arg * configured maven-resources-plugin propertyEncoding and fixed BuildInfoReaderImpl to use UTF-8
1 parent 86c5bb5 commit 61341a7

File tree

19 files changed

+176
-24
lines changed

19 files changed

+176
-24
lines changed

dsf-bpe/dsf-bpe-process-api-v1-impl/pom.xml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,22 @@
6464

6565
<build>
6666
<plugins>
67+
<plugin>
68+
<groupId>org.apache.maven.plugins</groupId>
69+
<artifactId>maven-compiler-plugin</artifactId>
70+
<configuration>
71+
<testCompilerArgument>-proc:none</testCompilerArgument>
72+
</configuration>
73+
</plugin>
6774
<plugin>
6875
<groupId>org.apache.maven.plugins</groupId>
6976
<artifactId>maven-dependency-plugin</artifactId>
7077
<executions>
78+
<execution>
79+
<goals>
80+
<goal>properties</goal>
81+
</goals>
82+
</execution>
7183
<execution>
7284
<id>copy-api-v1-dependencies-to-docker</id>
7385
<phase>pre-integration-test</phase>
@@ -187,6 +199,13 @@
187199
</execution>
188200
</executions>
189201
</plugin>
202+
<plugin>
203+
<groupId>org.apache.maven.plugins</groupId>
204+
<artifactId>maven-surefire-plugin</artifactId>
205+
<configuration>
206+
<argLine>-javaagent:${org.mockito:mockito-core:jar}</argLine>
207+
</configuration>
208+
</plugin>
190209
<plugin>
191210
<groupId>org.apache.maven.plugins</groupId>
192211
<artifactId>maven-clean-plugin</artifactId>

dsf-bpe/dsf-bpe-process-api-v2-impl/src/main/java/dev/dsf/bpe/v2/client/fhir/FhirClientFactory.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ public int getConnectTimeout()
222222
}
223223

224224
@Override
225+
@Deprecated
225226
public ServerValidationModeEnum getServerValidationModeEnum()
226227
{
227228
return getServerValidationMode();
@@ -294,6 +295,7 @@ public void setProxyCredentials(String theUsername, String thePassword)
294295
}
295296

296297
@Override
298+
@Deprecated
297299
public void setServerValidationModeEnum(ServerValidationModeEnum theServerValidationMode)
298300
{
299301
throw notSupported();

dsf-bpe/dsf-bpe-server-jetty/pom.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,15 @@
6363
</resources>
6464

6565
<plugins>
66+
<plugin>
67+
<groupId>org.apache.maven.plugins</groupId>
68+
<artifactId>maven-compiler-plugin</artifactId>
69+
<configuration>
70+
<compilerArgs>
71+
<arg>-proc:none</arg>
72+
</compilerArgs>
73+
</configuration>
74+
</plugin>
6675
<plugin>
6776
<groupId>org.apache.maven.plugins</groupId>
6877
<artifactId>maven-jar-plugin</artifactId>

dsf-bpe/dsf-bpe-server/pom.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,15 @@
259259
</testResources>
260260

261261
<plugins>
262+
<plugin>
263+
<groupId>org.apache.maven.plugins</groupId>
264+
<artifactId>maven-compiler-plugin</artifactId>
265+
<configuration>
266+
<compilerArgs>
267+
<arg>-proc:none</arg>
268+
</compilerArgs>
269+
</configuration>
270+
</plugin>
262271
<plugin>
263272
<groupId>org.apache.maven.plugins</groupId>
264273
<artifactId>maven-surefire-plugin</artifactId>

dsf-common/dsf-common-auth/pom.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,16 @@
6060
<scope>test</scope>
6161
</dependency>
6262
</dependencies>
63+
64+
<build>
65+
<plugins>
66+
<plugin>
67+
<groupId>org.apache.maven.plugins</groupId>
68+
<artifactId>maven-compiler-plugin</artifactId>
69+
<configuration>
70+
<testCompilerArgument>-proc:none</testCompilerArgument>
71+
</configuration>
72+
</plugin>
73+
</plugins>
74+
</build>
6375
</project>

dsf-common/dsf-common-build-info-reader/src/main/java/dev/dsf/common/build/BuildInfoReaderImpl.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
import java.io.IOException;
44
import java.io.InputStream;
5+
import java.io.InputStreamReader;
6+
import java.io.Reader;
7+
import java.nio.charset.StandardCharsets;
58
import java.time.ZoneId;
69
import java.time.ZoneOffset;
710
import java.time.ZonedDateTime;
@@ -34,10 +37,11 @@ private Properties getVersionProperties()
3437
{
3538
if (versionProperties == null)
3639
{
37-
try (InputStream in = BuildInfoReaderImpl.class.getResourceAsStream(VERSION_PROPERTIES_FILE))
40+
try (InputStream in = BuildInfoReaderImpl.class.getResourceAsStream(VERSION_PROPERTIES_FILE);
41+
Reader reader = new InputStreamReader(in, StandardCharsets.UTF_8))
3842
{
3943
versionProperties = new Properties();
40-
versionProperties.load(in);
44+
versionProperties.load(reader);
4145
}
4246
catch (IOException e)
4347
{

dsf-common/dsf-common-config/pom.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,16 @@
3131
<scope>test</scope>
3232
</dependency>
3333
</dependencies>
34+
35+
<build>
36+
<plugins>
37+
<plugin>
38+
<groupId>org.apache.maven.plugins</groupId>
39+
<artifactId>maven-compiler-plugin</artifactId>
40+
<configuration>
41+
<testCompilerArgument>-proc:none</testCompilerArgument>
42+
</configuration>
43+
</plugin>
44+
</plugins>
45+
</build>
3446
</project>

dsf-common/dsf-common-jetty/pom.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,18 @@
7676
<scope>test</scope>
7777
</dependency>
7878
</dependencies>
79+
80+
<build>
81+
<plugins>
82+
<plugin>
83+
<groupId>org.apache.maven.plugins</groupId>
84+
<artifactId>maven-compiler-plugin</artifactId>
85+
<configuration>
86+
<compilerArgs>
87+
<arg>-proc:none</arg>
88+
</compilerArgs>
89+
</configuration>
90+
</plugin>
91+
</plugins>
92+
</build>
7993
</project>

dsf-fhir/dsf-fhir-auth/pom.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,16 @@
3333
<scope>test</scope>
3434
</dependency>
3535
</dependencies>
36+
37+
<build>
38+
<plugins>
39+
<plugin>
40+
<groupId>org.apache.maven.plugins</groupId>
41+
<artifactId>maven-compiler-plugin</artifactId>
42+
<configuration>
43+
<testCompilerArgument>-proc:none</testCompilerArgument>
44+
</configuration>
45+
</plugin>
46+
</plugins>
47+
</build>
3648
</project>

dsf-fhir/dsf-fhir-rest-adapter/pom.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,16 @@
3939
<scope>test</scope>
4040
</dependency>
4141
</dependencies>
42+
43+
<build>
44+
<plugins>
45+
<plugin>
46+
<groupId>org.apache.maven.plugins</groupId>
47+
<artifactId>maven-compiler-plugin</artifactId>
48+
<configuration>
49+
<testCompilerArgument>-proc:none</testCompilerArgument>
50+
</configuration>
51+
</plugin>
52+
</plugins>
53+
</build>
4254
</project>

0 commit comments

Comments
 (0)