Skip to content

Commit

Permalink
[#noissue] Fix potential NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
emeroad authored and jaehong-kim committed Apr 27, 2022
1 parent 16a39c8 commit fc6b9f8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import com.navercorp.pinpoint.bootstrap.plugin.reactor.FluxAndMonoSubscribeInterceptor;
import com.navercorp.pinpoint.bootstrap.plugin.reactor.ReactorContextAccessor;
import com.navercorp.pinpoint.common.trace.ServiceType;
import com.navercorp.pinpoint.common.util.ArrayUtils;
import com.navercorp.pinpoint.plugin.reactor.netty.interceptor.ChannelOperationsChannelMethodInterceptor;
import com.navercorp.pinpoint.plugin.reactor.netty.interceptor.ChannelOperationsInterceptor;
import com.navercorp.pinpoint.plugin.reactor.netty.interceptor.ChannelOperationsOnInboundCompleteMethodInterceptor;
Expand Down Expand Up @@ -265,7 +266,7 @@ public byte[] doInTransform(Instrumentor instrumentor, ClassLoader loader, Strin

for (InstrumentMethod constructorMethod : target.getDeclaredConstructors()) {
final String[] parameterTypes = constructorMethod.getParameterTypes();
if (parameterTypes != null || parameterTypes.length > 0) {
if (ArrayUtils.hasLength(parameterTypes)) {
constructorMethod.addInterceptor(FluxAndMonoConstructorInterceptor.class);
}
}
Expand Down Expand Up @@ -294,7 +295,7 @@ public byte[] doInTransform(Instrumentor instrumentor, ClassLoader loader, Strin

for (InstrumentMethod constructorMethod : target.getDeclaredConstructors()) {
final String[] parameterTypes = constructorMethod.getParameterTypes();
if (parameterTypes != null || parameterTypes.length > 0) {
if (ArrayUtils.hasLength(parameterTypes)) {
constructorMethod.addInterceptor(FluxAndMonoOperatorConstructorInterceptor.class);
}
}
Expand All @@ -321,7 +322,7 @@ public byte[] doInTransform(Instrumentor instrumentor, ClassLoader loader, Strin

for (InstrumentMethod constructorMethod : target.getDeclaredConstructors()) {
final String[] parameterTypes = constructorMethod.getParameterTypes();
if (parameterTypes != null || parameterTypes.length > 0) {
if (ArrayUtils.hasLength(parameterTypes)) {
constructorMethod.addInterceptor(CoreSubscriberConstructorInterceptor.class);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import com.navercorp.pinpoint.bootstrap.plugin.ProfilerPluginSetupContext;
import com.navercorp.pinpoint.bootstrap.plugin.reactor.CoreSubscriberConstructorInterceptor;
import com.navercorp.pinpoint.bootstrap.plugin.reactor.ReactorContextAccessor;
import com.navercorp.pinpoint.common.util.ArrayUtils;
import com.navercorp.pinpoint.plugin.reactor.interceptor.ConnectableFluxSubscribeInterceptor;
import com.navercorp.pinpoint.plugin.reactor.interceptor.ConnectableFluxConstructorInterceptor;
import com.navercorp.pinpoint.plugin.reactor.interceptor.FluxConstructorInterceptor;
Expand Down Expand Up @@ -470,7 +471,7 @@ public byte[] doInTransform(Instrumentor instrumentor, ClassLoader loader, Strin

for (InstrumentMethod constructorMethod : target.getDeclaredConstructors()) {
final String[] parameterTypes = constructorMethod.getParameterTypes();
if (parameterTypes != null || parameterTypes.length > 0) {
if (ArrayUtils.hasLength(parameterTypes)) {
constructorMethod.addInterceptor(FluxConstructorInterceptor.class);
}
}
Expand Down Expand Up @@ -499,7 +500,7 @@ public byte[] doInTransform(Instrumentor instrumentor, ClassLoader loader, Strin

for (InstrumentMethod constructorMethod : target.getDeclaredConstructors()) {
final String[] parameterTypes = constructorMethod.getParameterTypes();
if (parameterTypes != null || parameterTypes.length > 0) {
if (ArrayUtils.hasLength(parameterTypes)) {
constructorMethod.addInterceptor(FluxOperatorConstructorInterceptor.class);
}
}
Expand Down Expand Up @@ -528,7 +529,7 @@ public byte[] doInTransform(Instrumentor instrumentor, ClassLoader loader, Strin

for (InstrumentMethod constructorMethod : target.getDeclaredConstructors()) {
final String[] parameterTypes = constructorMethod.getParameterTypes();
if (parameterTypes != null || parameterTypes.length > 0) {
if (ArrayUtils.hasLength(parameterTypes)) {
constructorMethod.addInterceptor(FluxDelaySubscriptionConstructorInterceptor.class);
}
}
Expand Down Expand Up @@ -561,7 +562,7 @@ public byte[] doInTransform(Instrumentor instrumentor, ClassLoader loader, Strin

for (InstrumentMethod constructorMethod : target.getDeclaredConstructors()) {
final String[] parameterTypes = constructorMethod.getParameterTypes();
if (parameterTypes != null || parameterTypes.length > 0) {
if (ArrayUtils.hasLength(parameterTypes)) {
constructorMethod.addInterceptor(RunnableCoreSubscriberConstructorInterceptor.class);
}
}
Expand Down Expand Up @@ -601,7 +602,7 @@ public byte[] doInTransform(Instrumentor instrumentor, ClassLoader loader, Strin

for (InstrumentMethod constructorMethod : target.getDeclaredConstructors()) {
final String[] parameterTypes = constructorMethod.getParameterTypes();
if (parameterTypes != null || parameterTypes.length > 0) {
if (ArrayUtils.hasLength(parameterTypes)) {
constructorMethod.addInterceptor(MonoConstructorInterceptor.class);
}
}
Expand All @@ -628,7 +629,7 @@ public byte[] doInTransform(Instrumentor instrumentor, ClassLoader loader, Strin

for (InstrumentMethod constructorMethod : target.getDeclaredConstructors()) {
final String[] parameterTypes = constructorMethod.getParameterTypes();
if (parameterTypes != null || parameterTypes.length > 0) {
if (ArrayUtils.hasLength(parameterTypes)) {
constructorMethod.addInterceptor(MonoOperatorConstructorInterceptor.class);
}
}
Expand All @@ -655,7 +656,7 @@ public byte[] doInTransform(Instrumentor instrumentor, ClassLoader loader, Strin

for (InstrumentMethod constructorMethod : target.getDeclaredConstructors()) {
final String[] parameterTypes = constructorMethod.getParameterTypes();
if (parameterTypes != null || parameterTypes.length > 0) {
if (ArrayUtils.hasLength(parameterTypes)) {
constructorMethod.addInterceptor(MonoDelaySubscriptionConstructorInterceptor.class);
}
}
Expand Down Expand Up @@ -701,7 +702,7 @@ public byte[] doInTransform(Instrumentor instrumentor, ClassLoader loader, Strin

for (InstrumentMethod constructorMethod : target.getDeclaredConstructors()) {
final String[] parameterTypes = constructorMethod.getParameterTypes();
if (parameterTypes != null || parameterTypes.length > 0) {
if (ArrayUtils.hasLength(parameterTypes)) {
constructorMethod.addInterceptor(ParallelFluxConstructorInterceptor.class);
}
}
Expand Down Expand Up @@ -741,7 +742,7 @@ public byte[] doInTransform(Instrumentor instrumentor, ClassLoader loader, Strin

for (InstrumentMethod constructorMethod : target.getDeclaredConstructors()) {
final String[] parameterTypes = constructorMethod.getParameterTypes();
if (parameterTypes != null || parameterTypes.length > 0) {
if (ArrayUtils.hasLength(parameterTypes)) {
constructorMethod.addInterceptor(ConnectableFluxConstructorInterceptor.class);
}
}
Expand Down Expand Up @@ -775,7 +776,7 @@ public byte[] doInTransform(Instrumentor instrumentor, ClassLoader loader, Strin

for (InstrumentMethod constructorMethod : target.getDeclaredConstructors()) {
final String[] parameterTypes = constructorMethod.getParameterTypes();
if (parameterTypes != null || parameterTypes.length > 0) {
if (ArrayUtils.hasLength(parameterTypes)) {
constructorMethod.addInterceptor(CoreSubscriberConstructorInterceptor.class);
}
}
Expand Down

0 comments on commit fc6b9f8

Please sign in to comment.