vy commented on PR #3839:
URL: https://github.com/apache/logging-log4j2/pull/3839#issuecomment-3225044795

   > One open question is how to define the nullability/return contract. The 
existing single-URI overload,
   > 
   > ```java
   > public Configuration getConfiguration(LoggerContext context, String name, 
URI uri)
   > ```
   > 
   > has inconsistent behavior across implementations:
   > 
   > * Individual `ConfigurationFactory` implementations typically return 
`null` if the URI itself is `null`.
   > * `ConfigurationFactory.Factory`, however, falls back to a 
`DefaultConfiguration`.
   > 
   > Most (but not all) callers explicitly check for `null`, so the contract is 
somewhat unclear. For the new multi-URI variant, we should decide whether the 
method is allowed to return `null`, or whether it must always return a valid 
`Configuration` (possibly default).
   
   @ppkarwasz, since there is no established default that one can claim as a 
stable API, I'm inclined to throw `IAE`, or `NPE` (when arg is null) on 
failures. WDYT?
   
   Will this new API necessitate an amendment/improvement to the manual? (I've 
skimmed through combined/composite configuration sections, but couldn't see 
any.)
   
   > Should I start working on this right away, or would you prefer to clarify 
a few implementation details first (like the nullability contract and specific 
behavior expectations)?
   
   @yybmion, please go ahead. I strongly advise you to work out the essentials 
first, and leave out the tests, docs, etc. Once we get it reviewed, you can 
continue with polishing the PR.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to