Return-Path: X-Original-To: apmail-cxf-issues-archive@www.apache.org Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 21E0510D46 for ; Mon, 27 Apr 2015 13:39:40 +0000 (UTC) Received: (qmail 35768 invoked by uid 500); 27 Apr 2015 13:39:39 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 35705 invoked by uid 500); 27 Apr 2015 13:39:39 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 35694 invoked by uid 99); 27 Apr 2015 13:39:39 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Apr 2015 13:39:39 +0000 Date: Mon, 27 Apr 2015 13:39:39 +0000 (UTC) From: "Sergey Beryozkin (JIRA)" To: issues@cxf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CXF-6369) org.apache.cxf.jaxrs.impl.ConfigurationImpl does not comply with SPEC MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CXF-6369?page=3Dcom.atlassian.j= ira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D145141= 36#comment-14514136 ]=20 Sergey Beryozkin commented on CXF-6369: --------------------------------------- That is a possibility, I've asked for the clarification, lets see... > org.apache.cxf.jaxrs.impl.ConfigurationImpl does not comply with SPEC > --------------------------------------------------------------------- > > Key: CXF-6369 > URL: https://issues.apache.org/jira/browse/CXF-6369 > Project: CXF > Issue Type: Bug > Components: JAX-RS > Affects Versions: 3.0.3, 3.0.4, 2.7.15 > Reporter: iris ding > Assignee: Sergey Beryozkin > Fix For: 3.1.0, 3.0.5 > > > According to http://docs.oracle.com/javaee/7/api/javax/ws/rs/core/Configu= rable.html > As a general rule, for each JAX-RS component class there can be at most o= ne registration =E2=80=94 class-based or instance-based =E2=80=94 configure= d at any given moment. Implementations MUST reject any attempts to configur= e a new registration for a provider class that has been already registered = in the given configurable context earlier. Implementations SHOULD also rais= e a warning to inform the user about the rejected component registration. > For example: > config.register(GzipInterceptor.class, WriterInterceptor.class); > config.register(GzipInterceptor.class); // Rejected by runtime. > config.register(new GzipInterceptor()); // Rejected by runtime. > config.register(GzipInterceptor.class, 6500); // Rejected by runtime. > So we need to check whether the same class's instances have already been = put into config before hand. > Also to check whether the class/instance has been registered via public = boolean isRegistered(Class cls) , we need to check whether the two class= is the same other than just isAssignableFrom. -- This message was sent by Atlassian JIRA (v6.3.4#6332)