Skip to content

Commit

Permalink
Cleanup of CommercialFeaturesServiceFactory, adding missing DefaultCo…
Browse files Browse the repository at this point in the history
…nnectionHandle changes
  • Loading branch information
Josh-Matsuoka authored and andrewazores committed Jun 7, 2023
1 parent b8cad73 commit 9ee6c7d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public class DefaultConnectionHandle implements IConnectionHandle {
public DefaultConnectionHandle(RJMXConnection connection, String description, IConnectionListener[] listeners) {
this.connection = connection;
this.description = description;
this.listeners = listeners;
this.listeners = listeners == null ? new IConnectionListener[0] : listeners;
registerDefaultServices();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public ICommercialFeaturesService getServiceInstance(IConnectionHandle handle)
if (descriptor != null) {
JavaVersion version = new JavaVersion(descriptor.getJavaVersion());
if (version.getMajorVersion() >= 11) {
return new Jdk11CommercialFeaturesService();
return new NoCommercialFeaturesService();
}
}
return new HotSpot23CommercialFeaturesService(handle);
Expand Down

0 comments on commit 9ee6c7d

Please sign in to comment.