-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Java issues - OSAC-42, OSAC-43, OSAC-45 (#76)
* Fix for issue #51 * Update on fix for Issue 51 * Added tests for Java Invoker timeout * Fix for issue #31 on empty array * fix for #31 for null parameters * fix issue with comparison of parameter types * implemented typed null solution for #31 * small fix for array indexing #31 * TestCases for issues #30 and #31 * Unit Tests of Generic Methods for issues #30 and #31 * merged * TestProgram.jar refactor * Removed unused * updated * Changes * changes * done * Suppressions * Bug fixes * Fixed comments * recompiled JAR file Co-authored-by: alcxs <[email protected]> Co-authored-by: petcua1 <[email protected]> Co-authored-by: Vlad Nicula <[email protected]>
- Loading branch information
1 parent
6eabf9e
commit 886cf69
Showing
38 changed files
with
707 additions
and
793 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
87 changes: 87 additions & 0 deletions
87
Activities/Java/TestProgram/src/uipath/java/test/GenericMethods.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
package uipath.java.test; | ||
|
||
public class GenericMethods { | ||
private String message; | ||
|
||
public GenericMethods() {} | ||
|
||
public GenericMethods(String sParam) { | ||
this.message = sParam; | ||
} | ||
|
||
public String getMessage() { | ||
return this.message; | ||
} | ||
|
||
public String[] GenericMethods(String[] strArrParam) { | ||
return strArrParam; | ||
} | ||
|
||
public String GenericMethods(String s1, String s2) { | ||
return s1 + s2; | ||
} | ||
|
||
public int[] IntArr(int[] intArrParam) { | ||
return intArrParam; | ||
} | ||
|
||
public static String[] StringArrStatic(String[] args) { | ||
return args; | ||
} | ||
|
||
public static int IntType(int args) { | ||
return args; | ||
} | ||
|
||
public static boolean BoolType(boolean args) { | ||
return args; | ||
} | ||
|
||
public static float FloatType(float args) { | ||
return args; | ||
} | ||
|
||
public String[] StringArrNonStatic(String[] args) { | ||
return args; | ||
} | ||
|
||
public <T> T GenericsExtObj(Object a) { | ||
this.message = "Generic method with Object " + a; | ||
return (T)this.message; | ||
} | ||
|
||
public <T extends String> Object GenericsExtString(T a) { | ||
this.message = "Generic method " + a; | ||
return this.message; | ||
} | ||
|
||
public <T> T GenericsR(T a) { | ||
this.message = "Generic method with return " + a; | ||
return (T)this.message; | ||
} | ||
|
||
public void finalize() throws Throwable {} | ||
|
||
public String StringParamValidation(String X) { | ||
return X; | ||
} | ||
|
||
public String ConcatenateXYZ() { | ||
String X = "X"; | ||
String Y = "Y"; | ||
String Z = "Z"; | ||
return StringParamValidation(X) + StringParamValidation(Y) + StringParamValidation(Z); | ||
} | ||
|
||
public int RecursiveCallTest(int k) { | ||
if (k < 2) | ||
return 1; | ||
return k * RecursiveCallTest(k - 1); | ||
} | ||
|
||
public static int StaticRecursiveCallTest(int k) { | ||
if (k < 2) | ||
return 1; | ||
return k * StaticRecursiveCallTest(k - 1); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.