Skip to Content
avatar image
Former Member

warning in java mapping

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jan 02, 2015 at 10:43 AM

    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 Implementing a Java Mapping in SAP PI

    Regards,

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 02, 2015 at 04:57 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded