Search code examples
scalawsdlplayframework-2.0

Convert Scala Wrapper$MapWrapper to a Java Map


I have the following code inside a Wsdl2Java generated class:

context.getMessageContext().get(MessageContext.HTTP_REQUEST_HEADERS)

The class of the object at runtime is

scala.collection.convert.Wrappers$MapWrapper

How can I convert this object to a Java map?

Thank you in advance.


Uf... there is no conversion to be done... it is a map already.


Solution

  • scala.collection.convert.Wrappers$MapWrapper extends java.util.AbstractMap (which, in turn, implements java.util.Map), so it is kind of already a java map and I believe you don't have to do anything.