Skip to content

Fix NPE using KeY command line interface caused by Java NIO#3643

Merged
wadoon merged 2 commits intomainfrom
weigl/fixNPEnio
Aug 13, 2025
Merged

Fix NPE using KeY command line interface caused by Java NIO#3643
wadoon merged 2 commits intomainfrom
weigl/fixNPEnio

Conversation

@wadoon
Copy link
Member

@wadoon wadoon commented Jul 30, 2025

Related Issue

Using KeY one CLI with a relative path w/o any parent results into a NPE. Resolving CLI arguments to absolute path resolves this issues.

Problem arise from java.nio.Path.getParent() return null for paths likes A.java in any working directory.

Accordingly to javadoc, this is also the behavior of java.io.File.getParentFile(), but it did not fail back then.

Intended Change

The following works:

cd /tmp/k/
java -jar $KEY contraposition.key

Plan

  • Fix it.

Type of pull request

  • Bug fix (non-breaking change which fixes an issue)

Ensuring quality

  • Manually tested.

@wadoon wadoon added this to the v2.12.4 milestone Jul 30, 2025
@wadoon wadoon requested a review from mattulbrich July 30, 2025 15:48
@wadoon wadoon self-assigned this Jul 30, 2025
@wadoon wadoon changed the title fix NPE using KeY cli caused by Java NIO Fix NPE using KeY cli caused by Java NIO Jul 30, 2025
@wadoon wadoon enabled auto-merge August 13, 2025 03:37
@wadoon wadoon added this pull request to the merge queue Aug 13, 2025
@wadoon wadoon changed the title Fix NPE using KeY cli caused by Java NIO Fix NPE using KeY command line interfaces caused by Java NIO Aug 13, 2025
@wadoon wadoon changed the title Fix NPE using KeY command line interfaces caused by Java NIO Fix NPE using KeY command line interface caused by Java NIO Aug 13, 2025
Merged via the queue into main with commit 0f9c566 Aug 13, 2025
35 checks passed
@wadoon wadoon deleted the weigl/fixNPEnio branch August 13, 2025 04:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants