Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 2624D200CBD for ; Thu, 22 Jun 2017 00:24:07 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 2510B160BD5; Wed, 21 Jun 2017 22:24:07 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 6F08E160BF0 for ; Thu, 22 Jun 2017 00:24:06 +0200 (CEST) Received: (qmail 26466 invoked by uid 500); 21 Jun 2017 22:24:05 -0000 Mailing-List: contact notifications-help@groovy.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@groovy.apache.org Delivered-To: mailing list notifications@groovy.apache.org Received: (qmail 26452 invoked by uid 99); 21 Jun 2017 22:24:05 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Jun 2017 22:24:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id AF451C00A9 for ; Wed, 21 Jun 2017 22:24:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id UitbeIxwL-ml for ; Wed, 21 Jun 2017 22:24:03 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 4CC1260D21 for ; Wed, 21 Jun 2017 22:24:02 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id CEDAEE0D51 for ; Wed, 21 Jun 2017 22:24:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 1B63621945 for ; Wed, 21 Jun 2017 22:24:00 +0000 (UTC) Date: Wed, 21 Jun 2017 22:24:00 +0000 (UTC) From: "John Wagenleitner (JIRA)" To: notifications@groovy.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (GROOVY-5227) AbstractHttpServlet should extend GenericServlet directly instead of HttpServlet MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 21 Jun 2017 22:24:07 -0000 [ https://issues.apache.org/jira/browse/GROOVY-5227?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16058363#comment-16058363 ] John Wagenleitner commented on GROOVY-5227: ------------------------------------------- I agree that {{AbstractHttpServlet}} should continue to extend from {{HttpServlet}}. The class is public and looks to be designed to be extended, so changing it to {{GenericServlet}} would break others code. Whereas {{AbstractHttpServlet}} is designed to be extended, its implementing classes {{GroovyServlet}} and {{TemplateServlet}} do not appear to be. Because of this I like suggestion 2, adding a documentation note. > AbstractHttpServlet should extend GenericServlet directly instead of HttpServlet > -------------------------------------------------------------------------------- > > Key: GROOVY-5227 > URL: https://issues.apache.org/jira/browse/GROOVY-5227 > Project: Groovy > Issue Type: Improvement > Components: Groovlet / GSP > Affects Versions: 1.7.5 > Reporter: Benjamin Gandon > Priority: Trivial > > The {{groovy.servlet.AbstractHttpServlet}} class overrides the {{service(HttpServletRequest, HttpServletResponse)}} method. > Thus all the circuitry implemented in the {{javax.servlet.http.HttpServlet}} superclass is bypassed altogether, except the trivial {{service(ServletRequest, ServletResponse)}} method which only provides a convenient call to {{service(HttpServletRequest, HttpServletResponse)}}, narrowing the request and response types to HTTP-dedicated subclasses. > None of the doGet, getLastModified, doHead, doPost, doPut, doDelete, doOption, doTrace, is ever called. Are they relevant to any {{AbstractHttpServlet}} subclasses? I doubt so. The programming model of {{GroovyServlet}} currently implies re-implementing in Groovlets the way these HTTP methods should be answered. > Then it might be a possible optimization to have {{AbstractHttpServlet}} extend {{GenericServlet}} directly, re-implementing in {{AbstractHttpServlet}} the trivial {{service(ServletRequest, ServletResponse)}} method of {{HttpServlet}}. This could prevent the unnecessary loading of the {{HttpServlet}} class in memory. -- This message was sent by Atlassian JIRA (v6.4.14#64029)