Fix exception in javac extension#3609
Merged
Drodt merged 1 commit intoKeYProject:mainfrom May 26, 2025
Merged
Conversation
This issue caused the UI to not update when loading
a new Java file that causes warnings like
"Some input files use unchecked or unsafe operations."
```
Caused by: java.lang.IllegalArgumentException: -1, -1
at de.uka.ilkd.key.java.Position.<init>(Position.java:48)
at de.uka.ilkd.key.java.Position.newOneBased(Position.java:61)
at de.uka.ilkd.key.gui.plugins.javac.JavaCompilerCheckFacade.lambda$check$2(JavaCompilerCheckFacade.java:129)
...
at de.uka.ilkd.key.gui.plugins.javac.JavaCompilerCheckFacade.lambda$check$3(JavaCompilerCheckFacade.java:132)
```
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3609 +/- ##
=========================================
Coverage 39.07% 39.07%
- Complexity 17164 17165 +1
=========================================
Files 2016 2015 -1
Lines 126427 126413 -14
Branches 21329 21326 -3
=========================================
- Hits 49402 49400 -2
+ Misses 70938 70928 -10
+ Partials 6087 6085 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
wadoon
approved these changes
May 25, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This issue caused the UI to not update when loading a new Java file that causes warnings like
"Some input files use unchecked or unsafe operations."
Related Issue
did not bother to open issue
Intended Change
Fixes javac extension behavior when loading files that use generic types in unsafe ways. This is actually extremely common when using KeY.
Type of pull request
Bugfix
Ensuring quality
I have tested the feature as follows: loaded Java file that uses unchecked generics.
Additional information and contact(s)
The contributions within this pull request are licensed under GPLv2 (only) for inclusion in KeY.