Skip to content

Commit ae58961

Browse files
committed
Fix optional MXBean test guard
Return early when a platform MXBean is absent so present MXBeans are still validated.
1 parent 5fc57ee commit ae58961

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎microsphere-java-core/src/test/java/io/microsphere/management/JmxUtilsTest.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ void testMethodSignature() {
357357
}
358358

359359
private void assertPlatformMXBean(Optional<? extends PlatformManagedObject> platformMXBean, String name) throws Throwable {
360-
if (platformMXBean.isPresent()) {
360+
if (platformMXBean.isEmpty()) {
361361
return;
362362
}
363363
assertPlatformMXBean(platformMXBean.get(), name);

0 commit comments

Comments
 (0)