W3C home > Mailing lists > Public > html-tidy@w3.org > October to December 2000

Re: JTidy and java.lang.NullPointerException

From: Kent Johnson <kjohnson@transparent.com>
Date: Mon, 2 Oct 2000 15:17:55 -0400 (EDT)
Message-Id: <p04330107b5fe8e7e53ae@[192.168.254.246]>
To: html-tidy@w3.org
Parsing this file gives a NullPointerException in JTidy:

<html>
<head>
<title></title>
</head>
<body>
<input type-"hidden" name="language" value="IT">
</body>
</html>

The problem seems to be that at line 2651 of Lexer.java
     Report.attrError(this, this.token, value, Report.BAD_ATTRIBUTE_VALUE);

value is null.

Using BBEdit Tidy (based on the C version of Tidy) gives a different error:
line 6 column 1 - Warning: <input> attribute "type-"hidden"" lacks value

I don't know why the behavior is different or where the error is 
being caught in the C version. Any suggestions for a fix?

Kent Johnson                   Transparent Language, Inc.
kjohnson@transparent.com       http://www.transparent.com
Received on Monday, 2 October 2000 15:42:09 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:44 GMT