File tree Expand file tree Collapse file tree 3 files changed +13
-4
lines changed
src/main/java/com/microsoft/azure/functions/worker Expand file tree Collapse file tree 3 files changed +13
-4
lines changed Original file line number Diff line number Diff line change
1
+ package com .microsoft .azure .functions .worker ;
2
+
3
+ public class Helper {
4
+
5
+ public static boolean isLoadAppLibsFirst () {
6
+ String javaReverseLibLoading = System .getenv (Constants .FUNCTIONS_WORKER_JAVA_LOAD_APP_LIBS );
7
+ return Util .isTrue (javaReverseLibLoading );
8
+ }
9
+ }
Original file line number Diff line number Diff line change 2
2
3
3
public class Util {
4
4
public static boolean isTrue (String value ) {
5
- if (value != null && value .toLowerCase ().equals ("true" )) {
5
+ if (value != null && ( value .toLowerCase ().equals ("true" ) || value . toLowerCase (). equals ( "1" ) )) {
6
6
return true ;
7
7
}
8
8
return false ;
Original file line number Diff line number Diff line change 10
10
11
11
import com .microsoft .azure .functions .rpc .messages .*;
12
12
import com .microsoft .azure .functions .worker .Constants ;
13
+ import com .microsoft .azure .functions .worker .Helper ;
13
14
import com .microsoft .azure .functions .worker .Util ;
14
15
import com .microsoft .azure .functions .worker .binding .BindingDataStore ;
15
16
import com .microsoft .azure .functions .worker .description .FunctionMethodDescriptor ;
@@ -95,11 +96,10 @@ void registerWithClassLoaderProvider(File libDirectory) {
95
96
try {
96
97
if (SystemUtils .IS_JAVA_1_8 ) {
97
98
String workerLibPath = System .getenv (Constants .FUNCTIONS_WORKER_DIRECTORY ) + "/lib" ;
98
- String javaReverseLibLoading = System .getenv (Constants .FUNCTIONS_WORKER_JAVA_LOAD_APP_LIBS );
99
99
File workerLib = new File (workerLibPath );
100
-
101
100
verifyLibrariesExist (workerLib , workerLibPath );
102
- if (Util .isTrue (javaReverseLibLoading )) {
101
+
102
+ if (Helper .isLoadAppLibsFirst ()) {
103
103
// load client app jars first.
104
104
classLoaderProvider .addDirectory (libDirectory );
105
105
classLoaderProvider .addDirectory (workerLib );
You can’t perform that action at this time.
0 commit comments