Skip to content

Commit 8a500e5

Browse files
committed
HV-661 Adding Animal Sniffer plug-in for checking project against Java 1.6 API. Also replacing method only available in 1.6.0_18 and later.
1 parent f7f81a6 commit 8a500e5

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

engine/src/main/java/org/hibernate/validator/internal/xml/XmlParserHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public class XmlParserHelper {
5757
private static final int NUMBER_OF_SCHEMAS = 4;
5858
private static final String DEFAULT_VERSION = "1.0";
5959

60-
private static final XMLInputFactory xmlInputFactory = XMLInputFactory.newFactory();
60+
private static final XMLInputFactory xmlInputFactory = XMLInputFactory.newInstance();
6161

6262
/**
6363
* Read limit for the buffered input stream. Resetting the stream after

pom.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,19 @@
288288
</execution>
289289
</executions>
290290
</plugin>
291+
<!-- Run mvn animal-sniffer:check to check that only Java 1.6 APIs are used -->
292+
<plugin>
293+
<groupId>org.codehaus.mojo</groupId>
294+
<artifactId>animal-sniffer-maven-plugin</artifactId>
295+
<version>1.9</version>
296+
<configuration>
297+
<signature>
298+
<groupId>org.codehaus.mojo.signature</groupId>
299+
<artifactId>java16</artifactId>
300+
<version>1.0</version>
301+
</signature>
302+
</configuration>
303+
</plugin>
291304
<plugin>
292305
<groupId>org.apache.maven.plugins</groupId>
293306
<artifactId>maven-surefire-plugin</artifactId>

0 commit comments

Comments
 (0)