Skip to content

Commit

Permalink
Defend against impl losing TemplateImplementationProperty. Closes #19
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc Carter committed Aug 29, 2014
1 parent e9432a9 commit 2f9f862
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ public static void handleTemplateSaved(AbstractProject templateProject, Template
@SuppressWarnings("unchecked")
TemplateImplementationProperty impProperty = (TemplateImplementationProperty) project.getProperty(TemplateImplementationProperty.class);

if ( !templateProject.getName().equals(impProperty.getTemplateJobName()) ) {
LOG.warning(String.format("%s doesn't inherit from this template. Cleaning it out of the template.",implementationName));
if (impProperty == null || !templateProject.getName().equals(impProperty.getTemplateJobName())) {
LOG.warning(String.format("%s doesn't inherit from this template. Cleaning it out of the template.", implementationName));
changedTemplateProject = true;
iterator.remove();
continue;
Expand Down

0 comments on commit 2f9f862

Please sign in to comment.