Hans Fledermaus
Hans Fledermaus

Reputation: 261

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.

Upvotes: 1

Views: 739

Answers (1)

Eugene Loy
Eugene Loy

Reputation: 12416

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.

Upvotes: 2

Related Questions