modelcontextprotocol / modelcontextprotocol/java-sdk
Migrate null annotations to jspecify
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Java
- Sterne
- 3.7k
- Forks
- 1.1k
- Ø Merge
- 1 T. 15 Std.
- Gemergte PRs (30 T.)
- 9
Beschreibung
Currently, the sdk uses Reactor's reactor.util.annotation.Nullable annotations, such as here
This is causing warnings in my downstream build since that type refers to javax classes I don't have on the classpath.
This is Reactor Nullable, along with its imports:
import javax.annotation.Nonnull;
import javax.annotation.meta.TypeQualifierNickname;
import javax.annotation.meta.When;
@Nonnull(when = When.MAYBE)
@TypeQualifierNickname
@Deprecated
public @interface Nullable {
}
The Reactor type is now deprecated, and they recommend you using JSpecify which is fast becoming the standard, if it is not already.
I can possibly submit a PR for this, but I notice a lot of PRs opened recently have limited activity, so will wait for the go-ahead first.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit mcp-core/src/main/java/io/modelcontextprotocol/util/Assert.java und durchsuche das Repository nach reactor.util.annotation.Nullable und verwandten Reactor-Null-Annotationen. Überprüfe die Build-Konfiguration auf die JSpecify-Abhängigkeit und verifiziere anschließend, dass alle relevanten Annotationen JSpecify verwenden und das SDK erstellt werden kann, ohne die javax-Annotation-Klassen zu benötigen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- java
- Bereich
- api, backend
- Issue-Typ
- Refactoring
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Aktiv
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 68/100