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 526B2200BF2 for ; Mon, 2 Jan 2017 09:01:11 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 51047160B30; Mon, 2 Jan 2017 08:01:11 +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 9AD98160B21 for ; Mon, 2 Jan 2017 09:01:10 +0100 (CET) Received: (qmail 16949 invoked by uid 500); 2 Jan 2017 08:01:09 -0000 Mailing-List: contact issues-help@struts.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@struts.apache.org Delivered-To: mailing list issues@struts.apache.org Received: (qmail 16924 invoked by uid 99); 2 Jan 2017 08:01:09 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Jan 2017 08:01:09 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 970232C2A6C for ; Mon, 2 Jan 2017 08:01:09 +0000 (UTC) Date: Mon, 2 Jan 2017 08:01:09 +0000 (UTC) From: "ASF subversion and git services (JIRA)" To: issues@struts.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (WW-4050) AnnotationValidationInterceptor should consult UnknownHandler before throwing NoSuchMethodException MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 02 Jan 2017 08:01:11 -0000 [ https://issues.apache.org/jira/browse/WW-4050?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15792439#comment-15792439 ] ASF subversion and git services commented on WW-4050: ----------------------------------------------------- Commit 97419283ea50efe2aa7f2a09e2b8f378a3fc0a4c in struts's branch refs/heads/master from [~lukaszlenart] [ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=9741928 ] WW-4050 Converts NoSuchMethodExceotion into ConfigurationException > AnnotationValidationInterceptor should consult UnknownHandler before throwing NoSuchMethodException > --------------------------------------------------------------------------------------------------- > > Key: WW-4050 > URL: https://issues.apache.org/jira/browse/WW-4050 > Project: Struts 2 > Issue Type: Improvement > Affects Versions: 2.3.14 > Reporter: Azuo Lee > Fix For: 2.5.next > > > If a {{NoSuchMethodException}} is caught when invoking {{getActionMethod()}}, {{AnnotationValidationInterceptor}} should first give any configured {{UnknownHandler}} a shot, before throwing the exception directly, just as what {{DefaultActionInvocation.invokeAction()}} does. > Any unknown {{Action}} or unknown {{Result}} is currently handled by {{Dispatcher.serviceAction()}}, and a *404* error code will be returned as expected. But an unknown {{Method}} will raise a *500* error, the only way to avoid this is to configure an {{UnknownHandler}}. Therefore, {{AnnotationValidationInterceptor}} won't inspect {{UnknownHandler}} at all... > {{GET /foo/list  *404* (Action "foo" not found)}} > {{GET /bar/list  *200*}} > {{GET /bar/print *500* (Method "print" not found, *404* is expected instead of *500*)}} -- This message was sent by Atlassian JIRA (v6.3.4#6332)