W3C home > Mailing lists > Public > www-jigsaw@w3.org > May to June 2003

possible bug in org/w3c/jigsaw/admin/BrokerFrame.java

From: Godmar Back <gback@stanford.edu>
Date: Fri, 16 May 2003 17:02:41 -0700 (PDT)
Message-Id: <200305170002.h4H02fZl029403@elaine33.Stanford.EDU>
To: www-jigsaw@w3.org
Cc: gback@stanford.edu


Hi,

here's a possible bug in org/w3c/jigsaw/admin/BrokerFrame.java:

If rr is null on line 223, error(...) will throw an exception and
you'll then call rr.unlock() on line 233.  This will cause a
NullPointerException.

Could you confirm/deny this?

Thanks!

	- Godmar

00221:              while ( ls.hasMoreComponents() ) {
00222:                  try {
00223:                      if (rr == null)
00224:                          error(request, "url too long");
00225:                      Resource r = rr.lock();
00226:                      if ( ! ( r instanceof ContainerInterface) )
00227:                          error(request, "url too long");
00228:                      rr_temp = ((ContainerInterface) r).lookup(
00229: 							       ls.getNextComponent());
00230:                  } catch (InvalidResourceException ex) {
00231:                      error(request, "unable to restore resource");
00232:                  } finally {
00233:                      rr.unlock();
00234:                      rr = rr_temp;
00235:                  }
00236:              }
Received on Friday, 16 May 2003 20:02:49 GMT

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