Skip to content

Commit dc92f02

Browse files
author
David Grieve
committed
address comments from PR 1492
1 parent cc9265f commit dc92f02

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

jfr-connection/src/main/java/io/opentelemetry/contrib/jfr/connection/FlightRecorderDiagnosticCommandConnection.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -245,20 +245,13 @@ static void assertCommercialFeaturesUnlocked(
245245

246246
if (operation.isPresent()) {
247247
mBeanServerConnection.invoke(objectName, "vmUnlockCommercialFeatures", params, signature);
248-
} else {
249-
// No vmUnlockCommercialFeatures command.
250-
return;
251248
}
252249
} catch (InstanceNotFoundException
253250
| IntrospectionException
254251
| MBeanException
255252
| ReflectionException e) {
256253
throw JfrConnectionException.canonicalJfrConnectionException(
257-
FlightRecorderDiagnosticCommandConnection.class,
258-
"assertCommercialFeaturesUnlocked",
259-
new UnsupportedOperationException(
260-
"Unlocking commercial features may be required. This must be explicitly enabled by adding -XX:+UnlockCommercialFeatures",
261-
e));
254+
FlightRecorderDiagnosticCommandConnection.class, "assertCommercialFeaturesUnlocked", e);
262255
}
263256
}
264257

0 commit comments

Comments
 (0)