Skip to content

Commit

Permalink
Set the RuntimeDelegate not to need it being looked up again and again
Browse files Browse the repository at this point in the history
Signed-off-by: jansupol <[email protected]>
  • Loading branch information
jansupol committed Nov 15, 2023
1 parent 09318a4 commit 8d6b0ba
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2023 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -46,6 +46,7 @@ public <T> T createEndpoint(Application application, Class<T> endpointType)
for (RuntimeDelegate delegate : ServiceFinder.find(RuntimeDelegate.class)) {
// try to find runtime delegate from core-server
if (delegate.getClass() != RuntimeDelegateImpl.class) {
RuntimeDelegate.setInstance(delegate);
return delegate.createEndpoint(application, endpointType);
}
}
Expand Down

0 comments on commit 8d6b0ba

Please sign in to comment.