[PR #235] [MERGED] Fix IntelliJ nullability errors #468

Closed
opened 2025-12-30 01:24:40 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/apple/pkl/pull/235
Author: @odenix
Created: 2/22/2024
Status: Merged
Merged: 2/23/2024
Merged by: @bioball

Base: mainHead: intellij-null


📝 Commits (1)

  • f0f9a19 Fix IntelliJ nullability errors

📊 Changes

4 files changed (+12 additions, -6 deletions)

View changed files

📝 pkl-core/src/main/java/org/pkl/core/EvaluatorBuilder.java (+2 -2)
📝 pkl-core/src/main/java/org/pkl/core/ast/builder/AstBuilder.java (+1 -1)
📝 pkl-core/src/main/java/org/pkl/core/project/Project.java (+2 -2)
📝 pkl-core/src/main/java/org/pkl/core/util/Nullable.java (+7 -1)

📄 Description

IntelliJ doesn't recognize nullability annotations in code such as java.time.@Nullable Duration. This causes erroneous nullability errors at call sites. Fix this by replacing the affected code with code such as @Nullable java.time.Duration. This requires allowing @Nullable in more places.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/apple/pkl/pull/235 **Author:** [@odenix](https://github.com/odenix) **Created:** 2/22/2024 **Status:** ✅ Merged **Merged:** 2/23/2024 **Merged by:** [@bioball](https://github.com/bioball) **Base:** `main` ← **Head:** `intellij-null` --- ### 📝 Commits (1) - [`f0f9a19`](https://github.com/apple/pkl/commit/f0f9a19b5370d94c53e495179658079cb4aec1ed) Fix IntelliJ nullability errors ### 📊 Changes **4 files changed** (+12 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `pkl-core/src/main/java/org/pkl/core/EvaluatorBuilder.java` (+2 -2) 📝 `pkl-core/src/main/java/org/pkl/core/ast/builder/AstBuilder.java` (+1 -1) 📝 `pkl-core/src/main/java/org/pkl/core/project/Project.java` (+2 -2) 📝 `pkl-core/src/main/java/org/pkl/core/util/Nullable.java` (+7 -1) </details> ### 📄 Description IntelliJ doesn't recognize nullability annotations in code such as `java.time.@Nullable Duration`. This causes erroneous nullability errors at call sites. Fix this by replacing the affected code with code such as `@Nullable java.time.Duration`. This requires allowing `@Nullable` in more places. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-30 01:24:40 +01:00
adam closed this issue 2025-12-30 01:24:41 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pkl#468