IDEMPIERE-4942 Performance Measurement - NPE by opening the Performance Detail Window (#871)
add null check
This commit is contained in:
parent
992ec3c219
commit
55af0b0db3
|
@ -39,6 +39,7 @@ import org.compiere.util.DB;
|
||||||
import org.compiere.util.DisplayType;
|
import org.compiere.util.DisplayType;
|
||||||
import org.compiere.util.Env;
|
import org.compiere.util.Env;
|
||||||
import org.compiere.util.Msg;
|
import org.compiere.util.Msg;
|
||||||
|
import org.compiere.util.Util;
|
||||||
import org.zkoss.zhtml.A;
|
import org.zkoss.zhtml.A;
|
||||||
import org.zkoss.zhtml.Br;
|
import org.zkoss.zhtml.Br;
|
||||||
import org.zkoss.zhtml.Table;
|
import org.zkoss.zhtml.Table;
|
||||||
|
@ -506,12 +507,14 @@ public class WGraph extends Div implements IdSpace {
|
||||||
}
|
}
|
||||||
|
|
||||||
private String stripHtml(String htmlString, boolean all) {
|
private String stripHtml(String htmlString, boolean all) {
|
||||||
|
if (!Util.isEmpty(htmlString, true)) {
|
||||||
htmlString = htmlString.replace("<html>", "").replace("</html>", "")
|
htmlString = htmlString.replace("<html>", "").replace("</html>", "")
|
||||||
.replace("<body>", "").replace("</body>", "").replace("<head>",
|
.replace("<body>", "").replace("</body>", "").replace("<head>",
|
||||||
"").replace("</head>", "");
|
"").replace("</head>", "");
|
||||||
|
|
||||||
if (all)
|
if (all)
|
||||||
htmlString = htmlString.replace(">", ">").replace("<", "<");
|
htmlString = htmlString.replace(">", ">").replace("<", "<");
|
||||||
|
}
|
||||||
return htmlString;
|
return htmlString;
|
||||||
}
|
}
|
||||||
} // BarGraph
|
} // BarGraph
|
||||||
|
|
Loading…
Reference in New Issue