Return-Path: Delivered-To: apmail-james-mime4j-dev-archive@minotaur.apache.org Received: (qmail 98278 invoked from network); 27 Feb 2009 17:14:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 27 Feb 2009 17:14:52 -0000 Received: (qmail 47547 invoked by uid 500); 27 Feb 2009 17:14:52 -0000 Delivered-To: apmail-james-mime4j-dev-archive@james.apache.org Received: (qmail 47523 invoked by uid 500); 27 Feb 2009 17:14:52 -0000 Mailing-List: contact mime4j-dev-help@james.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: mime4j-dev@james.apache.org Delivered-To: mailing list mime4j-dev@james.apache.org Received: (qmail 47512 invoked by uid 99); 27 Feb 2009 17:14:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Feb 2009 09:14:52 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of markus.wiederkehr@gmail.com designates 209.85.218.164 as permitted sender) Received: from [209.85.218.164] (HELO mail-bw0-f164.google.com) (209.85.218.164) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Feb 2009 17:14:44 +0000 Received: by bwz8 with SMTP id 8so1369067bwz.4 for ; Fri, 27 Feb 2009 09:14:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=AJiAwBO7jqJUNBHrWs7/wIeO0rQU8/UTMNCtQsdHaqw=; b=LK+8A4aE1INJNZUZkHwdf5igb5PzauiijNE+XyFT2sNaIcVH6Q8szYLbbXQVBj40X9 LOkuV6IQxbfsn19ken6QKQSZBXPhvJ9VFnhPRbNU6qo5SGk7CHORd3we6VhEqUla5Ipg rUu/oTTKC5okLGvohPGoiniqJKUUp4HBn++1o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=IBRjJgqrAqf3BEdBLO6JlZlbxDoITPsg3DgFQViJZ77Q0xa29NPqbcs0J8na3uvh2o bxgBIT3FNmolP7PpKEiph/dHBt+Eud/r/h8xiNkYygbZZ/LkXgPiOmX3Vz5AH3pJTNBR L1pEe3u4rLK0HzkbdtXpI2BLpFCJmz6q41WYQ= MIME-Version: 1.0 Received: by 10.223.112.202 with SMTP id x10mr3467067fap.68.1235754864272; Fri, 27 Feb 2009 09:14:24 -0800 (PST) In-Reply-To: References: <49A6F46F.6000507@apache.org> Date: Fri, 27 Feb 2009 18:14:24 +0100 Message-ID: Subject: Re: Interface Field From: Markus Wiederkehr To: mime4j-dev@james.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On Fri, Feb 27, 2009 at 3:39 PM, Robert Burrell Donkin wrote: > On Thu, Feb 26, 2009 at 7:58 PM, Oleg Kalnichevski wrote: >> Markus Wiederkehr wrote: >>> >>> The newly introduced interface mime4j.parser.Field misses some of the >>> method that where previously available in class mime4j.class.Field. >>> >>> The methods are still there but the user has to cast to AbstractField >>> (with instanceof check of course) to gain access to them.. >>> >>> Now the question is should we pull up some of the methods, remove them >>> or move them to other places? >>> >>> IMO there are three categories of methods: >>> >>> 1) the static methods parse(ByteSequence), parse(String) and getParser() >>> >>> These are still accessible but Field.parse() felt natural whereas >>> AbstractField.parse() feels clumsy in my opinon.. I would prefer a >>> separate class for these. > > +1 I'll look into it tomorrow. The rest is done.. Markus > >>> 2) isValidField(), getParseException() >>> >>> Pull up? >>> >> >> I personally would rather keep Field interface as generic ad simple as >> possible. I agree static parsing methods should go to a separate class. >> isValidField(), getParseException() do not belong to Field, in my opinion. > > IMHO they don't really seem to belong in AbstractField either. perhaps > a subinterface or empty abstract class (ParsedField?) would be better. > >>> 3) isContentType(), isSubject(), isFrom() and isTo() >>> >>> Feels arbitrary and incomplete.. remove? >>> >> >> +1 to remove. > > +1 > > - robert >