Allow Property impl to transform value before setting
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
Direzione di ricerca
Inizia con Property#isValidValue e il percorso di SettingsManager utilizzato quando un'applicazione imposta un valore. Esamina LowercaseStringSetProperty, le proprietà di raccolta e InlineArrayProperty per confrontare il caricamento delle risorse con l'impostazione programmatica. L'attività è completata quando è stato concordato un comportamento di trasformazione o rifiuto per questi casi, con test che coprano il comportamento risultante.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
A property like LowercaseStringSetProperty or any other property type where not every value of the Java type is considered valid, proper validation/transformation happens when values are loaded from the resource, but if a property's value is programmatically set later on, no such validation occurs. While there is Property#isValidValue and it gets called when a value is set, this makes the SettingsManager throw an exception if it's false.
Ideally, values are valid when the application sets them for a property, but it might make sense to promote the idea that properties manage their values a bit more by maybe allowing the property to slightly transform the value (or throw if the value is unusable) also when a property's value is set by the application.
Examples:
- A set with upper-case text is set for a LowercaseStringSetProperty
- A collection is provided for any collection property where one of the entries is null (I believe nothing checks this at all at the moment)
- InlineArrayProperty does not escape the chosen delimiter in the value -> would need to be done by the developer himself
- Lingua principale
- Java
- Stelle
- 44
- Fork
- 21
- Merge medio
- 2g 2h
- PR unite (30g)
- 3
Guida per i contributori
Apri 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 AuthMe/ConfigMe
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 65/100
-
architecture
Difficoltà 4/5 3-5 giorni Idoneità per principianti 38/100
Tutte le issue di AuthMe/ConfigMe
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
infinispan/infinispan#18150 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
-
untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100