fixed where image description doesn't match

This commit is contained in:
Adrian Cole 2010-03-15 13:32:18 -07:00
parent 983801ceb0
commit 1429edf69e
1 changed files with 18 additions and 8 deletions

View File

@ -128,8 +128,11 @@ public class TemplateBuilderImpl implements TemplateBuilder {
if (input.getOsDescription() == null)
returnVal = false;
else
returnVal = input.getOsDescription().contains(osDescription) ||
input.getOsDescription().matches(osDescription); /* note: matches() expects a regex!*/
returnVal = input.getOsDescription().contains(osDescription)
|| input.getOsDescription().matches(osDescription); /*
* note: matches()
* expects a regex!
*/
}
return returnVal;
}
@ -142,8 +145,11 @@ public class TemplateBuilderImpl implements TemplateBuilder {
if (input.getVersion() == null)
returnVal = false;
else
returnVal = input.getVersion().contains(imageVersion) ||
input.getVersion().matches(imageVersion); /* note: matches() expects a regex!*/
returnVal = input.getVersion().contains(imageVersion)
|| input.getVersion().matches(imageVersion); /*
* note: matches() expects a
* regex!
*/
}
return returnVal;
}
@ -156,8 +162,8 @@ public class TemplateBuilderImpl implements TemplateBuilder {
if (input.getName() == null)
returnVal = false;
else
returnVal = input.getName().contains(imageName) ||
input.getName().matches(imageName); /* note: matches() expects a regex!*/
returnVal = input.getName().contains(imageName)
|| input.getName().matches(imageName); /* note: matches() expects a regex! */
}
return returnVal;
}
@ -170,8 +176,12 @@ public class TemplateBuilderImpl implements TemplateBuilder {
if (input.getName() == null)
returnVal = false;
else
returnVal = input.getName().contains(imageDescription) ||
input.getName().matches(imageDescription); /* note: matches() expects a regex!*/
returnVal = input.getDescription().equals(imageDescription)
|| input.getDescription().contains(imageDescription)
|| input.getDescription().matches(imageDescription); /*
* note: matches()
* expects a regex!
*/
}
return returnVal;
}