-
Notifications
You must be signed in to change notification settings - Fork 41
Migration to java.nio.Path #3618
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Drodt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like good progress.
Do you want to remove all uses of java.io.File?
...test/java/de/uka/ilkd/key/symbolic_execution/testcase/AbstractSymbolicExecutionTestCase.java
Show resolved
Hide resolved
key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/TestCaseGenerator.java
Show resolved
Hide resolved
key.core/src/main/java/de/uka/ilkd/key/speclang/SLEnvInput.java
Outdated
Show resolved
Hide resolved
key.core/src/test/java/de/uka/ilkd/key/nparser/KeYParserExceptionTest.java
Show resolved
Hide resolved
In general, I would say that the usage of Therefore, in some smaller local cases, |
|
@FliegendeWurst |
|
Probably this method in ProofSaver |
|
This change works: diff --git a/keyext.slicing/src/main/java/org/key_project/slicing/SlicingProofReplayer.java b/keyext.slicing/src/main/java/org/key_project/slicing/SlicingProofReplayer.java
index f0e150de6e..589e4b1f40 100644
--- a/keyext.slicing/src/main/java/org/key_project/slicing/SlicingProofReplayer.java
+++ b/keyext.slicing/src/main/java/org/key_project/slicing/SlicingProofReplayer.java
@@ -247,9 +247,9 @@ public final class SlicingProofReplayer extends AbstractProofReplayer {
filename = filename + sliceSuffix + "1";
}
filename = filename + ".proof";
- File tempFile = tempDir.resolve(filename).toFile();
+ var tempFile = tempDir.resolve(filename);
ProofSaver.saveToFile(tempFile, proof);
proof.dispose();
- return tempFile.toPath();
+ return tempFile;
}
}Still I would suggest to rename the method I mentioned in the last comment. |
|
@Drodt Only windows is failing in few test cases... |
Do we have someone w/ a Windows PC who can run some manual tests? |
My home computer, ... so I'll take care today or tomorrow evening it. But you can still finalize the review. |
key.core.testgen/src/main/java/de/uka/ilkd/key/testgen/TestCaseGenerator.java
Show resolved
Hide resolved
removal disectFilename as used only in test cases
keyext.slicing/src/test/java/org/key_project/slicing/EndToEndTests.java
Outdated
Show resolved
Hide resolved
keyext.slicing/src/test/java/org/key_project/slicing/EndToEndTests.java
Outdated
Show resolved
Hide resolved
keyext.slicing/src/test/java/org/key_project/slicing/EndToEndTests.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Daniel Drodt <[email protected]>
Merging
mainintoweigl/key-javaparser3gets more and more complicated. One reason is the usage ofjava.nio.Pathon theJavaParserbranch.This PR brings the
java.nio.Pathinto KeY exhaustively for the following reason:Final goal of
FileReporemoval and easier handling of proof bundles.Java NIO supports reading and writing to Zip files directly w/o unzipping as a regular file system.
Uniform usage of one file API across KeY.
Currently it is a mess between the old
java.io.Fileandjava.nio.Path. The latter one supports common functionalities like recursively listing directories or globbing folders.Intended Change
On all major places, Java NIO replaces the old Java IO.
Type of pull request
Ensuring quality