Can not compile a JCD that has a HashMap in it (Doc ID 1026228.1)

Last updated on NOVEMBER 03, 2016

Applies to:

Oracle Java CAPS Enterprise Service Bus - Version: R6 U1 and later
Information in this document applies to any platform.

Symptoms

Created a hashmap in a JCD thusly:
HashMap<String, String> propMap = new HashMap<String, String> ((Map) prop);

The build fails with:
...Encountered "<" at line 29, column 50. Was expecting one of: "("... "."... "["... at line 29

However, if the same program is compiled in Netbeans as a regular Java program, it succeeds.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms