diff --git a/libraries/stdlib/jre7/src/kotlin/AutoCloseable.kt b/libraries/stdlib/jre7/src/kotlin/AutoCloseable.kt index c6ec435e7e6..cf47b37dea9 100644 --- a/libraries/stdlib/jre7/src/kotlin/AutoCloseable.kt +++ b/libraries/stdlib/jre7/src/kotlin/AutoCloseable.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2016 JetBrains s.r.o. + * Copyright 2010-2017 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -60,4 +60,3 @@ internal fun AutoCloseable?.closeFinally(cause: Throwable?) = when { cause.addSuppressed(closeException) } } - diff --git a/libraries/stdlib/jre7/src/kotlin/internal/JRE7PlatformImplementations.kt b/libraries/stdlib/jre7/src/kotlin/internal/JRE7PlatformImplementations.kt index 5dae5560a66..136116e4840 100644 --- a/libraries/stdlib/jre7/src/kotlin/internal/JRE7PlatformImplementations.kt +++ b/libraries/stdlib/jre7/src/kotlin/internal/JRE7PlatformImplementations.kt @@ -1,5 +1,20 @@ -package kotlin.internal +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed 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 kotlin.internal @Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER", "CANNOT_OVERRIDE_INVISIBLE_MEMBER") internal open class JRE7PlatformImplementations : PlatformImplementations() { diff --git a/libraries/stdlib/jre7/test/TryWithResourcesAutoCloseableTest.kt b/libraries/stdlib/jre7/test/TryWithResourcesAutoCloseableTest.kt index 7a09d34ac50..9d60ffd7f56 100644 --- a/libraries/stdlib/jre7/test/TryWithResourcesAutoCloseableTest.kt +++ b/libraries/stdlib/jre7/test/TryWithResourcesAutoCloseableTest.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed 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 kotlin.jdk7.test import java.io.* @@ -5,7 +21,6 @@ import org.junit.Test import java.util.* import kotlin.test.* - class TryWithResourcesAutoCloseableTest { @Suppress("HasPlatformType") fun platformNull() = Collections.singletonList(null as T).first() @@ -110,4 +125,4 @@ class TryWithResourcesAutoCloseableTest { assertTrue(e.suppressed.isEmpty()) } -} \ No newline at end of file +} diff --git a/libraries/stdlib/jre7/test/TryWithResourcesCloseableTest.kt b/libraries/stdlib/jre7/test/TryWithResourcesCloseableTest.kt index fe612dafb89..46425c363ab 100644 --- a/libraries/stdlib/jre7/test/TryWithResourcesCloseableTest.kt +++ b/libraries/stdlib/jre7/test/TryWithResourcesCloseableTest.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed 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 kotlin.jdk7.test import org.junit.Ignore @@ -110,4 +126,4 @@ class TryWithResourcesCloseableTest { assertTrue(e is IllegalArgumentException) assertTrue(e.suppressed.isEmpty()) } -} \ No newline at end of file +} diff --git a/libraries/stdlib/jre7/test/internalAnnotations.kt b/libraries/stdlib/jre7/test/internalAnnotations.kt index 6f5f26a1e9b..9a1b933f996 100644 --- a/libraries/stdlib/jre7/test/internalAnnotations.kt +++ b/libraries/stdlib/jre7/test/internalAnnotations.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2016 JetBrains s.r.o. + * Copyright 2010-2017 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/libraries/stdlib/jre8/src/kotlin/collections/Collections.kt b/libraries/stdlib/jre8/src/kotlin/collections/Collections.kt index f42d7b414a6..38870e5c550 100644 --- a/libraries/stdlib/jre8/src/kotlin/collections/Collections.kt +++ b/libraries/stdlib/jre8/src/kotlin/collections/Collections.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed 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. + */ + @file:Suppress("UNCHECKED_CAST", "NOTHING_TO_INLINE") @file:JvmName("CollectionsJRE8Kt") package kotlin.collections @@ -22,5 +38,3 @@ public inline fun <@kotlin.internal.OnlyInputTypes K, V> Map.getOrDefa @kotlin.internal.InlineOnly public inline fun <@kotlin.internal.OnlyInputTypes K, @kotlin.internal.OnlyInputTypes V> MutableMap.remove(key: K, value: V): Boolean = (this as MutableMap).remove(key, value) - - diff --git a/libraries/stdlib/jre8/src/kotlin/internal/JRE8PlatformImplementations.kt b/libraries/stdlib/jre8/src/kotlin/internal/JRE8PlatformImplementations.kt index 365a9149a26..b4a0e12b322 100644 --- a/libraries/stdlib/jre8/src/kotlin/internal/JRE8PlatformImplementations.kt +++ b/libraries/stdlib/jre8/src/kotlin/internal/JRE8PlatformImplementations.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed 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 kotlin.internal import java.util.regex.MatchResult diff --git a/libraries/stdlib/jre8/src/kotlin/streams/Streams.kt b/libraries/stdlib/jre8/src/kotlin/streams/Streams.kt index 1863a6358d4..28327fc7951 100644 --- a/libraries/stdlib/jre8/src/kotlin/streams/Streams.kt +++ b/libraries/stdlib/jre8/src/kotlin/streams/Streams.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed 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. + */ + @file:JvmName("StreamsKt") package kotlin.streams @@ -57,4 +73,3 @@ public fun LongStream.toList(): List = toArray().asList() */ @SinceKotlin("1.1") public fun DoubleStream.toList(): List = toArray().asList() - diff --git a/libraries/stdlib/jre8/src/kotlin/text/RegexExtensions.kt b/libraries/stdlib/jre8/src/kotlin/text/RegexExtensions.kt index 3b6547f4c9c..098ee02b9f7 100644 --- a/libraries/stdlib/jre8/src/kotlin/text/RegexExtensions.kt +++ b/libraries/stdlib/jre8/src/kotlin/text/RegexExtensions.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2016 JetBrains s.r.o. + * Copyright 2010-2017 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/libraries/stdlib/jre8/test/collections/CollectionTest.kt b/libraries/stdlib/jre8/test/collections/CollectionTest.kt index cce80c66df6..ef79925ef4c 100644 --- a/libraries/stdlib/jre8/test/collections/CollectionTest.kt +++ b/libraries/stdlib/jre8/test/collections/CollectionTest.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed 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 kotlin.jdk8.collections.test import org.junit.Test @@ -29,4 +45,4 @@ class CollectionTest { } -} \ No newline at end of file +} diff --git a/libraries/stdlib/jre8/test/collections/IterableTest.kt b/libraries/stdlib/jre8/test/collections/IterableTest.kt index a06bc8fd7bc..d1117205949 100644 --- a/libraries/stdlib/jre8/test/collections/IterableTest.kt +++ b/libraries/stdlib/jre8/test/collections/IterableTest.kt @@ -1,11 +1,25 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed 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 kotlin.jdk8.collections.test import org.junit.Test import kotlin.test.* import java.util.function.* - - class IterableTest { val data = listOf("foo", "bar") @@ -36,4 +50,4 @@ class IterableTest { }) } -} \ No newline at end of file +} diff --git a/libraries/stdlib/jre8/test/collections/ListTest.kt b/libraries/stdlib/jre8/test/collections/ListTest.kt index e091c1ab5d3..6672287e3f0 100644 --- a/libraries/stdlib/jre8/test/collections/ListTest.kt +++ b/libraries/stdlib/jre8/test/collections/ListTest.kt @@ -1,10 +1,25 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed 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 kotlin.jdk8.collections.test import org.junit.Test import kotlin.test.* import java.util.function.UnaryOperator - class ListTest { @Test fun replaceAll() { @@ -17,4 +32,4 @@ class ListTest { list.replaceAll(UnaryOperator.identity()) assertEquals(expected, list) } -} \ No newline at end of file +} diff --git a/libraries/stdlib/jre8/test/collections/MapTest.kt b/libraries/stdlib/jre8/test/collections/MapTest.kt index 25ef2317005..6f1d49206af 100644 --- a/libraries/stdlib/jre8/test/collections/MapTest.kt +++ b/libraries/stdlib/jre8/test/collections/MapTest.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed 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 kotlin.jdk8.collections.test import org.junit.Test @@ -125,4 +141,4 @@ class MapTest { assertEquals(null, map2.merge(1, "3") { _, _ -> null }) assertFalse(1 in map) } -} \ No newline at end of file +} diff --git a/libraries/stdlib/jre8/test/collections/StreamsTest.kt b/libraries/stdlib/jre8/test/collections/StreamsTest.kt index 113ddb535b2..86a122e9151 100644 --- a/libraries/stdlib/jre8/test/collections/StreamsTest.kt +++ b/libraries/stdlib/jre8/test/collections/StreamsTest.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed 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 kotlin.jdk8.streams.test import kotlin.streams.* diff --git a/libraries/stdlib/jre8/test/text/RegexTest.kt b/libraries/stdlib/jre8/test/text/RegexTest.kt index 55c10468feb..f3d13fc556a 100644 --- a/libraries/stdlib/jre8/test/text/RegexTest.kt +++ b/libraries/stdlib/jre8/test/text/RegexTest.kt @@ -1,9 +1,24 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed 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 kotlin.text.test import org.junit.Test import kotlin.test.* - class RegexTest { @Test fun namedGroups() { val input = "1a 2b 3c" @@ -24,4 +39,4 @@ class RegexTest { assertEquals("b", m2.groups["liter"]?.value) assertEquals(4..4, m2.groups["liter"]?.range) } -} \ No newline at end of file +}