Skip to content

Commit 7db583f

Browse files
otelbot[bot]trask
andauthored
Review fixes for xxl-job-common:testing (#17206)
Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com> Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
1 parent e0baba0 commit 7db583f

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

instrumentation/xxl-job/xxl-job-common/testing/src/main/java/io/opentelemetry/instrumentation/xxljob/AbstractXxlJobTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ protected Class<?> getReflectObjectClass() {
9595
}
9696

9797
@Test
98-
public void testMethodJob() {
98+
void testMethodJob() {
9999
// method handle is null if test is not supported by tested version of the library
100100
Assumptions.assumeTrue(getMethodHandler() != null);
101101

instrumentation/xxl-job/xxl-job-common/testing/src/main/java/io/opentelemetry/instrumentation/xxljob/ReflectiveMethodsFactory.java

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,28 +35,25 @@ static Object getTarget() {
3535

3636
static Method getMethod() {
3737
try {
38-
return SINGLETON_OBJECT.getClass().getMethod("echo", String.class);
38+
return ReflectObject.class.getMethod("echo", String.class);
3939
} catch (Throwable t) {
40-
// Ignore
40+
return null;
4141
}
42-
return null;
4342
}
4443

4544
static Method getInitMethod() {
4645
try {
47-
return SINGLETON_OBJECT.getClass().getMethod("initMethod");
46+
return ReflectObject.class.getMethod("initMethod");
4847
} catch (Throwable t) {
49-
// Ignore
48+
return null;
5049
}
51-
return null;
5250
}
5351

5452
static Method getDestroyMethod() {
5553
try {
56-
return SINGLETON_OBJECT.getClass().getMethod("destroyMethod");
54+
return ReflectObject.class.getMethod("destroyMethod");
5755
} catch (Throwable t) {
58-
// Ignore
56+
return null;
5957
}
60-
return null;
6158
}
6259
}

0 commit comments

Comments
 (0)