Author: nextgens
Date: 2007-08-14 04:15:59 +0000 (Tue, 14 Aug 2007)
New Revision: 14679

Modified:
   trunk/freenet/src/freenet/clients/http/PproxyToadlet.java
   trunk/freenet/src/freenet/pluginmanager/DownloadPluginHTTPException.java
Log:
Access that static variable statically

Modified: trunk/freenet/src/freenet/clients/http/PproxyToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/PproxyToadlet.java   2007-08-14 
04:14:10 UTC (rev 14678)
+++ trunk/freenet/src/freenet/clients/http/PproxyToadlet.java   2007-08-14 
04:15:59 UTC (rev 14679)
@@ -86,22 +86,22 @@
                                writeTemporaryRedirect(ctx, e.message, 
e.newLocation);
                        }
                        catch (NotFoundPluginHTTPException e) {
-                               sendErrorPage(ctx, e.code, e.message, 
e.location);
+                               sendErrorPage(ctx, 
NotFoundPluginHTTPException.code, e.message, e.location);
                        }
                        catch (AccessDeniedPluginHTTPException e) {
-                               sendErrorPage(ctx, e.code, e.message, 
e.location);
+                               sendErrorPage(ctx, 
AccessDeniedPluginHTTPException.code, e.message, e.location);
                        }
                        catch (DownloadPluginHTTPException e) {
                                // FIXME: maybe it ought to be defined like 
sendErrorPage : in toadlets

                                MultiValueTable head = new MultiValueTable();
                                head.put("Content-Disposition", "attachment; 
filename=\"" + e.filename + '"');
-                               ctx.sendReplyHeaders(e.code, "Found", head, 
e.mimeType, e.data.length);
+                               
ctx.sendReplyHeaders(DownloadPluginHTTPException.CODE, "Found", head, 
e.mimeType, e.data.length);
                                ctx.writeData(e.data);
                        }
                        catch(PluginHTTPException e)
                        {
-                               sendErrorPage(ctx, e.code, e.message, 
e.location);
+                               sendErrorPage(ctx, PluginHTTPException.code, 
e.message, e.location);
                        }
                        catch(Throwable t)
                        {
@@ -226,18 +226,18 @@
                } catch (RedirectPluginHTTPException e) {
                        writeTemporaryRedirect(ctx, e.message, e.newLocation);
                } catch (NotFoundPluginHTTPException e) {
-                       sendErrorPage(ctx, e.code, e.message, e.location);
+                       sendErrorPage(ctx, NotFoundPluginHTTPException.code, 
e.message, e.location);
                } catch (AccessDeniedPluginHTTPException e) {
-                       sendErrorPage(ctx, e.code, e.message, e.location);
+                       sendErrorPage(ctx, 
AccessDeniedPluginHTTPException.code, e.message, e.location);
                } catch (DownloadPluginHTTPException e) {
                        // FIXME: maybe it ought to be defined like 
sendErrorPage : in toadlets

                        MultiValueTable head = new MultiValueTable();
                        head.put("Content-Disposition", "attachment; 
filename=\"" + e.filename + '"');
-                       ctx.sendReplyHeaders(e.code, "Found", head, e.mimeType, 
e.data.length);
+                       ctx.sendReplyHeaders(DownloadPluginHTTPException.CODE, 
"Found", head, e.mimeType, e.data.length);
                        ctx.writeData(e.data);
                } catch(PluginHTTPException e) {
-                       sendErrorPage(ctx, e.code, e.message, e.location);
+                       sendErrorPage(ctx, PluginHTTPException.code, e.message, 
e.location);
                } catch (Throwable t) {
                        writeInternalError(t, ctx);
                }

Modified: 
trunk/freenet/src/freenet/pluginmanager/DownloadPluginHTTPException.java
===================================================================
--- trunk/freenet/src/freenet/pluginmanager/DownloadPluginHTTPException.java    
2007-08-14 04:14:10 UTC (rev 14678)
+++ trunk/freenet/src/freenet/pluginmanager/DownloadPluginHTTPException.java    
2007-08-14 04:15:59 UTC (rev 14679)
@@ -11,7 +11,7 @@
 public class DownloadPluginHTTPException extends PluginHTTPException {
        private static final long serialVersionUID = -1;

-       public static final short code = 200; // Found
+       public static final short CODE = 200; // Found
        public final String filename;
        public final String mimeType;
        public final byte[] data;


Reply via email to