Skip to content

Commit

Permalink
[JENKINS-21044] - Don't create a new HashMap after the load operation
Browse files Browse the repository at this point in the history
Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>
  • Loading branch information
oleg-nenashev committed Feb 24, 2014
1 parent 9b7562d commit c453516
Showing 1 changed file with 5 additions and 2 deletions.
Expand Up @@ -174,9 +174,12 @@ public DescriptorImpl() {
super(ThrottleJobProperty.class);
synchronized(propertiesByCategoryLock) {
load();
// Explictly drop queue items loaded from 1.8.1 version
if (!propertiesByCategory.isEmpty()) {
// Explictly handle the persisted data from the version 1.8.1
if (propertiesByCategory == null) {
propertiesByCategory = new HashMap<String,Map<ThrottleJobProperty,Void>>();
}
if (!propertiesByCategory.isEmpty()) {
propertiesByCategory.clear();
save(); // Save the configuration to remove obsolete data
}
}
Expand Down

0 comments on commit c453516

Please sign in to comment.