Skip to content

Conversation

@jurajmaj
Copy link

Fixes #1167

Null properties in VmTyped previously caused a NPE when accessed through hashCode().
This fix adds null checks so that containsKey and other map operations do not crash.

@jurajmaj
Copy link
Author

Hi @HT154, this PR is related to the issue we discussed #1167. I just wanted to check if there’s any feedback.
Thank you for your time!

@HT154
Copy link
Contributor

HT154 commented Nov 23, 2025

Hi @jurajmaj, thanks for the contribution! Most of the team is away until December, so it'll take us a little more time to review this fully. Thanks for your patience!

That said, my gut feeling here is that isn't quite the right way to resolve this. The cached property value being null here is a symptom of a Pkl stack overflow (circular data reference), so that should be the error communicated to the user. Interestingly, the exception's Pkl stack trace has already been rendered accordingly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NPE on invalid code

2 participants