Skip to content

Commit

Permalink
throw NPE in enso_project instead of assert
Browse files Browse the repository at this point in the history
  • Loading branch information
Akirathan committed Sep 13, 2023
1 parent 6a379f6 commit 7f9c05d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import com.oracle.truffle.api.library.CachedLibrary;
import com.oracle.truffle.api.nodes.Node;
import java.lang.ref.WeakReference;
import java.util.Objects;
import java.util.Optional;
import org.enso.interpreter.dsl.BuiltinMethod;
import org.enso.interpreter.node.EnsoRootNode;
Expand Down Expand Up @@ -100,7 +101,7 @@ public Object getCurrentProjectDescr(Object nothing) {
}
cachedProjectDescr = cachedProjectDescrRef.get();
}
assert cachedProjectDescr != null;
Objects.requireNonNull(cachedProjectDescr);
return cachedProjectDescr;
}

Expand Down

0 comments on commit 7f9c05d

Please sign in to comment.