Analysis hints for assertj: assertThat does not modify its argument
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 45/100
Direzione di ricerca
Start with the existing libs/test (JUnit Jupiter) hints as the model: follow how it is wired through a compile dependency in maddi-aapi-archive, an entry in CompileAnalysisHints.LIBRARIES, and one in LoadAnalysisResults.ANALYZED_RESULTS. The annotation targets are the assertThat*/then* entry points of org.assertj.core.api.Assertions, WithAssertions and BDDAssertions. Done when the argument of those methods is marked @NotModified and the langchain4j-core fields named in the issue (UserMessage.contents, ChatRequest.messages, AiMessage.toolExecutionRequests) are no longer reported as modified.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
AssertJ has no hints. An unannotated library parameter defaults to modified, so every assertThat(x) in a project's test code makes x modified. Through the reachability pass's shared callee-parameter node, that reaches the fields and parameters behind every argument passed there.
Measured on langchain4j-core (CodeLaser/maddi-mod#24): UserMessage.contents, ChatRequest.messages and AiMessage.toolExecutionRequests are modified only because tests pass them to WithAssertions.assertThat(List) / Assertions.assertThat(List).
Minimum: @NotModified on the argument of the assertThat*/then* entry points of org.assertj.core.api.Assertions, WithAssertions and BDDAssertions. Better: the Abstract*Assert methods, which read the actual value. Like libs/test (JUnit Jupiter), this needs a compile dependency in maddi-aapi-archive, an entry in CompileAnalysisHints.LIBRARIES and one in LoadAnalysisResults.ANALYZED_RESULTS.
- Lingua principale
- Java
- Stelle
- 1
- Fork
- 1
- Merge medio
- 2h 51m
- PR unite (30g)
- 3
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di CodeLaser/maddi
-
build/ci good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 3/5 Mezza giornata Idoneità per principianti 62/100
-
Java → C# translation: an idiomatic C# printer driven by the modification and nullability analysesApertaenhancement extension front-end:csharp
Difficoltà 5/5 Più di una settimana Idoneità per principianti 8/100
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 40/100
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
Tutte le issue di CodeLaser/maddi
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
objectionary/eo-graphs#85 ·
-
BoxAttachmentMulti parsing leaks IOException / ArrayIndexOutOfBoundsException on malformed content instead of IllegalArgumentExceptionForse già presa @Kshot3000 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
ergoplatform/ergo-appkit#272 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
utopia-rise/godot-jvm#1004 ·
I maintainer di solito rispondono entro 1 giorno