Return-Path: Delivered-To: apmail-incubator-abdera-dev-archive@locus.apache.org Received: (qmail 99443 invoked from network); 13 Sep 2006 19:14:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 13 Sep 2006 19:14:49 -0000 Received: (qmail 20369 invoked by uid 500); 13 Sep 2006 19:14:49 -0000 Delivered-To: apmail-incubator-abdera-dev-archive@incubator.apache.org Received: (qmail 20345 invoked by uid 500); 13 Sep 2006 19:14:49 -0000 Mailing-List: contact abdera-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: abdera-dev@incubator.apache.org Delivered-To: mailing list abdera-dev@incubator.apache.org Received: (qmail 20336 invoked by uid 99); 13 Sep 2006 19:14:49 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Sep 2006 12:14:49 -0700 Authentication-Results: idunn.apache.osuosl.org header.from=rooneg@gmail.com; domainkeys=good Authentication-Results: idunn.apache.osuosl.org smtp.mail=rooneg@gmail.com; spf=pass X-ASF-Spam-Status: No, hits=0.4 required=5.0 tests=DNS_FROM_RFC_ABUSE,RCVD_BY_IP Received-SPF: pass (idunn.apache.osuosl.org: domain gmail.com designates 66.249.82.229 as permitted sender) DomainKey-Status: good X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 Received: from ([66.249.82.229:37617] helo=wx-out-0506.google.com) by idunn.apache.osuosl.org (ecelerity 2.1 r(10620)) with ESMTP id 8E/40-10750-22858054 for ; Wed, 13 Sep 2006 12:13:49 -0700 Received: by wx-out-0506.google.com with SMTP id s13so2477086wxc for ; Wed, 13 Sep 2006 12:12:14 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=kuswIwWpoU3U/FJ/bghD/BW6k9ioFFIMgAY4S2FHBppuBvznqjhE6TRsW3eQWxkMZDeS6hfKNccpBWOOMr7PqxyyPYMn/od2/ggRwnDvTIvmmqujzHQpF7UHeRw3HohFCLjxlmRTwqbcLkpmUXE/Sd7SR5i8Jc3mBDo0PUSdgAo= Received: by 10.70.52.5 with SMTP id z5mr11448112wxz; Wed, 13 Sep 2006 12:12:14 -0700 (PDT) Received: by 10.70.71.8 with HTTP; Wed, 13 Sep 2006 12:12:14 -0700 (PDT) Message-ID: <7edfeeef0609131212y7f0583dw3779d11dcd523b1b@mail.gmail.com> Date: Wed, 13 Sep 2006 15:12:14 -0400 From: "Garrett Rooney" Sender: rooneg@gmail.com To: abdera-dev@incubator.apache.org Subject: Re: svn commit: r443068 - in /incubator/abdera/java/trunk: core/src/main/java/org/apache/abdera/model/ core/src/main/java/org/apache/abdera/util/ parser/src/main/java/org/apache/abdera/parser/stax/ In-Reply-To: <20060913184759.0BECE1A981A@eris.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20060913184759.0BECE1A981A@eris.apache.org> X-Google-Sender-Auth: 6a408fa4fb8dc6e0 X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On 9/13/06, jmsnell@apache.org wrote: > + public static boolean isMatch(MimeType a, MimeType b) { > + try { > + final MimeType WILDCARD = new MimeType("*/*"); > + if (a == null || b == null) return true; > + if (a.match(b)) return true; > + if (a.equals(WILDCARD)) return true; > + if (a.getPrimaryType().equals("*")) { > + MimeType c = new MimeType(b.getPrimaryType(), a.getSubType()); > + return c.match(b); > + } > + if (b.getPrimaryType().equals("*")) { > + MimeType c = new MimeType(a.getPrimaryType(), b.getSubType()); > + return c.match(a); > + } > + } catch (Exception e) {} > + return false; It seems like WILDCARD would be a nice chance for a static member, to avoid having to allocate one each time through here... -garrett