You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2019/06/20 22:36:17 UTC
[commons-codec] branch master updated: Allow code to work on Java7
for now
This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-codec.git
The following commit(s) were added to refs/heads/master by this push:
new e42727d Allow code to work on Java7 for now
e42727d is described below
commit e42727d6c6307b63ead9eb865fb1d874dc01e4eb
Author: Sebb <se...@apache.org>
AuthorDate: Thu Jun 20 23:34:39 2019 +0100
Allow code to work on Java7 for now
---
pom.xml | 10 +++++++---
.../apache/commons/codec/language/DaitchMokotoffSoundex.java | 2 +-
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/pom.xml b/pom.xml
index 2a71ecf..e8e8bf2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -219,13 +219,17 @@ limitations under the License.
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
- <version>3.9</version>
+ <!-- 3.9+ needs Java8 -->
+ <version>3.8</version>
<scope>test</scope>
</dependency>
</dependencies>
<properties>
- <maven.compiler.source>1.8</maven.compiler.source>
- <maven.compiler.target>1.8</maven.compiler.target>
+ <maven.compiler.source>1.7</maven.compiler.source>
+ <maven.compiler.target>1.7</maven.compiler.target>
+ <!-- Fix to build on JDK 7: version 4.0.0 requires Java 8. -->
+ <!-- Can be dropped when CP 49 is released -->
+ <commons.felix.version>3.5.1</commons.felix.version>
<commons.componentid>codec</commons.componentid>
<commons.module.name>org.apache.commons.codec</commons.module.name>
<commons.jira.id>CODEC</commons.jira.id>
diff --git a/src/main/java/org/apache/commons/codec/language/DaitchMokotoffSoundex.java b/src/main/java/org/apache/commons/codec/language/DaitchMokotoffSoundex.java
index dacb87c..1e6674c 100644
--- a/src/main/java/org/apache/commons/codec/language/DaitchMokotoffSoundex.java
+++ b/src/main/java/org/apache/commons/codec/language/DaitchMokotoffSoundex.java
@@ -500,7 +500,7 @@ public class DaitchMokotoffSoundex implements StringEncoder {
}
// use an EMPTY_LIST to avoid false positive warnings wrt potential null pointer access
- final List<Branch> nextBranches = branching ? new ArrayList<>() : Collections.<Branch>emptyList();
+ final List<Branch> nextBranches = branching ? new ArrayList<Branch>() : Collections.<Branch>emptyList();
for (final Rule rule : rules) {
if (rule.matches(inputContext)) {