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

possible typo in HttpAccept.java

From: Anselm Baird_Smith <Anselm.Baird_Smith@sophia.inria.fr>
Date: Mon, 18 Aug 1997 13:20:48 +0200 (MET DST)
Message-Id: <199708181120.NAA10385@www43.inria.fr>
To: Geoffrey A Dillon <gdillon@cs.tamu.edu>
Cc: www-jigsaw@w3.org
Geoffrey A. Dillon writes:
 > I have just started looking at the Jigsaw code for alpha5 and already
 > I think I found an error. Please tell me if this is old news.
 > In the file Jigsaw/src/classes/w3c/www/http/HttpAccept.java:
 >     protected void invalideByteValue() {
 >         super.invalidateByteValue();
 >         if ( list != null )
 >             list.invalidateByteValue();
 >     }
 > I think this declaration is misspelled, since a following
 > method made a call to "invalidateByteValue();". Just wondering
 > if this had been found before. Have there been any revisions
 > since alpha5 was released?

I don't think that this is a bug in fact: HttpAccept represents a
single clause of an HttpAcceptList (which is what the "Accept" header
gets parsed into). Invalidating a single clause means that you
invalidate the byte representation of that clause, which in turns
invalidate the byte rep of the entire list.

However, the dissymetry here is indeed surprising (invalidate usually
compares object values before actually invalidating byte rep). This is
not done here, probably because I felt the cost of mime type
comparison what higher than the saving of byte rep computation (if I
remember correctly).

Anyway, this shouldn't hurt (ie everything should behave properly) if
this is not the case, we may have a bug somewhere...

Received on Monday, 18 August 1997 07:20:55 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:25:31 UTC