Fix improper string comparisons
This commit is contained in:
@@ -425,7 +425,7 @@ public abstract class WebHelpMojo extends AbstractWebhelpMojo {
|
|||||||
|
|
||||||
String warBasename;
|
String warBasename;
|
||||||
String webhelpOutdir = targetFile.getName().substring(0, targetFile.getName().lastIndexOf('.'));
|
String webhelpOutdir = targetFile.getName().substring(0, targetFile.getName().lastIndexOf('.'));
|
||||||
if(null != webhelpDirname && webhelpDirname != ""){
|
if(null != webhelpDirname && !webhelpDirname.isEmpty()){
|
||||||
warBasename = webhelpDirname;
|
warBasename = webhelpDirname;
|
||||||
} else {
|
} else {
|
||||||
warBasename = webhelpOutdir;
|
warBasename = webhelpOutdir;
|
||||||
@@ -586,7 +586,7 @@ public abstract class WebHelpMojo extends AbstractWebhelpMojo {
|
|||||||
|
|
||||||
String warBasename;
|
String warBasename;
|
||||||
String webhelpOutdir = result.getName().substring(0, result.getName().lastIndexOf('.'));
|
String webhelpOutdir = result.getName().substring(0, result.getName().lastIndexOf('.'));
|
||||||
if(null != webhelpDirname && webhelpDirname != ""){
|
if(null != webhelpDirname && !webhelpDirname.isEmpty()){
|
||||||
warBasename = webhelpDirname;
|
warBasename = webhelpDirname;
|
||||||
} else {
|
} else {
|
||||||
warBasename = webhelpOutdir;
|
warBasename = webhelpOutdir;
|
||||||
@@ -617,7 +617,7 @@ public abstract class WebHelpMojo extends AbstractWebhelpMojo {
|
|||||||
|
|
||||||
String warSuffix = properties.getProperty("warsuffix","");
|
String warSuffix = properties.getProperty("warsuffix","");
|
||||||
String warSuffixForWar = warSuffix.equals("-external") ? "" : warSuffix;
|
String warSuffixForWar = warSuffix.equals("-external") ? "" : warSuffix;
|
||||||
if(null != webhelpWar && webhelpWar != "0"){
|
if(null != webhelpWar && !"0".equals(webhelpWar)){
|
||||||
//Zip up the war from here.
|
//Zip up the war from here.
|
||||||
File sourceDir = new File(result.getParentFile().getParentFile(), webhelpOutdir);
|
File sourceDir = new File(result.getParentFile().getParentFile(), webhelpOutdir);
|
||||||
File zipFile = new File(result.getParentFile().getParentFile(), properties.getProperty("warprefix","") + warBasename + warSuffixForWar + ".war");
|
File zipFile = new File(result.getParentFile().getParentFile(), properties.getProperty("warprefix","") + warBasename + warSuffixForWar + ".war");
|
||||||
@@ -837,7 +837,7 @@ public abstract class WebHelpMojo extends AbstractWebhelpMojo {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (null != webhelpDirname && webhelpDirname != "" ) {
|
if (null != webhelpDirname && !webhelpDirname.isEmpty() ) {
|
||||||
|
|
||||||
map.put("targetExtQueryFile", new File(getTargetDirectory(), webhelpDirname + "/content/ext_query.xml"));
|
map.put("targetExtQueryFile", new File(getTargetDirectory(), webhelpDirname + "/content/ext_query.xml"));
|
||||||
map.put("base.dir", new File(getTargetDirectory(), webhelpDirname));
|
map.put("base.dir", new File(getTargetDirectory(), webhelpDirname));
|
||||||
|
|||||||
@@ -201,7 +201,7 @@ public class PDFBuilder {
|
|||||||
//final String inputFilename = sourceFilePath;
|
//final String inputFilename = sourceFilePath;
|
||||||
// targetFilename is inputFilename - ".xml" + targetFile extension
|
// targetFilename is inputFilename - ".xml" + targetFile extension
|
||||||
String baseTargetFile;
|
String baseTargetFile;
|
||||||
if(null != pdfFilenameBase && pdfFilenameBase != ""){
|
if(null != pdfFilenameBase && !pdfFilenameBase.isEmpty()){
|
||||||
baseTargetFile = pdfFilenameBase;
|
baseTargetFile = pdfFilenameBase;
|
||||||
} else {
|
} else {
|
||||||
baseTargetFile = inputFilename.substring(0, inputFilename.length() - 4);
|
baseTargetFile = inputFilename.substring(0, inputFilename.length() - 4);
|
||||||
@@ -344,7 +344,7 @@ public class PDFBuilder {
|
|||||||
transformer.setParameter("autoPdfGlossaryInfix","/..");
|
transformer.setParameter("autoPdfGlossaryInfix","/..");
|
||||||
|
|
||||||
transformer.setParameter("branding", branding);
|
transformer.setParameter("branding", branding);
|
||||||
if(branding=="openstack") {
|
if("openstack".equals(branding)) {
|
||||||
transformer.setParameter("builtForOpenStack", "1");
|
transformer.setParameter("builtForOpenStack", "1");
|
||||||
} else {
|
} else {
|
||||||
transformer.setParameter("builtForOpenStack", "0");
|
transformer.setParameter("builtForOpenStack", "0");
|
||||||
|
|||||||
Reference in New Issue
Block a user