Skip to content

Commit a2b9ba5

Browse files
committed
avoiding loop when a test is skipped as already defined
1 parent 0e7744e commit a2b9ba5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

org/w3c/css/properties/css3/CssTextDecoration.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public CssTextDecoration(ApplContext ac, CssExpression expression, boolean check
9898
// constructor is providing expression.next()
9999
} else {
100100
// so we have an ident...
101-
CssIdent ident = (CssIdent) val;
101+
CssIdent ident = val.getIdent();
102102
if (inherit.equals(ident)) {
103103
value = inherit;
104104
if (check && expression.getCount() != 1) {
@@ -159,6 +159,10 @@ public CssTextDecoration(ApplContext ac, CssExpression expression, boolean check
159159
}
160160
// no need to check match, as if it is not a color
161161
// an exception would be fired
162+
} else if (!match) {
163+
// all failed, unrecognized value
164+
throw new InvalidParamException("value", val.toString(),
165+
getPropertyName(), ac);
162166
}
163167
}
164168
}

0 commit comments

Comments
 (0)