Skip to content

NPE in AbstractRefreshableConfigApplicationContext#setConfigLocations [SPR-4531] #9208

@spring-projects-issues

Description

@spring-projects-issues

Andreas Senft opened SPR-4531 and commented

The method setConfigLocations(String[]) has a problem which causes an NPE when the passed in array is null.
First a check is made whether the array contains nulls (correctly skipping processing if the array itself is null).
After that a String-array is created using the size of the passed in array. If that is null, an NPE results.

In conjunction with Apache CXF this is a problem as the SpringBusFactory#createBus() method of CXF does provide null as argument. This worked in Spring 2.5.1 as the class AbstractRefreshableConfigApplicationContext didn't exist there and the location setting has been handled differently.


Affects: 2.5.2

1 votes, 1 watchers

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions