Skip to content

Commit e38f59a

Browse files
committed
Fix doc + missing licence header
1 parent dafcf51 commit e38f59a

File tree

5 files changed

+100
-7
lines changed

5 files changed

+100
-7
lines changed

CHANGELOG.asciidoc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,6 @@ endif::[]
5858
===== Refactors
5959
* Migrate some plugins to indy dispatcher {pull}1405[#1405] {pull}1394[#1394]
6060
61-
[[release-notes-1.x]]
62-
=== Java Agent version 1.x
63-
6461
[[release-notes-1.19.0]]
6562
==== 1.19.0 - 2020/11/10
6663

apm-agent-plugin-sdk/src/main/java/co/elastic/apm/agent/sdk/weakmap/NullCheck.java

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
1+
/*-
2+
* #%L
3+
* Elastic APM Java agent
4+
* %%
5+
* Copyright (C) 2018 - 2021 Elastic and contributors
6+
* %%
7+
* Licensed to Elasticsearch B.V. under one or more contributor
8+
* license agreements. See the NOTICE file distributed with
9+
* this work for additional information regarding copyright
10+
* ownership. Elasticsearch B.V. licenses this file to you under
11+
* the Apache License, Version 2.0 (the "License"); you may
12+
* not use this file except in compliance with the License.
13+
* You may obtain a copy of the License at
14+
*
15+
* http://www.apache.org/licenses/LICENSE-2.0
16+
*
17+
* Unless required by applicable law or agreed to in writing,
18+
* software distributed under the License is distributed on an
19+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
20+
* KIND, either express or implied. See the License for the
21+
* specific language governing permissions and limitations
22+
* under the License.
23+
* #L%
24+
*/
125
package co.elastic.apm.agent.sdk.weakmap;
226

327
import org.slf4j.Logger;
@@ -28,7 +52,7 @@ private static <T> boolean isNull(@Nullable T v, boolean isKey) {
2852
return true;
2953
}
3054

31-
public static <T> boolean isNullKey(@Nullable T key){
55+
public static <T> boolean isNullKey(@Nullable T key) {
3256
return isNull(key, true);
3357
}
3458

apm-agent-plugin-sdk/src/main/java/co/elastic/apm/agent/sdk/weakmap/NullSafeWeakConcurrentSet.java

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
1+
/*-
2+
* #%L
3+
* Elastic APM Java agent
4+
* %%
5+
* Copyright (C) 2018 - 2021 Elastic and contributors
6+
* %%
7+
* Licensed to Elasticsearch B.V. under one or more contributor
8+
* license agreements. See the NOTICE file distributed with
9+
* this work for additional information regarding copyright
10+
* ownership. Elasticsearch B.V. licenses this file to you under
11+
* the Apache License, Version 2.0 (the "License"); you may
12+
* not use this file except in compliance with the License.
13+
* You may obtain a copy of the License at
14+
*
15+
* http://www.apache.org/licenses/LICENSE-2.0
16+
*
17+
* Unless required by applicable law or agreed to in writing,
18+
* software distributed under the License is distributed on an
19+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
20+
* KIND, either express or implied. See the License for the
21+
* specific language governing permissions and limitations
22+
* under the License.
23+
* #L%
24+
*/
125
package co.elastic.apm.agent.sdk.weakmap;
226

327
import com.blogspot.mydailyjava.weaklockfree.WeakConcurrentSet;
@@ -17,23 +41,23 @@ public NullSafeWeakConcurrentSet(Cleaner cleaner) {
1741

1842
@Override
1943
public boolean add(V value) {
20-
if(isNullValue(value)){
44+
if (isNullValue(value)) {
2145
return false;
2246
}
2347
return super.add(value);
2448
}
2549

2650
@Override
2751
public boolean contains(V value) {
28-
if(isNullValue(value)){
52+
if (isNullValue(value)) {
2953
return false;
3054
}
3155
return super.contains(value);
3256
}
3357

3458
@Override
3559
public boolean remove(V value) {
36-
if(isNullValue(value)){
60+
if (isNullValue(value)) {
3761
return false;
3862
}
3963
return super.remove(value);

apm-agent-plugin-sdk/src/test/java/co/elastic/apm/agent/sdk/state/GlobalThreadLocalTest.java

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
1+
/*-
2+
* #%L
3+
* Elastic APM Java agent
4+
* %%
5+
* Copyright (C) 2018 - 2021 Elastic and contributors
6+
* %%
7+
* Licensed to Elasticsearch B.V. under one or more contributor
8+
* license agreements. See the NOTICE file distributed with
9+
* this work for additional information regarding copyright
10+
* ownership. Elasticsearch B.V. licenses this file to you under
11+
* the Apache License, Version 2.0 (the "License"); you may
12+
* not use this file except in compliance with the License.
13+
* You may obtain a copy of the License at
14+
*
15+
* http://www.apache.org/licenses/LICENSE-2.0
16+
*
17+
* Unless required by applicable law or agreed to in writing,
18+
* software distributed under the License is distributed on an
19+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
20+
* KIND, either express or implied. See the License for the
21+
* specific language governing permissions and limitations
22+
* under the License.
23+
* #L%
24+
*/
125
package co.elastic.apm.agent.sdk.state;
226

327
import org.junit.jupiter.api.Test;

apm-agent-plugin-sdk/src/test/java/co/elastic/apm/agent/sdk/weakmap/NullSafeWeakConcurrentSetTest.java

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
1+
/*-
2+
* #%L
3+
* Elastic APM Java agent
4+
* %%
5+
* Copyright (C) 2018 - 2021 Elastic and contributors
6+
* %%
7+
* Licensed to Elasticsearch B.V. under one or more contributor
8+
* license agreements. See the NOTICE file distributed with
9+
* this work for additional information regarding copyright
10+
* ownership. Elasticsearch B.V. licenses this file to you under
11+
* the Apache License, Version 2.0 (the "License"); you may
12+
* not use this file except in compliance with the License.
13+
* You may obtain a copy of the License at
14+
*
15+
* http://www.apache.org/licenses/LICENSE-2.0
16+
*
17+
* Unless required by applicable law or agreed to in writing,
18+
* software distributed under the License is distributed on an
19+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
20+
* KIND, either express or implied. See the License for the
21+
* specific language governing permissions and limitations
22+
* under the License.
23+
* #L%
24+
*/
125
package co.elastic.apm.agent.sdk.weakmap;
226

327
import com.blogspot.mydailyjava.weaklockfree.WeakConcurrentSet;

0 commit comments

Comments
 (0)