Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4D261100AB for ; Wed, 20 Nov 2013 21:12:36 +0000 (UTC) Received: (qmail 74875 invoked by uid 500); 20 Nov 2013 21:12:36 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 74757 invoked by uid 500); 20 Nov 2013 21:12:36 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 74748 invoked by uid 99); 20 Nov 2013 21:12:36 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Nov 2013 21:12:36 +0000 Date: Wed, 20 Nov 2013 21:12:35 +0000 (UTC) From: "Thomas Neidhart (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (COLLECTIONS-502) Generic parameter inconsistency on various INSTANCE fields MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/COLLECTIONS-502?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13828121#comment-13828121 ] Thomas Neidhart commented on COLLECTIONS-502: --------------------------------------------- InstantiateTransformer.NO_ARG_INSTANCE made private and use raw type. Factory method instantiateTransformer() returns NO_ARG_INSTANCE cast to the generic type. > Generic parameter inconsistency on various INSTANCE fields > ---------------------------------------------------------- > > Key: COLLECTIONS-502 > URL: https://issues.apache.org/jira/browse/COLLECTIONS-502 > Project: Commons Collections > Issue Type: Improvement > Components: Functor > Affects Versions: 4.0 > Reporter: Emmanuel Bourg > Priority: Trivial > > In {{FalsePredicate}} the {{INSTANCE}} singleton is defined as {{Predicate}}. In other predicates such as {{TruePredicate}} it's > defined as {{Predicate}}. In both cases this prevents the declaration of: > {code} > Predicate predicate = FalsePredicate.INSTANCE; > {code} > This will fail to compile. > I suggest declaring the INSTANCE fields as an ungenerified {{Predicate}}, such that the above example compiles with an unchecked warning. -- This message was sent by Atlassian JIRA (v6.1#6144)