cancel
Showing results for 
Search instead for 
Did you mean: 

warning in java mapping

Former Member
0 Kudos

Dear Friends,

In the below code in java mapping I am getting a warning - Map is a raw type. "Map is a raw type. References to generic type Map<K,V> should be parameterized"  

public void setParameter(Map param) {
    if (param != null) {
        Object o = param.get(StreamTransformationConstants.MAPPING_TRACE);
        if (o != null && o instanceof MappingTrace) {
            trace = (MappingTrace) o;
        }
    }
}

Can anybody plz help me in correcting this code to remove this warning. I am using eclipse 4.3.

Thanks.

Sumeet.

Accepted Solutions (0)

Answers (2)

Answers (2)

RaghuVamseedhar
Active Contributor
0 Kudos

Sumeet,

1) Please do not use this deprecated class and method. Link.


implements StreamTransformation

void setParameter(Map param)

2) Use


extends AbstractTransformation

3) FYI..The warning is about Java Generics. Read more about it here.

4) Please use sample Java code in this wiki.

iaki_vila
Active Contributor
0 Kudos

Hi Summet,

Why don't you try to use the example code for setParameter?

Check the point 3 in Carlos Ivan Prieto Rubio's blog

Regards,