W3C home > Mailing lists > Public > www-jigsaw@w3.org > July to August 1999

RE: deadlock problem - followup

From: Dan Hansen <DLHansen@Quark.Com>
Date: Wed, 11 Aug 1999 19:22:30 -0400 (EDT)
Message-ID: <3D62AB6FFC80D211A84700104B10CB2C02728575@denver.quark.com>
To: "'Benoit Mahe'" <Benoit.Mahe@sophia.inria.fr>, Dan Hansen <DLHansen@Quark.Com>, Jigsaw Mailing List <www-jigsaw@w3.org>
Benoit,

>Well, could you send us your class? It's the better way to solve that
>kind of problems.

Thanks much for the offer - before I go beyond asking for just advise I'll
play with it some more and see if I can grok it - if not I will gladly take
you up on your offer and see what you think.  

A curiousity that may be of interest to you - when compiling 

/org/w3c/www/httpBag.java

with J++ the java compiler is unhappy.

In particular, J++ complains about implicit casting of char to byte in 
a switch statement in HttpBag.parse().  I "fixed" it by making the cast
explicit.

     /**
     * parse.
     * @exception HttpParserException if parsing failed.
     */
    protected final void parse()
	throws HttpParserException
    {
	final byte b1 = (byte) '{';
	final byte b2 = (byte) ' ';
	final byte b3 = (byte) '\t';
	final byte b4 = (byte) ',';

	int i = roff;
	// Parses a list of bags:
	isToplevel  = true;
	HttpBag top = this;
	while ( i < rlen ) {
	    switch(raw[i]) {
	      case b1:
		  ParseState ps  = new ParseState(i, rlen);
		  HttpBag    bag = parseBag(ps);
		  top.items.put(bag.name, bag);
		  i = ps.ooff;
		  break;
	      case b2:
	      case b3:
	      case b4:
		  i++;
		  break;
	      default:
		  error("Unexpected separator \""+raw[i]+"\".");
	    }
	}
    }    
Received on Thursday, 12 August 1999 02:25:44 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 9 April 2012 12:13:32 GMT