Support Article
Not able to instantiate a class with generic type
SA-10967
Summary
In PRPC 6.3 SP1, a utility function with Java language features from Java 1.5 (or higher) does not compile, and save.
Error Messages
"Syntax error, parameterized types are only available if source level is 1.5"
Steps to Reproduce
Attempt to save the following Java code in an activity or function:
java.util.ArrayList<String> list = new java.util.ArrayList<String>();
Root Cause
The root cause of this problem is a defect in Pegasystems’ code/rules. PRPC 6.x and earlier versions use Java 1.4 compiler and do not support methods instantiated in Java 1.5 version.
Resolution
This issue is resolved through the following local-change:
1.Add any Java 1.5 code to classes external to the PRPC environment.
2.Iimport the external classes/jars into PRPC.
3.Reference the external classes from a Java activity step.
Published July 1, 2015 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.