Skip to content

Commit 86f0096

Browse files
authored
Add missing license headers (getsentry#3003)
1 parent 7ca9895 commit 86f0096

File tree

10 files changed

+157
-22
lines changed

10 files changed

+157
-22
lines changed

sentry-android-core/src/main/java/io/sentry/android/core/ANRWatchDog.java

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,28 @@
1-
// https://github.com/SalomonBrys/ANR-WatchDog/blob/1969075f75f5980e9000eaffbaa13b0daf282dcb/anr-watchdog/src/main/java/com/github/anrwatchdog/ANRWatchDog.java
2-
// Based on the class above. The API unnecessary here was removed.
1+
/*
2+
* Adapted from https://github.com/SalomonBrys/ANR-WatchDog/blob/1969075f75f5980e9000eaffbaa13b0daf282dcb/anr-watchdog/src/main/java/com/github/anrwatchdog/ANRWatchDog.java
3+
*
4+
* The MIT License (MIT)
5+
*
6+
* Copyright (c) 2016 Salomon BRYS
7+
*
8+
* Permission is hereby granted, free of charge, to any person obtaining a copy of
9+
* this software and associated documentation files (the "Software"), to deal in
10+
* the Software without restriction, including without limitation the rights to
11+
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
12+
* the Software, and to permit persons to whom the Software is furnished to do so,
13+
* subject to the following conditions:
14+
*
15+
* The above copyright notice and this permission notice shall be included in all
16+
* copies or substantial portions of the Software.
17+
*
18+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
20+
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
21+
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
22+
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
23+
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24+
*/
25+
326
package io.sentry.android.core;
427

528
import static android.app.ActivityManager.ProcessErrorStateInfo.NOT_RESPONDING;

sentry-android-core/src/main/java/io/sentry/android/core/internal/util/FirstDrawDoneListener.java

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
/*
2+
* https://github.com/firebase/firebase-android-sdk/blob/master/firebase-perf/src/main/java/com/google/firebase/perf/util/FirstDrawDoneListener.java
3+
*
4+
* Copyright 2022 Google LLC
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
119
package io.sentry.android.core.internal.util;
220

321
import android.annotation.SuppressLint;
@@ -14,10 +32,6 @@
1432
/**
1533
* OnDrawListener that unregisters itself and invokes callback when the next draw is done. This API
1634
* 16+ implementation is an approximation of the initial-display-time defined by Android Vitals.
17-
*
18-
* <p>Adapted from <a
19-
* href="https://github.com/firebase/firebase-android-sdk/blob/master/firebase-perf/src/main/java/com/google/firebase/perf/util/FirstDrawDoneListener.java">Firebase</a>
20-
* under the Apache License, Version 2.0.
2135
*/
2236
@SuppressLint("ObsoleteSdkInt")
2337
@RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)

sentry/src/main/java/io/sentry/CircularFifoQueue.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
/*
2+
* Adapted from https://github.com/apache/commons-collections/blob/fce46cdcc6fa33ba9472921d4b3ec3f548d8cbcc/src/main/java/org/apache/commons/collections4/queue/CircularFifoQueue.java
3+
*
4+
* Licensed to the Apache Software Foundation (ASF) under one or more
5+
* contributor license agreements. See the NOTICE file distributed with
6+
* this work for additional information regarding copyright ownership.
7+
* The ASF licenses this file to You under the Apache License, Version 2.0
8+
* (the "License"); you may not use this file except in compliance with
9+
* the License. You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing, software
14+
* distributed under the License is distributed on an "AS IS" BASIS,
15+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
* See the License for the specific language governing permissions and
17+
* limitations under the License.
18+
*/
19+
120
package io.sentry;
221

322
import java.io.IOException;

