mirror of
https://github.com/OpenSPG/openspg.git
synced 2025-06-27 03:20:10 +00:00
fix(reasoner): fix dsl annonymous npe (#197)
This commit is contained in:
parent
170e4c2ab0
commit
b169228efb
@ -383,6 +383,9 @@ class PatternParser extends Serializable {
|
||||
var entityTypeNum = 0
|
||||
|
||||
var labels = Set[LabelType]()
|
||||
if (null == ctx) {
|
||||
return labels
|
||||
}
|
||||
ctx
|
||||
.label_name()
|
||||
.asScala
|
||||
@ -406,6 +409,9 @@ class PatternParser extends Serializable {
|
||||
|
||||
def parseLabelPropertyList(ctx: Label_property_listContext): Map[String, Object] = {
|
||||
var propertyMap = Map[String, Object]()
|
||||
if (null == ctx) {
|
||||
return propertyMap
|
||||
}
|
||||
for (i <- 0 until ctx.property_key().size()) {
|
||||
val keyName = ctx.property_key(i).getText
|
||||
propertyMap += (keyName -> parsePropertyValue(ctx.property_value(i)))
|
||||
|
Loading…
x
Reference in New Issue
Block a user