geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevan Miller <kevan.mil...@gmail.com>
Subject Re: Disasterous problem with 2 spec jars
Date Tue, 13 Dec 2005 17:44:59 GMT
I don't fully understand the issue, but Eclipse may not be doing the wrong
thing... Sun JDK 1.5 will, in fact, behave in the same manner (I haven't
tested to see how 1.5 will compile the same class).

Just to be clear, the "near-term" options seem to be:

1) switch spec build to maven 1
2) configure maven 2 to use javac from Sun 1.4 (there are references to
setting a compilerId in the maven-compiler-plug
3) challenge the test results

We should be able to easily determine if 2 will work... If not, then get
started on 1...

--kevan


On 12/13/05, Rick McGuire <rickmcg@gmail.com> wrote:
>
> I just took a look at the Sun version of the BodyPart class, and it is
> similarly truncated (although it supports a setParent() method in
> addition to getParent()).  It appears that the eclipse compiler is
> adding this incorrectly.  It makes sense that it shouldn't, since the
> BodyPart class is abstract.  It NEEDS to leave all of the unimplemented
> methods unimplemented to ensure that subclasses complete the concrete
> class contract.
>
> Rick
>
> David Jencks wrote:
>
> > Sachin says that maven 2 uses the eclipse compiler rather than javac
> > and that judging by its behavior when looking at binary classes in
> > eclipse it may well be producing these bad class files.  It appears
> > that all the methods in the "implements" interfaces have been added
> > to  the class.
> >
> > Presumably the solution is to build with maven 1.
> >
> > If the eclipse compiler is in fact at fault, I think that this will
> > prevent us from using maven 2 until either a javac compiler is
> > provided  or the eclipse compiler is fixed.  If the eclipse compiler
> > behavior is  actually according to the jdk spec we may have a
> > different issue.
> >
> > thanks
> > david jencks
> >
> >
> > On Dec 13, 2005, at 1:11 AM, David Jencks wrote:
> >
> >> Something is dreadfully wrong with two of the spec jars build by
> >> maven  2.
> >>
> >> The javamail BodyPart class  source looks like this:
> >>
> >>
> >> package javax.mail;
> >>
> >> /**
> >>  * @version $Rev: 54266 $ $Date: 2004-10-10 14:02:50 -0700 (Sun, 10
> >> Oct 2004) $
> >>  */
> >> public abstract class BodyPart implements Part {
> >>     protected Multipart parent;
> >>
> >>     public Multipart getParent() {
> >>         return parent;
> >>     }
> >> }
> >>
> >> Decompiling the class (1951 bytes) from the maven 2 build gives this:
> >>
> >> David-Jencks-Computer:~/geronimo/geronimo/svn/geronimo/branches/1.0
> >> david$ javap -classpath
> >> ~/downloads/geronimo-javamail_1.3.1_spec-1.0.jar javax.mail.BodyPart
> >> Compiled from "BodyPart.java"
> >> public abstract class javax.mail.BodyPart extends java.lang.Object
> >> implements javax.mail.Part{
> >>     protected javax.mail.Multipart parent;
> >>     public javax.mail.BodyPart();
> >>     public javax.mail.Multipart getParent();
> >>     public abstract void writeTo(java.io.OutputStream);
> >>        throws java/io/IOException, javax/mail/MessagingException
> >>     public abstract void setText(java.lang.String);
> >>        throws javax/mail/MessagingException
> >>     public abstract void setHeader(java.lang.String,java.lang.String);
> >>        throws javax/mail/MessagingException
> >>     public abstract void setFileName(java.lang.String);
> >>        throws javax/mail/MessagingException
> >>     public abstract void setDisposition(java.lang.String);
> >>        throws javax/mail/MessagingException
> >>     public abstract void setDescription(java.lang.String);
> >>        throws javax/mail/MessagingException
> >>     public abstract void setDataHandler(javax.activation.DataHandler);
> >>        throws javax/mail/MessagingException
> >>     public abstract void setContent(java.lang.Object,java.lang.String);
> >>        throws javax/mail/MessagingException
> >>     public abstract void setContent(javax.mail.Multipart);
> >>        throws javax/mail/MessagingException
> >>     public abstract void removeHeader(java.lang.String);
> >>        throws javax/mail/MessagingException
> >>     public abstract boolean isMimeType(java.lang.String);
> >>        throws javax/mail/MessagingException
> >>     public abstract int getSize();
> >>        throws javax/mail/MessagingException
> >>     public abstract java.util.Enumeration
> >> getNonMatchingHeaders(java.lang.String[]);
> >>        throws javax/mail/MessagingException
> >>     public abstract java.util.Enumeration
> >> getMatchingHeaders(java.lang.String[]);
> >>        throws javax/mail/MessagingException
> >>     public abstract int getLineCount();
> >>        throws javax/mail/MessagingException
> >>     public abstract java.io.InputStream getInputStream();
> >>        throws java/io/IOException, javax/mail/MessagingException
> >>     public abstract java.lang.String[] getHeader(java.lang.String);
> >>        throws javax/mail/MessagingException
> >>     public abstract java.lang.String getFileName();
> >>        throws javax/mail/MessagingException
> >>     public abstract java.lang.String getDisposition();
> >>        throws javax/mail/MessagingException
> >>     public abstract java.lang.String getDescription();
> >>        throws javax/mail/MessagingException
> >>     public abstract javax.activation.DataHandler getDataHandler();
> >>        throws javax/mail/MessagingException
> >>     public abstract java.lang.String getContentType();
> >>        throws javax/mail/MessagingException
> >>     public abstract java.lang.Object getContent();
> >>        throws java/io/IOException, javax/mail/MessagingException
> >>     public abstract java.util.Enumeration getAllHeaders();
> >>        throws javax/mail/MessagingException
> >>     public abstract void addHeader(java.lang.String,java.lang.String);
> >>        throws javax/mail/MessagingException
> >> }
> >>
> >>
> >> Decompiling the class from our own maven 1 build gives:
> >>
> >> David-Jencks-Computer:~/geronimo/geronimo/svn/geronimo/branches/1.0
> >> david$ javap -classpath
> >> ~/.maven/repository/geronimo-spec/jars/geronimo-spec-javamail-1.3.1-
> >> rc6.jar javax.mail.BodyPart
> >> Compiled from "BodyPart.java"
> >> public abstract class javax.mail.BodyPart extends java.lang.Object
> >> implements javax.mail.Part{
> >>     protected javax.mail.Multipart parent;
> >>     public javax.mail.BodyPart();
> >>     public javax.mail.Multipart getParent();
> >> }
> >>
> >>
> >>
> >> There appears to be a similar problem with the saaj SOAPPart class.
> >>
> >> What should we do? Use the maven 1 built jars?
> >>
> >> thanks
> >> david jencks
> >>
> >>
> >
> >
> >
>
>

Mime
View raw message