sentry/src/main/java/io/sentry/SynchronizedCollection.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
/*
2+
* Adapted from https://github.com/apache/commons-collections/blob/fce46cdcc6fa33ba9472921d4b3ec3f548d8cbcc/src/main/java/org/apache/commons/collections4/collection/SynchronizedCollection.java
3+
*
24
* Licensed to the Apache Software Foundation (ASF) under one or more
35
* contributor license agreements. See the NOTICE file distributed with
46
* this work for additional information regarding copyright ownership.

sentry/src/main/java/io/sentry/SynchronizedQueue.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
/*
2+
* Adapted from https://github.com/apache/commons-collections/blob/fce46cdcc6fa33ba9472921d4b3ec3f548d8cbcc/src/main/java/org/apache/commons/collections4/queue/SynchronizedQueue.java
3+
*
24
* Licensed to the Apache Software Foundation (ASF) under one or more
35
* contributor license agreements. See the NOTICE file distributed with
46
* this work for additional information regarding copyright ownership.

sentry/src/main/java/io/sentry/transport/ReusableCountLatch.java

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,29 @@
1-
// Apache-2:
2-
// https://github.com/MatejTymes/JavaFixes/blob/37e74b9d0a29f7a47485c6d1bb1307f01fb93634/LICENSE
1+
/*
2+
* Adapted from https://github.com/MatejTymes/JavaFixes/blob/37e74b9d0a29f7a47485c6d1bb1307f01fb93634/src/main/java/javafixes/concurrency/ReusableCountLatch.java
3+
*
4+
* Copyright (C) 2016 Matej Tymes
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
319
package io.sentry.transport;
420

521
import java.util.concurrent.TimeUnit;
622
import java.util.concurrent.locks.AbstractQueuedSynchronizer;
723
import org.jetbrains.annotations.NotNull;
824

925
/**
10-
* Class originally copied from <a
11-
* href="https://github.com/MatejTymes/JavaFixes/blob/37e74b9d0a29f7a47485c6d1bb1307f01fb93634/src/main/java/javafixes/concurrency/ReusableCountLatch.java">ReusableCountLatch.java</a>.
12-
*
13-
* <p>A synchronization aid that allows one or more threads to wait until a set of operations being
26+
* A synchronization aid that allows one or more threads to wait until a set of operations being
1427
* performed in other threads completes.
1528
*
1629
* <p>A {@code ReusableCountLatch} is initialized with a given <em>count</em>. The {@link

sentry/src/main/java/io/sentry/vendor/Base64.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
/*
2+
* Adapted from https://cs.android.com/android/platform/superproject/main/+/main:frameworks/base/core/java/android/util/Base64.java
3+
*
4+
* Copyright (C) 2010 The Android Open Source Project
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
119
package io.sentry.vendor;
220

321
import java.io.UnsupportedEncodingException;

sentry/src/main/java/io/sentry/vendor/gson/internal/bind/util/ISO8601Utils.java

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
/*
2+
* Adapted from https://github.com/FasterXML/jackson-databind/blob/c1e92435c6942386394a2a7733065bb047773107/src/main/java/com/fasterxml/jackson/databind/util/ISO8601Utils.java
3+
*
4+
* Copyright (C) 2007-, Tatu Saloranta
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
119
package io.sentry.vendor.gson.internal.bind.util;
220

321
import org.jetbrains.annotations.ApiStatus;
@@ -19,8 +37,6 @@
1937
*
2038
* @see <a href="http://www.w3.org/TR/NOTE-datetime">this specification</a>
2139
*/
22-
//Date parsing code from Jackson databind ISO8601Utils.java
23-
// https://github.com/FasterXML/jackson-databind/blob/master/src/main/java/com/fasterxml/jackson/databind/util/ISO8601Utils.java
2440
@SuppressWarnings({"TryWithIdenticalCatches", "UnusedAssignment", "MagicConstant"}) // Ignore warnings to preserve original code.
2541
@ApiStatus.Internal
2642
public class ISO8601Utils

sentry/src/test/java/io/sentry/transport/ReusableCountLatchTest.kt

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
/*
2+
* Adapted from https://github.com/MatejTymes/JavaFixes/blob/37e74b9d0a29f7a47485c6d1bb1307f01fb93634/src/test/java/javafixes/concurrency/ReusableCountLatchTest.java
3+
*
4+
* Copyright (C) 2016 Matej Tymes
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
119
package io.sentry.transport
220

321
import java.util.concurrent.Executors.newScheduledThreadPool
@@ -10,9 +28,6 @@ import kotlin.test.assertFailsWith
1028
import kotlin.test.assertFalse
1129
import kotlin.test.assertTrue
1230

13-
/**
14-
* Tests originally copied from <a href="https://github.com/MatejTymes/JavaFixes/blob/37e74b9d0a29f7a47485c6d1bb1307f01fb93634/src/test/java/javafixes/concurrency/ReusableCountLatchTest.java">ReusableCountLatchTest</a>.
15-
*/
1631
class ReusableCountLatchTest {
1732
@Test
1833
fun `should reflect initial value`() {

sentry/src/test/java/io/sentry/vendor/gson/internal/bind/util/ISO8601UtilsTest.java

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,22 @@
1-
package io.sentry.vendor.gson.internal.bind.util;
1+
/*
2+
* Adapted from https://github.com/FasterXML/jackson-databind/blob/c1e92435c6942386394a2a7733065bb047773107/src/test/java/com/fasterxml/jackson/databind/util/ISO8601UtilsTest.java
3+
*
4+
* Copyright (C) 2007-, Tatu Saloranta
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
218

3-
// Source: https://github.com/google/gson
4-
// Tag: gson-parent-2.8.9
5-
// Commit Hash: 6a368d89da37917be7714c3072b8378f4120110a
6-
// Changes: --
19+
package io.sentry.vendor.gson.internal.bind.util;
720

821
import org.junit.Test;
922

0 commit comments

Comments
 (0)