Skip to content

Commit 65f0d97

Browse files
committed
remove unnecessary changes
1 parent ed127ef commit 65f0d97

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

pom.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -286,10 +286,6 @@
286286
<pattern>javax.annotation</pattern>
287287
<shadedPattern>com.microsoft.azure.functions.shaded.javax.annotation</shadedPattern>
288288
</relocation>
289-
<relocation combine.children="append">
290-
<pattern>io.opentelemetry</pattern>
291-
<shadedPattern>com.microsoft.azure.functions.shaded.io.opentelemetry</shadedPattern>
292-
</relocation>
293289
</relocations>
294290
</configuration>
295291
</execution>

src/main/java/com/microsoft/azure/functions/worker/broker/JavaFunctionBroker.java

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ public JavaFunctionBroker(ClassLoaderProvider classLoaderProvider) {
6767
} else {
6868
this.workerObjectCache = null;
6969
}
70-
7170
}
7271

7372
public void loadMethod(FunctionMethodDescriptor descriptor, Map<String, BindingInfo> bindings)
@@ -112,14 +111,15 @@ private void initializeOneTimeLogics() {
112111
synchronized (oneTimeLogicInitializationLock) {
113112
if (!oneTimeLogicInitialized) {
114113
userContextClassLoader = classLoaderProvider.createClassLoader();
115-
oneTimeLogicInitialized = true;
116-
initializeFunctionInstanceInjector();
117114

118115
if (JAVA_ENABLE_SDK_TYPES_FLAG) {
119116
loadGlobalMiddlewares();
120117
} else {
121118
initializeInvocationChainFactory();
122119
}
120+
121+
oneTimeLogicInitialized = true;
122+
initializeFunctionInstanceInjector();
123123
}
124124
}
125125
}
@@ -150,10 +150,11 @@ private void initializeInvocationChainFactory() {
150150
}
151151
} finally {
152152
Thread.currentThread().setContextClassLoader(prevContextClassLoader);
153-
ArrayList<Middleware> middlewares = new ArrayList<>(this.serviceLoadedMiddlewares);
154-
middlewares.add(getFunctionExecutionMiddleWare(userContextClassLoader));
155-
this.invocationChainFactory = new InvocationChainFactory(middlewares);
156153
}
154+
155+
ArrayList<Middleware> middlewares = new ArrayList<>(this.serviceLoadedMiddlewares);
156+
middlewares.add(getFunctionExecutionMiddleWare(userContextClassLoader));
157+
this.invocationChainFactory = new InvocationChainFactory(middlewares);
157158
}
158159

159160
private void initializeFunctionInstanceInjector() {
@@ -317,6 +318,4 @@ private boolean isTesting(){
317318
public void setWorkerDirectory(String workerDirectory) {
318319
this.workerDirectory = workerDirectory;
319320
}
320-
321-
public List<Middleware> getServiceLoadedMiddlewares() { return this.serviceLoadedMiddlewares; }
322321
}

0 commit comments

Comments
 (0)