File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
src/main/scala-2/com/github/swagger/scala/converter Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -12,14 +12,13 @@ private[converter] object ErasureHelper {
1212
1313 def erasedOptionalPrimitives (cls : Class [_]): Map [String , Class [_]] = {
1414 try {
15- val mirror = universe.runtimeMirror(cls.getClassLoader )
16- val moduleSymbol = mirror.moduleSymbol (cls)
15+ val mirror = universe.runtimeMirror(Thread .currentThread().getContextClassLoader )
16+ val classSymbol = mirror.classSymbol (cls)
1717 val ConstructorName = " apply"
18- val companion : universe.Symbol = moduleSymbol .typeSignature.member(universe.TermName (ConstructorName ))
18+ val companion : universe.Symbol = classSymbol .typeSignature.member(universe.TermName (ConstructorName ))
1919 val properties =
2020 Try (companion.asTerm.alternatives.head.asMethod.paramLists.flatten).getOrElse {
21- val sym = mirror.classSymbol(cls)
22- sym.selfType.members
21+ classSymbol.selfType.members
2322 .filterNot(_.isMethod)
2423 .filterNot(_.isClass)
2524 }
You can’t perform that action at this time.
0 commit comments