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 05881200BBC for ; Sun, 13 Nov 2016 12:06:05 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 042F5160AF8; Sun, 13 Nov 2016 11:06:05 +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 4FC1C160AF2 for ; Sun, 13 Nov 2016 12:06:04 +0100 (CET) Received: (qmail 65400 invoked by uid 500); 13 Nov 2016 11:05:58 -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 65340 invoked by uid 99); 13 Nov 2016 11:05:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 13 Nov 2016 11:05:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 5C4802C0D55 for ; Sun, 13 Nov 2016 11:05:58 +0000 (UTC) Date: Sun, 13 Nov 2016 11:05:58 +0000 (UTC) From: "Lukasz Lenart (JIRA)" To: issues@struts.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (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: Sun, 13 Nov 2016 11:06:05 -0000 [ https://issues.apache.org/jira/browse/WW-4050?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Lukasz Lenart updated WW-4050: ------------------------------ Fix Version/s: (was: 2.5.x) 2.5.7 > 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.7 > > > 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)