From 3e19c0c692220ac153798cd5194c3c2189110152 Mon Sep 17 00:00:00 2001 From: kerry Date: Fri, 18 Jan 2019 15:14:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0jira=E4=BB=BB=E5=8A=A1=EF=BC=8C?= =?UTF-8?q?=E6=89=93=E5=8C=85=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/third/v2/lowagie/text/html/CSSUtils.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fine-itext/src/com/fr/third/v2/lowagie/text/html/CSSUtils.java b/fine-itext/src/com/fr/third/v2/lowagie/text/html/CSSUtils.java index dd2beda4b..6c03616f4 100644 --- a/fine-itext/src/com/fr/third/v2/lowagie/text/html/CSSUtils.java +++ b/fine-itext/src/com/fr/third/v2/lowagie/text/html/CSSUtils.java @@ -91,6 +91,9 @@ public class CSSUtils { public static Float parseFloat(String str){ float result = 0.0f; + if(str == null){ + return result; + } try { if(str.endsWith("px") || str.endsWith("pt")){ result = Float.parseFloat(str.substring(0, str.length() - 2)); @@ -100,7 +103,7 @@ public class CSSUtils { result = Float.parseFloat(str); } }catch (NumberFormatException e){ - + return result; } return result; }