kbarlowgw commented on PR #425:
URL:
https://github.com/apache/commons-configuration/pull/425#issuecomment-2127989266
Sorry for the delay... Unfortunately I did encounter an error (full error
attached):
"loggerName":
"org.springframework.boot.diagnostics.LoggingFailureAnalysisReporter",
"message": "Application failed to start due to an exception",
"thrown":
{
"commonElementCount": 0,
"localizedMessage": "Failed to bind properties under
'server.compression.enabled' to boolean",
"message": "Failed to bind properties under
'server.compression.enabled' to boolean",
"name":
"org.springframework.boot.context.properties.bind.BindException",
"cause":
{
"commonElementCount": 94,
"localizedMessage": "Failed to convert from type
[java.lang.String[]] to type [boolean] for value [null]",
"message": "Failed to convert from type [java.lang.String[]] to
type [boolean] for value [null]",
"name":
"org.springframework.core.convert.ConversionFailedException",
"cause":
{
"commonElementCount": 94,
"localizedMessage": "A null value cannot be assigned to a
primitive type",
"message": "A null value cannot be assigned to a primitive
type",
"name": "java.lang.IllegalArgumentException",
"extendedStackTrace":
[
I think what you want is:
@Override
public Object getProperty(final String name) {
final String[] propValue = source.getStringArray(name);
if (propValue == null || propValue.length == 0) {
return null;
} else if (propValue.length == 1) {
return propValue[0];
} else return propValue;
}
On Thu, May 23, 2024 at 1:26 PM Gary Gregory ***@***.***>
wrote:
> I would like to hear from @kbarlowgw
> <https://github.com/kbarlowgw>
> and if this PR affects the use case from #309
> <https://github.com/apache/commons-configuration/pull/309>
> negatively...
>
> —
> Reply to this email directly, view it on GitHub
>
<https://github.com/apache/commons-configuration/pull/425#issuecomment-2127691962>,
> or unsubscribe
>
<https://github.com/notifications/unsubscribe-auth/BBG2EVFNN74NSRTDSHQMI3TZDYREVAVCNFSM6AAAAABID3UVXCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRXGY4TCOJWGI>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>
--
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]