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 54A52200BF2 for ; Mon, 2 Jan 2017 09:40:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 53481160B30; Mon, 2 Jan 2017 08:40:00 +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 9BD89160B21 for ; Mon, 2 Jan 2017 09:39:59 +0100 (CET) Received: (qmail 57851 invoked by uid 500); 2 Jan 2017 08:39: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 57839 invoked by uid 99); 2 Jan 2017 08:39:58 -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:39:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 9A5D32C1F54 for ; Mon, 2 Jan 2017 08:39:58 +0000 (UTC) Date: Mon, 2 Jan 2017 08:39:58 +0000 (UTC) From: "Hudson (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:40:00 -0000 [ https://issues.apache.org/jira/browse/WW-4050?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15792491#comment-15792491 ] Hudson commented on WW-4050: ---------------------------- SUCCESS: Integrated in Jenkins build Struts-JDK7-master #577 (See [https://builds.apache.org/job/Struts-JDK7-master/577/]) WW-4050 Converts NoSuchMethodExceotion into ConfigurationException (lukaszlenart: rev 97419283ea50efe2aa7f2a09e2b8f378a3fc0a4c) * (edit) core/src/main/java/org/apache/struts2/interceptor/validation/AnnotationValidationInterceptor.java > 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 > Assignee: Lukasz Lenart > 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)