refactor: migrate EcoleDirecte JSON models from POJOs to Java records#3
Open
mdeverdelhan wants to merge 1 commit intomasterfrom
Open
refactor: migrate EcoleDirecte JSON models from POJOs to Java records#3mdeverdelhan wants to merge 1 commit intomasterfrom
mdeverdelhan wants to merge 1 commit intomasterfrom
Conversation
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.
Motivation
recordimmuables.rawDataavec setter) en fournissant une solution immuable garantissant que les données brutes sont toujours disponibles.Description
recordJava dans le packageeu.verdelhan.ecoledirecte.v3.*(environ 54 fichiers modifiés), incluantLogin,Notes,Eleve,Documents, etc.EcoleDirecteApiResponse<T>enrecorden ajoutantrawDatacomme composant du record et suppression du setter mutable existant.EcoleDirecteClientpour utiliser les accesseurs de records (xxx()) à la place desgetXxx()Lombok, et remplacement du comportement desetRawData(...)par une reconstruction immuable d'une nouvelleEcoleDirecteApiResponsecontenantrawDatalors du parsing (parseResponse).GtkCookies,DoubleAuthCnCv,DoubleAuthQuestion) enrecordet suppression des annotations Lombok inutiles.Testing
mvn test -qa été tenté mais a échoué pour des raisons d'environnement externes, la résolution d'un plugin Maven a retourné403 Forbiddenlors du téléchargement depuis Maven Central, empêchant l'exécution des tests unitaires.gson:2.13.2et cible Java 21, versions compatibles avec les records).Codex Task