IETS3 / iets3.opensource

Open Source Parts of IETS3
Apache License 2.0
44 stars 22 forks source link

InfHelper: NPE in GreaterOrEquals #1101

Open arimer opened 3 weeks ago

arimer commented 3 weeks ago

Missing a nullcheck here

an error occurred while applying rule to node (instance of CollectionSizeSpec)
java.lang.NullPointerException: Cannot invoke "String.equals(Object)" because "l" is null
    at org.iets3.core.expr.base.plugin.InfHelper.greaterOrEqual(InfHelper.java:218)
    at org.iets3.core.expr.collections.typesystem.check_CollectionSizeSpec_NonTypesystemRule.applyRule(check_CollectionSizeSpec_NonTypesystemRule.java:24)
    at jetbrains.mps.newTypesystem.context.typechecking.IncrementalTypechecking.applyRuleToNode(IncrementalTypechecking.java:157)
    at jetbrains.mps.newTypesystem.context.component.NonTypeSystemComponent.lambda$applyNonTypesystemRulesToNode$2(NonTypeSystemComponent.java:345)
    at jetbrains.mps.newTypesystem.context.typechecking.IncrementalTypechecking.runApplyRulesTo(IncrementalTypechecking.java:166)
    at jetbrains.mps.newTypesystem.context.component.NonTypeSystemComponent.applyNonTypesystemRulesToNode(NonTypeSystemComponent.java:320)
    at jetbrains.mps.newTypesystem.context.component.NonTypeSystemComponent.applyRulesToRoot(NonTypeSystemComponent.java:308)
    at jetbrains.mps.newTypesystem.context.component.NonTypeSystemComponent.lambda$applyNonTypeSystemRulesToRoot$1(NonTypeSystemComponent.java:293)
    at jetbrains.mps.languageScope.LanguageScopeExecutor.execWithModelScope(LanguageScopeExecutor.java:63)
    at jetbrains.mps.languageScope.LanguageScopeExecutor.execWithModelScope(LanguageScopeExecutor.java:43)
    at jetbrains.mps.newTypesystem.context.component.NonTypeSystemComponent.applyNonTypeSystemRulesToRoot(NonTypeSystemComponent.java:293)
    at jetbrains.mps.newTypesystem.context.typechecking.IncrementalTypechecking.applyNonTypesystemRulesToRoot(IncrementalTypechecking.java:227)
    at jetbrains.mps.typesystem.checking.NonTypesystemEditorChecker.lambda$doCreateMessages$2(NonTypesystemEditorChecker.java:105)
    at jetbrains.mps.newTypesystem.context.IncrementalTypecheckingContext.runTypeCheckingAction(IncrementalTypecheckingContext.java:165)
    at jetbrains.mps.typesystem.checking.NonTypesystemEditorChecker.doCreateMessages(NonTypesystemEditorChecker.java:89)
    at jetbrains.mps.typesystem.checking.AbstractTypesystemEditorChecker.lambda$update$0(AbstractTypesystemEditorChecker.java:112)
    at jetbrains.mps.typechecking.backend.TypecheckingSessionHandler.computeWithSession(TypecheckingSessionHandler.java:61)
    at jetbrains.mps.typesystem.checking.AbstractTypesystemEditorChecker.update(AbstractTypesystemEditorChecker.java:110)
    at jetbrains.mps.nodeEditor.highlighter.HighlighterUpdateSession$HighlighterReadAction.perform(HighlighterUpdateSession.java:308)
    at jetbrains.mps.nodeEditor.highlighter.EditorCheckerWrapper.withChecker(EditorCheckerWrapper.java:69)
    at jetbrains.mps.nodeEditor.highlighter.HighlighterUpdateSession$HighlighterReadAction.execute(HighlighterUpdateSession.java:302)
    at jetbrains.mps.smodel.CancellableReadAction.run(CancellableReadAction.java:86)
    at jetbrains.mps.smodel.ActionDispatcher.dispatch(ActionDispatcher.java:98)
    at jetbrains.mps.smodel.ActionDispatcher.lambda$wrap$0(ActionDispatcher.java:135)
    at jetbrains.mps.smodel.LockRunnable.run(LockRunnable.java:60)
    at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:915)
    at jetbrains.mps.smodel.WorkbenchModelAccess.runReadAction(WorkbenchModelAccess.java:84)
    at jetbrains.mps.smodel.ModelAccessBase.runReadAction(ModelAccessBase.java:56)
    at jetbrains.mps.nodeEditor.highlighter.HighlighterUpdateSession.updateEditor(HighlighterUpdateSession.java:211)
    at jetbrains.mps.nodeEditor.highlighter.HighlighterUpdateSession.updateEditorComponent(HighlighterUpdateSession.java:183)
    at jetbrains.mps.nodeEditor.highlighter.HighlighterUpdateSession.lambda$doUpdate$0(HighlighterUpdateSession.java:99)
    at jetbrains.mps.typechecking.backend.TypecheckingSessionHandler.runWithSession(TypecheckingSessionHandler.java:76)
    at jetbrains.mps.nodeEditor.highlighter.HighlighterUpdateSession.doUpdate(HighlighterUpdateSession.java:97)
    at jetbrains.mps.nodeEditor.highlighter.HighlighterUpdateSession.update(HighlighterUpdateSession.java:250)
    at jetbrains.mps.nodeEditor.Highlighter$ScheduleHighlighterUpdate.update(Highlighter.java:490)
    at jetbrains.mps.nodeEditor.Highlighter$ScheduleHighlighterUpdate.lambda$run$0(Highlighter.java:471)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.lang.Thread.run(Thread.java:833)