mirror of
https://github.com/stleary/JSON-java.git
synced 2025-08-03 03:15:32 -04:00
Merge branch 'stleary:master' into master
This commit is contained in:
commit
50a5ce256b
@ -103,6 +103,12 @@ gradlew clean build test
|
|||||||
gradlew testWithStrictMode
|
gradlew testWithStrictMode
|
||||||
```
|
```
|
||||||
|
|
||||||
|
*Optional* Execute the test suite in strict mode with Maven:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
mvn test -P test-strict-mode
|
||||||
|
```
|
||||||
|
|
||||||
# Notes
|
# Notes
|
||||||
|
|
||||||
For more information, please see [NOTES.md](https://github.com/stleary/JSON-java/blob/master/docs/NOTES.md)
|
For more information, please see [NOTES.md](https://github.com/stleary/JSON-java/blob/master/docs/NOTES.md)
|
||||||
|
51
pom.xml
51
pom.xml
@ -200,4 +200,55 @@
|
|||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
<profiles>
|
||||||
|
<profile>
|
||||||
|
<id>test-strict-mode</id>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>com.google.code.maven-replacer-plugin</groupId>
|
||||||
|
<artifactId>replacer</artifactId>
|
||||||
|
<version>1.5.3</version>
|
||||||
|
<executions>
|
||||||
|
<!-- Enable strict mode -->
|
||||||
|
<execution>
|
||||||
|
<id>enable-strict-mode</id>
|
||||||
|
<phase>process-sources</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>replace</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<file>src/main/java/org/json/JSONParserConfiguration.java</file>
|
||||||
|
<replacements>
|
||||||
|
<replacement>
|
||||||
|
<token>// this.strictMode = true;</token>
|
||||||
|
<value>this.strictMode = true;</value>
|
||||||
|
</replacement>
|
||||||
|
</replacements>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
<!-- Restore original code after tests -->
|
||||||
|
<execution>
|
||||||
|
<id>restore-original</id>
|
||||||
|
<phase>test</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>replace</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<file>src/main/java/org/json/JSONParserConfiguration.java</file>
|
||||||
|
<replacements>
|
||||||
|
<replacement>
|
||||||
|
<token>this.strictMode = true;</token>
|
||||||
|
<value>// this.strictMode = true;</value>
|
||||||
|
</replacement>
|
||||||
|
</replacements>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
</profiles>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user