Skip to content

Commit e42727d

Browse files
committed
Allow code to work on Java7 for now
1 parent f5e7a2a commit e42727d

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

pom.xml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,13 +219,17 @@ limitations under the License.
219219
<dependency>
220220
<groupId>org.apache.commons</groupId>
221221
<artifactId>commons-lang3</artifactId>
222-
<version>3.9</version>
222+
<!-- 3.9+ needs Java8 -->
223+
<version>3.8</version>
223224
<scope>test</scope>
224225
</dependency>
225226
</dependencies>
226227
<properties>
227-
<maven.compiler.source>1.8</maven.compiler.source>
228-
<maven.compiler.target>1.8</maven.compiler.target>
228+
<maven.compiler.source>1.7</maven.compiler.source>
229+
<maven.compiler.target>1.7</maven.compiler.target>
230+
<!-- Fix to build on JDK 7: version 4.0.0 requires Java 8. -->
231+
<!-- Can be dropped when CP 49 is released -->
232+
<commons.felix.version>3.5.1</commons.felix.version>
229233
<commons.componentid>codec</commons.componentid>
230234
<commons.module.name>org.apache.commons.codec</commons.module.name>
231235
<commons.jira.id>CODEC</commons.jira.id>

src/main/java/org/apache/commons/codec/language/DaitchMokotoffSoundex.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ private String[] soundex(final String source, final boolean branching) {
500500
}
501501

502502
// use an EMPTY_LIST to avoid false positive warnings wrt potential null pointer access
503-
final List<Branch> nextBranches = branching ? new ArrayList<>() : Collections.<Branch>emptyList();
503+
final List<Branch> nextBranches = branching ? new ArrayList<Branch>() : Collections.<Branch>emptyList();
504504

505505
for (final Rule rule : rules) {
506506
if (rule.matches(inputContext)) {

0 commit comments

Comments
 (0)