Skip to content

Commit

Permalink
fixed a bug of ConfigBuilder when parsing actions
Browse files Browse the repository at this point in the history
  • Loading branch information
garyelephant committed Dec 23, 2021
1 parent b27404b commit ffbf99c
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import java.util.ServiceLoader
import scala.language.reflectiveCalls
import scala.collection.JavaConversions._
import scala.collection.JavaConverters._
import io.github.interestinglab.waterdrop.config.{Config, ConfigFactory, ConfigRenderOptions, ConfigResolveOptions}
import io.github.interestinglab.waterdrop.apis._

import scala.util.{Failure, Success, Try}
Expand Down Expand Up @@ -204,6 +203,13 @@ class ConfigBuilder(configFile: String) {

def createActions[T <: Plugin](): List[T] = {

config.hasPath("action") match {
case true => createActionsImpl[T]
case false => List[T]()
}
}

private def createActionsImpl[T <: Plugin](): List[T] = {
var pluginInstances = List[T]()

config
Expand Down

0 comments on commit ffbf99c

Please sign in to comment.