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@[]>
To: html-tidy@w3.org
Parsing this file gives a NullPointerException in JTidy:

<input type-"hidden" name="language" value="IT">

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 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:38:48 UTC