• Stephane Nicoll's avatar
    Fix expansion of static-locations array · 66d1f5cd
    Stephane Nicoll authored
    This commit fixes a NPE when the static-locations array of
    `ResourceProperties` has to be expanded as the setter is cleaning the
    values of the array and is affected by a non-intuitive behaviour of the
    binder.
    
    When the binder needs to set an element of an array and the size of the
    array isn't large enough, the binder proceeds as follows:
    
    * An array of the required size is created
    * The content of the original array is copied over
    * The setter of the property is invoked with the new array
    * The setter of the property is invoked and the returned array is
    mutated to set the requested value
    
    While one would expect the array to contain the requested value when the
    setter is invoked, this is not the case. Also, the array might contain
    null values if a value at index 8 should be set and the array has a size
    of 3.
    
    All in all, `ResourceProperties#appendSlashIfNecessary` has to account
    for `null` and an additional round of cleaning has to happen once
    binding has completed.
    
    Closes gh-12360
    66d1f5cd
Name
Last commit
Last update
.github Loading commit data...
.mvn Loading commit data...
eclipse Loading commit data...
spring-boot Loading commit data...
spring-boot-actuator Loading commit data...
spring-boot-actuator-docs Loading commit data...
spring-boot-autoconfigure Loading commit data...
spring-boot-cli Loading commit data...
spring-boot-dependencies Loading commit data...
spring-boot-deployment-tests Loading commit data...
spring-boot-devtools Loading commit data...
spring-boot-docs Loading commit data...
spring-boot-full-build Loading commit data...
spring-boot-integration-tests Loading commit data...
spring-boot-parent Loading commit data...
spring-boot-samples Loading commit data...
spring-boot-starters Loading commit data...
spring-boot-test Loading commit data...
spring-boot-test-autoconfigure Loading commit data...
spring-boot-tools Loading commit data...
.editorconfig Loading commit data...
.gitignore Loading commit data...
.settings-template.xml Loading commit data...
.travis.yml Loading commit data...
CODE_OF_CONDUCT.adoc Loading commit data...
CONTRIBUTING.adoc Loading commit data...
LICENSE.txt Loading commit data...
README.adoc Loading commit data...
mvnw Loading commit data...
mvnw.cmd Loading commit data...
pom.xml Loading commit data...