Skip to content

Commit 2f4ee07

Browse files
committed
code cleanup
1 parent a766da9 commit 2f4ee07

File tree

3 files changed

+10
-18
lines changed

3 files changed

+10
-18
lines changed

Kotlin-Coroutines_1.3.3/src/main/java/kotlinx/coroutines/channels/AbstractSendChannel.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,12 @@ public Object send(E e, Continuation<? super Unit> c) {
1818
return Weaver.callOriginal();
1919
}
2020

21-
// @Trace
22-
// public boolean offer(E e) {
23-
// return Weaver.callOriginal();
24-
// }
25-
2621
@Trace
2722
protected Object offerInternal(Object element) {
2823
return Weaver.callOriginal();
2924
}
3025

26+
@SuppressWarnings("rawtypes")
3127
@Trace
3228
protected Object offerSelectInternal(Object element, SelectInstance select) {
3329
return Weaver.callOriginal();

Kotlin-Coroutines_1.3/src/main/java/kotlinx/coroutines/AbstractCoroutine.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ public final void resumeWith(Object obj) {
4343

4444
@Trace(dispatcher=true)
4545
public final void start(CoroutineStart start, Function1<? super Continuation<? super T>, ? extends Object> f) {
46-
// if(!(f instanceof NRFunction1)) {
47-
// NRFunction1 wrapper = new NRFunction1(f);
48-
// f = wrapper;
49-
// }
46+
if(!(f instanceof NRFunction1)) {
47+
NRFunction1 wrapper = new NRFunction1(f);
48+
f = wrapper;
49+
}
5050
String name = nameString$kotlinx_coroutines_core();
5151
if(name != null && !name.isEmpty()) {
5252
NewRelic.getAgent().getTracedMethod().setMetricName(new String[] {"Custom","Coroutine",name,"start"});
@@ -56,10 +56,10 @@ public final void start(CoroutineStart start, Function1<? super Continuation<? s
5656

5757
@Trace(dispatcher=true)
5858
public final <R> void start(CoroutineStart start, R r, Function2<? super R, ? super Continuation<? super T>, ? extends Object> f) {
59-
// if(!(f instanceof NRFunction2)) {
60-
// NRFunction2 wrapper = new NRFunction2(f);
61-
// f = wrapper;
62-
// }
59+
if(!(f instanceof NRFunction2)) {
60+
NRFunction2 wrapper = new NRFunction2(f);
61+
f = wrapper;
62+
}
6363
String name = nameString$kotlinx_coroutines_core();
6464
if(name != null && !name.isEmpty()) {
6565
NewRelic.getAgent().getTracedMethod().setMetricName(new String[] {"Custom","Coroutine",name,"start"});

Kotlin-Coroutines_1.4/src/main/java/kotlinx/coroutines/channels/AbstractSendChannel.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,12 @@ public Object send(E e, Continuation<? super Unit> c) {
1818
return Weaver.callOriginal();
1919
}
2020

21-
// @Trace
22-
// public boolean offer(E e) {
23-
// return Weaver.callOriginal();
24-
// }
25-
2621
@Trace
2722
protected Object offerInternal(Object element) {
2823
return Weaver.callOriginal();
2924
}
3025

26+
@SuppressWarnings("rawtypes")
3127
@Trace
3228
protected Object offerSelectInternal(Object element, SelectInstance select) {
3329
return Weaver.callOriginal();

0 commit comments

Comments
 (0)