Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-dev] GzipFilter bug

I thought that is what the code is trying to achieve.

But from looking at the bytecode you can see:

  8  invokespecial com.gigaspaces.admin.webui.server.filter.GzipResponseWrapper(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) [12]

    11  aload_1 [arg0]

    12  aload_1 [arg0]

    13  getfield com.gigaspaces.admin.webui.server.filter.GzipFilter._mimeTypes : java.util.Set [15]

    16  putfield com.gigaspaces.admin.webui.server.filter.GzipFilter._mimeTypes : java.util.Set [15]

 

But to be on the safe side I renamed the GzipResponseWrapper ._mimeTypes to GzipResponseWrapper ._myMimeTypes and changed the code to

_myMimeTypes = GzipFilter.this._mimeTypes;

 

The result was compilation error … which indicates I think that the code really access GzipFilter field and not GzipResponseWrapper.

 

From: jetty-dev-bounces@xxxxxxxxxxx [mailto:jetty-dev-bounces@xxxxxxxxxxx] On Behalf Of Michael Gorovoy
Sent: Thursday, July 21, 2011 5:36 PM
To: Jetty @ Eclipse developer discussion list
Subject: Re: [jetty-dev] GzipFilter bug

 

Greetings,

 

This is not a bug. The notation GzipFilter.this is used here to explicitly access a field of the outer class from an inner class that has a field with the same name. Please see http://en.wikibooks.org/wiki/Java_Programming/Nested_Classes for more details.

 

-Michael

On Thu, Jul 21, 2011 at 7:03 AM, Guy Korland <Guy@xxxxxxxxxxxxxx> wrote:

It seems like there’s a self-assignment bug in GzipFilter lines 156-168

 

            {

                _mimeTypes = GzipFilter.this._mimeTypes;

                _bufferSize = GzipFilter.this._bufferSize;

                _minGzipSize = GzipFilter.this._minGzipSize;

            }


_______________________________________________
jetty-dev mailing list
jetty-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-dev

 


Back to the top