Commit f67be17d authored by ascrutae's avatar ascrutae
Browse files

Remove confuse abstract method

parent 0d640622
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -23,11 +23,9 @@ import net.bytebuddy.matcher.ElementMatcher;
import org.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterceptPoint;
import org.skywalking.apm.agent.core.plugin.interceptor.InstanceMethodsInterceptPoint;
import org.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine;
import org.skywalking.apm.agent.core.plugin.match.ClassMatch;

import static net.bytebuddy.matcher.ElementMatchers.named;
import static net.bytebuddy.matcher.ElementMatchers.takesArguments;
import static org.skywalking.apm.agent.core.plugin.match.NameMatch.byName;
import static org.skywalking.apm.plugin.jdbc.define.Constants.CLOSE_METHOD_NAME;
import static org.skywalking.apm.plugin.jdbc.define.Constants.COMMIT_METHOD_NAME;
import static org.skywalking.apm.plugin.jdbc.define.Constants.CREATE_STATEMENT_INTERCEPT_CLASS;
@@ -139,10 +137,4 @@ public abstract class AbstractConnectionInstrumentation extends ClassInstanceMet
            }
        };
    }

    @Override protected ClassMatch enhanceClass() {
        return byName(getEnhanceClass());
    }

    public abstract String getEnhanceClass();
}
+6 −2
Original line number Diff line number Diff line
@@ -18,6 +18,10 @@

package org.skywalking.apm.plugin.jdbc.h2.define;

import org.skywalking.apm.agent.core.plugin.match.ClassMatch;

import static org.skywalking.apm.agent.core.plugin.match.NameMatch.byName;

/**
 * {@link JdbcConnectionInstrumentation} presents that skywalking intercepts {@link org.h2.jdbc.JdbcConnection}.
 *
@@ -26,7 +30,7 @@ package org.skywalking.apm.plugin.jdbc.h2.define;
public class JdbcConnectionInstrumentation extends AbstractConnectionInstrumentation {
    public static final String ENHANCE_CLASS = "org.h2.jdbc.JdbcConnection";

    @Override public String getEnhanceClass() {
        return ENHANCE_CLASS;
    @Override protected ClassMatch enhanceClass() {
        return byName(ENHANCE_CLASS);
    }
}
+4 −2
Original line number Diff line number Diff line
@@ -21,8 +21,10 @@ package org.skywalking.apm.plugin.jdbc.h2.define;
import net.bytebuddy.description.method.MethodDescription;
import net.bytebuddy.matcher.ElementMatcher;
import org.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterceptPoint;
import org.skywalking.apm.agent.core.plugin.match.ClassMatch;

import static net.bytebuddy.matcher.ElementMatchers.any;
import static org.skywalking.apm.agent.core.plugin.match.NameMatch.byName;

/**
 * {@link JdbcXAConnectionInstrumentation} presents that skywalking intercepts {@link org.h2.jdbcx.JdbcXAConnection}.
@@ -48,7 +50,7 @@ public class JdbcXAConnectionInstrumentation extends AbstractConnectionInstrumen
        };
    }

    @Override public String getEnhanceClass() {
        return ENHANCE_CLASS;
    @Override protected ClassMatch enhanceClass() {
        return byName(ENHANCE_CLASS);
    }
}
+7 −4
Original line number Diff line number Diff line
@@ -21,11 +21,14 @@ package org.skywalking.apm.plugin.jdbc.h2.define;
import net.bytebuddy.description.method.MethodDescription;
import net.bytebuddy.matcher.ElementMatcher;
import org.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterceptPoint;
import org.skywalking.apm.agent.core.plugin.match.ClassMatch;

import static net.bytebuddy.matcher.ElementMatchers.any;
import static org.skywalking.apm.agent.core.plugin.match.NameMatch.byName;

/**
 * {@link PooledJdbcConnectionInstrumentation} presents that skywalking intercepts {@link org.h2.jdbcx.JdbcXAConnection}.
 * {@link PooledJdbcConnectionInstrumentation} presents that skywalking intercepts {@link
 * org.h2.jdbcx.JdbcXAConnection}.
 *
 * @author zhangxin
 */
@@ -48,7 +51,7 @@ public class PooledJdbcConnectionInstrumentation extends AbstractConnectionInstr
        };
    }

    @Override public String getEnhanceClass() {
        return ENHANCE_CLASS;
    @Override protected ClassMatch enhanceClass() {
        return byName(ENHANCE_CLASS);
    }
}