Skip to content

Fix exception in javac extension#3609

Merged
Drodt merged 1 commit intoKeYProject:mainfrom
FliegendeWurst:javac-fix
May 26, 2025
Merged

Fix exception in javac extension#3609
Drodt merged 1 commit intoKeYProject:mainfrom
FliegendeWurst:javac-fix

Conversation

@FliegendeWurst
Copy link
Member

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)

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.

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
Copy link

codecov bot commented May 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 39.07%. Comparing base (e4ce5c3) to head (d1e3e32).
Report is 5 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Drodt Drodt added this pull request to the merge queue May 26, 2025
Merged via the queue into KeYProject:main with commit ea40886 May 26, 2025
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants