Repository: incubator-slider Updated Branches: refs/heads/develop 0ab072507 -> edb44dfca
SLIDER-790 change language level to Java 7 Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/edb44dfc Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/edb44dfc Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/edb44dfc Branch: refs/heads/develop Commit: edb44dfca857e41323a04bc00ab5f632550512ec Parents: 0ab0725 Author: Steve Loughran <[email protected]> Authored: Fri Feb 27 12:39:44 2015 -0800 Committer: Steve Loughran <[email protected]> Committed: Fri Feb 27 12:39:44 2015 -0800 ---------------------------------------------------------------------- pom.xml | 3 +- .../slider/tools/TestJavaLanguageVersion.java | 42 ++++++++++++++++++++ 2 files changed, 43 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/edb44dfc/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index a623b85..0d58b2b 100644 --- a/pom.xml +++ b/pom.xml @@ -99,7 +99,6 @@ </mailingLists> <properties> - <compileSource>1.7</compileSource> <distMgmtSnapshotsId>apache.snapshots.https</distMgmtSnapshotsId> <distMgmtSnapshotsName>Apache Development Snapshot Repository</distMgmtSnapshotsName> <distMgmtSnapshotsUrl>https://repository.apache.org/content/repositories/snapshots</distMgmtSnapshotsUrl> @@ -112,7 +111,7 @@ <!-- Java versions --> - <project.java.src.version>1.6</project.java.src.version> + <project.java.src.version>1.7</project.java.src.version> <enforced.java.version>${project.java.src.version}</enforced.java.version> <groovy.version>2.4.0</groovy.version> http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/edb44dfc/slider-core/src/test/java/org/apache/slider/tools/TestJavaLanguageVersion.java ---------------------------------------------------------------------- diff --git a/slider-core/src/test/java/org/apache/slider/tools/TestJavaLanguageVersion.java b/slider-core/src/test/java/org/apache/slider/tools/TestJavaLanguageVersion.java new file mode 100644 index 0000000..fd3c345 --- /dev/null +++ b/slider-core/src/test/java/org/apache/slider/tools/TestJavaLanguageVersion.java @@ -0,0 +1,42 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.tools; + +import groovy.util.logging.Slf4j; +import org.junit.Test; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +@Slf4j +public class TestJavaLanguageVersion { + + @Test + public void testJava7Language() throws Throwable { + List<String> list = new ArrayList<>(); + try (ByteArrayOutputStream baos = new ByteArrayOutputStream()) { + baos.write('a'); + list.add(baos.toString()); + } catch (IOException | OutOfMemoryError ignored) { + // ignored + } + } +}
