Skip to content

Commit

Permalink
swagger-api#216: Replace deprecated newInstance method call.
Browse files Browse the repository at this point in the history
  • Loading branch information
ClintCombs committed Dec 30, 2019
1 parent e53fa08 commit 9f55881
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/scala/play/modules/swagger/SwaggerPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class SwaggerPluginImpl @Inject()(environment: Environment, configuration: Confi
lazy val swaggerSpecFilter: Option[SwaggerSpecFilter] = config.filterClass match {
case Some(e) if e.nonEmpty =>
try {
val filter = environment.classLoader.loadClass(e).newInstance.asInstanceOf[SwaggerSpecFilter]
val filter = environment.classLoader.loadClass(e).getDeclaredConstructor().newInstance().asInstanceOf[SwaggerSpecFilter]
logger.debug("Setting swagger.filter to %s".format(e))
Some(filter)
} catch {
Expand Down

0 comments on commit 9f55881

Please sign in to comment.