Skip to content

Commit

Permalink
#1429 Force initialisation of TypeDefinitionCategory before ModifierType
Browse files Browse the repository at this point in the history
  • Loading branch information
To-om committed Jul 9, 2020
1 parent a561af9 commit 5f27aab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,5 @@ class MispModule(environment: Environment, configuration: Configuration) extends
bind[ActorRef]
.annotatedWithName("misp-actor")
.toProvider[MispActorProvider]
.asEagerSingleton()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import java.lang.reflect.Modifier
import gremlin.scala.{Graph, Key}
import javax.inject.{Inject, Singleton}
import org.janusgraph.core.schema.ConsistencyModifier
import org.janusgraph.graphdb.types.TypeDefinitionCategory
import org.reflections.Reflections
import org.reflections.scanners.SubTypesScanner
import org.reflections.util.ConfigurationBuilder
Expand All @@ -22,6 +23,8 @@ import scala.util.{Success, Try}
@Singleton
class TheHiveSchemaDefinition @Inject() (injector: Injector) extends Schema with UpdatableSchema {

// Make sure TypeDefinitionCategory has been initialised before ModifierType to prevent ExceptionInInitializerError
TypeDefinitionCategory.BACKING_INDEX
lazy val logger: Logger = Logger(getClass)
val name: String = "thehive"
val operations: Operations = Operations(name)
Expand Down

0 comments on commit 5f27aab

Please sign in to comment.