Skip to content

Commit 22a0b0f

Browse files
dalvarellosBeta Bot
authored andcommitted
Revert branch 'genexuslabs:fix/GxDynamicCall-improve-implementation' into beta
1 parent 0a86ab4 commit 22a0b0f

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

gxdynamiccall/src/main/java/com/genexus/gxdynamiccall/GXDynamicCall.java

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ public class GXDynamicCall {
2222
public GXDynamicCall(int remoteHandle, ModelContext context){
2323
this.remoteHandle = remoteHandle;
2424
this.context = context;
25-
this.properties = new GXProperties();
2625
}
2726

2827
public GXProperties getProperties() {
@@ -75,7 +74,7 @@ public Object execute(Vector<Object> parameters, GXDynCallMethodConf methodConfi
7574
{
7675
Class<?> auxClass=null;
7776
try {
78-
auxClass = loadClass(this.externalName, properties.get("PackageName"));
77+
auxClass = Class.forName(this.externalName);
7978
} catch (ClassNotFoundException e) {
8079
CommonUtil.ErrorToMessages("Load class Error", e.getMessage(), errors);
8180
errorsArray.addAll(errors.getStruct());
@@ -93,7 +92,7 @@ public void create(Vector<Object> constructParameters, Vector<SdtMessages_Messag
9392
Constructor<?> constructor=null;
9493
if (!this.externalName.isEmpty()) {
9594
try {
96-
Class<?> objClass = loadClass(this.externalName, properties.get("PackageName"));
95+
Class<?> objClass = Class.forName(this.externalName);
9796
Object[] auxConstParameters;
9897
Class<?>[] auxConstructorTypes;
9998
if (constructParameters != null && constructParameters.size() > 0) {
@@ -255,13 +254,4 @@ private static void updateParams(Vector<Object> originalParameter, Object[] call
255254
originalParameter.set(i, objectToUpdate);
256255
}
257256
}
258-
259-
private Class<?> loadClass(String className, String sPackage) throws ClassNotFoundException {
260-
String classPackage="";
261-
if(sPackage != null && !sPackage.isEmpty())
262-
classPackage+= sPackage + ".";
263-
classPackage+= className;
264-
Class<?> c = Class.forName(classPackage);;
265-
return c;
266-
}
267257
}

0 commit comments

Comments
 (0)