From MAILER-DAEMON Sat Mar 01 01:07:35 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18p09m-00062D-00
	for mharc-classpath@gnu.org; Sat, 01 Mar 2003 01:07:34 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18p09k-000623-00
	for classpath@gnu.org; Sat, 01 Mar 2003 01:07:32 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18p09j-00061o-00
	for classpath@gnu.org; Sat, 01 Mar 2003 01:07:31 -0500
Received: from mail.peakpeak.com ([207.174.178.17] helo=gash2.peakpeak.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18p09i-00061U-00
	for classpath@gnu.org; Sat, 01 Mar 2003 01:07:30 -0500
Received: from fleche.redhat.com (tf0101.peakpeak.com [204.144.239.101])
	by gash2.peakpeak.com (8.9.3/8.9.3) with ESMTP id XAA05442;
	Fri, 28 Feb 2003 23:07:27 -0700
Received: by fleche.redhat.com (Postfix, from userid 1000)
	id 8CC624F8610; Fri, 28 Feb 2003 22:58:44 -0700 (MST)
To: "Aaron M. Renn" <arenn@urbanophile.com>
References: <20030301043451.GA15439@urbanophile.com>
From: Tom Tromey <tromey@redhat.com>
X-Attribution: Tom
X-Zippy: I'm having a tax-deductible experience!  I need an energy crunch!!
Date: 28 Feb 2003 22:58:44 -0700
In-Reply-To: <20030301043451.GA15439@urbanophile.com>
Message-ID: <878yvz1vcb.fsf@fleche.redhat.com>
Lines: 41
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: classpath@gnu.org
Subject: Re: JNI/CNI Revisited
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
Reply-To: tromey@redhat.com
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sat, 01 Mar 2003 06:07:33 -0000

>>>>> "Aaron" == Aaron M Renn <arenn@urbanophile.com> writes:

Aaron> Looking at native methods used to implement FileDescriptor,
Aaron> FileInputStream, FileOutputStream, and RandomAccessFile (as
Aaron> well as a quick glance at FileChannel in NIO), I pulled
Aaron> together a quick list of potential methods as a sort of
Aaron> provider interface that would do everything but File stuff (so
Aaron> far).

This list looks basically the same as what we've got in the libgcj
FileDescriptor (in some cases your names are clearer).  Nice summary
btw.

You'll want a static initialization function, too, to set
FileDescriptor.in, out, and err.  We could also change System to use
these fields to construct the standard streams, eliminating 3 native
methods in java.lang.VMSystem.

Aaron> I'll attach it below.  Because NIO does a lot of the same stuff
Aaron> as java.io, perhaps sticking this somewhere under the gnu.java
Aaron> hierarchy would allow both java.io and java.nio to share it.

Then you have to do security checks in the code, to avoid malicious
use.  I think one major reason that Mark wanted to put the VM helper
classes in the packages themselves was so that we could just use the
language's access protection mechanisms to avoid security issues.

This may mean some redundancy.  OTOH our native code doesn't have to
precisely map to the Java API -- we could share code at the native
layer.  (In libgcj we accomplish this by circumventing the language
protections in CNI -- default access in Java translates to "public" in
C++.  But ordinary factoring could be used for the Classpath C code.)

Aaron> The immediate problem I see is that gcj uses an instance
Aaron> variable in FileDescriptor called position to track the current
Aaron> file position.

Mark added this recently for performance reasons.  I don't recall what
program prompted him to make this change.

Tom



From MAILER-DAEMON Sat Mar 01 03:53:36 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18p2kS-0004LU-00
	for mharc-classpath@gnu.org; Sat, 01 Mar 2003 03:53:36 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18p2kP-0004Jk-00
	for classpath@gnu.org; Sat, 01 Mar 2003 03:53:33 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18p2jB-0003hx-00
	for classpath@gnu.org; Sat, 01 Mar 2003 03:52:18 -0500
Received: from 62-177-154-234.bbeyond.nl ([62.177.154.234]
	helo=LEMBU.sumatrasoftware.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)	id 18p2iY-0003WT-00
	for classpath@gnu.org; Sat, 01 Mar 2003 03:51:38 -0500
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary="----_=_NextPart_001_01C2DFCF.AA2A975C"
Date: Sat, 1 Mar 2003 09:50:52 +0100
X-MimeOLE: Produced By Microsoft Exchange V6.5.6803.0
Message-ID: <5C38B761F205B54BA59FF611A65C624801189D@lembu.sumatrasoftware.com>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: JNI/CNI Revisited
Thread-Index: AcLfq+HHR9eo/vQYTQyz24y2xkFwTQAIsteg
From: "Jeroen Frijters" <jeroen@sumatra.nl>
To: "Aaron M. Renn" <arenn@urbanophile.com>,
	<classpath@gnu.org>
Subject: RE: JNI/CNI Revisited
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sat, 01 Mar 2003 08:53:34 -0000

This is a multi-part message in MIME format.

------_=_NextPart_001_01C2DFCF.AA2A975C
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable


Aaron M. Renn wrote:
[...]
> Needed for java.io (except File)
> --------------------------------
>   void nativeInit(); // For any required initialization
>=20
>   void nativeSync(long fd) throws SyncFailedException

I really don't like this model, because it forces the VM into using a
long for the file descriptor. IMHO a better alternative would be to have
instance methods in java.io.FileDescriptor that call a static native.

class FileDescriptor
{
  private long fd;

  void sync() {
    nativeSync(fd);
  }

  private static native void nativeSync(long fd);
}

This allows VMs (such as mine) that don't use an integer as a file
handle, to replace FileDescriptor with a different implementation, but
leave all other i/o classes as is.

There is a tiny overhead in this approach, but I think it is worth it
(but then, I'm biased ;-)).

Regards,
Jeroen

------_=_NextPart_001_01C2DFCF.AA2A975C
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
6.5.6803.0">
<TITLE>RE: JNI/CNI Revisited</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<BR>

<P><FONT SIZE=3D2>Aaron M. Renn wrote:</FONT>

<BR><FONT SIZE=3D2>[...]</FONT>

<BR><FONT SIZE=3D2>&gt; Needed for java.io (except File)</FONT>

<BR><FONT SIZE=3D2>&gt; --------------------------------</FONT>

<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp; void nativeInit(); // For any =
required initialization</FONT>

<BR><FONT SIZE=3D2>&gt; </FONT>

<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp; void nativeSync(long fd) throws =
SyncFailedException</FONT>
</P>

<P><FONT SIZE=3D2>I really don't like this model, because it forces the =
VM into using a long for the file descriptor. IMHO a better alternative =
would be to have instance methods in java.io.FileDescriptor that call a =
static native.</FONT></P>

<P><FONT SIZE=3D2>class FileDescriptor</FONT>

<BR><FONT SIZE=3D2>{</FONT>

<BR><FONT SIZE=3D2>&nbsp; private long fd;</FONT>
</P>

<P><FONT SIZE=3D2>&nbsp; void sync() {</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; nativeSync(fd);</FONT>

<BR><FONT SIZE=3D2>&nbsp; }</FONT>
</P>

<P><FONT SIZE=3D2>&nbsp; private static native void nativeSync(long =
fd);</FONT>

<BR><FONT SIZE=3D2>}</FONT>
</P>

<P><FONT SIZE=3D2>This allows VMs (such as mine) that don't use an =
integer as a file handle, to replace FileDescriptor with a different =
implementation, but leave all other i/o classes as is.</FONT></P>

<P><FONT SIZE=3D2>There is a tiny overhead in this approach, but I think =
it is worth it (but then, I'm biased ;-)).</FONT>
</P>

<P><FONT SIZE=3D2>Regards,</FONT>

<BR><FONT SIZE=3D2>Jeroen</FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C2DFCF.AA2A975C--



From MAILER-DAEMON Sat Mar 01 06:13:35 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18p4uV-0007AZ-00
	for mharc-classpath@gnu.org; Sat, 01 Mar 2003 06:12:07 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18p4uG-0006uE-00
	for classpath@gnu.org; Sat, 01 Mar 2003 06:11:52 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18p4u5-0006WA-00
	for classpath@gnu.org; Sat, 01 Mar 2003 06:11:42 -0500
Received: from node1c5f.a2000.nl ([62.108.28.95] helo=nescio.wildebeest.org)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18p4tf-0006ME-00
	for classpath@gnu.org; Sat, 01 Mar 2003 06:11:15 -0500
Received: from elsschot.wildebeest.org ([192.168.1.26] ident=mark)
	by nescio.wildebeest.org with esmtp (Exim 3.35 #1 (Debian))
	id 18p4t0-0007h0-00; Sat, 01 Mar 2003 12:10:34 +0100
From: Mark Wielaard <mark@klomp.org>
To: tromey@redhat.com
In-Reply-To: <87vfz51yj1.fsf@fleche.redhat.com>
References: <200302271335.37040.konqueror@gmx.de>
	 <87vfz51yj1.fsf@fleche.redhat.com>
Content-Type: text/plain
Organization: 
Message-Id: <1046517060.19764.124.camel@elsschot>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.2.2 
Date: 01 Mar 2003 12:11:01 +0100
Content-Transfer-Encoding: 7bit
cc: Michael Koch <konqueror@gmx.de>
cc: classpath@gnu.org
cc: java@gcc.gnu.org
Subject: Miranda methods again (Was: compatibility with jikes ?)
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sat, 01 Mar 2003 11:11:57 -0000

Hi (CC classpath mailinglist),

On Thu, 2003-02-27 at 17:25, Tom Tromey wrote:
> >>>>> "Michael" == Michael Koch <konqueror@gmx.de> writes:
> 
> Michael> java.net.DatagramSocketImpl.getOption()
> Michael> java.net.DatagramSocketImpl.setOption()
> Michael> java.net.SocketImpl.getOption()
> Michael> java.net.SocketImpl.setOption()
> 
> Michael> They came in via a merge with classpath long time ago. GCJ
> Michael> dont need them. They are only there to make these classes
> Michael> compilable with jikes (in classpath tree).
> 
> Michael> Should we really keep them in the libgcj tree for jikes
> Michael> compatibility or better remove them because we dont need them
> Michael> ?
> 
> Actually the comment says they are there to work around a gcj bug.
>
> This may be one of those bugs that only shows up if you compile a lot
> of java files with one gcj command.  Though it does look like a
> classic instance of the Miranda method problem, so I'm not entirely
> sure why we wouldn't need this.

Actually they are workaround for VMs (or compilers) that cannot handle
miranda methods not being generated for abstract classes. So they help
when glibj.jar is generated by gcj (or a recent jikes) and used with a
VM that doesn't handle missing Miranda methods yet.

I just saw the message about Miranda methods missing from the X509CRL
and X509Certificate classes for the X509Extension interface. That is a
similar case.

I vote that we add the Miranda methods explicitly to the abstract
classes in Classpath that need them. If nobody objects then I will go
through the Classpath source and add them (with explicit comments) to
any abstract class that implements an interface but doesn't redeclare
all interface methods (japi can help here since it checks for declared
methods in classes, not inherited methods).

The reason is that "modern" compilers like jikes (when used with -target
1.4) no longer generate them and buggy compilers like gcj -C never
generated them. But not having those methods for the standard classes
now makes the serialisation different (depends on Declared Methods) and
breaks "buggy" VMs (that is almost all VMs since till very recently they
all depended on the compiler generating these Miranda methods).

Cheers,

Mark




From MAILER-DAEMON Sat Mar 01 10:20:00 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18p8mN-0002eT-00
	for mharc-classpath@gnu.org; Sat, 01 Mar 2003 10:19:59 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18otse-0001lI-00
	for classpath@gnu.org; Fri, 28 Feb 2003 18:25:28 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18otsd-0001kz-00
	for classpath@gnu.org; Fri, 28 Feb 2003 18:25:27 -0500
Received: from dns.precisionio.com ([65.192.41.225])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18otsc-0001kr-00
	for classpath@gnu.org; Fri, 28 Feb 2003 18:25:26 -0500
Received: from mailman.precisionio.com (mailman.precisionio.com
	[172.16.0.248])
	by dns.precisionio.com (8.12.6/8.12.6) with ESMTP id h1SNPPM9010279;
	Fri, 28 Feb 2003 15:25:25 -0800 (PST)
	(envelope-from archie@precisionio.com)
Received: from precisionio.com (bubba.precisionio.com [172.16.0.223])
	h1SNUiJx041559;	Fri, 28 Feb 2003 15:30:45 -0800 (PST)
	(envelope-from archie@precisionio.com)
Message-ID: <3E5FEFE5.5080500@precisionio.com>
Date: Fri, 28 Feb 2003 15:25:25 -0800
From: Archie Cobbs <archie@precisionio.com>
Organization: Precision I/O
User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.1) Gecko/20021106
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: Per Bothner <per@bothner.com>
References: <200302282058.h1SKwoAN000823@archie1.precisionio.com>
	<3E5FE7F9.4050705@bothner.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Mailman-Approved-At: Sat, 01 Mar 2003 10:19:58 -0500
cc: classpath@gnu.org
Subject: Re: Method.equals() question
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Fri, 28 Feb 2003 23:25:29 -0000

Per Bothner wrote:
>> I'm assuming here that the VM guarantees that only one Method object
>> will ever be created for each declared method in a class.
> 
> Why are you assuming this?  It is possible the VM internal
> data structures are unrelated to java.lang.reflect.Method,
> and so it may make sense to create a new one each time it
> is requested than try to cache it.

You're right, you could certainly do things that way instead and
in that case my idea of using "this == o" for equals() wouldn't work.

In that case the VM implementor better take a look at Field.equals()
and Constructor.equals() too because that's what they do as well.
So perhaps all three should be annotated with appropriate comments.

-Archie

__________________________________________________________________________
Archie Cobbs     *     Precision I/O      *     http://www.precisionio.com




From MAILER-DAEMON Sat Mar 01 10:41:47 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18p96X-0002hj-00
	for mharc-classpath@gnu.org; Sat, 01 Mar 2003 10:40:49 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18p96J-0002gm-00
	for classpath@gnu.org; Sat, 01 Mar 2003 10:40:35 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18p96I-0002eD-00
	for classpath@gnu.org; Sat, 01 Mar 2003 10:40:34 -0500
Received: from node1c5f.a2000.nl ([62.108.28.95] helo=nescio.wildebeest.org)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18p96H-0002cK-00
	for classpath@gnu.org; Sat, 01 Mar 2003 10:40:33 -0500
Received: from elsschot.wildebeest.org ([192.168.1.26] ident=mark)
	by nescio.wildebeest.org with esmtp (Exim 3.35 #1 (Debian))
	id 18p95b-00082u-00; Sat, 01 Mar 2003 16:39:51 +0100
From: Mark Wielaard <mark@klomp.org>
To: Archie Cobbs <archie@precisionio.com>
In-Reply-To: <200302282058.h1SKwoAN000823@archie1.precisionio.com>
References: <200302282058.h1SKwoAN000823@archie1.precisionio.com>
Content-Type: text/plain
Organization: 
Message-Id: <1046533217.19758.216.camel@elsschot>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.2.2 
Date: 01 Mar 2003 16:40:18 +0100
Content-Transfer-Encoding: 7bit
cc: classpath@gnu.org
cc: tromey@redhat.com
Subject: Re: Method.equals() question
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sat, 01 Mar 2003 15:40:36 -0000

Hi,

On Fri, 2003-02-28 at 21:58, Archie Cobbs wrote:
> I'm assuming here that the VM guarantees that only one Method object
> will ever be created for each declared method in a class.

I used to think that this would be the optimal thing todo for a VM. But
in reality each Method object returned should actually be unique. The
reason is that Method, Field and Constructor are AccessibleObjects.
AccessibleObjects have an setAccessible() method that should only
operate on that instance of the Method/Field but not on other
Method/Field objects which might refer to the same reflected field,
method or constructor.

I have wanted to add some Mauve tests for this since it is an easy thing
to overlook. Have put that a bit higher on the TODO list now :)

As a consequence some of the reflect classes have to be carefully
examined to make sure that they do not make the assumption that equals
means same reference. (Note that in contrast each Class object should
have the property they are unique.)

Cheers,

Mark




From MAILER-DAEMON Sat Mar 01 11:09:24 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18p9YB-0006cO-00
	for mharc-classpath@gnu.org; Sat, 01 Mar 2003 11:09:23 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18p9Y8-0006Zj-00
	for classpath@gnu.org; Sat, 01 Mar 2003 11:09:20 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18p9Vo-0005pc-00
	for classpath@gnu.org; Sat, 01 Mar 2003 11:06:57 -0500
Received: from web10004.mail.yahoo.com ([216.136.130.40])
	by monty-python.gnu.org with smtp (Exim 4.10.13)
	id 18p9Ui-0005jg-00
	for classpath@gnu.org; Sat, 01 Mar 2003 11:05:48 -0500
Message-ID: <20030301160538.40052.qmail@web10004.mail.yahoo.com>
Received: from [139.19.20.91] by web10004.mail.yahoo.com via HTTP;
	Sat, 01 Mar 2003 08:05:38 PST
Date: Sat, 1 Mar 2003 08:05:38 -0800 (PST)
From: Dalibor Topic <robilad@yahoo.com>
To: Mark Wielaard <mark@klomp.org>, Archie Cobbs <archie@precisionio.com>
In-Reply-To: <1046533217.19758.216.camel@elsschot>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: tromey@redhat.com
cc: classpath@gnu.org
Subject: Re: Method.equals() question
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sat, 01 Mar 2003 16:09:21 -0000


--- Mark Wielaard <mark@klomp.org> wrote:

> As a consequence some of the reflect classes have to
> be carefully
> examined to make sure that they do not make the
> assumption that equals
> means same reference. (Note that in contrast each
> Class object should
> have the property they are unique.)

Unique in the context of the class loader, or unique
for all class loaders? I think they have to be unique
in the context of their class loader, and can't be
globally unique because of the assertion status flag
...

cheers,
dalibor topic

__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/



From MAILER-DAEMON Sat Mar 01 11:22:14 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18p9kc-0005ng-00
	for mharc-classpath@gnu.org; Sat, 01 Mar 2003 11:22:14 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18p9kb-0005nV-00
	for classpath@gnu.org; Sat, 01 Mar 2003 11:22:13 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18p9kZ-0005n7-00
	for classpath@gnu.org; Sat, 01 Mar 2003 11:22:12 -0500
Received: from node1c5f.a2000.nl ([62.108.28.95] helo=nescio.wildebeest.org)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18p9kZ-0005n3-00
	for classpath@gnu.org; Sat, 01 Mar 2003 11:22:11 -0500
Received: from elsschot.wildebeest.org ([192.168.1.26] ident=mark)
	by nescio.wildebeest.org with esmtp (Exim 3.35 #1 (Debian))
	id 18p9jz-00088K-00; Sat, 01 Mar 2003 17:21:35 +0100
From: Mark Wielaard <mark@klomp.org>
To: Dalibor Topic <robilad@yahoo.com>
In-Reply-To: <20030301160538.40052.qmail@web10004.mail.yahoo.com>
References: <20030301160538.40052.qmail@web10004.mail.yahoo.com>
Content-Type: text/plain
Organization: 
Message-Id: <1046535722.19773.285.camel@elsschot>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.2.2 
Date: 01 Mar 2003 17:22:02 +0100
Content-Transfer-Encoding: 7bit
cc: Archie Cobbs <archie@precisionio.com>
cc: classpath@gnu.org
cc: tromey@redhat.com
Subject: Re: Method.equals() question
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sat, 01 Mar 2003 16:22:13 -0000

Hi,

On Sat, 2003-03-01 at 17:05, Dalibor Topic wrote:
> > (Note that in contrast each
> > Class object should
> > have the property they are unique.)
> 
> Unique in the context of the class loader, or unique
> for all class loaders? I think they have to be unique
> in the context of their class loader, and can't be
> globally unique because of the assertion status flag
> ...

Unique in the context of their class loader (hierarchy) indeed. Should
have been more careful.

Thanks,

Mark




From MAILER-DAEMON Sat Mar 01 11:59:56 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18pAKe-0006jo-00
	for mharc-classpath@gnu.org; Sat, 01 Mar 2003 11:59:28 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18pAK6-0006TI-00
	for classpath@gnu.org; Sat, 01 Mar 2003 11:58:54 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18pAJB-00060h-00
	for classpath@gnu.org; Sat, 01 Mar 2003 11:58:12 -0500
Received: from node1c5f.a2000.nl ([62.108.28.95] helo=nescio.wildebeest.org)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18pAIf-0005eT-00
	for classpath@gnu.org; Sat, 01 Mar 2003 11:57:25 -0500
Received: from elsschot.wildebeest.org ([192.168.1.26] ident=mark)
	by nescio.wildebeest.org with esmtp (Exim 3.35 #1 (Debian))
	id 18pAHV-00089J-00; Sat, 01 Mar 2003 17:56:13 +0100
From: Mark Wielaard <mark@klomp.org>
To: Archie Cobbs <archie@dellroad.org>
In-Reply-To: <200302280526.h1S5QJiJ066611@arch20m.dellroad.org>
References: <200302280526.h1S5QJiJ066611@arch20m.dellroad.org>
Content-Type: text/plain
Organization: 
Message-Id: <1046537800.19772.320.camel@elsschot>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.2.2 
Date: 01 Mar 2003 17:56:40 +0100
Content-Transfer-Encoding: 7bit
cc: classpath@gnu.org
Subject: Re: java.lang.Class patches
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sat, 01 Mar 2003 16:59:10 -0000

Hi,

On Fri, 2003-02-28 at 06:26, Archie Cobbs wrote:
> Below is a subset of my current set of diffs for java.lang.Class.
> I'm sending them just for anyone to look at and for consideration
> for checking in. I think some of them could be useful for classpath.
> I'd be interested to hear what other people think.

Nice. Thanks. You make a lot of good observations about our VM interface
policies which make me think how to do it better.

> Notes about this patch...
> 
>   - The 'vmData' field is VM specific, ignore that part.
>     A neat idea stolen from SableVM.

If you want to make this more generic then we might want to introduce a
real "VMData" type (a bit like libgcj has its RawData type. It looks
like a normal type, but "normal" code should never touch it (maybe only
to pass it to VM specific methods.

>   - The Class.initialize() method is from SableVM and I like it
>     a lot as it simplifies the work that the JVM has to do for class
>     initialization.  Since initialization is a one time thing it's
>     less important if things are slower. The integer thread ID might
>     need to be generalized to long or byte[] or something.

I would split this (and the native stepX() methods) out into a VMClass
helper class specific to your VM.

>   - Is the Class.forName() patch correct?? I just uncommented
>     the code that was already there but commented out.

Yes, that is how it should work. As a side note: The JikesRVM developers
asked to have a VM dependent VMSecurityManager.getCurrentClassLoader()
which might be (much) more efficient in this case. gcj also has such a
getCurrentClassLoader() method so I think we should do this
(See patch #1031).

>   - getComponentType() became native, this is probably VM specific.
>     Seems like an obvious and easy native method though.

This is another method that I would push into a VMClass helper and keep
the non-native version in Classpath. That makes it easy for VM
implementors to get something working quickly, but which they can
override if they wish for efficiency.

>   - Several of the get*Field*(), get*Method*(), and get*Constructor()
>     methods became non-native. This may make them slower (?) but for me
>     it's worth it because it saves a lot of work in the VM.

I think the tradeoff is nice because it makes clear what a VM
implementor must implemeent (the native*() methods) which makes it just
work. But that they can also override the complete method fi they think
it can be done more efficiently.

Class is a interesting, ehe, class since VMs might want to do a lot of
optimizing for it which makes splitting it into a general Class and
VMClass part interesting.

Cheers,

Mark




From MAILER-DAEMON Sat Mar 01 12:43:47 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18pAy3-0005pq-00
	for mharc-classpath@gnu.org; Sat, 01 Mar 2003 12:40:11 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18pAxV-0005cJ-00
	for classpath@gnu.org; Sat, 01 Mar 2003 12:39:37 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18pAtF-00055w-00
	for classpath@gnu.org; Sat, 01 Mar 2003 12:35:29 -0500
Received: from mail.peakpeak.com ([207.174.178.17] helo=gash2.peakpeak.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18pAsM-0004j8-00
	for classpath@gnu.org; Sat, 01 Mar 2003 12:34:19 -0500
Received: from fleche.redhat.com (tf0101.peakpeak.com [204.144.239.101])
	by gash2.peakpeak.com (8.9.3/8.9.3) with ESMTP id KAA12572;
	Sat, 1 Mar 2003 10:33:28 -0700
Received: by fleche.redhat.com (Postfix, from userid 1000)
	id 625FE4F8610; Sat,  1 Mar 2003 10:24:51 -0700 (MST)
To: Mark Wielaard <mark@klomp.org>
References: <200302271335.37040.konqueror@gmx.de>
	<87vfz51yj1.fsf@fleche.redhat.com>
	<1046517060.19764.124.camel@elsschot>
From: Tom Tromey <tromey@redhat.com>
X-Attribution: Tom
X-Zippy: NOW, I'm supposed to SCRAMBLE two, and HOLD th' MAYO!!
Date: 01 Mar 2003 10:24:51 -0700
In-Reply-To: <1046517060.19764.124.camel@elsschot>
Message-ID: <87el5ryp7g.fsf@fleche.redhat.com>
Lines: 24
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: Michael Koch <konqueror@gmx.de>
cc: classpath@gnu.org
cc: java@gcc.gnu.org
Subject: Re: Miranda methods again (Was: compatibility with jikes ?)
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
Reply-To: tromey@redhat.com
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sat, 01 Mar 2003 17:39:53 -0000

>>>>> "Mark" == Mark Wielaard <mark@klomp.org> writes:

Mark> I vote that we add the Miranda methods explicitly to the
Mark> abstract classes in Classpath that need them.

Don't we only need this to work around gcj bugs?  Maybe this should
only happen in the gcj tree.

In either case, let's mark the methods so we know to remove them
later.

Mark> The reason is that "modern" compilers like jikes (when used with
Mark> -target 1.4) no longer generate them and buggy compilers like
Mark> gcj -C never generated them. But not having those methods for
Mark> the standard classes now makes the serialisation different
Mark> (depends on Declared Methods) and breaks "buggy" VMs (that is
Mark> almost all VMs since till very recently they all depended on the
Mark> compiler generating these Miranda methods).

I think we have to solve serialization problems differently -- by
setting the UID explicitly and having tests.  That seems like the only
approach that will work with all compilers.

Tom



From MAILER-DAEMON Sat Mar 01 12:48:22 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18pB5j-0006ey-00
	for mharc-classpath@gnu.org; Sat, 01 Mar 2003 12:48:07 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18pB5D-0006Yb-00
	for classpath@gnu.org; Sat, 01 Mar 2003 12:47:35 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18pB4I-0006Ob-00
	for classpath@gnu.org; Sat, 01 Mar 2003 12:46:54 -0500
Received: from node1c5f.a2000.nl ([62.108.28.95] helo=nescio.wildebeest.org)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18pB3o-0006Hp-00
	for classpath@gnu.org; Sat, 01 Mar 2003 12:46:08 -0500
Received: from elsschot.wildebeest.org ([192.168.1.26] ident=mark)
	by nescio.wildebeest.org with esmtp (Exim 3.35 #1 (Debian))
	id 18pB2m-0008FD-00; Sat, 01 Mar 2003 18:45:04 +0100
From: Mark Wielaard <mark@klomp.org>
To: tromey@redhat.com
In-Reply-To: <87el5ryp7g.fsf@fleche.redhat.com>
References: <200302271335.37040.konqueror@gmx.de>
	<1046517060.19764.124.camel@elsschot>
	<87el5ryp7g.fsf@fleche.redhat.com>
Content-Type: text/plain
Organization: 
Message-Id: <1046540730.19757.362.camel@elsschot>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.2.2 
Date: 01 Mar 2003 18:45:31 +0100
Content-Transfer-Encoding: 7bit
cc: Michael Koch <konqueror@gmx.de>
cc: classpath@gnu.org
cc: java@gcc.gnu.org
Subject: Re: Miranda methods again (Was: compatibility with jikes ?)
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sat, 01 Mar 2003 17:47:50 -0000

Hi,

On Sat, 2003-03-01 at 18:24, Tom Tromey wrote:
> >>>>> "Mark" == Mark Wielaard <mark@klomp.org> writes:
> 
> Mark> I vote that we add the Miranda methods explicitly to the
> Mark> abstract classes in Classpath that need them.
> 
> Don't we only need this to work around gcj bugs?  Maybe this should
> only happen in the gcj tree.

Nope. There are more VMs that don't work correctly when those Miranda
methods are not declared in an abstract class. And the latest jikes
doesn't automatically generate them anymore.

> In either case, let's mark the methods so we know to remove them
> later.

Certainly.

> Mark> The reason is that "modern" compilers like jikes (when used with
> Mark> -target 1.4) no longer generate them and buggy compilers like
> Mark> gcj -C never generated them. But not having those methods for
> Mark> the standard classes now makes the serialisation different
> Mark> (depends on Declared Methods) and breaks "buggy" VMs (that is
> Mark> almost all VMs since till very recently they all depended on the
> Mark> compiler generating these Miranda methods).
> 
> I think we have to solve serialization problems differently -- by
> setting the UID explicitly and having tests.  That seems like the only
> approach that will work with all compilers.

Sigh. You are probably right. O, how do I hate this stupid Serialization
specification.... :{

Cheers,

Mark




From MAILER-DAEMON Sat Mar 01 12:56:49 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18pBDu-00008o-00
	for mharc-classpath@gnu.org; Sat, 01 Mar 2003 12:56:34 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18pBDO-0008Vu-00
	for classpath@gnu.org; Sat, 01 Mar 2003 12:56:02 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18pBA0-00085C-00
	for classpath@gnu.org; Sat, 01 Mar 2003 12:52:44 -0500
Received: from mail.peakpeak.com ([207.174.178.17] helo=gash2.peakpeak.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18pB9P-0007cP-00
	for classpath@gnu.org; Sat, 01 Mar 2003 12:51:56 -0500
Received: from fleche.redhat.com (tf0101.peakpeak.com [204.144.239.101])
	by gash2.peakpeak.com (8.9.3/8.9.3) with ESMTP id KAA15327;
	Sat, 1 Mar 2003 10:51:07 -0700
Received: by fleche.redhat.com (Postfix, from userid 1000)
	id A21154F8610; Sat,  1 Mar 2003 10:42:30 -0700 (MST)
To: "Jeroen Frijters" <jeroen@sumatra.nl>
References: <5C38B761F205B54BA59FF611A65C624801189D@lembu.sumatrasoftware.com>
From: Tom Tromey <tromey@redhat.com>
X-Attribution: Tom
X-Zippy: This MUST be a good party -- My RIB CAGE is being painfully
 pressed up against someone's MARTINI!!
Date: 01 Mar 2003 10:42:30 -0700
In-Reply-To: <5C38B761F205B54BA59FF611A65C624801189D@lembu.sumatrasoftware.com>
Message-ID: <877kbjyoe1.fsf@fleche.redhat.com>
Lines: 13
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: "Aaron M. Renn" <arenn@urbanophile.com>
cc: classpath@gnu.org
Subject: Re: JNI/CNI Revisited
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
Reply-To: tromey@redhat.com
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sat, 01 Mar 2003 17:56:17 -0000

>>>>> "Jeroen" == Jeroen Frijters <jeroen@sumatra.nl> writes:

Jeroen> I really don't like this model, because it forces the VM into
Jeroen> using a long for the file descriptor. IMHO a better
Jeroen> alternative would be to have instance methods in
Jeroen> java.io.FileDescriptor that call a static native.

I'm curious about this: when would using a long cause problems?  It
seems to me that a native pointer will fit in a long on every
platform.  In your VM, do you need to use an actual GC-visible object
as the file descriptor?

Tom



From MAILER-DAEMON Sat Mar 01 12:57:56 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18pBEv-0000Qy-00
	for mharc-classpath@gnu.org; Sat, 01 Mar 2003 12:57:37 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18pAyK-0005tc-00
	for classpath@gnu.org; Sat, 01 Mar 2003 12:40:28 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18pAxV-0005c8-00
	for classpath@gnu.org; Sat, 01 Mar 2003 12:39:54 -0500
Received: from node1c5f.a2000.nl ([62.108.28.95] helo=nescio.wildebeest.org)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18pAx0-0005Vc-00
	for classpath@gnu.org; Sat, 01 Mar 2003 12:39:06 -0500
Received: from elsschot.wildebeest.org ([192.168.1.26] ident=mark)
	by nescio.wildebeest.org with esmtp (Exim 3.35 #1 (Debian))
	id 18pAw5-0008F4-00; Sat, 01 Mar 2003 18:38:09 +0100
From: Mark Wielaard <mark@klomp.org>
To: Archie Cobbs <archie@dellroad.org>
In-Reply-To: <200302260025.h1Q0PwgG057446@arch20m.dellroad.org>
References: <200302260025.h1Q0PwgG057446@arch20m.dellroad.org>
Content-Type: text/plain
Organization: 
Message-Id: <1046540316.19772.356.camel@elsschot>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.2.2 
Date: 01 Mar 2003 18:38:36 +0100
Content-Transfer-Encoding: 7bit
cc: classpath@gnu.org
Subject: Re: Thoughts on 'reference classes'
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sat, 01 Mar 2003 17:57:21 -0000

Hi,

On Wed, 2003-02-26 at 01:25, Archie Cobbs wrote:
> [ warning, random thoughts below... ]
> 
> I've been working on a new JVM and trying to figure out how
> modify the "vm/reference" classpath classes into something that
> this JVM particular can support.

Fun! Do you have specific needs that non of the current ones fullfill or
do you just like the challenge?

> Something occurred to me while looking at the Java sources under
> vm/reference and reading some messages on this list.
> 
> On the one hand, the 'reference' classes contain many places where
> the particular JVM developer is required or expected to add, subtract,
> or modify the 'reference' Java code to fit that particular JVM.
> >From my point of view this is annoying, because often means I have
> to think hard about how to do something and whether I'm breaking
> some subtle JVM semantics by doing it. But even when it's obvious
> what to do, you still have to create a different version of this
> class which has to be synchronized whenever you update from Classpath.

(Much) better documentation of vm/reference classes would probably help.
We have a VM integration guide, but it hasn't been updated to much (see
http://www.gnu.org/software/classpath/docs/vmintegration.html, source is
in the classpath cvs tree).

But in general the vm/reference classes are meant to be copied
completely and then adapted to your specific VM implementation. We try
to produce default implementations where possible but they are often not
the most optimal for a particular VM.

> For example, VMThrowable.java. While it's clear what the JVM needs
> to do in this case, whatever your JVM, you'll have to do *something*
> with this class if you want to be able to print out exception traces.
> Also, there are lots of other methods that are marked "XXX - Not
> implemented; this requires native help" but are not native methods.
> Why not just make them native so I don't have to modify the file?

The reason to not make this native is that a VM does not have to do
anything really. Exceptions will just work with the default
implementations you just won't have StackTraceElements but that doesn't
seem to be such a big deal (in some environments where there is no
console or user debugging required this might even be the ideal
implementation).

> On the other hand, any proposed changes to the reference classes
> in the interest of making them more 'generally suitable' to the
> widest variety of JVM's, or making them require fewer changes when
> ported to a new JVM, run up against backwards compatibility
> issues, because any such change means some existing JVM somewhere
> will probably have to be adjusted to accomodate.

We are still a very alpha product (0.05) and the VM interface is not
expected to be stable before we reach 1.0. In general when changing a
vm/reference VM interface I try to get it right for gcj and Kissme and
document the change in the NEWS file so when a new release is
distributed VM implementers just go over the NEWS file and change what
is necessary. When the change can be done in java or standard JNI
(Posix) then we can even provide a complete working solution.

> For an example of this, there are lots of places in the reference
> classes that say "this method will be removed in a future version of
> classpath" yet there the method sits.

We might be a bit to soft about this. But mostly these are backward
compatibility methods that just make lives of VM implementers easier if
they want to keep their old infrastructure.

> The tension between these two 'hands' seems to me likely to result
> in a negative effect on the reference code, because you can't easily
> make changes that improve anything. As a result, new JVM implementors
> like me don't get as much value out of the 'reference' code.

Feel free to do suggestions for improvements. Especially when you back
it up with a simple reference implementation (in java or jni) then it
should be easy for other VMs to follow.

> I.e., in my (biased) opinion, ideally the 'reference' classes should
> always reflect the combined wisdom of the Classpath developers'
> about what the best, most correct way is to organize and partition
> the Java code from the native code. If a new way to do something is
> discovered, it should be natural and we should be quick to include
> it in Classpath, even if that changes the Java <-> native API.

I agree. Till we reach 1.0 the VM interface is in flux anyway. And VMs
don't have to follow the Classpath CVS version anyway they can just use
the last release. Brian is doing a good job here making sure that we
have a new release every couple of months (Thansk Brian!).

> What I'd like to suggest is the following (donning flamesuit): the
> goal of the 'reference' code should be explicitly changed so that
> it reflects this 'best guess' at what an 'ideal' set of native
> method classes should look like, and the goal of maintaining support
> for existing JVM's in the 'reference' classes should be dropped.

Sounds good since we currently have just to much cruft from the pre 1.1
days when Japhar was the only supported VM. But only drop old stuff when
we actually have new stuff!

BTW. I don't know if anybody uses Japhar anymore. If so, what version of
Classpath do you use?

It is important though that there is at least one free VM that can at
all times be used with Classpath from CVS. Personally Kissme is my Vm of
choice so I am willing to help John Leuner and Stephen Crawley to keep
that one always up to date with any CVS changes.

I general it is a good idea if anybody that proposes a change for the VM
reference classes makes sure that it makes sense for at least two
somewhat different VMs (say Kissme and gcj, or IKVM.NET and SableVM,
etc).

> In it's place, the existing 'reference' code can be (CVS repository)
> copied into distinct 'vm' subdirectories for each JVM out there
> that currently relies on it. These JVM's can then manage their
> per-JVM classes as they see fit (some may not change anything,
> others may try to migrate toward the 'reference' set).

You mean move old vm/reference classes into the CVS repository of VMs
that actually use them? Agreed, that was how it is supposed to work. But
I think that also new VMs should have this policy.

> Moreover, a second goal for the 'reference' classes should be that it
> is possible for a JVM to be implemented using them without any changes.
> Having methods marked "XXX - Not implemented; this requires native help"
> but not actualy native is neither here nor there.

Don't know if I agree here. Wheter or not a method is marked "native"
does not matter much. Sometimes a method can be implemented "non-native"
by a VM (since it has some other bridging mechanism to the runtime, e.g.
IKVM.NET uses C# library calls, JikesRVM uses "magic" java classes). And
some things just cannot be implemented in a generic fashion, even if one
uses JNI and POSIX like mechanism.

> Hope this makes sense and is not too simplistic a view to take,
> as I'm new to this project. Comments?

Thanks for your enthousiasm, it is contagious :)

Cheers,

Mark




From MAILER-DAEMON Sat Mar 01 13:02:52 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18pBJx-0001JA-00
	for mharc-classpath@gnu.org; Sat, 01 Mar 2003 13:02:49 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18pBJR-0001C7-00
	for classpath@gnu.org; Sat, 01 Mar 2003 13:02:17 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18pBIU-00012E-00
	for classpath@gnu.org; Sat, 01 Mar 2003 13:01:35 -0500
Received: from web10006.mail.yahoo.com ([216.136.130.42])
	by monty-python.gnu.org with smtp (Exim 4.10.13)
	id 18pBI0-0000vD-00
	for classpath@gnu.org; Sat, 01 Mar 2003 13:00:48 -0500
Message-ID: <20030301180022.4405.qmail@web10006.mail.yahoo.com>
Received: from [139.19.20.91] by web10006.mail.yahoo.com via HTTP;
	Sat, 01 Mar 2003 10:00:22 PST
Date: Sat, 1 Mar 2003 10:00:22 -0800 (PST)
From: Dalibor Topic <robilad@yahoo.com>
To: Mark Wielaard <mark@klomp.org>, tromey@redhat.com
In-Reply-To: <1046540730.19757.362.camel@elsschot>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: Michael Koch <konqueror@gmx.de>
cc: classpath@gnu.org
cc: java@gcc.gnu.org
Subject: Re: Miranda methods again (Was: compatibility with jikes ?)
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sat, 01 Mar 2003 18:02:33 -0000


--- Mark Wielaard <mark@klomp.org> wrote:
> Hi,
> 
> On Sat, 2003-03-01 at 18:24, Tom Tromey wrote:
> > >>>>> "Mark" == Mark Wielaard <mark@klomp.org>
> writes:
> > 
> > Mark> I vote that we add the Miranda methods
> explicitly to the
> > Mark> abstract classes in Classpath that need
> them.
> > 
> > Don't we only need this to work around gcj bugs? 
> Maybe this should
> > only happen in the gcj tree.
> 
> Nope. There are more VMs that don't work correctly
> when those Miranda
> methods are not declared in an abstract class. And
> the latest jikes
> doesn't automatically generate them anymore.

yeah, but ... that only help with classpath's classes.
As soon as some third-party jar triggers the miranda
bug, you're back to square one, right? 

I think it would be better to write some docs on how
to fix it. Reminds me that I should fix the miranda
bug in kaffe, btw...

Serialization: I don't think one can get it right
without specifying the serial version ids anyway
because of naming differences of automatically
generated methods in compiler implementations.

cheers,
dalibor topic

__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/



From MAILER-DAEMON Sat Mar 01 13:11:37 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18pBSE-0002cQ-00
	for mharc-classpath@gnu.org; Sat, 01 Mar 2003 13:11:22 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18pBRh-0002Wg-00
	for classpath@gnu.org; Sat, 01 Mar 2003 13:10:49 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18pBMK-0001z7-00
	for classpath@gnu.org; Sat, 01 Mar 2003 13:05:32 -0500
Received: from mail.peakpeak.com ([207.174.178.17] helo=gash2.peakpeak.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18pBM3-0001pL-00
	for classpath@gnu.org; Sat, 01 Mar 2003 13:05:00 -0500
Received: from fleche.redhat.com (tf0101.peakpeak.com [204.144.239.101])
	by gash2.peakpeak.com (8.9.3/8.9.3) with ESMTP id LAA17467;
	Sat, 1 Mar 2003 11:04:27 -0700
Received: by fleche.redhat.com (Postfix, from userid 1000)
	id 4275A4F8611; Sat,  1 Mar 2003 10:55:51 -0700 (MST)
To: John Leuner <jewel@pixie.co.za>
References: <20030227220656.GA27040@urbanophile.com>
	<87r89tusa8.fsf@fleche.redhat.com> <1046464721.387.29.camel@cmalu>
From: Tom Tromey <tromey@redhat.com>
X-Attribution: Tom
X-Zippy: I wish I was a sex-starved manicurist found dead in the Bronx!!
Date: 01 Mar 2003 10:55:51 -0700
In-Reply-To: <1046464721.387.29.camel@cmalu>
Message-ID: <87vfz3x97c.fsf@fleche.redhat.com>
Lines: 23
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: classpath@gnu.org
Subject: Re: The Road to 1.0
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
Reply-To: tromey@redhat.com
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sat, 01 Mar 2003 18:11:05 -0000

>>>>> "John" == John Leuner <jewel@pixie.co.za> writes:

John> It would be nice if someone could write a TODO for the AWT and
John> GTK peers code.

Here's my list:

* Some Java code is missing.  See classpath/1.4 comparison page.
  GridBagLayout is the big one.

* Make sure the tree lock is properly used where required

* Port Gtk+ peer native code to work with Gtk2.

* Implement missing Gtk+ peers.  You can look through the java code
  and see missing stuff pretty easily.

It's not very specific.  You can still find bugs to work on by running
TestAWT and looking for weird behavior.  Assuming I ever got that far,
my plan was to try to find AWT applications to test -- Hans Boehm
already fixed some AWT bugs following that approach.

Tom



From MAILER-DAEMON Sat Mar 01 13:11:54 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18pBSU-0002fn-00
	for mharc-classpath@gnu.org; Sat, 01 Mar 2003 13:11:38 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18pBS3-0002af-00
	for classpath@gnu.org; Sat, 01 Mar 2003 13:11:11 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18pBR7-0002SA-00
	for classpath@gnu.org; Sat, 01 Mar 2003 13:10:30 -0500
Received: from pop2a.ripco.com ([209.100.227.25])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18pBMs-00027d-00
	for classpath@gnu.org; Sat, 01 Mar 2003 13:05:50 -0500
Received: (from arenn@localhost)
	by pop2a.ripco.com (8.11.0/8.11.0) id h21I5nE11294
	for classpath@gnu.org; Sat, 1 Mar 2003 12:05:49 -0600 (CST)
Date: Sat, 1 Mar 2003 12:05:49 -0600
From: "Aaron M. Renn" <arenn@urbanophile.com>
To: classpath@gnu.org
Message-ID: <20030301180549.GA10747@urbanophile.com>
Mail-Followup-To: "Aaron M. Renn" <arenn@urbanophile.com>,
	classpath@gnu.org
References: <20030301043451.GA15439@urbanophile.com>
	<878yvz1vcb.fsf@fleche.redhat.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <878yvz1vcb.fsf@fleche.redhat.com>
User-Agent: Mutt/1.4i
Organization: GNU's Not Unix!
Subject: Re: JNI/CNI Revisited
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sat, 01 Mar 2003 18:11:13 -0000

Tom Tromey (tromey@redhat.com) wrote:
> Aaron> Looking at native methods used to implement FileDescriptor,
> Aaron> FileInputStream, FileOutputStream, and RandomAccessFile (as
> Aaron> well as a quick glance at FileChannel in NIO), I pulled
> Aaron> together a quick list of potential methods as a sort of
> Aaron> provider interface that would do everything but File stuff (so
> Aaron> far).
> 
> This list looks basically the same as what we've got in the libgcj
> FileDescriptor (in some cases your names are clearer).  Nice summary
> btw.

Thanks.  I liked the gcj approach better because it had fewer classes
with native methods.  And a lot of the differences between the two code
sets are of the "six of one, half dozen of the other" variety and I'm
not averse to just adopting the gcj approach in those cases, assuming
it doesn't create too horribly much work :) 
 
> You'll want a static initialization function, too, to set
> FileDescriptor.in, out, and err.  We could also change System to use
> these fields to construct the standard streams, eliminating 3 native
> methods in java.lang.VMSystem.

Right now Classpath just hardcodes these as FD 0, 1, and 2.  Probably
not a good idea.  The nativeInit() method was one I envisioned being
called as part of static initialization a la gcj, and thus it could
set up these values.
 
> Aaron> I'll attach it below.  Because NIO does a lot of the same stuff
> Aaron> as java.io, perhaps sticking this somewhere under the gnu.java
> Aaron> hierarchy would allow both java.io and java.nio to share it.
> 
> Then you have to do security checks in the code, to avoid malicious
> use.  I think one major reason that Mark wanted to put the VM helper
> classes in the packages themselves was so that we could just use the
> language's access protection mechanisms to avoid security issues.
> 
> This may mean some redundancy.  OTOH our native code doesn't have to
> precisely map to the Java API -- we could share code at the native
> layer.

Hmm.  That would be a problem.  And you're right that native code could
easily be shared regardless.  Even now most of the actual Classpath
native methods just delegate to another function that does the real work.
Probably best to keep them in FileDescriptor then.

> Aaron> The immediate problem I see is that gcj uses an instance
> Aaron> variable in FileDescriptor called position to track the current
> Aaron> file position.
> 
> Mark added this recently for performance reasons.  I don't recall what
> program prompted him to make this change.

Interesting that it was done for performance reason.  I thought perhaps
it was becuase we could not always guarantee that we could
determine the current file position without tracking it.  I think
Classpath does something like lseek(fd, 0, SEEK_CUR) but this may not
be portable.

-- 
Aaron M. Renn (arenn@urbanophile.com) http://www.urbanophile.com/arenn/




From MAILER-DAEMON Sat Mar 01 13:17:36 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18pBY1-0003TH-00
	for mharc-classpath@gnu.org; Sat, 01 Mar 2003 13:17:21 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18pBXd-0003N1-00
	for classpath@gnu.org; Sat, 01 Mar 2003 13:16:57 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18pBWe-0003AV-00
	for classpath@gnu.org; Sat, 01 Mar 2003 13:16:12 -0500
Received: from node1c5f.a2000.nl ([62.108.28.95] helo=nescio.wildebeest.org)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18pBW9-00034I-00
	for classpath@gnu.org; Sat, 01 Mar 2003 13:15:25 -0500
Received: from elsschot.wildebeest.org ([192.168.1.26] ident=mark)
	by nescio.wildebeest.org with esmtp (Exim 3.35 #1 (Debian))
	id 18pBV6-0008Ks-00; Sat, 01 Mar 2003 19:14:20 +0100
From: Mark Wielaard <mark@klomp.org>
To: Jeroen Frijters <jeroen@sumatra.nl>
In-Reply-To: <5C38B761F205B54BA59FF611A65C624801188F@lembu.sumatrasoftware.com>
References: 
	 <5C38B761F205B54BA59FF611A65C624801188F@lembu.sumatrasoftware.com>
Content-Type: text/plain
Organization: 
Message-Id: <1046542487.19764.388.camel@elsschot>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.2.2 
Date: 01 Mar 2003 19:14:47 +0100
Content-Transfer-Encoding: 7bit
cc: classpath@gnu.org
Subject: RE: Thoughts on 'reference classes'
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sat, 01 Mar 2003 18:17:04 -0000

Hi,

On Wed, 2003-02-26 at 10:14, Jeroen Frijters wrote:
> I'm a VM implementer too and I have a few comments. One general point
> is that the current GNU Classpath version is 0.05, this suggests that
> it isn't mature yet so I think VM implementers should expect that the
> VM interface isn't yet stable. BTW, personally I think that 0.05 is a
> way too low number for the current state of affairs, but maybe I'm
> just reading too much into the number ;-)

Maybe we should just take the TeX approach and just converge to some
non-rational number like e, so we can say that we are now at version
2.7182 :)

> Some random points (all IMHO):
> * I don't mind changes to the Classpath <-> VM interface, if they
> improve the situation. I'd love to hear what other VM implementers
> have to say about this, but I agree with Archie sometimes there is too
> much inertia.

Note that there also just is the Not Enough Time thing... :{

> * The use of native code should be limited. Preferrably to primitive
> operations that cannot be performed from within Java

What do you exactly mean when you say native code here? Do you mean the
use of JNI code? Or just VM specific interface code?. I don't think we
should restrict it to much.

I believe that if something cannot be done in Java, but can be done
through JNI (+POSIX) then GNU Classpath should provide a native
(reference) implementation.

Also when something can be done in java, but there is an possibility for
the VM to do something more efficient (like for example the
getCurrentClass(Loader) methods) then they should be moved into the VM
interface code (with a default java implementation so VM implementers
don't have to implement them "natively" if they don't want to).

> * I really like Mark's approach of introducing the VMxxx classes. The
> interface between xxx and VMxxx should be well defined and we should
> try to minimize changes too it, but we also have to recognize that
> this is a hard problem. Not all VMs have the same
> requirements/trade-offs.

Glad you like it. It is really meant to make the differences between
implementing the VM interface in either java, JNI, CNI, C# or even
Active Oberon - see http://www.oberon.ethz.ch/jaos/overview.html - more
transparent. I want to use it much more (in principle for everything
that is JNI/CNI/VM specific) but just don't have enough time...

> And finally, here is an example of how some of the requirements can be
> very different: My VM (http://ikvm.net) is built on top of .NET, so I
> want to use the .NET class libraries for I/O [...]

That is why I like IKVM.NET so much. It is just so weird ;)

BTW. Are you going to point people to the latest Mono 0.20 release notes
anytime soon? You really should shout this from the highest roof you can
find. Hint, hint...

Cheers,

Mark

P.S Why the HTML email with font size=tiny?
Did someone complain that they couldn't read the plain text version?




From MAILER-DAEMON Sat Mar 01 13:17:52 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18pBYG-0003WQ-00
	for mharc-classpath@gnu.org; Sat, 01 Mar 2003 13:17:36 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18pBKN-0001QI-00
	for classpath@gnu.org; Sat, 01 Mar 2003 13:03:15 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18pBJV-0001CE-00
	for classpath@gnu.org; Sat, 01 Mar 2003 13:02:34 -0500
Received: from ms-smtp-02.southeast.rr.com ([24.93.67.83])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18pBIx-00013m-00
	for classpath@gnu.org; Sat, 01 Mar 2003 13:01:47 -0500
Received: from mail3.nc.rr.com (fe3 [24.93.67.50])h21Hxlo5008029;
	Sat, 1 Mar 2003 12:59:47 -0500 (EST)
Received: from lyta.haphazard.org ([66.57.9.48]) by mail3.nc.rr.com  with
	Microsoft SMTPSVC(5.5.1877.757.75);	 Sat, 1 Mar 2003 12:59:16 -0500
Received: by lyta.haphazard.org (Postfix, from userid 500)
	id 5D0B3BEA92; Sat,  1 Mar 2003 13:01:09 -0500 (EST)
Sender: cbj@haphazard.org
To: Mark Wielaard <mark@klomp.org>
References: <200302280526.h1S5QJiJ066611@arch20m.dellroad.org>
	<1046537800.19772.320.camel@elsschot>
From: Brian Jones <cbj@gnu.org>
Date: 01 Mar 2003 13:01:09 -0500
In-Reply-To: <1046537800.19772.320.camel@elsschot>
Message-ID: <m3znofhspm.fsf@lyta.haphazard.org>
Lines: 20
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: classpath@gnu.org
Subject: Re: java.lang.Class patches
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sat, 01 Mar 2003 18:17:04 -0000

Mark Wielaard <mark@klomp.org> writes:

> Hi,
> 
> On Fri, 2003-02-28 at 06:26, Archie Cobbs wrote:
> > Below is a subset of my current set of diffs for java.lang.Class.
> > I'm sending them just for anyone to look at and for consideration
> > for checking in. I think some of them could be useful for classpath.
> > I'd be interested to hear what other people think.
> 
> Nice. Thanks. You make a lot of good observations about our VM interface
> policies which make me think how to do it better.

Mark, are you just commenting or will you be able to commit what you
and Archie are thinking about to CVS?  Just need to know if I should
keep this in my queue of things to look at.

Brian
-- 
Brian Jones <cbj@gnu.org>



From MAILER-DAEMON Sat Mar 01 13:28:54 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18pBix-0004hm-00
	for mharc-classpath@gnu.org; Sat, 01 Mar 2003 13:28:39 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18pBaO-0003uY-00
	for classpath@gnu.org; Sat, 01 Mar 2003 13:19:48 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18pBSX-0002gK-00
	for classpath@gnu.org; Sat, 01 Mar 2003 13:11:57 -0500
Received: from pop2a.ripco.com ([209.100.227.25])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18pBS2-0002Yj-00
	for classpath@gnu.org; Sat, 01 Mar 2003 13:11:10 -0500
Received: (from arenn@localhost)
	by pop2a.ripco.com (8.11.0/8.11.0) id h21IB9V11425
	for classpath@gnu.org; Sat, 1 Mar 2003 12:11:10 -0600 (CST)
Date: Sat, 1 Mar 2003 12:11:09 -0600
From: "Aaron M. Renn" <arenn@urbanophile.com>
To: classpath@gnu.org
Message-ID: <20030301181109.GB10747@urbanophile.com>
Mail-Followup-To: "Aaron M. Renn" <arenn@urbanophile.com>,
	classpath@gnu.org
References: <5C38B761F205B54BA59FF611A65C624801189D@lembu.sumatrasoftware.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <5C38B761F205B54BA59FF611A65C624801189D@lembu.sumatrasoftware.com>
User-Agent: Mutt/1.4i
Organization: GNU's Not Unix!
Subject: Re: JNI/CNI Revisited
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sat, 01 Mar 2003 18:28:22 -0000

Jeroen Frijters (jeroen@sumatra.nl) wrote:
> >   void nativeSync(long fd) throws SyncFailedException
> 
> I really don't like this model, because it forces the VM into using a
> long for the file descriptor. IMHO a better alternative would be to have
> instance methods in java.io.FileDescriptor that call a static native.
> 
> class FileDescriptor
> {
>   private long fd;
> 
>   void sync() {
>     nativeSync(fd);
>   }
> 
>   private static native void nativeSync(long fd);
> }
> 
> This allows VMs (such as mine) that don't use an integer as a file
> handle, to replace FileDescriptor with a different implementation, but
> leave all other i/o classes as is.
> 
> There is a tiny overhead in this approach, but I think it is worth it
> (but then, I'm biased ;-)).

Can you explain this further?  I'm not clear on the problem, exactly.
In your example, everything is still long.  If you changed your instance
variable to an int, I don't know what that buys us.

For cases where we might have architectures that don't use traditional
file descriptors or require storing lots of state information, my
thought was that the long fd value just becomes a handle you use to
access native information.  I believe that somewhere in the bowels
of Classpath, there is a library of helper functions for doing this.
In really offbeat cases, there may be no alternative to but replace
FileDescriptor completely.

-- 
Aaron M. Renn (arenn@urbanophile.com) http://www.urbanophile.com/arenn/




From MAILER-DAEMON Sat Mar 01 13:35:24 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18pBpF-0005Ca-00
	for mharc-classpath@gnu.org; Sat, 01 Mar 2003 13:35:09 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18pBoi-00058I-00
	for classpath@gnu.org; Sat, 01 Mar 2003 13:34:36 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18pBgl-0004az-00
	for classpath@gnu.org; Sat, 01 Mar 2003 13:26:39 -0500
Received: from node1c5f.a2000.nl ([62.108.28.95] helo=nescio.wildebeest.org)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18pBaA-0003pj-00; Sat, 01 Mar 2003 13:19:34 -0500
Received: from elsschot.wildebeest.org ([192.168.1.26] ident=mark)
	by nescio.wildebeest.org with esmtp (Exim 3.35 #1 (Debian))
	id 18pBZ3-0008L8-00; Sat, 01 Mar 2003 19:18:25 +0100
From: Mark Wielaard <mark@klomp.org>
To: Brian Jones <cbj@gnu.org>
In-Reply-To: <m3znofhspm.fsf@lyta.haphazard.org>
References: <200302280526.h1S5QJiJ066611@arch20m.dellroad.org>
	<m3znofhspm.fsf@lyta.haphazard.org>
Content-Type: text/plain
Organization: 
Message-Id: <1046542732.19757.392.camel@elsschot>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.2.2 
Date: 01 Mar 2003 19:18:52 +0100
Content-Transfer-Encoding: 7bit
cc: classpath@gnu.org
Subject: Re: java.lang.Class patches
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sat, 01 Mar 2003 18:34:52 -0000

Hi,

On Sat, 2003-03-01 at 19:01, Brian Jones wrote:
> Mark Wielaard <mark@klomp.org> writes: 
> > On Fri, 2003-02-28 at 06:26, Archie Cobbs wrote:
> > > Below is a subset of my current set of diffs for java.lang.Class.
> > > I'm sending them just for anyone to look at and for consideration
> > > for checking in. I think some of them could be useful for classpath.
> > > I'd be interested to hear what other people think.
> > 
> > Nice. Thanks. You make a lot of good observations about our VM interface
> > policies which make me think how to do it better.
> 
> Mark, are you just commenting or will you be able to commit what you
> and Archie are thinking about to CVS?  Just need to know if I should
> keep this in my queue of things to look at.

Just commenting for now (first need to go through a lot of - very
interesting - email of that last week. I was a bit sick so I missed all
the excitement). I hoped that Archie would push another patch when he
thinks it is ready. But there are certainly parts that we should try to
absorb into CVS.

Cheers,

Mark




From MAILER-DAEMON Sat Mar 01 13:40:00 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18pBte-00061l-00
	for mharc-classpath@gnu.org; Sat, 01 Mar 2003 13:39:42 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18pBt8-0005tE-00
	for classpath@gnu.org; Sat, 01 Mar 2003 13:39:10 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18pBq9-0005LO-00
	for classpath@gnu.org; Sat, 01 Mar 2003 13:36:22 -0500
Received: from node1c5f.a2000.nl ([62.108.28.95] helo=nescio.wildebeest.org)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18pBod-00055t-00; Sat, 01 Mar 2003 13:34:31 -0500
Received: from elsschot.wildebeest.org ([192.168.1.26] ident=mark)
	by nescio.wildebeest.org with esmtp (Exim 3.35 #1 (Debian))
	id 18pBnW-0008LV-00; Sat, 01 Mar 2003 19:33:22 +0100
From: Mark Wielaard <mark@klomp.org>
To: Brian Jones <cbj@gnu.org>
In-Reply-To: <m365r5s2ep.fsf@lyta.haphazard.org>
References: 
	 <5C38B761F205B54BA59FF611A65C624801188F@lembu.sumatrasoftware.com>
	 <m365r5s2ep.fsf@lyta.haphazard.org>
Content-Type: text/plain
Organization: 
Message-Id: <1046543629.19757.404.camel@elsschot>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.2.2 
Date: 01 Mar 2003 19:33:49 +0100
Content-Transfer-Encoding: 7bit
cc: Jeroen Frijters <jeroen@sumatra.nl>
cc: classpath@gnu.org
Subject: Re: Thoughts on 'reference classes'
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sat, 01 Mar 2003 18:39:26 -0000

Hi,

On Fri, 2003-02-28 at 00:57, Brian Jones wrote:
> Some degree of control needs to be exercised over the reference
> interface or nothing would ever work with Classpath CVS and JVM
> implementors might not enjoy tracking a rapidly moving target.

Yeah. We need some guidelines on how to introduce new VM interfaces..
But currently the VM interface is clearly suboptimal and very focused on
JNI based VMs. We now have VMs that use much different approaches for
interfacing the VM with their own runtime environment (see the
JNI/CNI/C#/Active Oberon/etc. list of my previous email). So just
deeclaring something native and saying that it should be implemented by
the VM is not enough anymore.

> > This is why I really like the native methods to live in a VMxxx class,
> > because that way I can choose to implement the method inline and still
> > retain the ability to keep using the latest Classpath code (except for
> > the vm/reference classes) as long as the interface between the xxx and
> > VMxxx classes remains stable.
> 
> To make it more clear, perhaps things that are "native" that we
> provide implementations for should be moved to some other type of
> interface scheme such as NativeXXX instead of VMXXX.  Putting these
> things in VMXXX makes it terribly unclear what needs to be implemented
> by a JVM and what is "optional".  Opinions?

I don't know about a better name. But we might want to differientate
between:

- VMData -> is as big as a normal object reference but special from the
point of view of the VM (like RawData in gcj), should never be
manipulated from
- VMState -> Helper class that holds all state a VM needs to hold for a
particular object (guaranteed to be one-on-one with the actual instance
of the object it belongs to).
- VMInterface -> Collection of static (native) callback methods the VM
and Classpath use to transfer control/state to each other.

Maybe this isn't the best categorization, but I think it captures the
intent of the different uses of the VM interface.

Cheers,

Mark




From MAILER-DAEMON Sat Mar 01 14:02:09 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18pCF8-0000E8-00
	for mharc-classpath@gnu.org; Sat, 01 Mar 2003 14:01:54 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18pBze-00076J-00
	for classpath@gnu.org; Sat, 01 Mar 2003 13:45:54 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18pByb-0006tY-00
	for classpath@gnu.org; Sat, 01 Mar 2003 13:45:05 -0500
Received: from node1c5f.a2000.nl ([62.108.28.95] helo=nescio.wildebeest.org)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18pBy7-0006jk-00
	for classpath@gnu.org; Sat, 01 Mar 2003 13:44:19 -0500
Received: from elsschot.wildebeest.org ([192.168.1.26] ident=mark)
	by nescio.wildebeest.org with esmtp (Exim 3.35 #1 (Debian))
	id 18pBww-0008Lr-00; Sat, 01 Mar 2003 19:43:06 +0100
From: Mark Wielaard <mark@klomp.org>
To: tromey@redhat.com
In-Reply-To: <87znohut2p.fsf@fleche.redhat.com>
References: 
	<5C38B761F205B54BA59FF611A65C624801188F@lembu.sumatrasoftware.com>
	<20030228004058.GA5287@urbanophile.com>
	<87znohut2p.fsf@fleche.redhat.com>
Content-Type: text/plain
Organization: 
Message-Id: <1046544213.19772.412.camel@elsschot>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.2.2 
Date: 01 Mar 2003 19:43:33 +0100
Content-Transfer-Encoding: 7bit
cc: "Aaron M. Renn" <arenn@urbanophile.com>
cc: classpath@gnu.org
Subject: Re: Thoughts on 'reference classes'
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sat, 01 Mar 2003 19:01:30 -0000

Hi,

On Fri, 2003-02-28 at 01:50, Tom Tromey wrote:
> >>>>> "Aaron" == Aaron M Renn <arenn@urbanophile.com> writes:
> Aaron> o Figure out the JNI/CNI situation and merge the native
> Aaron> backends with gcj.
> 
> I don't think we should let this hold up Classpath 1.0.  libgcj will
> probably continue to have some divergences with Classpath for quite
> some time.  The CNI thing is just part of it.  In other places we have
> divergences for performance reasons (see ResourceBundle) or due to how
> our VM is implemented (see Reference).

I agree with Tom here. I think it is best if GNU Classpath sticks with
providing only a JNI/POSIX/C based native reference implementation. We
just need to define the VMNative/Interface parts well enough for 1.0 to
make a CNI/C#/Java/WhatEver implementation easy. Then if people want a
CNI implementation of those VMInterface classes they can just look at
the libgcj implementation.

I think that ResourceBundle is a good candidate for introducing a
VMResourceBundle class that defines the (callback) methods that a VM
might want to implement for optimization (Classpath would supply a
default java based implementation).

Cheers,

Mark




From MAILER-DAEMON Sat Mar 01 14:09:29 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18pCME-0001NC-00
	for mharc-classpath@gnu.org; Sat, 01 Mar 2003 14:09:14 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18pCJ9-00018u-00
	for classpath@gnu.org; Sat, 01 Mar 2003 14:06:03 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18pC4S-0007i7-00
	for classpath@gnu.org; Sat, 01 Mar 2003 13:51:08 -0500
Received: from node1c5f.a2000.nl ([62.108.28.95] helo=nescio.wildebeest.org)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18pC35-0007PO-00; Sat, 01 Mar 2003 13:49:27 -0500
Received: from elsschot.wildebeest.org ([192.168.1.26] ident=mark)
	by nescio.wildebeest.org with esmtp (Exim 3.35 #1 (Debian))
	id 18pC1b-0008Lz-00; Sat, 01 Mar 2003 19:47:55 +0100
From: Mark Wielaard <mark@klomp.org>
To: tromey@redhat.com
In-Reply-To: <87adghunps.fsf@fleche.redhat.com>
References: 
	<5C38B761F205B54BA59FF611A65C624801188F@lembu.sumatrasoftware.com>
	<874r6pw7ra.fsf@fleche.redhat.com><87adghunps.fsf@fleche.redhat.com>
Content-Type: text/plain
Organization: 
Message-Id: <1046544501.19773.417.camel@elsschot>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.2.2 
Date: 01 Mar 2003 19:48:21 +0100
Content-Transfer-Encoding: 7bit
cc: Jeroen Frijters <jeroen@sumatra.nl>
cc: classpath@gnu.org
cc: Brian Jones <cbj@gnu.org>
Subject: Re: Thoughts on 'reference classes'
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sat, 01 Mar 2003 19:08:57 -0000

Hi,

On Fri, 2003-02-28 at 03:46, Tom Tromey wrote:
> >>>>> "Brian" == Brian Jones <cbj@gnu.org> writes:
> 
> Brian> Windows POSIX API has both 'int' and 'long' versions of the
> Brian> file I/O functions or I should say 32bit vs 64bit.
> 
> I think we were just talking about the file descriptor representation.
> In Windows I think this is a pointer.
> 
> The libgcj FileDescriptor is already set up to allow 64-bit file
> contents.  The various methods use `long' arguments for lengths of
> things, e.g.:
> 
>   native void setLength (long pos) throws IOException;

But to make it really transparent this method, the platform file
desciptor field and anything else that is dependent on the
representation of the "native" file descriptor should be moved into a
VMFileDescriptor class. Then it can also be used by for by example
IKVM.NET that want to reuse the file descriptor concept of the C#
standard library.

Cheers,

Mark




From MAILER-DAEMON Sat Mar 01 14:16:50 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18pCTJ-00031R-00
	for mharc-classpath@gnu.org; Sat, 01 Mar 2003 14:16:33 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18pCSg-0002ol-00
	for classpath@gnu.org; Sat, 01 Mar 2003 14:15:54 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18pCRk-0002ZH-00
	for classpath@gnu.org; Sat, 01 Mar 2003 14:15:12 -0500
Received: from node1c5f.a2000.nl ([62.108.28.95] helo=nescio.wildebeest.org)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18pCK3-0001ER-00; Sat, 01 Mar 2003 14:07:00 -0500
Received: from elsschot.wildebeest.org ([192.168.1.26] ident=mark)
	by nescio.wildebeest.org with esmtp (Exim 3.35 #1 (Debian))
	id 18pCFm-0008Qu-00; Sat, 01 Mar 2003 20:02:34 +0100
From: Mark Wielaard <mark@klomp.org>
To: Stephen Crawley <crawley@dstc.edu.au>
In-Reply-To: <200302280317.h1S3Hb8b005162@piglet.dstc.edu.au>
References: <200302280317.h1S3Hb8b005162@piglet.dstc.edu.au>
Content-Type: text/plain
Organization: 
Message-Id: <1046545380.19757.429.camel@elsschot>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.2.2 
Date: 01 Mar 2003 20:03:00 +0100
Content-Transfer-Encoding: 7bit
cc: crawley@piglet.dstc.edu.au
cc: classpath@gnu.org
cc: Brian Jones <cbj@gnu.org>
Subject: Re: Thoughts on 'reference classes'
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sat, 01 Mar 2003 19:16:11 -0000

Hi,

On Fri, 2003-02-28 at 04:17, Stephen Crawley wrote:
> Speaking as the most active Kissme maintainer, and the one on whose
> shoulders the work will fall, I'm wary of changes to the reference 
> classes and the native APIs they use.  It represents short term /
> high priority work ... and I'd prefer to be doing things that make
> Kissme more usable.

I am certainly willing to help make sure that Kissme will stay useable
with current CVS. I am always using it when hacking on Classpath (or
even libgcj) to make sure that I don't break things.

> We maintain own version of the VM reference classes that need to be
> different for Kissme.  They live in the Kissme CVS repository, and
> we don't intend to check them into the Classpath CVS repository.  We
> handle integration by putting a ZIP file of Kissme specific classes
> on the bootstrap classpath, ahead of the Classpath JAR file.

This is how I think all VMs should do it BTW.

> Historically, Kissme's VM classes came from an old version of Classpath
> ... well before the split between core and vm/ reference classes.  We
> probably have too many (unnecessary) Kissme-specific classes, which
> means that we don't benefit from some bug fixes made in Classpath.
> 
> When you say:
> 
>   "and the goal of maintaining support for existing JVM's in 
>    the 'reference' classes should be dropped"
> 
> ... I have to disagree.  I'm prepared to wear some migration cost for
> adapting Kissme to changes in the Classpath vm reference classes and
> APIs.  However, if the Classpath development process does not take
> account of the ongoing support for old JVMs, those will stop working
> or the they will get stuck on an old version of Classpath.  [This
> happened to Kissme in the past, until we changed the build process
> to work against a pristine Classpath checkout.  It has apparently
> also happened to the current version of SableVM.]

Hopefully some of the things that are now in your specific VM reference
version (like e.g. Runtime, which Classpath doesn't currently provide an
native reference implemenentation for) can be moved into the Classpath
reference implementation if you want to donate them.

I think the problem with SableVM is that it has its completely own build
system. That makes updating to newer versions of Classpath very hard. I
used to use sablevm but since it didn't keep up with CVS I stopped using
it. Adapting the build process such as Kissme has done so you can track
CVS changes easily (if they are not to big of a change to the VM
interface) has been really helpfull. Thanks.

Cheers,

Mark




From MAILER-DAEMON Sat Mar 01 14:27:46 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18pCdq-00058A-00
	for mharc-classpath@gnu.org; Sat, 01 Mar 2003 14:27:26 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18pCdJ-0004yp-00
	for classpath@gnu.org; Sat, 01 Mar 2003 14:26:53 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18pCcN-0004np-00
	for classpath@gnu.org; Sat, 01 Mar 2003 14:26:11 -0500
Received: from node1c5f.a2000.nl ([62.108.28.95] helo=nescio.wildebeest.org)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18pCbt-0004gn-00
	for classpath@gnu.org; Sat, 01 Mar 2003 14:25:25 -0500
Received: from elsschot.wildebeest.org ([192.168.1.26] ident=mark)
	by nescio.wildebeest.org with esmtp (Exim 3.35 #1 (Debian))
	id 18pCau-0008RP-00; Sat, 01 Mar 2003 20:24:24 +0100
From: Mark Wielaard <mark@klomp.org>
To: "Aaron M. Renn" <arenn@urbanophile.com>
In-Reply-To: <20030227031901.GA7122@urbanophile.com>
References: <20030227031901.GA7122@urbanophile.com>
Content-Type: text/plain
Organization: 
Message-Id: <1046546691.19773.449.camel@elsschot>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.2.2 
Date: 01 Mar 2003 20:24:51 +0100
Content-Transfer-Encoding: 7bit
cc: classpath@gnu.org
Subject: Re: Classpath / GCJ java.io Merge
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sat, 01 Mar 2003 19:27:09 -0000

Hi,

On Thu, 2003-02-27 at 04:19, Aaron M. Renn wrote:
> Hi.  I've been looking at the Classpath / GCJ merge status here:
> 
> http://gcc.gnu.org/java/libgcj-classpath-compare.html

BTW Tom, when are you going to enable the automatic updater of that
page? It is already a bit out of sync with reality again.

> For #2, it seems that the answer is to switch to NIO.  I hear that the
> Classpath version is not yet functional however.

Jesse Rosenstock <jmr@ugcs.caltech.edu> has been working on this. It
should be API complete (in libgcj at least) and he was looking at
converting the gnu.gcj.convert iconv support to it so String could use
java.nio.charset for getBytes() and such methods.

I recently looked at the char conversion code of libgcj and although it
is nicer then the Classpath one it isn't optimal. James Clark recently
found a bug in it that shows up when a converter cannot make progress
anymore because the output buffer was full and the input buffer was
empty. You need a way to signal both these conditions. java.nio.charset
gives you that support from the start. See thread starting:
http://gcc.gnu.org/ml/java-patches/2003-q1/msg00532.html

> For #1, I have no idea what has been decided regarding native code.
> Last I checked, we still had a JNI/CNI deadlock going on.

We have to go for the setup that libgcj uses (delegate actual file
access to the package local methods of FileDescriptor). Classpath has a
problem with the ownership of the file descriptor. See the description
of Jeroen Frijters here (and how I dropped the ball on the issue by
saying that I would look into it soon...):
http://mail.gnu.org/archive/html/classpath/2002-07/msg00012.html

Cheers,

Mark




From MAILER-DAEMON Sat Mar 01 15:06:40 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18pDFC-0004Vo-00
	for mharc-classpath@gnu.org; Sat, 01 Mar 2003 15:06:02 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18pDEg-0004Ie-00
	for classpath@gnu.org; Sat, 01 Mar 2003 15:05:30 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18pDDc-0003yv-00
	for classpath@gnu.org; Sat, 01 Mar 2003 15:04:41 -0500
Received: from mail.peakpeak.com ([207.174.178.17] helo=gash2.peakpeak.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18pDD7-0003ki-00
	for classpath@gnu.org; Sat, 01 Mar 2003 15:03:53 -0500
Received: from fleche.redhat.com (tf0101.peakpeak.com [204.144.239.101])
	by gash2.peakpeak.com (8.9.3/8.9.3) with ESMTP id NAA27053;
	Sat, 1 Mar 2003 13:03:19 -0700
Received: by fleche.redhat.com (Postfix, from userid 1000)
	id AB7494F8610; Sat,  1 Mar 2003 12:54:43 -0700 (MST)
To: Mark Wielaard <mark@klomp.org>
References: <20030227031901.GA7122@urbanophile.com>
	<1046546691.19773.449.camel@elsschot>
From: Tom Tromey <tromey@redhat.com>
X-Attribution: Tom
X-Zippy: After THIS, let's go to PHILADELPHIA and have TRIPLETS!!
Date: 01 Mar 2003 12:54:43 -0700
In-Reply-To: <1046546691.19773.449.camel@elsschot>
Message-ID: <87ptpayi9o.fsf@fleche.redhat.com>
Lines: 22
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: "Aaron M. Renn" <arenn@urbanophile.com>
cc: classpath@gnu.org
Subject: Re: Classpath / GCJ java.io Merge
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
Reply-To: tromey@redhat.com
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sat, 01 Mar 2003 20:05:46 -0000

>>>>> "Mark" == Mark Wielaard <mark@klomp.org> writes:

>> http://gcc.gnu.org/java/libgcj-classpath-compare.html

Mark> BTW Tom, when are you going to enable the automatic updater of that
Mark> page? It is already a bit out of sync with reality again.

I'll try to do it soon.  I wanted to get the nightly build stuff set
up first (now done) and let it run for a while to iron out any
problems (also done).

Mark> I recently looked at the char conversion code of libgcj and
Mark> although it is nicer then the Classpath one it isn't
Mark> optimal. James Clark recently found a bug in it that shows up
Mark> when a converter cannot make progress anymore because the output
Mark> buffer was full and the input buffer was empty.

Yeah, we've run into bugs in this from time to time.  There is also PR
libgcj/1379 -- the libgcj converters have no way to signal that
something has gone wrong.

Tom



From MAILER-DAEMON Sat Mar 01 15:19:36 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18pDS4-0001wh-00
	for mharc-classpath@gnu.org; Sat, 01 Mar 2003 15:19:20 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18pDRY-0001cK-00
	for classpath@gnu.org; Sat, 01 Mar 2003 15:18:48 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18pDQf-0001Ke-00
	for classpath@gnu.org; Sat, 01 Mar 2003 15:18:10 -0500
Received: from mail.peakpeak.com ([207.174.178.17] helo=gash2.peakpeak.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18pDQA-000187-00
	for classpath@gnu.org; Sat, 01 Mar 2003 15:17:22 -0500
Received: from fleche.redhat.com (tf0101.peakpeak.com [204.144.239.101])
	by gash2.peakpeak.com (8.9.3/8.9.3) with ESMTP id NAA29154;
	Sat, 1 Mar 2003 13:16:56 -0700
Received: by fleche.redhat.com (Postfix, from userid 1000)
	id BBE484F8610; Sat,  1 Mar 2003 13:08:20 -0700 (MST)
To: "Aaron M. Renn" <arenn@urbanophile.com>
References: <20030227031901.GA7122@urbanophile.com>
	<87y941zjax.fsf@fleche.redhat.com>
	<20030227183741.GB14675@urbanophile.com>
From: Tom Tromey <tromey@redhat.com>
X-Attribution: Tom
X-Zippy: Should I start with the time I SWITCHED personalities with a BEATNIK
 hair stylist or my failure to refer five TEENAGERS to a good OCULIST?
Date: 01 Mar 2003 13:08:20 -0700
In-Reply-To: <20030227183741.GB14675@urbanophile.com>
Message-ID: <87llzyyhmz.fsf@fleche.redhat.com>
Lines: 41
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: classpath@gnu.org
Subject: Re: Classpath / GCJ java.io Merge
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
Reply-To: tromey@redhat.com
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sat, 01 Mar 2003 20:19:03 -0000

>>>>> "Aaron" == Aaron M Renn <arenn@urbanophile.com> writes:

[ DataOutputStream ]

Aaron> Those shared methods can die, IMO.  They don't do much.  The
Aaron> allocation is an interesting point.  Classpath does it to avoid
Aaron> doing what gcj does: namely do tons of single byte writes.
Aaron> This would be hideously expensive in the JNI world.  Is
Aaron> allocation still a problem?

For me the swaying argument is that if there is a lot of allocation
inside the class, the user can't do anything about it.  But if there
are too many short writes, he can add a buffer.

In private mail (Aaron and I have had a conversation about this
off-list) I said that the performance of DataInputStream and
DataOutputStream probably doesn't matter.  But while looking elsewhere
today I found that serialization uses these classes.  So maybe
performance here is important.

We could always add a `byte[8]' buffer to these classes.
Synchronization isn't that expensive.  Or, for DataInputStream, we
could just leave it unsynchronized, like libgcj currently does -- I
don't know when it would make sense for two threads to read from a
DataInputStream.

>> For PrintStream it looks like there were conflicting goals.  From
>> libgcj:

Aaron> Hmm.  I kinda liked the Classpath approach, assuming it's
Aaron> actually a valid implementation strategy, because I'm lazy by
Aaron> nature.

Yeah, me too.  And I dislike duplication.

I notice the libgcj implementation routes everything through the
print(...,boolean) methods in PrintStream.  Presumably this is to make
it easier to subclass.  I haven't looked to see whether this behavior
is specified.

Tom



From MAILER-DAEMON Sat Mar 01 15:24:12 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18pDWX-0003KY-00
	for mharc-classpath@gnu.org; Sat, 01 Mar 2003 15:23:57 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18pDW1-0003Ch-00
	for classpath@gnu.org; Sat, 01 Mar 2003 15:23:25 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18pDV6-000314-00
	for classpath@gnu.org; Sat, 01 Mar 2003 15:22:44 -0500
Received: from mail.peakpeak.com ([207.174.178.17] helo=gash2.peakpeak.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18pDUc-0002rf-00
	for classpath@gnu.org; Sat, 01 Mar 2003 15:21:58 -0500
Received: from fleche.redhat.com (tf0101.peakpeak.com [204.144.239.101])
	by gash2.peakpeak.com (8.9.3/8.9.3) with ESMTP id NAA29829;
	Sat, 1 Mar 2003 13:21:21 -0700
Received: by fleche.redhat.com (Postfix, from userid 1000)
	id 9B70B4F8610; Sat,  1 Mar 2003 13:12:46 -0700 (MST)
To: "Aaron M. Renn" <arenn@urbanophile.com>
References: <20030301043451.GA15439@urbanophile.com>
	<878yvz1vcb.fsf@fleche.redhat.com>
	<20030301180549.GA10747@urbanophile.com>
From: Tom Tromey <tromey@redhat.com>
X-Attribution: Tom
X-Zippy: My pants just went to high school in the Carlsbad Caverns!!!
Date: 01 Mar 2003 13:12:46 -0700
In-Reply-To: <20030301180549.GA10747@urbanophile.com>
Message-ID: <87heamyhfl.fsf@fleche.redhat.com>
Lines: 23
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: classpath@gnu.org
Subject: Re: JNI/CNI Revisited
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
Reply-To: tromey@redhat.com
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sat, 01 Mar 2003 20:23:41 -0000

>>>>> "Aaron" == Aaron M Renn <arenn@urbanophile.com> writes:

Aaron> Right now Classpath just hardcodes these as FD 0, 1, and 2.
Aaron> Probably not a good idea.  The nativeInit() method was one I
Aaron> envisioned being called as part of static initialization a la
Aaron> gcj, and thus it could set up these values.

For some reason I assumed your `nativeInit' method had to do with
initializing an instance -- but of course open() can be used for that.

Aaron> Interesting that it was done for performance reason.  I thought
Aaron> perhaps it was becuase we could not always guarantee that we
Aaron> could determine the current file position without tracking it.
Aaron> I think Classpath does something like lseek(fd, 0, SEEK_CUR)
Aaron> but this may not be portable.

Here's the thread:

    http://gcc.gnu.org/ml/java-patches/2003-q1/msg00013.html

We were doing 3 lseek()s per FileDescriptor.seek operation.

Tom



From MAILER-DAEMON Sat Mar 01 15:37:49 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18pDjf-00081T-00
	for mharc-classpath@gnu.org; Sat, 01 Mar 2003 15:37:31 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18pDj8-0007tt-00
	for classpath@gnu.org; Sat, 01 Mar 2003 15:36:58 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18pDeA-0006qY-00
	for classpath@gnu.org; Sat, 01 Mar 2003 15:32:06 -0500
Received: from mail.peakpeak.com ([207.174.178.17] helo=gash2.peakpeak.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18pDdi-0006dx-00
	for classpath@gnu.org; Sat, 01 Mar 2003 15:31:22 -0500
Received: from fleche.redhat.com (tf0101.peakpeak.com [204.144.239.101])
	by gash2.peakpeak.com (8.9.3/8.9.3) with ESMTP id NAA01204;
	Sat, 1 Mar 2003 13:30:55 -0700
Received: by fleche.redhat.com (Postfix, from userid 1000)
	id 5408E4F8610; Sat,  1 Mar 2003 13:22:20 -0700 (MST)
To: "Aaron M. Renn" <arenn@urbanophile.com>
References: <20030301043451.GA15439@urbanophile.com>
	<878yvz1vcb.fsf@fleche.redhat.com>
	<20030301180549.GA10747@urbanophile.com>
	<87heamyhfl.fsf@fleche.redhat.com>
From: Tom Tromey <tromey@redhat.com>
X-Attribution: Tom
X-Zippy: Yow!  Are you the self-frying president?
Date: 01 Mar 2003 13:22:20 -0700
In-Reply-To: <87heamyhfl.fsf@fleche.redhat.com>
Message-ID: <878yvyygzn.fsf@fleche.redhat.com>
Lines: 20
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: classpath@gnu.org
Subject: Re: JNI/CNI Revisited
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
Reply-To: tromey@redhat.com
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sat, 01 Mar 2003 20:37:14 -0000

Aaron> Right now Classpath just hardcodes these as FD 0, 1, and 2.
Aaron> Probably not a good idea.  The nativeInit() method was one I
Aaron> envisioned being called as part of static initialization a la
Aaron> gcj, and thus it could set up these values.

Tom> For some reason I assumed your `nativeInit' method had to do with
Tom> initializing an instance -- but of course open() can be used for that.

Though looking yet again at the libgcj FileDescriptor, I see this:

  private int fd = -1;

If we have a nativeValid method, we also need a native way to compute
the value for an invalid fd.  We need this since there is a public
FileDescriptor constructor which creates an `invalid' instance.  So,
add something like:

  static native long nativeGetInvalidDescriptor();

Tom



From MAILER-DAEMON Sat Mar 01 15:42:13 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18pDed-0006zx-00
	for mharc-classpath@gnu.org; Sat, 01 Mar 2003 15:32:19 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18pDe0-0006n4-00
	for classpath@gnu.org; Sat, 01 Mar 2003 15:31:40 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18pDd4-0006XP-00
	for classpath@gnu.org; Sat, 01 Mar 2003 15:30:58 -0500
Received: from mail.peakpeak.com ([207.174.178.17] helo=gash2.peakpeak.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18pDb1-0005Gp-00
	for classpath@gnu.org; Sat, 01 Mar 2003 15:28:36 -0500
Received: from fleche.redhat.com (tf0101.peakpeak.com [204.144.239.101])
	by gash2.peakpeak.com (8.9.3/8.9.3) with ESMTP id NAA30807;
	Sat, 1 Mar 2003 13:27:49 -0700
Received: by fleche.redhat.com (Postfix, from userid 1000)
	id 0BBB14F8610; Sat,  1 Mar 2003 13:19:14 -0700 (MST)
To: "Aaron M. Renn" <arenn@urbanophile.com>
References: <5C38B761F205B54BA59FF611A65C624801189D@lembu.sumatrasoftware.com>
	<20030301181109.GB10747@urbanophile.com>
From: Tom Tromey <tromey@redhat.com>
X-Attribution: Tom
X-Zippy: Now I'm telling MISS PIGGY about MONEY MARKET FUNDS!
Date: 01 Mar 2003 13:19:13 -0700
In-Reply-To: <20030301181109.GB10747@urbanophile.com>
Message-ID: <87d6layh4u.fsf@fleche.redhat.com>
Lines: 39
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: classpath@gnu.org
Subject: Re: JNI/CNI Revisited
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
Reply-To: tromey@redhat.com
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sat, 01 Mar 2003 20:31:55 -0000

>>>>> "Aaron" == Aaron M Renn <arenn@urbanophile.com> writes:

Jeroen> This allows VMs (such as mine) that don't use an integer as a
Jeroen> file handle, to replace FileDescriptor with a different
Jeroen> implementation, but leave all other i/o classes as is.

Aaron> Can you explain this further?  I'm not clear on the problem,
Aaron> exactly.  In your example, everything is still long.  If you
Aaron> changed your instance variable to an int, I don't know what
Aaron> that buys us.

Aaron> [ ... ]
Aaron> In really offbeat cases, there may be no alternative to but
Aaron> replace FileDescriptor completely.

I think his example code was to show how the reference implementation
would look.  The idea is that the FileDescriptor API would consist of
instance (not static) methods, and in the reference implementation
these would just call the appropriate native (static) methods.  If the
FileDescriptor API is done this way, then it facilitates replacing the
FileDescriptor implementation, because the other classes in java.io
won't have to be changed.

I have a slight preference for this since it lets us make less changes
in libgcj :-).  But really it isn't a major point.  If
FileOutputStream.write(byte) is written:

    return FileDescriptor.nativeWrite(fd.nativeDescriptor, b);

or:

    return fd.write(b);  // Delegates to nativeWrite, like Jeroen's example

... either way a VM implementer could replace FileDescriptor, since
the above doesn't depend on the type of
FileDescriptor.nativeDescriptor.  Still, the latter seems a bit
clearer.

Tom



From MAILER-DAEMON Sat Mar 01 15:53:22 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18pDyl-0003fE-00
	for mharc-classpath@gnu.org; Sat, 01 Mar 2003 15:53:07 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18pDsA-0001pI-00
	for classpath@gnu.org; Sat, 01 Mar 2003 15:46:18 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18pDr4-0001W8-00
	for classpath@gnu.org; Sat, 01 Mar 2003 15:45:26 -0500
Received: from mail.peakpeak.com ([207.174.178.17] helo=gash2.peakpeak.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18pDq7-0000vs-00; Sat, 01 Mar 2003 15:44:11 -0500
Received: from fleche.redhat.com (tf0101.peakpeak.com [204.144.239.101])
	by gash2.peakpeak.com (8.9.3/8.9.3) with ESMTP id NAA07539;
	Sat, 1 Mar 2003 13:43:25 -0700
Received: by fleche.redhat.com (Postfix, from userid 1000)
	id 27AF34F8610; Sat,  1 Mar 2003 13:34:50 -0700 (MST)
To: Brian Jones <cbj@gnu.org>
References: <87y9402l1e.fsf@fleche.redhat.com>
	<m3heaocahr.fsf@lyta.haphazard.org>
From: Tom Tromey <tromey@redhat.com>
X-Attribution: Tom
X-Zippy: I'm thinking about DIGITAL READ-OUT systems and
 computer-generated IMAGE FORMATIONS..
Date: 01 Mar 2003 13:34:49 -0700
In-Reply-To: <m3heaocahr.fsf@lyta.haphazard.org>
Message-ID: <87znoex1ue.fsf@fleche.redhat.com>
Lines: 9
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: Classpath Discussion Mailing List <classpath@gnu.org>
Subject: Re: removing gcj workarounds
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
Reply-To: tromey@redhat.com
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sat, 01 Mar 2003 20:52:50 -0000

>>>>> "Brian" == Brian Jones <cbj@gnu.org> writes:

Brian> You could do it now, for it is CVS after all... or you could
Brian> wait till GCC 3.3 is released...

Ok.  I think I'll wait for the official 3.3 release.  If anybody
really wants to see the patch, just ask and I will mail it to you.

Tom



From MAILER-DAEMON Sat Mar 01 18:50:58 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18pGks-0003MY-00
	for mharc-classpath@gnu.org; Sat, 01 Mar 2003 18:50:58 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18pGkq-0003MQ-00
	for classpath@gnu.org; Sat, 01 Mar 2003 18:50:56 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18pGkK-0002nC-00
	for classpath@gnu.org; Sat, 01 Mar 2003 18:50:55 -0500
Received: from ms-smtp-02.southeast.rr.com ([24.93.67.83])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18pGkK-0002n5-00
	for classpath@gnu.org; Sat, 01 Mar 2003 18:50:24 -0500
Received: from mail5.nc.rr.com (fe5 [24.93.67.52])h21NmpoS014863;
	Sat, 1 Mar 2003 18:48:53 -0500 (EST)
Received: from lyta.haphazard.org ([66.57.9.48]) by mail5.nc.rr.com  with
	Microsoft SMTPSVC(5.5.1877.757.75);	 Sat, 1 Mar 2003 18:48:12 -0500
Received: by lyta.haphazard.org (Postfix, from userid 500)
	id E6AE9BEA92; Sat,  1 Mar 2003 18:50:15 -0500 (EST)
Sender: cbj@haphazard.org
To: Mark Wielaard <mark@klomp.org>
References: <200302260025.h1Q0PwgG057446@arch20m.dellroad.org>
	<1046540316.19772.356.camel@elsschot>
From: Brian Jones <cbj@gnu.org>
Date: 01 Mar 2003 18:50:15 -0500
In-Reply-To: <1046540316.19772.356.camel@elsschot>
Message-ID: <m3isv2ir48.fsf@lyta.haphazard.org>
Lines: 23
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: classpath@gnu.org
Subject: Re: Thoughts on 'reference classes'
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sat, 01 Mar 2003 23:50:56 -0000

Mark Wielaard <mark@klomp.org> writes:

> Brian is doing a good job here making sure that we have a new
> release every couple of months (Thansk Brian!).

Hmm... that's the new plan!  Release early, release often... etc.

> BTW. I don't know if anybody uses Japhar anymore. If so, what version of
> Classpath do you use?

One day I'll hack on Japhar again just for my own
amusement... probably when Classpath is "complete".  It has no current
developers.

> I general it is a good idea if anybody that proposes a change for the VM
> reference classes makes sure that it makes sense for at least two
> somewhat different VMs (say Kissme and gcj, or IKVM.NET and SableVM,
> etc).

Sounds like a good idea.  That should be added to the hacking guide.

-- 
Brian Jones <cbj@gnu.org>



From MAILER-DAEMON Sat Mar 01 19:26:10 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18pHIp-00061x-00
	for mharc-classpath@gnu.org; Sat, 01 Mar 2003 19:26:03 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18pHIQ-0005av-00
	for classpath@gnu.org; Sat, 01 Mar 2003 19:25:38 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18pHIK-0005Qq-00
	for classpath@gnu.org; Sat, 01 Mar 2003 19:25:33 -0500
Received: from adsl-216-102-199-253.dsl.snfc21.pacbell.net ([216.102.199.253]
	helo=bothner.com)	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18pHIC-0005LS-00
	for classpath@gnu.org; Sat, 01 Mar 2003 19:25:24 -0500
Received: from bothner.com (eureka.bothner.com [192.168.1.9])
	by bothner.com (8.12.5/8.12.5) with ESMTP id h220Puj5005336;
	Sat, 1 Mar 2003 16:25:56 -0800
Message-ID: <3E614A11.40405@bothner.com>
Date: Sat, 01 Mar 2003 16:02:25 -0800
From: Per Bothner <per@bothner.com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3b) Gecko/20030210
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: java@gcc.gnu.org, classpath@gnu.org
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Subject: unimplemented methods
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sun, 02 Mar 2003 00:25:52 -0000

I just looked at a couple of classes (java.net.URI
and java.awt.GridBagLayout) and noticed lots of
unimplemented methods just do nothing or return null.

This has to stop.  If an method does not do what it
is supposed to do, then it must throw an exception.
I'll make an exception for a method where you might
get semi-useful results if it isn't implemented
correctly, but if a class isn't anywhere close to
useful, it shouldn't pretend to be.

That raises the question:  What exception to throw?
We could add a special gnu exception, but I suggest
UnsupportedOperationException.  E.g:

   public URI (String scheme, String ssp, String fragment)
     throws URISyntaxException
   {
     throw new UnsupportedOperationException();
   }
-- 
	--Per Bothner
per@bothner.com   http://www.bothner.com/per/




From MAILER-DAEMON Sat Mar 01 19:33:21 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18pHOX-00053G-00
	for mharc-classpath@gnu.org; Sat, 01 Mar 2003 19:31:57 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18pHOT-0004ry-00
	for classpath@gnu.org; Sat, 01 Mar 2003 19:31:53 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18pHOI-0004QB-00
	for classpath@gnu.org; Sat, 01 Mar 2003 19:31:44 -0500
Received: from mail.peakpeak.com ([207.174.178.17] helo=gash2.peakpeak.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18pHOH-0004OW-00
	for classpath@gnu.org; Sat, 01 Mar 2003 19:31:41 -0500
Received: from fleche.redhat.com (tf0101.peakpeak.com [204.144.239.101])
	by gash2.peakpeak.com (8.9.3/8.9.3) with ESMTP id RAA20850;
	Sat, 1 Mar 2003 17:31:37 -0700
Received: by fleche.redhat.com (Postfix, from userid 1000)
	id 4B7DC4F8610; Sat,  1 Mar 2003 17:22:53 -0700 (MST)
To: Per Bothner <per@bothner.com>
References: <3E614A11.40405@bothner.com>
From: Tom Tromey <tromey@redhat.com>
X-Attribution: Tom
X-Zippy: When this load is DONE I think I'll wash it AGAIN..
Date: 01 Mar 2003 17:22:48 -0700
In-Reply-To: <3E614A11.40405@bothner.com>
Message-ID: <87isv2r50n.fsf@fleche.redhat.com>
Lines: 13
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: java@gcc.gnu.org
cc: classpath@gnu.org
Subject: Re: unimplemented methods
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
Reply-To: tromey@redhat.com
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sun, 02 Mar 2003 00:31:55 -0000

>>>>> "Per" == Per Bothner <per@bothner.com> writes:

Per> I just looked at a couple of classes (java.net.URI
Per> and java.awt.GridBagLayout) and noticed lots of
Per> unimplemented methods just do nothing or return null.

Per> This has to stop.  If an method does not do what it
Per> is supposed to do, then it must throw an exception.

That sounds fine.  I'd suggest bringing the issue up on the Classpath
list; we could add this to the Classpath hacking guide.

Tom



From MAILER-DAEMON Sat Mar 01 19:35:42 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18pHRv-00013M-00
	for mharc-classpath@gnu.org; Sat, 01 Mar 2003 19:35:27 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18pHRn-0000oc-00
	for classpath@gnu.org; Sat, 01 Mar 2003 19:35:19 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18pHRh-0000ea-00
	for classpath@gnu.org; Sat, 01 Mar 2003 19:35:16 -0500
Received: from mail.peakpeak.com ([207.174.178.17] helo=gash2.peakpeak.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18pHRg-0000eD-00
	for classpath@gnu.org; Sat, 01 Mar 2003 19:35:13 -0500
Received: from fleche.redhat.com (tf0101.peakpeak.com [204.144.239.101])
	by gash2.peakpeak.com (8.9.3/8.9.3) with ESMTP id RAA21403;
	Sat, 1 Mar 2003 17:35:09 -0700
Received: by fleche.redhat.com (Postfix, from userid 1000)
	id 066074F8610; Sat,  1 Mar 2003 17:26:35 -0700 (MST)
To: Per Bothner <per@bothner.com>
References: <3E614A11.40405@bothner.com> <87isv2r50n.fsf@fleche.redhat.com>
From: Tom Tromey <tromey@redhat.com>
X-Attribution: Tom
X-Zippy: PARDON me, am I speaking ENGLISH?
Date: 01 Mar 2003 17:26:35 -0700
In-Reply-To: <87isv2r50n.fsf@fleche.redhat.com>
Message-ID: <87d6lar4uc.fsf@fleche.redhat.com>
Lines: 13
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: java@gcc.gnu.org
cc: classpath@gnu.org
Subject: Re: unimplemented methods
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
Reply-To: tromey@redhat.com
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sun, 02 Mar 2003 00:35:25 -0000

>>>>> "Tom" == Tom Tromey <tromey@redhat.com> writes:

Tom> That sounds fine.  I'd suggest bringing the issue up on the Classpath
Tom> list; we could add this to the Classpath hacking guide.

And, duh, you did and I didn't see the CC.
Sorry about that.

Brian, I took a quick look at the hacking guide and didn't see an
obvious place to put this.  If you can suggest a location, I'll write
a patch.

Tom



From MAILER-DAEMON Sat Mar 01 19:51:01 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18pHgz-0003on-00
	for mharc-classpath@gnu.org; Sat, 01 Mar 2003 19:51:01 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18pHgx-0003nf-00
	for classpath@gnu.org; Sat, 01 Mar 2003 19:50:59 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18pHgv-0003lQ-00
	for classpath@gnu.org; Sat, 01 Mar 2003 19:50:58 -0500
Received: from adsl-216-102-199-253.dsl.snfc21.pacbell.net ([216.102.199.253]
	helo=bothner.com)	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18pHgu-0003is-00
	for classpath@gnu.org; Sat, 01 Mar 2003 19:50:57 -0500
Received: from bothner.com (eureka.bothner.com [192.168.1.9])
	by bothner.com (8.12.5/8.12.5) with ESMTP id h220pTj5005486;
	Sat, 1 Mar 2003 16:51:29 -0800
Message-ID: <3E61500D.5070008@bothner.com>
Date: Sat, 01 Mar 2003 16:27:57 -0800
From: Per Bothner <per@bothner.com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3b) Gecko/20030210
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: tromey@redhat.com
References: <3E614A11.40405@bothner.com> <87isv2r50n.fsf@fleche.redhat.com>
	<87d6lar4uc.fsf@fleche.redhat.com>
In-Reply-To: <87d6lar4uc.fsf@fleche.redhat.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
cc: java@gcc.gnu.org
cc: classpath@gnu.org
Subject: Re: unimplemented methods
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sun, 02 Mar 2003 00:51:00 -0000

A possible refinement:

throw new UnsupportedOperationException ("not implemented");

This makes it clear that it's an unimplemented feature,
rather than the usual collections invalid call.

The string "not implemented" also makes it easy for
our tools to search for, so we can generate more useful summaries.
And it's boilerplate - you can paste the same string into
every method.  We can allow extra information:

"not implemented - needs javax.xx.YY first"

So my suggested coding standard:

throw new UnsupportedOperationException (REASON);
where REASON is a string literal that includes "not implemented"
and all on a single line (to make it easy to grep for).
-- 
	--Per Bothner
per@bothner.com   http://www.bothner.com/per/




From MAILER-DAEMON Sat Mar 01 20:33:05 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18pILh-0005Ze-00
	for mharc-classpath@gnu.org; Sat, 01 Mar 2003 20:33:05 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18pILe-0005W2-00
	for classpath@gnu.org; Sat, 01 Mar 2003 20:33:02 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18pILd-0005Vr-00
	for classpath@gnu.org; Sat, 01 Mar 2003 20:33:02 -0500
Received: from pop2a.ripco.com ([209.100.227.25])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18pILd-0005Vn-00
	for classpath@gnu.org; Sat, 01 Mar 2003 20:33:01 -0500
Received: (from arenn@localhost)
	by pop2a.ripco.com (8.11.0/8.11.0) id h221XPV25533;
	Sat, 1 Mar 2003 19:33:25 -0600 (CST)
Date: Sat, 1 Mar 2003 19:33:25 -0600
From: "Aaron M. Renn" <arenn@urbanophile.com>
To: Per Bothner <per@bothner.com>
Message-ID: <20030302013324.GB25287@urbanophile.com>
Mail-Followup-To: "Aaron M. Renn" <arenn@urbanophile.com>,
	Per Bothner <per@bothner.com>, java@gcc.gnu.org, classpath@gnu.org
References: <3E614A11.40405@bothner.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <3E614A11.40405@bothner.com>
User-Agent: Mutt/1.4i
Organization: GNU's Not Unix!
cc: java@gcc.gnu.org
cc: classpath@gnu.org
Subject: Re: unimplemented methods
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sun, 02 Mar 2003 01:33:03 -0000

Per Bothner (per@bothner.com) wrote:
> I just looked at a couple of classes (java.net.URI
> and java.awt.GridBagLayout) and noticed lots of
> unimplemented methods just do nothing or return null.
> 
> This has to stop.  If an method does not do what it
> is supposed to do, then it must throw an exception.
...
> That raises the question:  What exception to throw?
> We could add a special gnu exception, but I suggest
> UnsupportedOperationException.  E.g:

In several cases, an Error("Not implemented yet") is
thrown.  I'm in complete agreement that unimplemented
methods should throw some type of exception.  Also
the source code should be prominently marked with
FIXME or XXX indicating work to be done.

-- 
Aaron M. Renn (arenn@urbanophile.com) http://www.urbanophile.com/arenn/




From MAILER-DAEMON Sun Mar 02 02:21:24 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18pNmm-0001sB-00
	for mharc-classpath@gnu.org; Sun, 02 Mar 2003 02:21:24 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18pNmj-0001qh-00
	for classpath@gnu.org; Sun, 02 Mar 2003 02:21:21 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18pNmg-0001kr-00
	for classpath@gnu.org; Sun, 02 Mar 2003 02:21:20 -0500
Received: from ms-smtp-02.southeast.rr.com ([24.93.67.83])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18pNmf-0001eK-00
	for classpath@gnu.org; Sun, 02 Mar 2003 02:21:18 -0500
Received: from mail3.nc.rr.com (fe3 [24.93.67.50])h227Jfo9021712;
	Sun, 2 Mar 2003 02:19:42 -0500 (EST)
Received: from lyta.haphazard.org ([66.57.9.48]) by mail3.nc.rr.com  with
	Microsoft SMTPSVC(5.5.1877.757.75);	 Sun, 2 Mar 2003 02:19:12 -0500
Received: by lyta.haphazard.org (Postfix, from userid 500)
	id 67207BEA92; Sun,  2 Mar 2003 02:21:04 -0500 (EST)
Sender: cbj@haphazard.org
To: tromey@redhat.com
References: <3E614A11.40405@bothner.com> <87isv2r50n.fsf@fleche.redhat.com>
	<87d6lar4uc.fsf@fleche.redhat.com>
From: Brian Jones <cbj@gnu.org>
Date: 02 Mar 2003 02:21:04 -0500
In-Reply-To: <87d6lar4uc.fsf@fleche.redhat.com>
Message-ID: <m31y1qi68v.fsf@lyta.haphazard.org>
Lines: 21
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: java@gcc.gnu.org
cc: classpath@gnu.org
cc: Per Bothner <per@bothner.com>
Subject: Re: unimplemented methods
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sun, 02 Mar 2003 07:21:23 -0000

Tom Tromey <tromey@redhat.com> writes:

> >>>>> "Tom" == Tom Tromey <tromey@redhat.com> writes:
> 
> Tom> That sounds fine.  I'd suggest bringing the issue up on the Classpath
> Tom> list; we could add this to the Classpath hacking guide.
> 
> And, duh, you did and I didn't see the CC.
> Sorry about that.
> 
> Brian, I took a quick look at the hacking guide and didn't see an
> obvious place to put this.  If you can suggest a location, I'll write
> a patch.

Place in "Programming Standards" section.  I noticed a lot of gtk peer
classes with this stuff but wasn't sure whether to throw an error,
exception, or do nothing.

Brian
-- 
Brian Jones <cbj@gnu.org>



From MAILER-DAEMON Sun Mar 02 03:22:15 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18pOjf-0007KM-00
	for mharc-classpath@gnu.org; Sun, 02 Mar 2003 03:22:15 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18pOjc-0007Gb-00
	for classpath@gnu.org; Sun, 02 Mar 2003 03:22:12 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18pOjb-0007D5-00
	for classpath@gnu.org; Sun, 02 Mar 2003 03:22:12 -0500
Received: from 62-177-154-234.bbeyond.nl ([62.177.154.234]
	helo=LEMBU.sumatrasoftware.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)	id 18pOjb-000798-00
	for classpath@gnu.org; Sun, 02 Mar 2003 03:22:11 -0500
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Date: Sun, 2 Mar 2003 09:21:22 +0100
Message-ID: <5C38B761F205B54BA59FF611A65C624801189E@lembu.sumatrasoftware.com>
X-MimeOLE: Produced By Microsoft Exchange V6.5.6803.0
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: JNI/CNI Revisited
Thread-Index: AcLgGyib+XoKXMerTmecdYSQbwEcVwAd7I/w
From: "Jeroen Frijters" <jeroen@sumatra.nl>
To: <tromey@redhat.com>
cc: "Aaron M. Renn" <arenn@urbanophile.com>
cc: classpath@gnu.org
Subject: RE: JNI/CNI Revisited
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sun, 02 Mar 2003 08:22:13 -0000

Tom Tromey wrote:
> Jeroen> I really don't like this model, because it forces the VM into
> Jeroen> using a long for the file descriptor. IMHO a better
> Jeroen> alternative would be to have instance methods in
> Jeroen> java.io.FileDescriptor that call a static native.
>=20
> I'm curious about this: when would using a long cause problems?  It
> seems to me that a native pointer will fit in a long on every
> platform.  In your VM, do you need to use an actual GC-visible object
> as the file descriptor?

Exactly. One of my goals is to use no native code and implement all the
Java "native" methods in C# using the .NET class library. The only place
where use native code is in the JNI layer, but that is only for third
party code, the VM itself doesn't use JNI.

In other words, in ikvm java.io.FileDescription is just a wrapper around
a .NET System.IO.Stream reference.

Regards,
Jeroen



From MAILER-DAEMON Sun Mar 02 03:49:09 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18pP9g-0006NV-00
	for mharc-classpath@gnu.org; Sun, 02 Mar 2003 03:49:08 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18pP9d-0006J4-00
	for classpath@gnu.org; Sun, 02 Mar 2003 03:49:05 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18pP9c-0006Iq-00
	for classpath@gnu.org; Sun, 02 Mar 2003 03:49:05 -0500
Received: from 62-177-154-234.bbeyond.nl ([62.177.154.234]
	helo=LEMBU.sumatrasoftware.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)	id 18pP9c-0006Ij-00
	for classpath@gnu.org; Sun, 02 Mar 2003 03:49:04 -0500
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Date: Sun, 2 Mar 2003 09:48:16 +0100
Message-ID: <5C38B761F205B54BA59FF611A65C62480118A1@lembu.sumatrasoftware.com>
X-MimeOLE: Produced By Microsoft Exchange V6.5.6803.0
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: Thoughts on 'reference classes'
Thread-Index: AcLgHllJMJw2ocFoQLWvTowjJSNiIAAdRUbQ
From: "Jeroen Frijters" <jeroen@sumatra.nl>
To: "Mark Wielaard" <mark@klomp.org>
cc: classpath@gnu.org
Subject: RE: Thoughts on 'reference classes'
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sun, 02 Mar 2003 08:49:06 -0000


Mark Wielaard wrote:
> Note that there also just is the Not Enough Time thing... :{

Well understood.

> > * The use of native code should be limited. Preferrably to primitive
> > operations that cannot be performed from within Java
>=20
> What do you exactly mean when you say native code here? Do=20
> you mean the
> use of JNI code? Or just VM specific interface code?. I don't think we
> should restrict it to much.
>=20
> I believe that if something cannot be done in Java, but can be done
> through JNI (+POSIX) then GNU Classpath should provide a native
> (reference) implementation.

I didn't mean to imply that GNU Classpath shouldn't provide a native
implementation, just that the native methods should be as small as
possible (i.e. real primitives that can be used as building blocks for
more complex operations).

> Also when something can be done in java, but there is an=20
> possibility for
> the VM to do something more efficient (like for example the
> getCurrentClass(Loader) methods) then they should be moved into the VM
> interface code (with a default java implementation so VM implementers
> don't have to implement them "natively" if they don't want to).

Absolutely. When you have JNI mechanism that is slow, it may be
worthwhile to move more stuff to native, but I don't that should be the
default.

> BTW. Are you going to point people to the latest Mono 0.20=20
> release notes anytime soon? You really should shout this
> from the highest roof you can find. Hint, hint...

Despite what the release notes say, we're not just yet at a point where
it works. We're getting there pretty quickly though. My lameness in
makefile department isn't really helping though ;-) I still haven't
gotten around to getting Mono to build on my system.

> P.S Why the HTML email with font size=3Dtiny?
> Did someone complain that they couldn't read the plain text version?

Yeah, sorry about that. I recently switched to using an MS Exchange 2003
server with Outlook 2003 (both beta versions) and I haven't been able to
figure out what causes that. I'm sending plain text mails, but the mail
header contains a MIME-Version and Content-Type header and I'm guessing
that the listserv software generates the HTML based on that.

Regards,
Jeroen



From MAILER-DAEMON Sun Mar 02 11:13:40 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18pW5s-0004mO-00
	for mharc-classpath@gnu.org; Sun, 02 Mar 2003 11:13:40 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18pW5p-0004lx-00
	for classpath@gnu.org; Sun, 02 Mar 2003 11:13:37 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18pW5o-0004ih-00
	for classpath@gnu.org; Sun, 02 Mar 2003 11:13:36 -0500
Received: from ms-smtp-02.southeast.rr.com ([24.93.67.83])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18pW5n-0004gK-00
	for classpath@gnu.org; Sun, 02 Mar 2003 11:13:35 -0500
Received: from mail4.nc.rr.com (fe4 [24.93.67.51])h22GC0oX006988;
	Sun, 2 Mar 2003 11:12:04 -0500 (EST)
Received: from lyta.haphazard.org ([66.57.9.48]) by mail4.nc.rr.com  with
	Microsoft SMTPSVC(5.5.1877.757.75);	 Sun, 2 Mar 2003 11:14:56 -0500
Received: by lyta.haphazard.org (Postfix, from userid 500)
	id DE963BEA92; Sun,  2 Mar 2003 11:13:24 -0500 (EST)
Sender: cbj@haphazard.org
To: "Jeroen Frijters" <jeroen@sumatra.nl>
References: <5C38B761F205B54BA59FF611A65C62480118A1@lembu.sumatrasoftware.com>
From: Brian Jones <cbj@gnu.org>
Date: 02 Mar 2003 11:13:24 -0500
In-Reply-To: <5C38B761F205B54BA59FF611A65C62480118A1@lembu.sumatrasoftware.com>
Message-ID: <m3vfz1hhln.fsf@lyta.haphazard.org>
Lines: 19
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: Mark Wielaard <mark@klomp.org>
cc: classpath@gnu.org
Subject: Re: Thoughts on 'reference classes'
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sun, 02 Mar 2003 16:13:38 -0000

"Jeroen Frijters" <jeroen@sumatra.nl> writes:

> > P.S Why the HTML email with font size=tiny?
> > Did someone complain that they couldn't read the plain text version?
> 
> Yeah, sorry about that. I recently switched to using an MS Exchange 2003
> server with Outlook 2003 (both beta versions) and I haven't been able to
> figure out what causes that. I'm sending plain text mails, but the mail
> header contains a MIME-Version and Content-Type header and I'm guessing
> that the listserv software generates the HTML based on that.

Seems like Emacs GNUs handles it okay.  I have a similar problem with
Outlook at work; despite being set to send plain text email it sends
the email in two MIME parts.  One part is plain text and the second is
HTML.  Outlook sucks.

Brian
-- 
Brian Jones <cbj@gnu.org>



From MAILER-DAEMON Mon Mar 03 04:27:24 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18pmEC-000560-00
	for mharc-classpath@gnu.org; Mon, 03 Mar 2003 04:27:20 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18pmE9-00052H-00
	for classpath@gnu.org; Mon, 03 Mar 2003 04:27:17 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18pmE5-0004r5-00
	for classpath@gnu.org; Mon, 03 Mar 2003 04:27:14 -0500
Received: from nat.acunia.com ([194.7.211.211] helo=mail.acunia.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18pmE3-0004WH-00
	for classpath@gnu.org; Mon, 03 Mar 2003 04:27:12 -0500
Received: from sophocles.leuven.intern.acunia.com
	(sophocles.leuven.intern.acunia.com [10.0.1.34])
	by mail.acunia.com (8.11.6/8.11.6) with ESMTP id h239QHu01338;
	Mon, 3 Mar 2003 10:26:18 +0100
Date: Mon, 3 Mar 2003 09:48:56 +0100 (CET)
From: Chris Gray <chris.gray@acunia.com>
X-X-Sender: gray@sophocles.leuven.intern.acunia.com
To: Mark Wielaard <mark@klomp.org>
In-Reply-To: <1046542487.19764.388.camel@elsschot>
Message-ID: <Pine.LNX.4.44.0303030940080.17413-100000@sophocles.leuven.intern.acunia.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
cc: Jeroen Frijters <jeroen@sumatra.nl>
cc: classpath@gnu.org
Subject: RE: Thoughts on 'reference classes'
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Mon, 03 Mar 2003 09:27:18 -0000

On 1 Mar 2003, Mark Wielaard wrote:

> Maybe we should just take the TeX approach and just converge to some
> non-rational number like e, so we can say that we are now at version
> 2.7182 :)

Hm, I think e is already taken by LaTeX. What else is there? (Apart from i 
:>).

-- 

Chris Gray

VM Architect, ACUNIA





From MAILER-DAEMON Mon Mar 03 04:42:44 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18pmT6-0005AH-00
	for mharc-classpath@gnu.org; Mon, 03 Mar 2003 04:42:44 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18pmRf-0004mN-00
	for classpath@gnu.org; Mon, 03 Mar 2003 04:41:15 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18pmQj-0004ac-00
	for classpath@gnu.org; Mon, 03 Mar 2003 04:40:18 -0500
Received: from nat.acunia.com ([194.7.211.211] helo=mail.acunia.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18pmQh-0004Vf-00
	for classpath@gnu.org; Mon, 03 Mar 2003 04:40:16 -0500
Received: from sophocles.leuven.intern.acunia.com
	(sophocles.leuven.intern.acunia.com [10.0.1.34])
	by mail.acunia.com (8.11.6/8.11.6) with ESMTP id h239dXu01904;
	Mon, 3 Mar 2003 10:39:33 +0100
Date: Mon, 3 Mar 2003 10:02:11 +0100 (CET)
From: Chris Gray <chris.gray@acunia.com>
X-X-Sender: gray@sophocles.leuven.intern.acunia.com
To: Mark Wielaard <mark@klomp.org>
In-Reply-To: <1046533217.19758.216.camel@elsschot>
Message-ID: <Pine.LNX.4.44.0303030950420.17413-100000@sophocles.leuven.intern.acunia.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
cc: Archie Cobbs <archie@precisionio.com>
cc: classpath@gnu.org
cc: tromey@redhat.com
Subject: Re: Method.equals() question
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Mon, 03 Mar 2003 09:42:43 -0000

On 1 Mar 2003, Mark Wielaard wrote:

> Hi,
> 
> On Fri, 2003-02-28 at 21:58, Archie Cobbs wrote:
> > I'm assuming here that the VM guarantees that only one Method object
> > will ever be created for each declared method in a class.
> 
> I used to think that this would be the optimal thing todo for a VM. But
> in reality each Method object returned should actually be unique. The
> reason is that Method, Field and Constructor are AccessibleObjects.
> AccessibleObjects have an setAccessible() method that should only
> operate on that instance of the Method/Field but not on other
> Method/Field objects which might refer to the same reflected field,
> method or constructor.

Yup. What we are doing is to compare (in native code) the Method `wotsit',
which is a pointer to the internal data structure used by the VM. We have 
to go native to do this because the wotsit is not visible at the Java 
level. 
> 
> I have wanted to add some Mauve tests for this since it is an easy thing
> to overlook. Have put that a bit higher on the TODO list now :)
> 
> As a consequence some of the reflect classes have to be carefully
> examined to make sure that they do not make the assumption that equals
> means same reference. (Note that in contrast each Class object should
> have the property they are unique.)

Sounds like a good idea: nasty things could happen if calls to 
setAccessible() were to interfere with one another. With regard to the 
Class objects, bear in mind that e.g. java.lang.String should be the same 
object whatever class loader you use, whereas for user-defined class 
loaders there can be as many classes with a given name as there are class 
loader instances.


-- 

Chris Gray

VM Architect, ACUNIA





From MAILER-DAEMON Mon Mar 03 04:57:07 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18pmh1-00063P-00
	for mharc-classpath@gnu.org; Mon, 03 Mar 2003 04:57:07 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18pmgz-00063H-00
	for classpath@gnu.org; Mon, 03 Mar 2003 04:57:05 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18pmgx-00061p-00
	for classpath@gnu.org; Mon, 03 Mar 2003 04:57:04 -0500
Received: from web10004.mail.yahoo.com ([216.136.130.40])
	by monty-python.gnu.org with smtp (Exim 4.10.13)
	id 18pmgw-00061T-00
	for classpath@gnu.org; Mon, 03 Mar 2003 04:57:02 -0500
Message-ID: <20030303095656.66754.qmail@web10004.mail.yahoo.com>
Received: from [62.104.211.66] by web10004.mail.yahoo.com via HTTP;
	Mon, 03 Mar 2003 01:56:56 PST
Date: Mon, 3 Mar 2003 01:56:56 -0800 (PST)
From: Dalibor Topic <robilad@yahoo.com>
To: Chris Gray <chris.gray@acunia.com>, Mark Wielaard <mark@klomp.org>
In-Reply-To: <Pine.LNX.4.44.0303030940080.17413-100000@sophocles.leuven.intern.acunia.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: Jeroen Frijters <jeroen@sumatra.nl>
cc: classpath@gnu.org
Subject: RE: Thoughts on 'reference classes'
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Mon, 03 Mar 2003 09:57:06 -0000


--- Chris Gray <chris.gray@acunia.com> wrote:
> On 1 Mar 2003, Mark Wielaard wrote:
> 
> > Maybe we should just take the TeX approach and
> just converge to some
> > non-rational number like e, so we can say that we
> are now at version
> > 2.7182 :)
> 
> Hm, I think e is already taken by LaTeX. What else
> is there? (Apart from i 
> :>).

Are complex numbers allowed?

cheers,
dalibor topic

__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/



From MAILER-DAEMON Mon Mar 03 11:29:53 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18psov-00085t-00
	for mharc-classpath@gnu.org; Mon, 03 Mar 2003 11:29:41 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18psoG-0007f2-00
	for classpath@gnu.org; Mon, 03 Mar 2003 11:29:00 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18psni-0007LW-00
	for classpath@gnu.org; Mon, 03 Mar 2003 11:28:27 -0500
Received: from 62-177-154-234.bbeyond.nl ([62.177.154.234]
	helo=LEMBU.sumatrasoftware.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)	id 18psnM-0007Bf-00
	for classpath@gnu.org; Mon, 03 Mar 2003 11:28:04 -0500
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: multipart/mixed;
	boundary="----_=_NextPart_001_01C2E1A1.BE6FDBC2"
Date: Mon, 3 Mar 2003 17:27:12 +0100
X-MimeOLE: Produced By Microsoft Exchange V6.5.6803.0
Message-ID: <5C38B761F205B54BA59FF611A65C62480118A6@lembu.sumatrasoftware.com>
X-MS-Has-Attach: yes
X-MS-TNEF-Correlator: 
Thread-Topic: Class loader optimization patch
Thread-Index: AcLhocwtoPr7I/KVTq28Ejqfx0lmpw==
From: "Jeroen Frijters" <jeroen@sumatra.nl>
To: <classpath@gnu.org>
Subject: Class loader optimization patch
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Mon, 03 Mar 2003 16:29:39 -0000

This is a multi-part message in MIME format.

------_=_NextPart_001_01C2E1A1.BE6FDBC2
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Hi,

I made another attempt at reducing the number of ClassNotFoundExceptions
that are thrown when loading a class, this time I believe the patch can
be integrated without breaking anything. No API changes and existing
code should continue to run fine. If the VM implementation of
VMClassLoader.loadClass throws a ClassNotFoundException, fine, but with
this patch it can also return null, and thus prevent the creation of a
(in some cases) useless exception object.

Regards,
Jeroen

------_=_NextPart_001_01C2E1A1.BE6FDBC2
Content-Type: application/octet-stream;
	name="classloader.patch"
Content-Transfer-Encoding: base64
Content-Description: classloader.patch
Content-Disposition: attachment;
	filename="classloader.patch"

SW5kZXg6IGphdmEvbGFuZy9DbGFzc0xvYWRlci5qYXZhDQo9PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQpSQ1MgZmlsZTog
L2N2c3Jvb3QvY2xhc3NwYXRoL2NsYXNzcGF0aC9qYXZhL2xhbmcvQ2xhc3NMb2FkZXIuamF2YSx2
DQpyZXRyaWV2aW5nIHJldmlzaW9uIDEuMjMNCmRpZmYgLXUgLXIxLjIzIENsYXNzTG9hZGVyLmph
dmENCi0tLSBqYXZhL2xhbmcvQ2xhc3NMb2FkZXIuamF2YQkxNyBKYW4gMjAwMyAxOToxNDowNyAt
MDAwMAkxLjIzDQorKysgamF2YS9sYW5nL0NsYXNzTG9hZGVyLmphdmEJMyBNYXIgMjAwMyAxNjoy
Mjo0MCAtMDAwMA0KQEAgLTI3OCwyMSArMjc4LDI4IEBADQogICAgICAgaWYgKGMgIT0gbnVsbCkN
CiAgICAgICAgIHJldHVybiBjOw0KIA0KLSAgICAgIC8vIENhbiB0aGUgY2xhc3MgYmVlbiBsb2Fk
ZWQgYnkgYSBwYXJlbnQ/DQorICAgICAgLy8gQ2FuIHRoZSBjbGFzcyBiZSBsb2FkZWQgYnkgYSBw
YXJlbnQ/DQogICAgICAgdHJ5DQorICAgICAgew0KKyAgICAgICAgaWYgKHBhcmVudCA9PSBudWxs
KQ0KICAgICAgICAgew0KLSAgICAgICAgICBpZiAocGFyZW50ID09IG51bGwpDQotICAgICAgICAg
ICAgcmV0dXJuIFZNQ2xhc3NMb2FkZXIubG9hZENsYXNzKG5hbWUsIHJlc29sdmUpOw0KLSAgICAg
ICAgICByZXR1cm4gcGFyZW50LmxvYWRDbGFzcyhuYW1lLCByZXNvbHZlKTsNCisgICAgICAgICAg
YyA9IFZNQ2xhc3NMb2FkZXIubG9hZENsYXNzKG5hbWUsIHJlc29sdmUpOw0KKyAgICAgICAgICBp
ZiAoYyAhPSBudWxsKQ0KKyAgICAgICAgICAgIHJldHVybiBjOw0KICAgICAgICAgfQ0KLSAgICAg
IGNhdGNoIChDbGFzc05vdEZvdW5kRXhjZXB0aW9uIGUpDQorICAgICAgICBlbHNlDQogICAgICAg
ICB7DQotICAgICAgICAgIC8vIFN0aWxsIG5vdCBmb3VuZCwgd2UgaGF2ZSB0byBkbyBpdCBvdXJz
ZWxmLg0KLSAgICAgICAgICBjID0gZmluZENsYXNzKG5hbWUpOw0KLSAgICAgICAgICBpZiAocmVz
b2x2ZSkNCi0gICAgICAgICAgICByZXNvbHZlQ2xhc3MoYyk7DQotICAgICAgICAgIHJldHVybiBj
Ow0KKyAgICAgICAgICByZXR1cm4gcGFyZW50LmxvYWRDbGFzcyhuYW1lLCByZXNvbHZlKTsNCiAg
ICAgICAgIH0NCisgICAgICB9DQorICAgICAgY2F0Y2ggKENsYXNzTm90Rm91bmRFeGNlcHRpb24g
ZSkNCisgICAgICB7DQorICAgICAgfQ0KKyAgICAgIC8vIFN0aWxsIG5vdCBmb3VuZCwgd2UgaGF2
ZSB0byBkbyBpdCBvdXJzZWxmLg0KKyAgICAgIGMgPSBmaW5kQ2xhc3MobmFtZSk7DQorICAgICAg
aWYgKHJlc29sdmUpDQorICAgICAgICByZXNvbHZlQ2xhc3MoYyk7DQorICAgICAgcmV0dXJuIGM7
DQogICAgIH0NCiANCiAgIC8qKg0KSW5kZXg6IHZtL3JlZmVyZW5jZS9qYXZhL2xhbmcvQ2xhc3Mu
amF2YQ0KPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PQ0KUkNTIGZpbGU6IC9jdnNyb290L2NsYXNzcGF0aC9jbGFzc3BhdGgv
dm0vcmVmZXJlbmNlL2phdmEvbGFuZy9DbGFzcy5qYXZhLHYNCnJldHJpZXZpbmcgcmV2aXNpb24g
MS4yMw0KZGlmZiAtdSAtcjEuMjMgQ2xhc3MuamF2YQ0KLS0tIHZtL3JlZmVyZW5jZS9qYXZhL2xh
bmcvQ2xhc3MuamF2YQkyNiBPY3QgMjAwMiAxODo0MTo1OSAtMDAwMAkxLjIzDQorKysgdm0vcmVm
ZXJlbmNlL2phdmEvbGFuZy9DbGFzcy5qYXZhCTMgTWFyIDIwMDMgMTY6MjI6NDQgLTAwMDANCkBA
IC0xODcsNyArMTg3LDEwIEBADQogICAgICAgICAgICAgaWYgKGNsICE9IG51bGwpDQogICAgICAg
ICAgICAgICBzbS5jaGVja1Blcm1pc3Npb24obmV3IFJ1bnRpbWVQZXJtaXNzaW9uKCJnZXRDbGFz
c0xvYWRlciIpKTsNCiAgICAgICAgICAgfQ0KLQlyZXR1cm4gVk1DbGFzc0xvYWRlci5sb2FkQ2xh
c3MobmFtZSwgaW5pdGlhbGl6ZSk7DQorCUNsYXNzIGMgPSBWTUNsYXNzTG9hZGVyLmxvYWRDbGFz
cyhuYW1lLCBpbml0aWFsaXplKTsNCisgICAgICAgIGlmIChjICE9IG51bGwpDQorICAgICAgICAg
IHJldHVybiBjOw0KKyAgICAgICAgdGhyb3cgbmV3IENsYXNzTm90Rm91bmRFeGNlcHRpb24obmFt
ZSk7DQogICAgICAgfQ0KICAgICByZXR1cm4gY2xhc3Nsb2FkZXIubG9hZENsYXNzKG5hbWUsIGlu
aXRpYWxpemUpOw0KICAgfQ0KSW5kZXg6IHZtL3JlZmVyZW5jZS9qYXZhL2xhbmcvVk1DbGFzc0xv
YWRlci5qYXZhDQo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09DQpSQ1MgZmlsZTogL2N2c3Jvb3QvY2xhc3NwYXRoL2NsYXNz
cGF0aC92bS9yZWZlcmVuY2UvamF2YS9sYW5nL1ZNQ2xhc3NMb2FkZXIuamF2YSx2DQpyZXRyaWV2
aW5nIHJldmlzaW9uIDEuMTQNCmRpZmYgLXUgLXIxLjE0IFZNQ2xhc3NMb2FkZXIuamF2YQ0KLS0t
IHZtL3JlZmVyZW5jZS9qYXZhL2xhbmcvVk1DbGFzc0xvYWRlci5qYXZhCTE4IERlYyAyMDAyIDEw
OjI4OjI5IC0wMDAwCTEuMTQNCisrKyB2bS9yZWZlcmVuY2UvamF2YS9sYW5nL1ZNQ2xhc3NMb2Fk
ZXIuamF2YQkzIE1hciAyMDAzIDE2OjIyOjQ0IC0wMDAwDQpAQCAtMTE3LDEyICsxMTcsMTIgQEAN
CiAgICAqDQogICAgKiBAcGFyYW0gbmFtZSB0aGUgY2xhc3MgbmFtZSB0byBsb2FkDQogICAgKiBA
cGFyYW0gcmVzb2x2ZSB3aGV0aGVyIHRvIHJlc29sdmUgaXQNCi0gICAqIEByZXR1cm4gdGhlIGNs
YXNzLCBsb2FkZWQgYnkgdGhlIGJvb3RzdHJhcCBjbGFzc2xvYWRlcg0KKyAgICogQHJldHVybiB0
aGUgY2xhc3MsIGxvYWRlZCBieSB0aGUgYm9vdHN0cmFwIGNsYXNzbG9hZGVyIG9yIG51bGwNCisg
ICAqIGlmIHRoZSBjbGFzcyB3YXNuJ3QgZm91bmQNCiAgICAqLw0KICAgc3RhdGljIGZpbmFsIENs
YXNzIGxvYWRDbGFzcyhTdHJpbmcgbmFtZSwgYm9vbGVhbiByZXNvbHZlKQ0KLSAgICB0aHJvd3Mg
Q2xhc3NOb3RGb3VuZEV4Y2VwdGlvbg0KICAgew0KLSAgICB0aHJvdyBuZXcgQ2xhc3NOb3RGb3Vu
ZEV4Y2VwdGlvbihuYW1lKTsNCisgICAgcmV0dXJuIG51bGw7DQogICB9DQogDQogICAvKioNCg==

------_=_NextPart_001_01C2E1A1.BE6FDBC2--



From MAILER-DAEMON Mon Mar 03 15:09:19 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18pwFS-00018h-00
	for mharc-classpath@gnu.org; Mon, 03 Mar 2003 15:09:18 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18puzA-0003NT-00
	for classpath@gnu.org; Mon, 03 Mar 2003 13:48:24 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18puyp-0003GR-00
	for classpath@gnu.org; Mon, 03 Mar 2003 13:48:04 -0500
Received: from ftp.precisionio.com ([65.192.41.225] helo=dns.precisionio.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18puwW-0002jd-00
	for classpath@gnu.org; Mon, 03 Mar 2003 13:45:40 -0500
Received: from mailman.precisionio.com (mailman.precisionio.com
	[172.16.0.248])
	by dns.precisionio.com (8.12.6/8.12.6) with ESMTP id h23Ij4M9018854;
	Mon, 3 Mar 2003 10:45:04 -0800 (PST)
	(envelope-from archie@precisionio.com)
Received: from precisionio.com (bubba.precisionio.com [172.16.0.223])
	h23IpcBU002019;	Mon, 3 Mar 2003 10:51:39 -0800 (PST)
	(envelope-from archie@precisionio.com)
Message-ID: <3E63A2AF.3020304@precisionio.com>
Date: Mon, 03 Mar 2003 10:45:03 -0800
From: Archie Cobbs <archie@precisionio.com>
Organization: Precision I/O
User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.1) Gecko/20021106
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: Chris Gray <chris.gray@acunia.com>
References: <Pine.LNX.4.44.0303030950420.17413-100000@sophocles.leuven.intern.acunia.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Mailman-Approved-At: Mon, 03 Mar 2003 15:09:17 -0500
cc: classpath@gnu.org
cc: Mark Wielaard <mark@klomp.org>
cc: tromey@redhat.com
Subject: Re: Method.equals() question
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Mon, 03 Mar 2003 18:49:02 -0000

Chris Gray wrote:
>>>I'm assuming here that the VM guarantees that only one Method object
>>>will ever be created for each declared method in a class.
>>
>>I used to think that this would be the optimal thing todo for a VM. But
>>in reality each Method object returned should actually be unique. The
>>reason is that Method, Field and Constructor are AccessibleObjects.
>>AccessibleObjects have an setAccessible() method that should only
>>operate on that instance of the Method/Field but not on other
>>Method/Field objects which might refer to the same reflected field,
>>method or constructor.

So, let me try to summarize this thread (to confirm my own understanding).

#1 Because Method, Field, and Constructor are mutable objects, every
    method that returns a Method, Field, or Constructor object should
    instantiate a new one object instead of caching and reusing them.
    Therefore, implementing equals() by comparing object references
    is incorrect.

#2 The definition of equals() uses the phrase "same declaring class".
    The term "class" is taken to mean the pair <classname, ClassLoader>.
    I.e. two classes are not the "same" if they have been loaded by
    different class loaders.

#3 Using this same definition, two classes are "the same" iff they have
    the same Class object (obj1 == obj2). As a corollary, two classes
    loaded by different Class loaders have different Class instances.

The practical upshot of this is that the equals() methods that currently
exist in Classpath for Field and Constructor need to be fixed. But the
fixes could use "obj1.getDeclaringClass() == obj2.getDeclaringClass()"
as part of the test.

Method also needs to be fixed, but for a different reason (it doesn't
compare the return types as it should (referring to Classpath 0.05)).

Thanks,
-Archie

__________________________________________________________________________
Archie Cobbs     *     Precision I/O      *     http://www.precisionio.com




From MAILER-DAEMON Mon Mar 03 15:45:57 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18pwoW-0002zj-00
	for mharc-classpath@gnu.org; Mon, 03 Mar 2003 15:45:32 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18pwoU-0002vW-00
	for classpath@gnu.org; Mon, 03 Mar 2003 15:45:30 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18pwoS-0002vF-00
	for classpath@gnu.org; Mon, 03 Mar 2003 15:45:29 -0500
Received: from adsl-63-194-81-26.dsl.snfc21.pacbell.net ([63.194.81.26]
	helo=InterJet.dellroad.org)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)	id 18pwoF-0002my-00
	for classpath@gnu.org; Mon, 03 Mar 2003 15:45:15 -0500
Received: from arch20m.dellroad.org (arch20m.dellroad.org [10.1.1.20])
	by InterJet.dellroad.org (8.9.1a/8.9.1) with ESMTP id MAA48731;
	Mon, 3 Mar 2003 12:30:30 -0800 (PST)
Received: from arch20m.dellroad.org (localhost [127.0.0.1])
	by arch20m.dellroad.org (8.12.6/8.12.6) with ESMTP id h23JUJn6004757;
	Mon, 3 Mar 2003 11:30:19 -0800 (PST)
	(envelope-from archie@arch20m.dellroad.org)
Received: (from archie@localhost)
	by arch20m.dellroad.org (8.12.6/8.12.6/Submit) id h23JUJan004756;
	Mon, 3 Mar 2003 11:30:19 -0800 (PST)
	(envelope-from archie)
From: Archie Cobbs <archie@dellroad.org>
Message-Id: <200303031930.h23JUJan004756@arch20m.dellroad.org>
In-Reply-To: <1046540316.19772.356.camel@elsschot">"
To: Mark Wielaard <mark@klomp.org>
Date: Mon, 3 Mar 2003 11:30:19 -0800 (PST)
X-Mailer: ELM [version 2.4ME+ PL99b (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
cc: classpath@gnu.org
Subject: Re: Thoughts on 'reference classes'
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Mon, 03 Mar 2003 20:45:30 -0000

Mark Wielaard wrote:
> > I've been working on a new JVM and trying to figure out how
> > modify the "vm/reference" classpath classes into something that
> > this JVM particular can support.
> 
> Fun! Do you have specific needs that non of the current ones fullfill or
> do you just like the challenge?

The main reason is that I just want one of my own for the fun of it! :-)
That also means I understand it and can debug it competently if something
breaks. Other motivations are portability/suitabilty for use on embedded
systems. E.g. I'm tired of programming in C all the time when programming
in Java would be so much nicer, but is not practical for various reasons.

This is a spare time project so it's not getting as many time slices as
I'd like, so don't expect anything useful out of me for a while. However
I would not have considered attempting such a project if Classpath didn't
exist, so.. thanks :-)

Cheers,
-Archie

__________________________________________________________________________
Archie Cobbs     *     Precision I/O      *     http://www.precisionio.com



From MAILER-DAEMON Mon Mar 03 16:04:59 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18px4y-0004OV-00
	for mharc-classpath@gnu.org; Mon, 03 Mar 2003 16:02:32 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18px4m-00042H-00
	for classpath@gnu.org; Mon, 03 Mar 2003 16:02:20 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18px4e-0003z4-00
	for classpath@gnu.org; Mon, 03 Mar 2003 16:02:13 -0500
Received: from adsl-63-194-81-26.dsl.snfc21.pacbell.net ([63.194.81.26]
	helo=InterJet.dellroad.org)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)	id 18px2a-0002en-00
	for classpath@gnu.org; Mon, 03 Mar 2003 16:00:04 -0500
Received: from arch20m.dellroad.org (arch20m.dellroad.org [10.1.1.20])
	by InterJet.dellroad.org (8.9.1a/8.9.1) with ESMTP id MAA48820;
	Mon, 3 Mar 2003 12:55:49 -0800 (PST)
Received: from arch20m.dellroad.org (localhost [127.0.0.1])
	by arch20m.dellroad.org (8.12.6/8.12.6) with ESMTP id h23Jtdn6004942;
	Mon, 3 Mar 2003 11:55:39 -0800 (PST)
	(envelope-from archie@arch20m.dellroad.org)
Received: (from archie@localhost)
	by arch20m.dellroad.org (8.12.6/8.12.6/Submit) id h23Jtc1o004941;
	Mon, 3 Mar 2003 11:55:38 -0800 (PST)
	(envelope-from archie)
From: Archie Cobbs <archie@dellroad.org>
Message-Id: <200303031955.h23Jtc1o004941@arch20m.dellroad.org>
In-Reply-To: <3E63A2AF.3020304@precisionio.com>
To: Archie Cobbs <archie@precisionio.com>
Date: Mon, 3 Mar 2003 11:55:38 -0800 (PST)
X-Mailer: ELM [version 2.4ME+ PL99b (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
cc: classpath@gnu.org
Subject: Re: Method.equals() question
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Mon, 03 Mar 2003 21:02:31 -0000

Archie Cobbs wrote:
> The practical upshot of this is that the equals() methods that currently
> exist in Classpath for Field and Constructor need to be fixed. But the
> fixes could use "obj1.getDeclaringClass() == obj2.getDeclaringClass()"
> as part of the test.
> 
> Method also needs to be fixed, but for a different reason (it doesn't
> compare the return types as it should (referring to Classpath 0.05)).

Below are my patches (against 0.05) for fixing these equals() methods.

Cheers,
-Archie

__________________________________________________________________________
Archie Cobbs     *     Precision I/O      *     http://www.precisionio.com

diff -ur /home/archie/classpath/classpath-0.05/vm/reference/java/lang/reflect/Constructor.java ./Constructor.java
--- /home/archie/classpath/classpath-0.05/vm/reference/java/lang/reflect/Constructor.java	Fri Oct 25 16:02:26 2002
+++ ./Constructor.java	Mon Mar  3 12:51:12 2003
@@ -38,6 +38,8 @@
 
 package java.lang.reflect;
 
+import java.util.Arrays;
+
 /**
  * The Constructor class represents a constructor of a class. It also allows
  * dynamic creation of an object, via reflection. Invocation on Constructor
@@ -160,7 +141,14 @@
    */
   public boolean equals(Object o)
   {
-    return this == o;
+    if (!(o instanceof Constructor))
+      return false;
+    Constructor that = (Constructor)o; 
+    if (this.getDeclaringClass() != that.getDeclaringClass())
+      return false;
+    if (!Arrays.equals(this.getParameterTypes(), that.getParameterTypes()))
+      return false;
+    return true;
   }
 
   /**
diff -ur /home/archie/classpath/classpath-0.05/vm/reference/java/lang/reflect/Field.java ./Field.java
--- /home/archie/classpath/classpath-0.05/vm/reference/java/lang/reflect/Field.java	Fri Oct 25 16:02:26 2002
+++ ./Field.java	Mon Mar  3 12:47:44 2003
@@ -135,7 +125,16 @@
    */
   public boolean equals(Object o)
   {
-    return this == o;
+    if (!(o instanceof Field))
+      return false;
+    Field that = (Field)o; 
+    if (this.getDeclaringClass() != that.getDeclaringClass())
+      return false;
+    if (!this.getName().equals(that.getName()))
+      return false;
+    if (this.getType() != that.getType())
+      return false;
+    return true;
   }
 
   /**
diff -ur /home/archie/classpath/classpath-0.05/vm/reference/java/lang/reflect/Method.java ./Method.java
--- /home/archie/classpath/classpath-0.05/vm/reference/java/lang/reflect/Method.java	Wed Dec 18 02:28:29 2002
+++ ./Method.java	Mon Mar  3 12:52:48 2003
@@ -38,6 +38,8 @@
 
 package java.lang.reflect;
 
+import java.util.Arrays;
+
 /**
  * The Method class represents a member method of a class. It also allows
  * dynamic invocation, via reflection. This works for both static and
@@ -144,57 +136,25 @@
   /**
    * Compare two objects to see if they are semantically equivalent.
    * Two Methods are semantically equivalent if they have the same declaring
-   * class, name, and parameter list.  This ignores different exception
-   * clauses or return types.
+   * class, name, parameter list, and return type.
    *
    * @param o the object to compare to
    * @return <code>true</code> if they are equal; <code>false</code> if not
    */
   public boolean equals(Object o)
   {
-      // Implementation note:
-      // The following is a correct but possibly slow implementation.
-      //
-      // This class has a private field 'slot' that could be used by
-      // the VM implementation to "link" a particular method to a Class.
-      // In that case equals could be simply implemented as:
-      //
-      // if (o instanceof Method)
-      // {
-      //    Method m = (Method)o;
-      //    return m.declaringClass == this.declaringClass
-      //           && m.slot == this.slot;
-      // }
-      // return false;
-      //
-      // If a VM uses the Method class as their native/internal representation
-      // then just using the following would be optimal:
-      //
-      // return this == o;
-      //
-      if (o == null)
-        return false;
-
-      if (!(o instanceof Method))
-        return false;
-
-      Method m = (Method)o;
-      if(!name.equals(m.name))
-	  return false;
-
-      if(declaringClass != m.declaringClass)
-	  return false;
-
-      Class[] params1 = getParameterTypes();
-      Class[] params2 = m.getParameterTypes();
-      if(params1.length != params2.length)
-	  return false;
-
-      for(int i = 0; i < params1.length; i++)
-	  if(params1[i] != params2[i])
-	      return false;
-
-      return true;
+    if (!(o instanceof Method))
+      return false;
+    Method that = (Method)o; 
+    if (this.getDeclaringClass() != that.getDeclaringClass())
+      return false;
+    if (!this.getName().equals(that.getName()))
+      return false;
+    if (this.getReturnType() != that.getReturnType())
+      return false;
+    if (!Arrays.equals(this.getParameterTypes(), that.getParameterTypes()))
+      return false;
+    return true;
   }
 
   /**



From MAILER-DAEMON Mon Mar 03 16:34:11 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18pxZb-00017a-00
	for mharc-classpath@gnu.org; Mon, 03 Mar 2003 16:34:11 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18pxZY-00015o-00
	for classpath@gnu.org; Mon, 03 Mar 2003 16:34:08 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18pxZX-000150-00
	for classpath@gnu.org; Mon, 03 Mar 2003 16:34:08 -0500
Received: from node1c5f.a2000.nl ([62.108.28.95] helo=nescio.wildebeest.org)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18pxZX-00014d-00
	for classpath@gnu.org; Mon, 03 Mar 2003 16:34:07 -0500
Received: from elsschot.wildebeest.org ([192.168.1.26] ident=mark)
	by nescio.wildebeest.org with esmtp (Exim 3.35 #1 (Debian))
	id 18pxZ2-00051o-00; Mon, 03 Mar 2003 22:33:36 +0100
From: Mark Wielaard <mark@klomp.org>
To: Jeroen Frijters <jeroen@sumatra.nl>
In-Reply-To: <5C38B761F205B54BA59FF611A65C62480118A6@lembu.sumatrasoftware.com>
References: 
	 <5C38B761F205B54BA59FF611A65C62480118A6@lembu.sumatrasoftware.com>
Content-Type: text/plain
Organization: 
Message-Id: <1046727244.8735.49.camel@elsschot>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.2.2 
Date: 03 Mar 2003 22:34:04 +0100
Content-Transfer-Encoding: 7bit
cc: classpath@gnu.org
Subject: Re: Class loader optimization patch
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Mon, 03 Mar 2003 21:34:09 -0000

Hi,

On Mon, 2003-03-03 at 17:27, Jeroen Frijters wrote:
> I made another attempt at reducing the number of ClassNotFoundExceptions
> that are thrown when loading a class, this time I believe the patch can
> be integrated without breaking anything. No API changes and existing
> code should continue to run fine. If the VM implementation of
> VMClassLoader.loadClass throws a ClassNotFoundException, fine, but with
> this patch it can also return null, and thus prevent the creation of a
> (in some cases) useless exception object.

I like it. The only thing that I would (not) change is the signature of
the VMClassLoader loadClass() method. Your patch removes the exception.
We should just document that throwing the exception will sometimes
create a unused object so returning null is more efficient.

I do like your earlier proposal even though it changes the public API
slightly. As long as it is compatible with other implementations I don't
see to many troubles. We might want to introduce an interface
gnu.java.lang.OptimizedClassLoader that defines a optimizedFindClass
method that returns null if it cannot find a class. Our system
(application) classloader and URLClassLoader should implement it.

Skip this part if you don't like speculative, ugly, unproven hacks:
[If we really don't want to introduce any public visible methods to the
standard classes then we might want to do something "clever" with
ClassLoader.getParent(), URLClassLoader.newInstance() or even the
ClassLoader(ClassLoader) constructor that transparently replace a
ClassLoader with its optimized version. (Haven't thought that out
completely yet...) Another sneaky way would be to call URLClassLoader
(and other trusted ClassLoaders) findClass() with a classname prefixed
with some illegal character so they know to return null when nothing was
found.]

Another idea for faster ClassLoading. If ClassLoader.loadClass() is
called for any java.* or gnu.java.* class directly go through the
VMClassLoader() since no user defined classloader may/should return
those classes.

Other opinions?

Cheers,

Mark




From MAILER-DAEMON Mon Mar 03 16:58:38 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18pxvr-0000H0-00
	for mharc-classpath@gnu.org; Mon, 03 Mar 2003 16:57:11 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18pxuY-000820-00
	for classpath@gnu.org; Mon, 03 Mar 2003 16:55:50 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18pxu9-0007t0-00
	for classpath@gnu.org; Mon, 03 Mar 2003 16:55:26 -0500
Received: from node1c5f.a2000.nl ([62.108.28.95] helo=nescio.wildebeest.org)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18pxtk-0007iP-00
	for classpath@gnu.org; Mon, 03 Mar 2003 16:55:00 -0500
Received: from elsschot.wildebeest.org ([192.168.1.26] ident=mark)
	by nescio.wildebeest.org with esmtp (Exim 3.35 #1 (Debian))
	id 18pxt6-00053D-00; Mon, 03 Mar 2003 22:54:20 +0100
From: Mark Wielaard <mark@klomp.org>
To: Archie Cobbs <archie@precisionio.com>
In-Reply-To: <3E63A2AF.3020304@precisionio.com>
References: 
	<Pine.LNX.4.44.0303030950420.17413-100000@sophocles.leuven.intern.acunia.com>
	<3E63A2AF.3020304@precisionio.com>
Content-Type: text/plain
Organization: 
Message-Id: <1046728488.8729.73.camel@elsschot>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.2.2 
Date: 03 Mar 2003 22:54:48 +0100
Content-Transfer-Encoding: 7bit
cc: classpath@gnu.org
cc: Chris Gray <chris.gray@acunia.com>
cc: tromey@redhat.com
Subject: Re: Method.equals() question
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Mon, 03 Mar 2003 21:57:10 -0000

Hi,

On Mon, 2003-03-03 at 19:45, Archie Cobbs wrote:
> So, let me try to summarize this thread (to confirm my own understanding).
> 
> #1 Because Method, Field, and Constructor are mutable objects, every
>     method that returns a Method, Field, or Constructor object should
>     instantiate a new one object instead of caching and reusing them.
>     Therefore, implementing equals() by comparing object references
>     is incorrect.

Yes. It is probably best to write some Mauve tests to check that the
accesibility of two Method/Field/Constructor objects don't interfere
with each other, but that it does keep the "equals()".

> #2 The definition of equals() uses the phrase "same declaring class".
>     The term "class" is taken to mean the pair <classname, ClassLoader>.
>     I.e. two classes are not the "same" if they have been loaded by
>     different class loaders.
>
> #3 Using this same definition, two classes are "the same" iff they have
>     the same Class object (obj1 == obj2). As a corollary, two classes
>     loaded by different Class loaders have different Class instances.

Yes.

> The practical upshot of this is that the equals() methods that currently
> exist in Classpath for Field and Constructor need to be fixed. But the
> fixes could use "obj1.getDeclaringClass() == obj2.getDeclaringClass()"
> as part of the test.
> 
> Method also needs to be fixed, but for a different reason (it doesn't
> compare the return types as it should (referring to Classpath 0.05)).

Yes, thanks for the bug report btw. That one is nasty because you cannot
define such method in the language java (but you can in byte code).

While we are fixing all this I would split all these classes into a
public SomethingClass (that should be moved out vm/reference) and a
package private (final) VMSomethingClass (that should be moved in to
vm/reference).

Cheers,

Mark




From MAILER-DAEMON Mon Mar 03 17:27:37 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18pyPA-0004E7-00
	for mharc-classpath@gnu.org; Mon, 03 Mar 2003 17:27:28 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18pyOW-0003vx-00
	for classpath@gnu.org; Mon, 03 Mar 2003 17:26:48 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18pyO8-0003kB-00
	for classpath@gnu.org; Mon, 03 Mar 2003 17:26:26 -0500
Received: from anis.telecom.uqam.ca ([132.208.250.6] helo=uqam.ca)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18pyNm-0003aT-00
	for classpath@gnu.org; Mon, 03 Mar 2003 17:26:02 -0500
Received: from anis.telecom.uqam.ca (anis.telecom.uqam.ca [132.208.250.6])
	by sortant.uqam.ca (8.12.2/8.12.1) with SMTP id h23MAosF011398
	for <classpath@gnu.org>; Mon, 3 Mar 2003 17:10:53 -0500 (EST)
Received: from antivirus.uqam.ca ([127.0.0.1])
 by anis.telecom.uqam.ca (NAVGW 2.5.1.12) with SMTP id M2003030317105209370
 for <classpath@gnu.org>; Mon, 03 Mar 2003 17:10:52 -0500
Received: from localhost (perseval.info.uqam.ca [132.208.137.96])
	h23M8VRK009065;	Mon, 3 Mar 2003 17:08:31 -0500 (EST)
X-Spam-Filter: Filtre-Uqam re:  abuse@uqam.ca
Received: from egagnon by localhost with local (Exim 3.36 #1 (Debian))
	id 18py6k-0007a6-00; Mon, 03 Mar 2003 17:08:26 -0500
Date: Mon, 3 Mar 2003 17:08:26 -0500
To: Mark Wielaard <mark@klomp.org>
Message-ID: <20030303220826.GA29121@perseval.info.uqam.ca>
References: <5C38B761F205B54BA59FF611A65C62480118A6@lembu.sumatrasoftware.com>
	<1046727244.8735.49.camel@elsschot>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <1046727244.8735.49.camel@elsschot>
User-Agent: Mutt/1.5.3i
From: "Prof. Etienne M. Gagnon" <etienne.gagnon@uqam.ca>
cc: Jeroen Frijters <jeroen@sumatra.nl>
cc: classpath@gnu.org
Subject: Re: Class loader optimization patch
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Mon, 03 Mar 2003 22:27:23 -0000

Hi,

Just a couple of thoughts...

I know that throwing exceptions might slow down class loading (yet,
there are clever tricks that more complex JVMs can do to significantly
reduce the cost of exceptions), but has anybody made time measurements
to see if the potential gains in performance of *moslty* eliminating
exceptions from class loading is worth the proposed efforts?

I am not convinced that the final solution would be easier to maintain
(specially in the context of adding a verifier to a VM).  If class
loading counts for less than 1% of the execution time, in most
non-HelloWorld applications, maybe we should simply leave the public
interface as it is, and only modify when bugs are found?

Or, maybe there's another motivation for this change that I missed?

Etienne

On Mon, Mar 03, 2003 at 10:34:04PM +0100, Mark Wielaard wrote:
> Hi,
> 
> On Mon, 2003-03-03 at 17:27, Jeroen Frijters wrote:
> > I made another attempt at reducing the number of ClassNotFoundExceptions
> > that are thrown when loading a class, this time I believe the patch can
> > be integrated without breaking anything. No API changes and existing
> > code should continue to run fine. If the VM implementation of
> > VMClassLoader.loadClass throws a ClassNotFoundException, fine, but with
> > this patch it can also return null, and thus prevent the creation of a
> > (in some cases) useless exception object.
> 
> I like it. The only thing that I would (not) change is the signature of
> the VMClassLoader loadClass() method. Your patch removes the exception.
> We should just document that throwing the exception will sometimes
> create a unused object so returning null is more efficient.
> 
> I do like your earlier proposal even though it changes the public API
> slightly. As long as it is compatible with other implementations I don't
> see to many troubles. We might want to introduce an interface
> gnu.java.lang.OptimizedClassLoader that defines a optimizedFindClass
> method that returns null if it cannot find a class. Our system
> (application) classloader and URLClassLoader should implement it.
> 
> Skip this part if you don't like speculative, ugly, unproven hacks:
> [If we really don't want to introduce any public visible methods to the
> standard classes then we might want to do something "clever" with
> ClassLoader.getParent(), URLClassLoader.newInstance() or even the
> ClassLoader(ClassLoader) constructor that transparently replace a
> ClassLoader with its optimized version. (Haven't thought that out
> completely yet...) Another sneaky way would be to call URLClassLoader
> (and other trusted ClassLoaders) findClass() with a classname prefixed
> with some illegal character so they know to return null when nothing was
> found.]
> 
> Another idea for faster ClassLoading. If ClassLoader.loadClass() is
> called for any java.* or gnu.java.* class directly go through the
> VMClassLoader() since no user defined classloader may/should return
> those classes.
> 
> Other opinions?
> 
> Cheers,
> 
> Mark
> 
> 
> 
> _______________________________________________
> Classpath mailing list
> Classpath@gnu.org
> http://mail.gnu.org/mailman/listinfo/classpath

-- 
Etienne M. Gagnon, Ph.D.             http://www.info.uqam.ca/~egagnon/
SableVM:                                       http://www.sablevm.org/
SableCC:                                       http://www.sablecc.org/



From MAILER-DAEMON Mon Mar 03 17:59:32 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18pytf-0004gU-00
	for mharc-classpath@gnu.org; Mon, 03 Mar 2003 17:58:59 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18pysE-0003am-00
	for classpath@gnu.org; Mon, 03 Mar 2003 17:57:30 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18pyrw-0003SA-00
	for classpath@gnu.org; Mon, 03 Mar 2003 17:57:12 -0500
Received: from node1c5f.a2000.nl ([62.108.28.95] helo=nescio.wildebeest.org)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18pymH-0000ED-00
	for classpath@gnu.org; Mon, 03 Mar 2003 17:51:22 -0500
Received: from elsschot.wildebeest.org ([192.168.1.26] ident=mark)
	by nescio.wildebeest.org with esmtp (Exim 3.35 #1 (Debian))
	id 18pylj-00059j-00; Mon, 03 Mar 2003 23:50:47 +0100
From: Mark Wielaard <mark@klomp.org>
To: "Prof. Etienne M. Gagnon" <etienne.gagnon@uqam.ca>
In-Reply-To: <20030303220826.GA29121@perseval.info.uqam.ca>
References: 
	 <5C38B761F205B54BA59FF611A65C62480118A6@lembu.sumatrasoftware.com>
	 <1046727244.8735.49.camel@elsschot>
	 <20030303220826.GA29121@perseval.info.uqam.ca>
Content-Type: text/plain
Organization: 
Message-Id: <1046731875.8730.113.camel@elsschot>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.2.2 
Date: 03 Mar 2003 23:51:15 +0100
Content-Transfer-Encoding: 7bit
cc: Jeroen Frijters <jeroen@sumatra.nl>
cc: classpath@gnu.org
Subject: Re: Class loader optimization patch
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Mon, 03 Mar 2003 22:58:53 -0000

Hi,

On Mon, 2003-03-03 at 23:08, Prof. Etienne M. Gagnon wrote:
> I am not convinced that the final solution would be easier to maintain
> (specially in the context of adding a verifier to a VM).  If class
> loading counts for less than 1% of the execution time, in most
> non-HelloWorld applications, maybe we should simply leave the public
> interface as it is, and only modify when bugs are found?

I agree that anything that goes beyond what Jeroen posted should
certainly be measured first to see if it makes a difference in real
world applications. And that goes double for the ideas that I prefixed
with "Skip this part if you don't like speculative, ugly, unproven
hacks" :)

> Or, maybe there's another motivation for this change that I missed?

It is mainly startup time that can be reduced somewhat. Big applications
such as Eclipse create a new ClassLoader for every component (and stack
them for subcomponents). That means that every class that is loaded
often goes through three classloader parents. Given the fact that there
are hunderds of classes being loaded that way you can prevent thousands
of short lived objects if you don't have to throw a couple of No
ClassDefFoundExceptions for every class that is requested.

But I agree this is all a bit experimental. GNU Classpath based VMs have
only recently been able to run things like Eclipse. But it already shown
me a couple of speed improvements. The ZipFile speedups for example were
very noticeable on Eclipse Loading time. And the (lib)gcj runtime has
certainly seen some nice improvements by just looking for the
bottlenecks that showed up while starting Eclipse.

Note that this is a very nice speed tests for the different VMs. It
takes minutes before the main Eclipse Window shows up even on a fast
machine. Maybe we can have a price for the first VM that manages to load
Eclipse under one minute on some standard PC (say 1Ghz Athlon/Pentium
with 512MB).

Cheers,

Mark




From MAILER-DAEMON Mon Mar 03 18:52:39 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18pzjW-0007gz-00
	for mharc-classpath@gnu.org; Mon, 03 Mar 2003 18:52:34 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18pzeZ-0005Gc-00
	for classpath@gnu.org; Mon, 03 Mar 2003 18:47:27 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18pzeB-00052B-00
	for classpath@gnu.org; Mon, 03 Mar 2003 18:47:04 -0500
Received: from ms-smtp-02.southeast.rr.com ([24.93.67.83])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18pzdG-0004ib-00
	for classpath@gnu.org; Mon, 03 Mar 2003 18:46:06 -0500
Received: from mail3.nc.rr.com (fe3 [24.93.67.50])h23NiZo5022589;
	Mon, 3 Mar 2003 18:44:35 -0500 (EST)
Received: from lyta.haphazard.org ([66.57.9.48]) by mail3.nc.rr.com  with
	Microsoft SMTPSVC(5.5.1877.757.75);	 Mon, 3 Mar 2003 18:44:04 -0500
Received: by lyta.haphazard.org (Postfix, from userid 500)
	id DE2F4BEA92; Mon,  3 Mar 2003 18:45:52 -0500 (EST)
Sender: cbj@haphazard.org
To: Mark Wielaard <mark@klomp.org>
References: <5C38B761F205B54BA59FF611A65C62480118A6@lembu.sumatrasoftware.com>
	<1046727244.8735.49.camel@elsschot>
	<20030303220826.GA29121@perseval.info.uqam.ca>
	<1046731875.8730.113.camel@elsschot>
From: Brian Jones <cbj@gnu.org>
Date: 03 Mar 2003 18:45:52 -0500
In-Reply-To: <1046731875.8730.113.camel@elsschot>
Message-ID: <m3d6l8ggjz.fsf@lyta.haphazard.org>
Lines: 17
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: Jeroen Frijters <jeroen@sumatra.nl>
cc: classpath@gnu.org
cc: "Prof. Etienne M. Gagnon" <etienne.gagnon@uqam.ca>
Subject: Re: Class loader optimization patch
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Mon, 03 Mar 2003 23:52:32 -0000

Mark Wielaard <mark@klomp.org> writes:

> It is mainly startup time that can be reduced somewhat. Big applications
> such as Eclipse create a new ClassLoader for every component (and stack
> them for subcomponents). That means that every class that is loaded
> often goes through three classloader parents. Given the fact that there
> are hunderds of classes being loaded that way you can prevent thousands
> of short lived objects if you don't have to throw a couple of No
> ClassDefFoundExceptions for every class that is requested.

Reducing startup time and required memory foot print are two things
that apparently Sun still needs to do with their JVM.  That free JVMs
might resolve some of these issues would be a great thing.

Brian
-- 
Brian Jones <cbj@gnu.org>



From MAILER-DAEMON Mon Mar 03 19:46:58 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18q0ZE-0004cb-00
	for mharc-classpath@gnu.org; Mon, 03 Mar 2003 19:46:00 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18q0Z5-0004Xc-00
	for classpath@gnu.org; Mon, 03 Mar 2003 19:45:51 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18q0Yy-0004QF-00
	for classpath@gnu.org; Mon, 03 Mar 2003 19:45:44 -0500
Received: from piglet.dstc.edu.au ([130.102.176.1])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18q0YE-0003wt-00
	for classpath@gnu.org; Mon, 03 Mar 2003 19:44:58 -0500
Received: from dstc.edu.au (soluble.dstc.edu.au [130.102.176.43])
	by piglet.dstc.edu.au (8.12.3/8.12.3) with ESMTP id h240hm8b002963;
	Tue, 4 Mar 2003 10:43:48 +1000 (EST)
Message-Id: <200303040043.h240hm8b002963@piglet.dstc.edu.au>
X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4
To: Archie Cobbs <archie@dellroad.org>
In-Reply-To: Message from Archie Cobbs <archie@dellroad.org> 
	<200303031930.h23JUJan004756@arch20m.dellroad.org> 
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Date: Tue, 04 Mar 2003 10:43:48 +1000
From: Stephen Crawley <crawley@dstc.edu.au>
X-Virus-Scanned: Message: ok
X-Scanned-By: MIMEDefang 2.9 (www dot roaringpenguin dot com slash mimedefang)
cc: crawley@piglet.dstc.edu.au
cc: Mark Wielaard <mark@klomp.org>
cc: classpath@gnu.org
Subject: Re: Thoughts on 'reference classes' 
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Tue, 04 Mar 2003 00:45:58 -0000

> Mark Wielaard wrote:
> > > I've been working on a new JVM and trying to figure out how
> > > modify the "vm/reference" classpath classes into something that
> > > this JVM particular can support.
> > 
> > Fun! Do you have specific needs that non of the current ones fullfill or
> > do you just like the challenge?
> 
> The main reason is that I just want one of my own for the fun of it! :-)
> That also means I understand it and can debug it competently if something
> breaks. Other motivations are portability/suitabilty for use on embedded
> systems. E.g. I'm tired of programming in C all the time when programming
> in Java would be so much nicer, but is not practical for various reasons.

None of that explains why it would be a good idea to impose your changes
on other Classpath-based projects.  I've no problem with you having fun
with "vm/reference", but I'd object to being burdened with tracking the
results in Kissme ... unless there was a clear benefit overall.

-- Steve





From MAILER-DAEMON Mon Mar 03 23:30:18 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18q44H-0006bj-00
	for mharc-classpath@gnu.org; Mon, 03 Mar 2003 23:30:17 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18q44E-0006Ur-00
	for classpath@gnu.org; Mon, 03 Mar 2003 23:30:14 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18q44B-0006P0-00
	for classpath@gnu.org; Mon, 03 Mar 2003 23:30:12 -0500
Received: from adsl-63-194-81-26.dsl.snfc21.pacbell.net ([63.194.81.26]
	helo=InterJet.dellroad.org)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)	id 18q44A-0006M8-00
	for classpath@gnu.org; Mon, 03 Mar 2003 23:30:11 -0500
Received: from arch20m.dellroad.org (arch20m.dellroad.org [10.1.1.20])
	by InterJet.dellroad.org (8.9.1a/8.9.1) with ESMTP id UAA51345;
	Mon, 3 Mar 2003 20:27:38 -0800 (PST)
Received: from arch20m.dellroad.org (localhost [127.0.0.1])
	by arch20m.dellroad.org (8.12.6/8.12.6) with ESMTP id h243RRn6006010;
	Mon, 3 Mar 2003 19:27:27 -0800 (PST)
	(envelope-from archie@arch20m.dellroad.org)
Received: (from archie@localhost)
	by arch20m.dellroad.org (8.12.6/8.12.6/Submit) id h243RQxe006009;
	Mon, 3 Mar 2003 19:27:26 -0800 (PST)
	(envelope-from archie)
From: Archie Cobbs <archie@dellroad.org>
Message-Id: <200303040327.h243RQxe006009@arch20m.dellroad.org>
In-Reply-To: <1046731875.8730.113.camel@elsschot>
To: Mark Wielaard <mark@klomp.org>
Date: Mon, 3 Mar 2003 19:27:25 -0800 (PST)
X-Mailer: ELM [version 2.4ME+ PL99b (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
cc: Jeroen Frijters <jeroen@sumatra.nl>
cc: classpath@gnu.org
cc: "Prof. Etienne M. Gagnon" <etienne.gagnon@uqam.ca>
Subject: Re: Class loader optimization patch
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Tue, 04 Mar 2003 04:30:16 -0000

Mark Wielaard wrote:
> > Or, maybe there's another motivation for this change that I missed?
> 
> It is mainly startup time that can be reduced somewhat. Big applications
> such as Eclipse create a new ClassLoader for every component (and stack

I kindof agree with Etienne but also love to optimize things too :-)

Here's another slant on this idea: if you don't care about the
stack trace, there's no reason an exception object can't be
reused. So the native code could just keep around a pre-allocated
exception object and throw it over and over again as necessary.
Since it's always caught, it will never "escape" into any code
that could try to print out its stack trace.

This might actually be faster than returning null, depending on
the relative speed of unwinding the stack via throwing an exception
versus unwinding the stack via successive returns.

-Archie

__________________________________________________________________________
Archie Cobbs     *     Precision I/O      *     http://www.precisionio.com



From MAILER-DAEMON Mon Mar 03 23:46:04 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18q4JA-0007Lc-00
	for mharc-classpath@gnu.org; Mon, 03 Mar 2003 23:45:40 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18q4Ik-00077a-00
	for classpath@gnu.org; Mon, 03 Mar 2003 23:45:14 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18q4Ih-00075J-00
	for classpath@gnu.org; Mon, 03 Mar 2003 23:45:12 -0500
Received: from adsl-63-194-81-26.dsl.snfc21.pacbell.net ([63.194.81.26]
	helo=InterJet.dellroad.org)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)	id 18q4Ih-00074l-00
	for classpath@gnu.org; Mon, 03 Mar 2003 23:45:11 -0500
Received: from arch20m.dellroad.org (arch20m.dellroad.org [10.1.1.20])
	by InterJet.dellroad.org (8.9.1a/8.9.1) with ESMTP id UAA51396;
	Mon, 3 Mar 2003 20:31:11 -0800 (PST)
Received: from arch20m.dellroad.org (localhost [127.0.0.1])
	by arch20m.dellroad.org (8.12.6/8.12.6) with ESMTP id h243V0n6006023;
	Mon, 3 Mar 2003 19:31:00 -0800 (PST)
	(envelope-from archie@arch20m.dellroad.org)
Received: (from archie@localhost)
	by arch20m.dellroad.org (8.12.6/8.12.6/Submit) id h243UxjA006022;
	Mon, 3 Mar 2003 19:30:59 -0800 (PST)
	(envelope-from archie)
From: Archie Cobbs <archie@dellroad.org>
Message-Id: <200303040330.h243UxjA006022@arch20m.dellroad.org>
In-Reply-To: <200303040043.h240hm8b002963@piglet.dstc.edu.au>
To: Stephen Crawley <crawley@dstc.edu.au>
Date: Mon, 3 Mar 2003 19:30:59 -0800 (PST)
X-Mailer: ELM [version 2.4ME+ PL99b (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
cc: crawley@piglet.dstc.edu.au
cc: classpath@gnu.org
cc: Mark Wielaard <mark@klomp.org>
Subject: Re: Thoughts on 'reference classes'
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Tue, 04 Mar 2003 04:45:38 -0000

Stephen Crawley wrote:
> > > Fun! Do you have specific needs that non of the current ones fullfill or
> > > do you just like the challenge?
> > 
> > The main reason is that I just want one of my own for the fun of it! :-)
> > That also means I understand it and can debug it competently if something
> > breaks. Other motivations are portability/suitabilty for use on embedded
> > systems. E.g. I'm tired of programming in C all the time when programming
> > in Java would be so much nicer, but is not practical for various reasons.
> 
> None of that explains why it would be a good idea to impose your changes
> on other Classpath-based projects.  I've no problem with you having fun
> with "vm/reference", but I'd object to being burdened with tracking the
> results in Kissme ... unless there was a clear benefit overall.

Naturally.. I wouldn't want any one VM to impose itself onto the
others for no good reason either.

But the exact meaning of "clear benefit overall" requires discussion,
which is why it seems worthwhile to bring these questions up.  

Cheers,
-Archie

__________________________________________________________________________
Archie Cobbs     *     Precision I/O      *     http://www.precisionio.com



From MAILER-DAEMON Tue Mar 04 03:48:49 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18q86S-0004Qb-00
	for mharc-classpath@gnu.org; Tue, 04 Mar 2003 03:48:48 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18q86P-0004N8-00
	for classpath@gnu.org; Tue, 04 Mar 2003 03:48:45 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18q854-00043U-00
	for classpath@gnu.org; Tue, 04 Mar 2003 03:47:22 -0500
Received: from nat.acunia.com ([194.7.211.211] helo=mail.acunia.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18q84f-0003Xw-00
	for classpath@gnu.org; Tue, 04 Mar 2003 03:46:57 -0500
Received: from sophocles.leuven.intern.acunia.com
	(sophocles.leuven.intern.acunia.com [10.0.1.34])
	by mail.acunia.com (8.11.6/8.11.6) with ESMTP id h248kIt26173;
	Tue, 4 Mar 2003 09:46:18 +0100
Date: Tue, 4 Mar 2003 09:08:52 +0100 (CET)
From: Chris Gray <chris.gray@acunia.com>
X-X-Sender: gray@sophocles.leuven.intern.acunia.com
To: Archie Cobbs <archie@precisionio.com>
In-Reply-To: <3E63A2AF.3020304@precisionio.com>
Message-ID: <Pine.LNX.4.44.0303040906170.3654-100000@sophocles.leuven.intern.acunia.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
cc: classpath@gnu.org
cc: Chris Gray <chris.gray@acunia.com>
cc: Mark Wielaard <mark@klomp.org>
cc: tromey@redhat.com
Subject: Re: Method.equals() question
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Tue, 04 Mar 2003 08:48:46 -0000

On Mon, 3 Mar 2003, Archie Cobbs wrote:

> Chris Gray wrote:
> >>>I'm assuming here that the VM guarantees that only one Method object
> >>>will ever be created for each declared method in a class.

No I didn't.

> >>I used to think that this would be the optimal thing todo for a VM. [...]

Nor that neither. Just for the sake of accuracy. ;>

-- 

Chris Gray

VM Architect, ACUNIA





From MAILER-DAEMON Tue Mar 04 04:00:10 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18q8HM-0000Sr-00
	for mharc-classpath@gnu.org; Tue, 04 Mar 2003 04:00:04 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18q8HB-00006w-00
	for classpath@gnu.org; Tue, 04 Mar 2003 03:59:53 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18q8GZ-0007zT-00
	for classpath@gnu.org; Tue, 04 Mar 2003 03:59:46 -0500
Received: from 62-177-154-234.bbeyond.nl ([62.177.154.234]
	helo=LEMBU.sumatrasoftware.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)	id 18q8Fq-0007Fl-00
	for classpath@gnu.org; Tue, 04 Mar 2003 03:58:30 -0500
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Date: Tue, 4 Mar 2003 09:57:35 +0100
Message-ID: <5C38B761F205B54BA59FF611A65C62480118A8@lembu.sumatrasoftware.com>
X-MimeOLE: Produced By Microsoft Exchange V6.5.6803.0
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: Class loader optimization patch
Thread-Index: AcLiBp6wyCxkjf7uStua9T+1X5WoPgAIEbVQ
From: "Jeroen Frijters" <jeroen@sumatra.nl>
To: "Archie Cobbs" <archie@dellroad.org>,
	"Mark Wielaard" <mark@klomp.org>
cc: classpath@gnu.org
cc: "Prof. Etienne M. Gagnon" <etienne.gagnon@uqam.ca>
Subject: RE: Class loader optimization patch
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Tue, 04 Mar 2003 09:00:00 -0000

Archie Cobbs wrote:
> Here's another slant on this idea: if you don't care about the
> stack trace, there's no reason an exception object can't be
> reused. So the native code could just keep around a pre-allocated
> exception object and throw it over and over again as necessary.
> Since it's always caught, it will never "escape" into any code
> that could try to print out its stack trace.

Just to point out that not all VMs are the same, on ikvm throwing an
exception will always cause a stack trace to be built, I cannot avoid
that, because that is just the way the underlying platform (.NET) works.

BTW, the stack crawl is basically what I'm trying to avoid, object
allocation is not a bottle neck for me, but when Eclipse is starting up
the stacks are fairly deep and like Mark said there are multiple levels
of class loaders loading on the order of 3000 classes before Eclipse
starts up. Throwing ClassNotFoundExceptions is a major part of the
Eclipse startup time for ikvm.

Regards,
Jeroen



From MAILER-DAEMON Tue Mar 04 04:44:05 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18q8xi-0003uI-00
	for mharc-classpath@gnu.org; Tue, 04 Mar 2003 04:43:50 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18q8xd-0003jd-00
	for classpath@gnu.org; Tue, 04 Mar 2003 04:43:45 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18q8xb-0003em-00
	for classpath@gnu.org; Tue, 04 Mar 2003 04:43:44 -0500
Received: from moutvdom.kundenserver.de ([212.227.126.252])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18q8xG-0003GN-00
	for Classpath@gnu.org; Tue, 04 Mar 2003 04:43:22 -0500
Received: from [212.227.126.222] (helo=mrvdomng.kundenserver.de)
	by moutvdom.kundenserver.de with esmtp (Exim 3.35 #1)
	id 18q8bU-0005La-00
	for Classpath@gnu.org; Tue, 04 Mar 2003 10:20:52 +0100
Received: from [212.126.196.45] (helo=aicas.com)
	by mrvdomng.kundenserver.de with esmtp (Exim 3.35 #1)
	id 18q8bU-0002Zb-00; Tue, 04 Mar 2003 10:20:52 +0100
Message-ID: <3E646FF3.5080906@aicas.com>
Date: Tue, 04 Mar 2003 10:20:51 +0100
From: "Dr. Torsten Rupp" <rupp@aicas.com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3a) Gecko/20021212
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: Classpath@gnu.org
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Subject: C native layer (pre-announcement)
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Tue, 04 Mar 2003 09:43:48 -0000

Dear developers,

I'm a software engineer at aicas GmbH, Karlsruhe/Germany in the group
"operating systems". As formerly discusses with Brian Jones and my
college Andy Walter I adapted our 'C native layer' for the GNU
classpath project to be able to port the library to different operating
systems. The first version of this new layer for GNU classpath under
Linux is now complete. Because of too much other things to do we had a
delay in providing the C native layer to the GNU classpath project
earlier, but now we believe we are ready.

Currently there is a discussion to merge some or all of the native
functions with the GCJ project. Because this will probably have some
influence to the changes I made to the GNU classpath sources I want to 
post the following read-me in this list before I check-in the new
sources. Please feel free to send me your comments. We use the native 
layer already in our VM "Jamaica" and currently I'm working on native 
layers for other operating systems, like vxWorks, Cygwin or QNX.

Maybe someone who is familiar with the GCJ project, too, would also be
able to check if the C native layer could also be used with the GCJ
project and how to make some "super merge". Any hints are welcome.

Sincerely,

Torsten


The GNU classpath native layer
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

To enable GNU classpath to run on a diverse array of different hardware
platforms, a new native software layer has been added. This layer hide all
machine and hardware dependent issues except common available definitions,
which are ANSI C functions. For each targets system where the GNU classpath
library is to be used, a specific set of native layer functions have to be
provided. A generic set of functions is provided for Unix like systems
(currently tested only with Linux). For a new target system, some or
all native layer functions have to be rewritten. The following scheme
illustrate the native layer.

             Java API
       ----------------------
      |    Java classes      |
      | -------------------- |
      |  C native functions  |
      | -------------------- |
   >> |    C native layer    |  <<
      | -------------------- |
      |   operating system   |
      | -------------------- |
      |       hardware       |
       ----------------------

The C native layer is implemented as a set of C pre-processor native macros.
These macros expand to the appropriated native code. Macros are used
instead function calls to give optimal performance and small code size.
Of course in special cases, a macro can also expand to a function call
if this is needed. This approach provide a flexible and efficient
implementation of the native layer.

The naming pattern for native macros is like follows:

   TARGET_NATIVE_<module name>_<macro name>

where <module name> is a name of a module, e. g. FILE; <macro name> is
the name of the specific native macro, e. g. OPEN_READ.

The parameters for the macro use in general (with a few exceptions) the
scheme

   <parameter>,<parameter>,...,<result>

where <parameter> is input/output parameter and <result> is the result
code TARGET_NATIVE_OK or TARGET_NATIVE_ERROR. Specific error codes
and error strings can be gotten with

   TARGET_NATIVE_LAST_ERROR and
   TARGET_NATIVE_LAST_ERROR_STRING

(see also file target_generic.h).

For a single target system there exists two sets of native macros in
the files

   a) <target name>/target_native_<module name>.h
   b) generic/target_generic_<module name>.h

The macros in "a" are target specific implementations of native
functions, the macros in "b" are generic implementations (for Unix) of
the same native functions. If a native macro is not defined in the file
"a", then the definition in file "b" is used (there is a check to see if
a native macros is already defined elsewhere). This technique enables
"a" to 'overwrite' single generic native macros with specific native
macros for a specific target. In the default case, where only the
generic implementation of the native macros is used, the files in the
directory '<target name>' are empty except for the mandatory include of the
generic header file in the directory 'generic' at the end. Please
look at the existing Linux target specific files.

The directory and file structure is as follows.

   native
    ...
     |
     |--- target
     |      |
     |      |--- Linux
     |      |      |--- target_native_<module name>.h
     |      |      |--- ...
     |      |     ...
     |      |--- ...
     |      |--- generic
     |      |      |--- target_generic_<module name>.h
     |      |      |--- ...
    ...    ...    ...


Include hierarchy is as follows.

   native file <name>
     --> include 'target_native_<module name>.h'
                   ...
                   <target specific definitions>
                   ...
                   --> include 'target_generic_<module name>.h'
                                 ...
                                 <generic definitions>
                                 ...

When writing native code, please take care with the following.

  - Use _only_ ANSI C specific functions directly which are available
    on all target systems with the same parameters, e. g. strdup() is
    not an ANSI C function, thus is is not available on all systems; mkdir()
    expect on some systems different parameters.

    !!!Do NOT use this functions in your native code!!!

    Instead

    * if a function is not available, create a native macro in the file

      <target name>/target_native_<module name>.h

    * if it is a generic function, include a generic implementation in

      generic/target_generic_<module name>.h

    * Then use this macro in your native code.

  - Avoid _all_ OS specific data types and constants, e. g. structures 
or error
    numbers. Instead, wrap them in a native macro and convert the values to
    basic scalar types like char, int, double or long.

  - Take care with 64 bit values; the are machine dependent. Not all
    target system support 64 bit operations. The macros in
    target_generic_math_int.h give a set of macros implementing 64 bit
    operations and constants.

  - Avoid - if possible - non-reentrant functions. Non-reentrant functions
    cause strange problems on some multitasking systems.

  - Avoid - if possible - dynamic data types created by malloc() and similar
    functions. Instead use (local) static variables to avoid stack usage.
    On some target systems, dynamic memory management is either slow or even
    dangerous. Moreover malloc()-calls can cause fragmentation of the system
    memory, which could result in a system crash or an application failure.

For some examples, please look in the current implementation for
Linux in the directory 'target/Linux' and the generic implementation in
the directory 'target/generic'.


                                         aicas GmbH, February 2003






From MAILER-DAEMON Tue Mar 04 04:46:03 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18q8zE-0005R2-00
	for mharc-classpath@gnu.org; Tue, 04 Mar 2003 04:45:24 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18q8ys-0004zP-00
	for classpath@gnu.org; Tue, 04 Mar 2003 04:45:02 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18q8yq-0004yp-00
	for classpath@gnu.org; Tue, 04 Mar 2003 04:45:01 -0500
Received: from 62-177-154-234.bbeyond.nl ([62.177.154.234]
	helo=LEMBU.sumatrasoftware.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)	id 18q8yk-0004n8-00
	for classpath@gnu.org; Tue, 04 Mar 2003 04:44:54 -0500
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Date: Tue, 4 Mar 2003 10:44:00 +0100
Message-ID: <5C38B761F205B54BA59FF611A65C62480118A9@lembu.sumatrasoftware.com>
X-MimeOLE: Produced By Microsoft Exchange V6.5.6803.0
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: Class loader optimization patch
Thread-Index: AcLh10qo3Wp7HnvtTwGRGZsjgrnYGgAWf49g
From: "Jeroen Frijters" <jeroen@sumatra.nl>
To: "Mark Wielaard" <mark@klomp.org>,
	"Prof. Etienne M. Gagnon" <etienne.gagnon@uqam.ca>
cc: classpath@gnu.org
Subject: RE: Class loader optimization patch
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Tue, 04 Mar 2003 09:45:22 -0000

Mark Wielaard wrote:
> Note that this is a very nice speed tests for the different VMs. It
> takes minutes before the main Eclipse Window shows up even on a fast
> machine. Maybe we can have a price for the first VM that=20
> manages to load Eclipse under one minute on some standard PC
> (say 1Ghz Athlon/Pentium with 512MB).

1 minute 12 seconds is the best I can do at the moment. This is with
Eclipse 2.1 RC1 with no windows open on an 850 MHz Pentium III with
512MB. Getting to the point where I can edit Java code takes a couple
minutes more though.

For reference, starting eclipse.exe (using Sun's JRE 1.4.1) takes 11
seconds.

Regards,
Jeroen



From MAILER-DAEMON Tue Mar 04 07:30:49 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18qBZE-0003yh-00
	for mharc-classpath@gnu.org; Tue, 04 Mar 2003 07:30:44 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18qBZB-0003sB-00
	for classpath@gnu.org; Tue, 04 Mar 2003 07:30:41 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18qBZ0-0003kd-00
	for classpath@gnu.org; Tue, 04 Mar 2003 07:30:31 -0500
Received: from ms-smtp-03.southeast.rr.com ([24.93.67.84])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18qBYK-0002wj-00
	for classpath@gnu.org; Tue, 04 Mar 2003 07:29:48 -0500
Received: from mail3.nc.rr.com (fe3 [24.93.67.50])h24CSji6020628;
	Tue, 4 Mar 2003 07:28:45 -0500 (EST)
Received: from lyta.haphazard.org ([66.57.9.48]) by mail3.nc.rr.com  with
	Microsoft SMTPSVC(5.5.1877.757.75);	 Tue, 4 Mar 2003 07:27:46 -0500
Received: by lyta.haphazard.org (Postfix, from userid 500)
	id 016D2BEA92; Tue,  4 Mar 2003 07:29:33 -0500 (EST)
Sender: cbj@haphazard.org
To: "Jeroen Frijters" <jeroen@sumatra.nl>
References: <5C38B761F205B54BA59FF611A65C62480118A9@lembu.sumatrasoftware.com>
From: Brian Jones <cbj@gnu.org>
Date: 04 Mar 2003 07:29:33 -0500
In-Reply-To: <5C38B761F205B54BA59FF611A65C62480118A9@lembu.sumatrasoftware.com>
Message-ID: <m37kbfe2mq.fsf@lyta.haphazard.org>
Lines: 11
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: classpath@gnu.org
cc: Mark Wielaard <mark@klomp.org>
cc: "Prof. Etienne M. Gagnon" <etienne.gagnon@uqam.ca>
Subject: Re: Class loader optimization patch
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Tue, 04 Mar 2003 12:30:43 -0000

"Jeroen Frijters" <jeroen@sumatra.nl> writes:

> For reference, starting eclipse.exe (using Sun's JRE 1.4.1) takes 11
> seconds.

Is Hotspot providing this factor of 10 improvement?  I assume the
measurement was with the client hotspot.

Brian
-- 
Brian Jones <cbj@gnu.org>



From MAILER-DAEMON Tue Mar 04 07:58:59 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18qC0Z-0008Vk-00
	for mharc-classpath@gnu.org; Tue, 04 Mar 2003 07:58:59 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18qC0W-0008NN-00
	for classpath@gnu.org; Tue, 04 Mar 2003 07:58:56 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18qC0U-0008Hb-00
	for classpath@gnu.org; Tue, 04 Mar 2003 07:58:54 -0500
Received: from 62-177-154-234.bbeyond.nl ([62.177.154.234]
	helo=LEMBU.sumatrasoftware.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18qC0R-00089r-00; Tue, 04 Mar 2003 07:58:52 -0500
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Date: Tue, 4 Mar 2003 13:57:57 +0100
Message-ID: <5C38B761F205B54BA59FF611A65C62480118AB@lembu.sumatrasoftware.com>
X-MimeOLE: Produced By Microsoft Exchange V6.5.6803.0
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: Class loader optimization patch
Thread-Index: AcLiSaFmLNI/djNtTbKnUUr3h9yZYwAAr3cw
From: "Jeroen Frijters" <jeroen@sumatra.nl>
To: "Brian Jones" <cbj@gnu.org>
cc: classpath@gnu.org
cc: Mark Wielaard <mark@klomp.org>
cc: "Prof. Etienne M. Gagnon" <etienne.gagnon@uqam.ca>
Subject: RE: Class loader optimization patch
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Tue, 04 Mar 2003 12:58:57 -0000

Brian Jones wrote:
> "Jeroen Frijters" <jeroen@sumatra.nl> writes:
>=20
> > For reference, starting eclipse.exe (using Sun's JRE 1.4.1) takes 11
> > seconds.
>=20
> Is Hotspot providing this factor of 10 improvement?  I assume the
> measurement was with the client hotspot.

Not sure what you mean, but yes, that measurement was taken with the
HotSpot Client VM. The startup time difference between Sun's VM and ikvm
isn't due to HotSpot though. Class loading is just very slow on ikvm,
because it has to convert the Java classes into .NET classes and then
the .NET runtime has to load those, plus the fact that my
verifier/compiler isn't very fast either and I probably have to load
more classes than the Sun VM (because I cannot be as lazy as I would
like to, due to the design of the dynamic code generation support in
.NET).

Regards,
Jeroen



From MAILER-DAEMON Tue Mar 04 08:09:03 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18qCAI-0003F0-00
	for mharc-classpath@gnu.org; Tue, 04 Mar 2003 08:09:02 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18qCAB-00031w-00
	for classpath@gnu.org; Tue, 04 Mar 2003 08:08:55 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18qCA6-0002tq-00
	for classpath@gnu.org; Tue, 04 Mar 2003 08:08:51 -0500
Received: from ms-smtp-03.southeast.rr.com ([24.93.67.84])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18qC9y-0002dK-00
	for Classpath@gnu.org; Tue, 04 Mar 2003 08:08:42 -0500
Received: from mail3.nc.rr.com (fe3 [24.93.67.50])h24D7ci6020998;
	Tue, 4 Mar 2003 08:07:38 -0500 (EST)
Received: from lyta.haphazard.org ([66.57.9.48]) by mail3.nc.rr.com  with
	Microsoft SMTPSVC(5.5.1877.757.75);	 Tue, 4 Mar 2003 08:06:39 -0500
Received: by lyta.haphazard.org (Postfix, from userid 500)
	id 8E101BEA92; Tue,  4 Mar 2003 08:08:26 -0500 (EST)
Sender: cbj@haphazard.org
To: "Dr. Torsten Rupp" <rupp@aicas.com>
References: <3E646FF3.5080906@aicas.com>
From: Brian Jones <cbj@gnu.org>
Date: 04 Mar 2003 08:08:26 -0500
In-Reply-To: <3E646FF3.5080906@aicas.com>
Message-ID: <m33cm3e0tx.fsf@lyta.haphazard.org>
Lines: 107
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: Classpath@gnu.org
Subject: Re: C native layer (pre-announcement)
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Tue, 04 Mar 2003 13:09:01 -0000

"Dr. Torsten Rupp" <rupp@aicas.com> writes:

> Currently there is a discussion to merge some or all of the native
> functions with the GCJ project. 

It's come up in the past.  The essential problem, for lack of a better
term, is that because underlying code is not shared that native bugs
must be fixed in two source trees.

> Because this will probably have some influence to the changes I made
> to the GNU classpath sources I want to post the following read-me in
> this list before I check-in the new sources. 

It would be a good idea to post the "patch" to the mailing list first
by using 'cvs diff -u' due to the size.  Except for one minor
directory name change I have no complaints.

> The GNU classpath native layer
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> To enable GNU classpath to run on a diverse array of different hardware
> platforms, a new native software layer has been added. This layer hide all
> machine and hardware dependent issues except common available definitions,
> which are ANSI C functions. For each targets system where the GNU classpath
> library is to be used, a specific set of native layer functions have to be
> provided. A generic set of functions is provided for Unix like systems
> (currently tested only with Linux). For a new target system, some or
> all native layer functions have to be rewritten. The following scheme
> illustrate the native layer.
> 
>              Java API
>        ----------------------
>       |    Java classes      |
>       | -------------------- |
>       |  C native functions  |
>       | -------------------- |
>    >> |    C native layer    |  <<
>       | -------------------- |
>       |   operating system   |
>       | -------------------- |
>       |       hardware       |
>        ----------------------
> 
> The C native layer is implemented as a set of C pre-processor native macros.
> These macros expand to the appropriated native code. Macros are used
> instead function calls to give optimal performance and small code size.
> Of course in special cases, a macro can also expand to a function call
> if this is needed. This approach provide a flexible and efficient
> implementation of the native layer.

When this becomes part of Classpath would you mind adding this
information to the hacker's guide or as a lesser option adding this
README to CVS as well?

> The directory and file structure is as follows.
> 
>    native
>     ...
>      |
>      |--- target

Should this 'target' be called 'macros'?

>      |      |
>      |      |--- Linux
>      |      |      |--- target_native_<module name>.h
>      |      |      |--- ...
>      |      |     ...
>      |      |--- ...
>      |      |--- generic
>      |      |      |--- target_generic_<module name>.h
>      |      |      |--- ...
>     ...    ...    ...
> 
> 
> When writing native code, please take care with the following.
> 
>   - Use _only_ ANSI C specific functions directly which are available
>     on all target systems with the same parameters, e. g. strdup() is
>     not an ANSI C function, thus is is not available on all systems; mkdir()
>     expect on some systems different parameters.
> 
>     !!!Do NOT use this functions in your native code!!!

I don't think I have a handy reference for what ANSI C functions are
generally available on most systems with the same arguments.  Where
would I look?

>   - Avoid _all_ OS specific data types and constants,
> e. g. structures or error numbers. Instead, wrap them in a native
> macro and convert the values to basic scalar types like char, int,
> double or long.

I'd like to see how you deal with the 'tm' structure for time/date
data.

>   - Avoid - if possible - non-reentrant functions. Non-reentrant functions
>     cause strange problems on some multitasking systems.

I'm confused about when to worry about this.  Does it matter for
synchronized methods?  Does it matter for all native code?  Does ANSI
define what is reentrant?

That's all my thoughts for now,
Brian
-- 
Brian Jones <cbj@gnu.org>



From MAILER-DAEMON Tue Mar 04 09:14:52 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18qDAE-0002l9-00
	for mharc-classpath@gnu.org; Tue, 04 Mar 2003 09:13:02 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18qD9t-00028s-00
	for classpath@gnu.org; Tue, 04 Mar 2003 09:12:41 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18qD9q-000248-00
	for classpath@gnu.org; Tue, 04 Mar 2003 09:12:39 -0500
Received: from 62-177-154-234.bbeyond.nl ([62.177.154.234]
	helo=LEMBU.sumatrasoftware.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)	id 18qD9q-00023S-00
	for classpath@gnu.org; Tue, 04 Mar 2003 09:12:38 -0500
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: multipart/mixed;
	boundary="----_=_NextPart_001_01C2E257.FC25B25A"
Date: Tue, 4 Mar 2003 15:11:44 +0100
X-MimeOLE: Produced By Microsoft Exchange V6.5.6803.0
Message-ID: <5C38B761F205B54BA59FF611A65C62480118AE@lembu.sumatrasoftware.com>
X-MS-Has-Attach: yes
X-MS-TNEF-Correlator: 
Thread-Topic: Small ZipFile patch
Thread-Index: AcLiWAAufgD8l/Y+ReuTIelOMRbEpQ==
From: "Jeroen Frijters" <jeroen@sumatra.nl>
To: <classpath@gnu.org>
Subject: Small ZipFile patch
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Tue, 04 Mar 2003 14:12:59 -0000

This is a multi-part message in MIME format.

------_=_NextPart_001_01C2E257.FC25B25A
Content-Type: multipart/alternative;
	boundary="----_=_NextPart_002_01C2E257.FC25B25A"


------_=_NextPart_002_01C2E257.FC25B25A
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Hi,

ZipFile has a finalizer (it shouldn't!) and that tries to close the
RandomAccessFile, even the RandomAccessFile never was created, this
causes an NPE during finalization, not a big deal, but since .NET 1.1
decided to print these to the console, it's kind of distracting.

ZipFile really shouldn't have a finalizer though (if you have a pure
Java implementation). Only classes that own native resources should have
finalizers.

BTW, the design of the 1.0 I/O classes is less than stellar. Since the
FileDescriptor class is the owner of the native resource, it should have
had a finalizer, instead of FileInputStream and FileOutputStream (for
some reason RandomAccessFile doesn't have a finalizer). I guess I should
be a bit mild in my criticism, finalizers weren't very well understood
back then...

BTW 2, in gnu\java\nio\ServerSocketChannelImpl.java and
gnu\java\nio\SocketChannelImpl.java both have method called finalize*r*
and that probably should be finalize (although since these classes do
not seem to own any native resources, they really don't need a
finalizer).

Regards,
Jeroen

------_=_NextPart_002_01C2E257.FC25B25A
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
6.5.6803.0">
<TITLE>Small ZipFile patch</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=3D2>Hi,</FONT>
</P>

<P><FONT SIZE=3D2>ZipFile has a finalizer (it shouldn't!) and that tries =
to close the RandomAccessFile, even the RandomAccessFile never was =
created, this causes an NPE during finalization, not a big deal, but =
since .NET 1.1 decided to print these to the console, it's kind of =
distracting.</FONT></P>

<P><FONT SIZE=3D2>ZipFile really shouldn't have a finalizer though (if =
you have a pure Java implementation). Only classes that own native =
resources should have finalizers.</FONT></P>

<P><FONT SIZE=3D2>BTW, the design of the 1.0 I/O classes is less than =
stellar. Since the FileDescriptor class is the owner of the native =
resource, it should have had a finalizer, instead of FileInputStream and =
FileOutputStream (for some reason RandomAccessFile doesn't have a =
finalizer). I guess I should be a bit mild in my criticism, finalizers =
weren't very well understood back then...</FONT></P>

<P><FONT SIZE=3D2>BTW 2, in gnu\java\nio\ServerSocketChannelImpl.java =
and gnu\java\nio\SocketChannelImpl.java both have method called =
finalize*r* and that probably should be finalize (although since these =
classes do not seem to own any native resources, they really don't need =
a finalizer).</FONT></P>

<P><FONT SIZE=3D2>Regards,</FONT>

<BR><FONT SIZE=3D2>Jeroen</FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_002_01C2E257.FC25B25A--

------_=_NextPart_001_01C2E257.FC25B25A
Content-Type: application/octet-stream;
	name="zipfile.patch"
Content-Transfer-Encoding: base64
Content-Description: zipfile.patch
Content-Disposition: attachment;
	filename="zipfile.patch"

SW5kZXg6IGphdmEvdXRpbC96aXAvWmlwRmlsZS5qYXZhDQo9PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQpSQ1MgZmlsZTog
L2N2c3Jvb3QvY2xhc3NwYXRoL2NsYXNzcGF0aC9qYXZhL3V0aWwvemlwL1ppcEZpbGUuamF2YSx2
DQpyZXRyaWV2aW5nIHJldmlzaW9uIDEuMTINCmRpZmYgLXUgLXIxLjEyIFppcEZpbGUuamF2YQ0K
LS0tIGphdmEvdXRpbC96aXAvWmlwRmlsZS5qYXZhCTIwIEZlYiAyMDAzIDE1OjQxOjIwIC0wMDAw
CTEuMTINCisrKyBqYXZhL3V0aWwvemlwL1ppcEZpbGUuamF2YQk0IE1hciAyMDAzIDEzOjM1OjE4
IC0wMDAwDQpAQCAtMzEwLDcgKzMxMCw3IEBADQogICAgKi8NCiAgIHByb3RlY3RlZCB2b2lkIGZp
bmFsaXplKCkgdGhyb3dzIElPRXhjZXB0aW9uDQogICB7DQotICAgIGlmICghY2xvc2VkKSBjbG9z
ZSgpOw0KKyAgICBpZiAoIWNsb3NlZCAmJiByYWYgIT0gbnVsbCkgY2xvc2UoKTsNCiAgIH0NCiAN
CiAgIC8qKg0K

------_=_NextPart_001_01C2E257.FC25B25A--



From MAILER-DAEMON Tue Mar 04 09:40:23 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18qDXx-0002WZ-00
	for mharc-classpath@gnu.org; Tue, 04 Mar 2003 09:37:33 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18qDWm-0001lu-00
	for classpath@gnu.org; Tue, 04 Mar 2003 09:36:20 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18qDP6-0006Ky-00
	for classpath@gnu.org; Tue, 04 Mar 2003 09:28:25 -0500
Received: from 62-177-154-234.bbeyond.nl ([62.177.154.234]
	helo=LEMBU.sumatrasoftware.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)	id 18qDO2-0005eg-00
	for classpath@gnu.org; Tue, 04 Mar 2003 09:27:18 -0500
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Date: Tue, 4 Mar 2003 15:26:24 +0100
X-MimeOLE: Produced By Microsoft Exchange V6.5.6803.0
Message-ID: <5C38B761F205B54BA59FF611A65C62480118AF@lembu.sumatrasoftware.com>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: More finalize woes
Thread-Index: AcLiWiEuCxrApIjlTlWKS88ZLxvo5w==
From: "Jeroen Frijters" <jeroen@sumatra.nl>
To: <classpath@gnu.org>
Subject: More finalize woes
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Tue, 04 Mar 2003 14:37:31 -0000

Hi,

Classpath's java.io.BufferedOutputStream has a finalize, but Java API
docs say it shouldn't have it.

java.util.zip.[De|In]flater both have an empty finalize method "for
compatibility". Is this really necessary?

If the existence of a finalizer really is significant,  it should be
removed from java.util.Timer and that should be reimplemented using a
weak reference.

Regards,
Jeroen



From MAILER-DAEMON Tue Mar 04 10:04:08 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18qDwj-0002LH-00
	for mharc-classpath@gnu.org; Tue, 04 Mar 2003 10:03:09 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18qDwM-0001aj-00
	for classpath@gnu.org; Tue, 04 Mar 2003 10:02:46 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18qDwE-0001Eg-00
	for classpath@gnu.org; Tue, 04 Mar 2003 10:02:38 -0500
Received: from pop2a.ripco.com ([209.100.227.25])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18qDw4-0000pR-00
	for classpath@gnu.org; Tue, 04 Mar 2003 10:02:28 -0500
Received: (from arenn@localhost)
	by pop2a.ripco.com (8.11.0/8.11.0) id h24F2Wh09173;
	Tue, 4 Mar 2003 09:02:32 -0600 (CST)
Date: Tue, 4 Mar 2003 09:02:32 -0600
From: "Aaron M. Renn" <arenn@urbanophile.com>
To: Jeroen Frijters <jeroen@sumatra.nl>
Message-ID: <20030304150231.GA9064@urbanophile.com>
Mail-Followup-To: "Aaron M. Renn" <arenn@urbanophile.com>,
	Jeroen Frijters <jeroen@sumatra.nl>, classpath@gnu.org
References: <5C38B761F205B54BA59FF611A65C62480118AE@lembu.sumatrasoftware.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <5C38B761F205B54BA59FF611A65C62480118AE@lembu.sumatrasoftware.com>
User-Agent: Mutt/1.4i
Organization: GNU's Not Unix!
cc: classpath@gnu.org
Subject: Re: Small ZipFile patch
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Tue, 04 Mar 2003 15:03:07 -0000

Jeroen Frijters (jeroen@sumatra.nl) wrote:
> BTW, the design of the 1.0 I/O classes is less than stellar. Since the
> FileDescriptor class is the owner of the native resource, it should have
> had a finalizer, instead of FileInputStream and FileOutputStream (for
> some reason RandomAccessFile doesn't have a finalizer). I guess I should
> be a bit mild in my criticism, finalizers weren't very well understood
> back then...

I am in the process of correcting this.

-- 
Aaron M. Renn (arenn@urbanophile.com) http://www.urbanophile.com/arenn/




From MAILER-DAEMON Tue Mar 04 10:05:14 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18qDyk-0003WA-00
	for mharc-classpath@gnu.org; Tue, 04 Mar 2003 10:05:14 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18qDyg-0003U4-00
	for classpath@gnu.org; Tue, 04 Mar 2003 10:05:10 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18qDyc-0003Oj-00
	for classpath@gnu.org; Tue, 04 Mar 2003 10:05:07 -0500
Received: from pop2a.ripco.com ([209.100.227.25])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18qDyb-0003NF-00
	for classpath@gnu.org; Tue, 04 Mar 2003 10:05:05 -0500
Received: (from arenn@localhost)
	by pop2a.ripco.com (8.11.0/8.11.0) id h24F5Bq09248;
	Tue, 4 Mar 2003 09:05:11 -0600 (CST)
Date: Tue, 4 Mar 2003 09:05:11 -0600
From: "Aaron M. Renn" <arenn@urbanophile.com>
To: Jeroen Frijters <jeroen@sumatra.nl>
Message-ID: <20030304150511.GB9064@urbanophile.com>
Mail-Followup-To: "Aaron M. Renn" <arenn@urbanophile.com>,
	Jeroen Frijters <jeroen@sumatra.nl>, classpath@gnu.org
References: <5C38B761F205B54BA59FF611A65C62480118AF@lembu.sumatrasoftware.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <5C38B761F205B54BA59FF611A65C62480118AF@lembu.sumatrasoftware.com>
User-Agent: Mutt/1.4i
Organization: GNU's Not Unix!
cc: classpath@gnu.org
Subject: Re: More finalize woes
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Tue, 04 Mar 2003 15:05:12 -0000

Jeroen Frijters (jeroen@sumatra.nl) wrote:
> Classpath's java.io.BufferedOutputStream has a finalize, but Java API
> docs say it shouldn't have it.

It appears to be commented out.  For finalizers, I'm not sure that it
is a huge deal if we have one when there isn't one listed in the API
documentation.  Though if one isn't needed, we should probably get rid
of it.

-- 
Aaron M. Renn (arenn@urbanophile.com) http://www.urbanophile.com/arenn/




From MAILER-DAEMON Tue Mar 04 10:21:56 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18qECz-0002Nr-00
	for mharc-classpath@gnu.org; Tue, 04 Mar 2003 10:19:57 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18qEBY-0001sy-00
	for classpath@gnu.org; Tue, 04 Mar 2003 10:18:28 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18qEBK-0001WX-00
	for classpath@gnu.org; Tue, 04 Mar 2003 10:18:16 -0500
Received: from 62-177-154-234.bbeyond.nl ([62.177.154.234]
	helo=LEMBU.sumatrasoftware.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)	id 18qEB5-0001AN-00
	for classpath@gnu.org; Tue, 04 Mar 2003 10:18:00 -0500
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Date: Tue, 4 Mar 2003 16:17:01 +0100
Message-ID: <5C38B761F205B54BA59FF611A65C62480118B0@lembu.sumatrasoftware.com>
X-MimeOLE: Produced By Microsoft Exchange V6.5.6803.0
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: Small ZipFile patch
Thread-Index: AcLiXvIEkOU1dsizTHSnnsozxjoIegAAg0Uw
From: "Jeroen Frijters" <jeroen@sumatra.nl>
To: "Aaron M. Renn" <arenn@urbanophile.com>
cc: classpath@gnu.org
Subject: RE: Small ZipFile patch
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Tue, 04 Mar 2003 15:19:55 -0000


Aaron M. Renn wrote:
> Jeroen Frijters (jeroen@sumatra.nl) wrote:
> > BTW, the design of the 1.0 I/O classes is less than=20
> stellar. Since the
> > FileDescriptor class is the owner of the native resource,=20
> it should have
> > had a finalizer, instead of FileInputStream and=20
> FileOutputStream (for
> > some reason RandomAccessFile doesn't have a finalizer). I=20
> guess I should
> > be a bit mild in my criticism, finalizers weren't very well=20
> understood
> > back then...
>=20
> I am in the process of correcting this.

My gripe really wasn't directed at the Classpath implementation, but at
the Sun implementation. How compatible do we want to be in this case?
Compatible and broken or a little less compatible and not so broken ;-)

Regards,
Jeroen



From MAILER-DAEMON Tue Mar 04 10:22:09 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18qEEK-0003GR-00
	for mharc-classpath@gnu.org; Tue, 04 Mar 2003 10:21:20 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18qEDn-0002t7-00
	for classpath@gnu.org; Tue, 04 Mar 2003 10:20:47 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18qEDZ-0002fQ-00
	for classpath@gnu.org; Tue, 04 Mar 2003 10:20:34 -0500
Received: from 62-177-154-234.bbeyond.nl ([62.177.154.234]
	helo=LEMBU.sumatrasoftware.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)	id 18qECn-0002GN-00
	for classpath@gnu.org; Tue, 04 Mar 2003 10:19:45 -0500
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Date: Tue, 4 Mar 2003 16:18:51 +0100
Message-ID: <5C38B761F205B54BA59FF611A65C62480118B1@lembu.sumatrasoftware.com>
X-MimeOLE: Produced By Microsoft Exchange V6.5.6803.0
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: More finalize woes
Thread-Index: AcLiX1DYEf+oRxQfS7KEd8sLFGh3wwAAg2Bg
From: "Jeroen Frijters" <jeroen@sumatra.nl>
To: "Aaron M. Renn" <arenn@urbanophile.com>
cc: classpath@gnu.org
Subject: RE: More finalize woes
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Tue, 04 Mar 2003 15:21:17 -0000

Aaron M. Renn wrote:
> Jeroen Frijters (jeroen@sumatra.nl) wrote:
> > Classpath's java.io.BufferedOutputStream has a finalize,=20
> but Java API
> > docs say it shouldn't have it.
>=20
> It appears to be commented out.  For finalizers, I'm not sure that it
> is a huge deal if we have one when there isn't one listed in the API
> documentation.  Though if one isn't needed, we should probably get rid
> of it.

You're right. I missed that. Sorry.

Regards,
Jeroen



From MAILER-DAEMON Tue Mar 04 10:28:25 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18qEJ8-00089k-00
	for mharc-classpath@gnu.org; Tue, 04 Mar 2003 10:26:18 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18qEIk-0007vj-00
	for classpath@gnu.org; Tue, 04 Mar 2003 10:25:54 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18qEI4-0006Wx-00
	for classpath@gnu.org; Tue, 04 Mar 2003 10:25:13 -0500
Received: from web10009.mail.yahoo.com ([216.136.128.120])
	by monty-python.gnu.org with smtp (Exim 4.10.13)
	id 18qEI1-0006Pr-00
	for classpath@gnu.org; Tue, 04 Mar 2003 10:25:10 -0500
Message-ID: <20030304152309.49045.qmail@web10009.mail.yahoo.com>
Received: from [139.19.20.90] by web10009.mail.yahoo.com via HTTP;
	Tue, 04 Mar 2003 07:23:09 PST
Date: Tue, 4 Mar 2003 07:23:09 -0800 (PST)
From: Dalibor Topic <robilad@yahoo.com>
To: Jeroen Frijters <jeroen@sumatra.nl>, classpath@gnu.org
In-Reply-To: <5C38B761F205B54BA59FF611A65C62480118AF@lembu.sumatrasoftware.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Subject: Re: More finalize woes
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Tue, 04 Mar 2003 15:26:17 -0000

Hi Jeroen,

--- Jeroen Frijters <jeroen@sumatra.nl> wrote:
> Hi,
> 
> Classpath's java.io.BufferedOutputStream has a
> finalize, but Java API
> docs say it shouldn't have it.

it's commented out, and should be removed from
classpath completely, in my opinion, just like the
close method. they are already implemented in
FilteredOutputStream (or should be, according to the
spec).

> java.util.zip.[De|In]flater both have an empty
> finalize method "for
> compatibility". Is this really necessary?

Yes, in order to have reflection on these methods
working. A pretty good reason in my opinion.

Beside, the finalize method in classpath's Deflater is
broken. It should call end() as the 1.4 spec demands,
instead of tweaking it for optimization purposes.

The optimization breaks code when you extend Deflater
for your own native implementation which relies on
finalize calling its end() to cleanup native
resources.

The analoguous case can be make for Inflater.

BTW, deprecating end() before it's deprecated in the
spec is a minor glitch that could be fixed in the same
swoop ;)

cheers,
dalibor topic

__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/



From MAILER-DAEMON Tue Mar 04 10:33:31 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18qEQ5-0003Pm-00
	for mharc-classpath@gnu.org; Tue, 04 Mar 2003 10:33:29 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18qEQ0-0003Hn-00
	for classpath@gnu.org; Tue, 04 Mar 2003 10:33:24 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18qEPN-0002Ws-00
	for classpath@gnu.org; Tue, 04 Mar 2003 10:32:47 -0500
Received: from pop2a.ripco.com ([209.100.227.25])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18qEOk-00023J-00
	for classpath@gnu.org; Tue, 04 Mar 2003 10:32:06 -0500
Received: (from arenn@localhost)
	by pop2a.ripco.com (8.11.0/8.11.0) id h24FWCZ10277
	for classpath@gnu.org; Tue, 4 Mar 2003 09:32:12 -0600 (CST)
Date: Tue, 4 Mar 2003 09:32:12 -0600
From: "Aaron M. Renn" <arenn@urbanophile.com>
To: classpath@gnu.org
Message-ID: <20030304153212.GA10039@urbanophile.com>
Mail-Followup-To: "Aaron M. Renn" <arenn@urbanophile.com>,
	classpath@gnu.org
References: <5C38B761F205B54BA59FF611A65C62480118B0@lembu.sumatrasoftware.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <5C38B761F205B54BA59FF611A65C62480118B0@lembu.sumatrasoftware.com>
User-Agent: Mutt/1.4i
Organization: GNU's Not Unix!
Subject: Re: Small ZipFile patch
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Tue, 04 Mar 2003 15:33:27 -0000

Jeroen Frijters (jeroen@sumatra.nl) wrote:
> > Jeroen Frijters (jeroen@sumatra.nl) wrote:
> > > BTW, the design of the 1.0 I/O classes is less than 
> > stellar. Since the
> > > FileDescriptor class is the owner of the native resource, 
> > it should have
> > > had a finalizer, instead of FileInputStream and 
> > FileOutputStream (for
> > > some reason RandomAccessFile doesn't have a finalizer). I 
> > guess I should
> > > be a bit mild in my criticism, finalizers weren't very well 
> > understood
> > > back then...
> > 
> > I am in the process of correcting this.
> 
> My gripe really wasn't directed at the Classpath implementation, but at
> the Sun implementation. How compatible do we want to be in this case?
> Compatible and broken or a little less compatible and not so broken ;-)

I think we want to do the right thing.  I believe it was you yourself
who pointed out a condition whereby a FileInputStream closing the file
descriptor in finalization could potentially lead to problems.  Particularly
since you can use the getFD() call to return a valid file descriptor
that would suddenly get un-valid if your FileInputStream happened to
be garbage collected out from under you.  Better to let FileDescriptor
handle its own finalization.  Actually, its much better if the application
manually closes the stream (which would close the underlying file descriptor)
because there is no guarantee that anything will ever get garbage
collected.

-- 
Aaron M. Renn (arenn@urbanophile.com) http://www.urbanophile.com/arenn/




From MAILER-DAEMON Tue Mar 04 10:48:05 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18qEeC-0003up-00
	for mharc-classpath@gnu.org; Tue, 04 Mar 2003 10:48:04 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18qEe9-0003t5-00
	for classpath@gnu.org; Tue, 04 Mar 2003 10:48:01 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18qEe8-0003sc-00
	for classpath@gnu.org; Tue, 04 Mar 2003 10:48:01 -0500
Received: from smtp.easynet.ch ([217.8.192.20] helo=smtp1.mail.ch.easynet.net)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18qEe8-0003sM-00
	for classpath@gnu.org; Tue, 04 Mar 2003 10:48:00 -0500
Received: from [192.168.1.33] (197.103.dyn-adsl.customer.ch.easynet.net
	[217.8.197.103])	by smtp1.mail.ch.easynet.net (Postfix) with ESMTP
	id 9F96C4A198; Tue,  4 Mar 2003 16:43:16 +0100 (CET)
From: Sascha Brawer <brawer@acm.org>
To: GNU Classpath <classpath@gnu.org>,
	Jeroen Frijters <jeroen@sumatra.nl>
Date: Tue, 4 Mar 2003 16:47:48 +0100
Message-Id: <20030304154748.6576@smtp.mail.ch.easynet.net>
In-Reply-To: 
 <5C38B761F205B54BA59FF611A65C62480118AB@lembu.sumatrasoftware.com>
References: 
 <5C38B761F205B54BA59FF611A65C62480118AB@lembu.sumatrasoftware.com>
X-Mailer: CTM PowerMail 3.1.1 carbon <http://www.ctmdev.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Subject: RE: Class loader optimization patch
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Tue, 04 Mar 2003 15:48:02 -0000

Jeroen Frijters <jeroen@sumatra.nl> wrote on Tue, 4 Mar 2003 13:57:57 +0100:

>Class loading is just very slow on ikvm,
>because it has to convert the Java classes into .NET classes and then
>the .NET runtime has to load those, plus the fact that my
>verifier/compiler isn't very fast either and I probably have to load
>more classes than the Sun VM (because I cannot be as lazy as I would
>like to, due to the design of the dynamic code generation support in
>.NET).

Couldn't you cache the result of the conversion? You might find [1] an
interesting paper: It discusses caching the results of a JIT compiler.
The dependency tracking might possibly be applicable to your situation as
well (I'm not sure, though -- the Common Language Runtime might already
do this for you). Or maybe, you could generate a CLI assembly for an
entire JAR file when a class is requested through your JAR ClassLoader
for the first time.

Best regards,

-- Sascha Brawer

[1] Mauricio Serrano, Rajesh Bordawekar, Sam Midkiff, and Manish Gupta.
Quicksilver: A Quasi-Static Compiler for Java. In Proceedings of the
Conference on Object-Oriented Programming, Systems, Languages and
Applications (OOPSLA '00), Minneapolis, MN, USA. October 2000. http://
www.research.ibm.com/people/g/gupta/oopsla00.ps





From MAILER-DAEMON Tue Mar 04 10:59:50 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18qEpZ-0008IC-00
	for mharc-classpath@gnu.org; Tue, 04 Mar 2003 10:59:49 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18qEpW-0008Fu-00
	for classpath@gnu.org; Tue, 04 Mar 2003 10:59:46 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18qEmU-0007RC-00
	for classpath@gnu.org; Tue, 04 Mar 2003 10:56:38 -0500
Received: from 62-177-154-234.bbeyond.nl ([62.177.154.234]
	helo=LEMBU.sumatrasoftware.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)	id 18qEkv-0007CQ-00
	for classpath@gnu.org; Tue, 04 Mar 2003 10:55:01 -0500
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Date: Tue, 4 Mar 2003 16:54:01 +0100
X-MimeOLE: Produced By Microsoft Exchange V6.5.6803.0
Message-ID: <5C38B761F205B54BA59FF611A65C62480118B3@lembu.sumatrasoftware.com>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: Class loader optimization patch
Thread-Index: AcLiZU8doQEmm8NoSECbZHiyS0O1iQAAFiQA
From: "Jeroen Frijters" <jeroen@sumatra.nl>
To: "Sascha Brawer" <brawer@acm.org>,
	"GNU Classpath" <classpath@gnu.org>
Subject: RE: Class loader optimization patch
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Tue, 04 Mar 2003 15:59:47 -0000

Sascha Brawer wrote:
> Couldn't you cache the result of the conversion? You might find [1] an
> interesting paper: It discusses caching the results of a JIT compiler.
> The dependency tracking might possibly be applicable to your=20
> situation as
> well (I'm not sure, though -- the Common Language Runtime=20
> might already
> do this for you). Or maybe, you could generate a CLI assembly for an
> entire JAR file when a class is requested through your JAR ClassLoader
> for the first time.

I plan to do something like that in the future, but at the moment it is
very low priority. I first need to get more important stuff working.
"Normal" applications I can already statically compile, Eclipse makes
life interesting with all the class loader tricks it plays ;-)

Something more related to Classpath I've been thinking about recently,
has anyone ever thought about putting hooks in URLClassLoader to support
caching JITed classes?

Regards,
Jeroen



From MAILER-DAEMON Tue Mar 04 11:01:59 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18qEqw-0000Uc-00
	for mharc-classpath@gnu.org; Tue, 04 Mar 2003 11:01:14 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18qEqi-0000QP-00
	for classpath@gnu.org; Tue, 04 Mar 2003 11:01:00 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18qEqY-0000Jq-00
	for classpath@gnu.org; Tue, 04 Mar 2003 11:00:51 -0500
Received: from 62-177-154-234.bbeyond.nl ([62.177.154.234]
	helo=LEMBU.sumatrasoftware.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)	id 18qEku-0007CQ-00
	for classpath@gnu.org; Tue, 04 Mar 2003 10:55:00 -0500
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Date: Tue, 4 Mar 2003 16:54:01 +0100
X-MimeOLE: Produced By Microsoft Exchange V6.5.6803.0
Message-ID: <5C38B761F205B54BA59FF611A65C62480118B2@lembu.sumatrasoftware.com>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: Small ZipFile patch
Thread-Index: AcLiY1n2Bg3eUM3QQt6JB8/bQDRRFwAAZGDQ
From: "Jeroen Frijters" <jeroen@sumatra.nl>
To: "Aaron M. Renn" <arenn@urbanophile.com>,
	<classpath@gnu.org>
Subject: RE: Small ZipFile patch
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Tue, 04 Mar 2003 16:01:12 -0000


Aaron M. Renn wrote:
> Jeroen Frijters (jeroen@sumatra.nl) wrote:
> > > Jeroen Frijters (jeroen@sumatra.nl) wrote:
> > > > BTW, the design of the 1.0 I/O classes is less than=20
> > > stellar. Since the
> > > > FileDescriptor class is the owner of the native resource,=20
> > > it should have
> > > > had a finalizer, instead of FileInputStream and=20
> > > FileOutputStream (for
> > > > some reason RandomAccessFile doesn't have a finalizer). I=20
> > > guess I should
> > > > be a bit mild in my criticism, finalizers weren't very well=20
> > > understood
> > > > back then...
> > >=20
> > > I am in the process of correcting this.
> >=20
> > My gripe really wasn't directed at the Classpath=20
> implementation, but at
> > the Sun implementation. How compatible do we want to be in=20
> this case?
> > Compatible and broken or a little less compatible and not=20
> so broken ;-)
>=20
> I think we want to do the right thing.  I believe it was you yourself
> who pointed out a condition whereby a FileInputStream closing the file
> descriptor in finalization could potentially lead to=20
> problems.  Particularly
> since you can use the getFD() call to return a valid file descriptor
> that would suddenly get un-valid if your FileInputStream happened to
> be garbage collected out from under you.  Better to let FileDescriptor
> handle its own finalization.  Actually, its much better if=20
> the application
> manually closes the stream (which would close the underlying=20
> file descriptor)
> because there is no guarantee that anything will ever get garbage
> collected.

Putting the finalize in FileDescriptor should be safe (once
FileDescriptor is an opaque object). That way you can be sure that a
FileDescriptor will only be closed by finalization if it isn't being
used anymore, even in the case of sharing. The only downside to this
would be that code developed under Classpath might behave erratically
when run under a Sun VM. I remember when I first started using Java
(beginning of 1997) I spent a couple of days tracking down a weird bug
that turned out to be caused by my (shared) FileDescriptor being closed
when I didn't expect it (because a temporary FileInputStream was being
finalized at some random point in time).

Regards,
Jeroen



From MAILER-DAEMON Tue Mar 04 11:33:29 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18qFLw-0004Va-00
	for mharc-classpath@gnu.org; Tue, 04 Mar 2003 11:33:16 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18qFLr-0004OX-00
	for classpath@gnu.org; Tue, 04 Mar 2003 11:33:11 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18qFLo-0004Ja-00
	for classpath@gnu.org; Tue, 04 Mar 2003 11:33:09 -0500
Received: from mail.peakpeak.com ([207.174.178.17] helo=gash2.peakpeak.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18qFLX-0003o0-00
	for classpath@gnu.org; Tue, 04 Mar 2003 11:32:51 -0500
Received: from fleche.redhat.com (te0190.peakpeak.com [204.144.238.190])
	by gash2.peakpeak.com (8.9.3/8.9.3) with ESMTP id JAA16967;
	Tue, 4 Mar 2003 09:32:46 -0700
Received: by fleche.redhat.com (Postfix, from userid 1000)
	id 1BC7C4F8610; Tue,  4 Mar 2003 09:24:49 -0700 (MST)
To: "Jeroen Frijters" <jeroen@sumatra.nl>
References: <5C38B761F205B54BA59FF611A65C62480118B3@lembu.sumatrasoftware.com>
From: Tom Tromey <tromey@redhat.com>
X-Attribution: Tom
X-Zippy: Quick, sing me the BUDAPEST NATIONAL ANTHEM!!
Date: 04 Mar 2003 09:24:48 -0700
In-Reply-To: <5C38B761F205B54BA59FF611A65C62480118B3@lembu.sumatrasoftware.com>
Message-ID: <87isuzkskv.fsf@fleche.redhat.com>
Lines: 14
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: Sascha Brawer <brawer@acm.org>
cc: GNU Classpath <classpath@gnu.org>
Subject: Re: Class loader optimization patch
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
Reply-To: tromey@redhat.com
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Tue, 04 Mar 2003 16:33:14 -0000

>>>>> "Jeroen" == Jeroen Frijters <jeroen@sumatra.nl> writes:

Jeroen> Something more related to Classpath I've been thinking about
Jeroen> recently, has anyone ever thought about putting hooks in
Jeroen> URLClassLoader to support caching JITed classes?

Andrew must have done something like this when he experimented with
using gcj as a JIT:

    http://gcc.gnu.org/ml/java/2003-01/msg00022.html

I don't think he posted a patch for this.

Tom



From MAILER-DAEMON Tue Mar 04 11:37:37 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18qFOU-00088p-00
	for mharc-classpath@gnu.org; Tue, 04 Mar 2003 11:35:54 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18qFOO-0007tc-00
	for classpath@gnu.org; Tue, 04 Mar 2003 11:35:48 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18qFOG-0007ZU-00
	for classpath@gnu.org; Tue, 04 Mar 2003 11:35:43 -0500
Received: from mail.peakpeak.com ([207.174.178.17] helo=gash2.peakpeak.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18qFOB-0007L7-00; Tue, 04 Mar 2003 11:35:35 -0500
Received: from fleche.redhat.com (te0190.peakpeak.com [204.144.238.190])
	by gash2.peakpeak.com (8.9.3/8.9.3) with ESMTP id JAA17756;
	Tue, 4 Mar 2003 09:35:33 -0700
Received: by fleche.redhat.com (Postfix, from userid 1000)
	id 3A94B4F8610; Tue,  4 Mar 2003 09:27:36 -0700 (MST)
To: Brian Jones <cbj@gnu.org>
References: <5C38B761F205B54BA59FF611A65C62480118A9@lembu.sumatrasoftware.com>
	<m37kbfe2mq.fsf@lyta.haphazard.org>
From: Tom Tromey <tromey@redhat.com>
X-Attribution: Tom
X-Zippy: There's a little picture of ED MCMAHON doing BAD THINGS to JOAN
	RIVERS in a $200,000 MALIBU BEACH HOUSE!!
Date: 04 Mar 2003 09:27:36 -0700
In-Reply-To: <m37kbfe2mq.fsf@lyta.haphazard.org>
Message-ID: <87el5nksg7.fsf@fleche.redhat.com>
Lines: 15
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: Jeroen Frijters <jeroen@sumatra.nl>
cc: classpath@gnu.org
cc: Mark Wielaard <mark@klomp.org>
cc: "Prof. Etienne M. Gagnon" <etienne.gagnon@uqam.ca>
Subject: Re: Class loader optimization patch
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
Reply-To: tromey@redhat.com
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Tue, 04 Mar 2003 16:35:53 -0000

>>>>> "Brian" == Brian Jones <cbj@gnu.org> writes:

Brian> Is Hotspot providing this factor of 10 improvement?  I assume the
Brian> measurement was with the client hotspot.

Some JITs do lazy exception creation.  I believe the idea is: notice
if the exception object is discarded in the catching frame, and, if
so, simply branch there rather than creating the object, filling in
the stack trace, etc.  This only works for things like `throw new Foo()',
but that is a very common case.  I believe ORP does this optimization.

I doubt this is the cause of a factor of 10 improvement.  But it may
still be important.

Tom



From MAILER-DAEMON Tue Mar 04 11:47:43 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18qFZp-0000rg-00
	for mharc-classpath@gnu.org; Tue, 04 Mar 2003 11:47:37 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18qFZf-0000dE-00
	for classpath@gnu.org; Tue, 04 Mar 2003 11:47:27 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18qFZN-0000Fo-00
	for classpath@gnu.org; Tue, 04 Mar 2003 11:47:09 -0500
Received: from mail.peakpeak.com ([207.174.178.17] helo=gash2.peakpeak.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18qFZ9-0008Ud-00
	for classpath@gnu.org; Tue, 04 Mar 2003 11:46:55 -0500
Received: from fleche.redhat.com (te0190.peakpeak.com [204.144.238.190])
	by gash2.peakpeak.com (8.9.3/8.9.3) with ESMTP id JAA20838;
	Tue, 4 Mar 2003 09:46:53 -0700
Received: by fleche.redhat.com (Postfix, from userid 1000)
	id 23EA54F8610; Tue,  4 Mar 2003 09:38:56 -0700 (MST)
To: "Jeroen Frijters" <jeroen@sumatra.nl>
References: <5C38B761F205B54BA59FF611A65C62480118AE@lembu.sumatrasoftware.com>
From: Tom Tromey <tromey@redhat.com>
X-Attribution: Tom
X-Zippy: Now I'm concentrating on a specific tank battle toward
 the end of World War II!
Date: 04 Mar 2003 09:38:56 -0700
In-Reply-To: <5C38B761F205B54BA59FF611A65C62480118AE@lembu.sumatrasoftware.com>
Message-ID: <87adgbkrxb.fsf@fleche.redhat.com>
Lines: 17
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: classpath@gnu.org
Subject: Re: Small ZipFile patch
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
Reply-To: tromey@redhat.com
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Tue, 04 Mar 2003 16:47:31 -0000

>>>>> "Jeroen" == Jeroen Frijters <jeroen@sumatra.nl> writes:

Jeroen> BTW, the design of the 1.0 I/O classes is less than
Jeroen> stellar. Since the FileDescriptor class is the owner of the
Jeroen> native resource, it should have had a finalizer, instead of
Jeroen> FileInputStream and FileOutputStream (for some reason
Jeroen> RandomAccessFile doesn't have a finalizer).

It isn't a compatibility problem to decide what class should have a
nontrivial finalizer.  We're free to rearrange things here.

In libgcj we have a finalizer in FileDescriptor.  I think this is the
only place you should have a finalizer that closes the underlying
native file descriptor.  Otherwise you run into problems here and
there; we had some bug reports about this a couple years ago.

Tom



From MAILER-DAEMON Tue Mar 04 12:41:48 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18qGQF-0001Z9-00
	for mharc-classpath@gnu.org; Tue, 04 Mar 2003 12:41:47 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18qGQD-0001Vu-00
	for classpath@gnu.org; Tue, 04 Mar 2003 12:41:45 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18qGQB-0001VS-00
	for classpath@gnu.org; Tue, 04 Mar 2003 12:41:44 -0500
Received: from web41602.mail.yahoo.com ([66.218.93.102])
	by monty-python.gnu.org with smtp (Exim 4.10.13)
	id 18qGQB-0001Uv-00
	for classpath@gnu.org; Tue, 04 Mar 2003 12:41:43 -0500
Message-ID: <20030304174141.51303.qmail@web41602.mail.yahoo.com>
Received: from [18.111.1.12] by web41602.mail.yahoo.com via HTTP;
	Tue, 04 Mar 2003 09:41:41 PST
Date: Tue, 4 Mar 2003 09:41:41 -0800 (PST)
From: Wes Beebee <wbeebee@yahoo.com>
To: classpath@gnu.org
In-Reply-To: <87el5nksg7.fsf@fleche.redhat.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Subject: Classpath AWT problems (or gtk problems...)
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
Reply-To: wbeebee@alum.mit.edu
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Tue, 04 Mar 2003 17:41:45 -0000

I'm having difficulty with Frame.setVisible(true) using Classpath.

I've compiled Classpath using FLEX - and I suspect that perhaps the
resource/gnu/java/awt/peer/gtk/font.properties file may not have the
right font for my system (RedHat Linux 7.3 with gtk+-1.2.10).

It's dying in gtk/gtkrc.c at gtk_rc_style_to_style when trying to
call rc_style->engine->rc_style_to_style(style, rc_style)
after calling gtk_thread_engine_ref(style->engine), which
was called from the GtkWindowPeer.connectHooks native method 
(gtk_widget_realize(layout)).

Thanks,
- Wes

Here's the stack trace:

#0  0x4015c719 in ?? ()
#1  0x40155f4c in ?? ()
#2  0x401558d1 in ?? ()
#3  0x4022a377 in ?? ()
#4  0x40368a3e in ?? ()
#5  0x400edb69 in ?? ()
#6  0x080a630f in gtk_rc_style_to_style ()
    at _Class_java_lang_NumberFormatException.c:298
#7  0x080a6605 in gtk_rc_style_init ()
    at _Class_java_lang_NumberFormatException.c:298
#8  0x080a5c34 in gtk_rc_get_style ()
    at _Class_java_lang_NumberFormatException.c:298
#9  0x080cead2 in gtk_widget_set_rc_style ()
    at _Class_java_lang_NumberFormatException.c:298
#10 0x080ce9a3 in gtk_widget_ensure_style ()
    at _Class_java_lang_NumberFormatException.c:298
#11 0x080ca78d in gtk_widget_realize ()
    at _Class_java_lang_NumberFormatException.c:298
#12 0x080ca781 in gtk_widget_realize ()
    at _Class_java_lang_NumberFormatException.c:298
#13 0x080ca781 in gtk_widget_realize ()
    at _Class_java_lang_NumberFormatException.c:298
#14 0x08060d13 in Java_gnu_java_awt_peer_gtk_GtkWindowPeer_connectHooks (
    env=0x8549220, obj=0x40000040) at gnu_java_awt_peer_gtk_GtkWindowPeer.c:102
#15 0x082ce77f in _Flex_gnu_java_awt_peer_gtk_GtkWindowPeer_connectHooks__ (
    param0=0x861d6b0) at _Class_gnu_java_awt_peer_gtk_GtkWindowPeer.c:492
#16 0x082c5c28 in
_Flex_gnu_java_awt_peer_gtk_GtkComponentPeer__0003cinit_0003e__Ljava_awt_Component_2
(lv0_0=0x861d6b0, lv1_0=0x85c36a0)
    at _Class_gnu_java_awt_peer_gtk_GtkComponentPeer.c:534
#17 0x082c84ed in
_Flex_gnu_java_awt_peer_gtk_GtkContainerPeer__0003cinit_0003e__Ljava_awt_Container_2
(lv0_0=0x861d6b0, lv1_0=0x85c36a0)
    at _Class_gnu_java_awt_peer_gtk_GtkContainerPeer.c:386
#18 0x082ce635 in _Flex_gnu_java_awt_peer_gtk_GtkWindowPeer__0003cinit_0003e__Ljava_awt_Window_2
(lv0_0=0x861d6b0, lv1_0=0x85c36a0)
    at _Class_gnu_java_awt_peer_gtk_GtkWindowPeer.c:426
#19 0x082c9590 in _Flex_gnu_java_awt_peer_gtk_GtkFramePeer__0003cinit_0003e__Ljava_awt_Frame_2
(lv0_0=0x861d6b0, lv1_0=0x85c36a0)
    at _Class_gnu_java_awt_peer_gtk_GtkFramePeer.c:424
#20 0x082ce3f4 in _Flex_gnu_java_awt_peer_gtk_GtkToolkit_createFrame__Ljava_awt_Frame_2
(lv0_0=0x85c3a28, lv1_0=0x85c36a0)
    at _Class_gnu_java_awt_peer_gtk_GtkToolkit.c:429
#21 0x0832de97 in _Flex_java_awt_Frame_addNotify__ (lv0_0=0x85c36a0)
    at _Class_java_awt_Frame.c:1123
#22 0x0833e7c1 in _Flex_java_awt_Window_show__ (lv0_0=0x85c36a0)
    at _Class_java_awt_Window.c:1684
#23 0x08318418 in _Flex_java_awt_Component_setVisible__Z (lv0_0=0x85c36a0, 
    lv1_0=1) at _Class_java_awt_Component.c:5992
#24 0x083064a5 in _Flex_imagerec_graph_Display__0003cinit_0003e__Ljava_lang_String_2
(lv0_0=0x85c31e0, lv1_0=0x8542050) at _Class_imagerec_graph_Display.c:432
#25 0x0830811b in _Flex_imagerec_Main_main___3Ljava_lang_String_2 (
    lv0_0=0x85500c8) at _Class_imagerec_Main.c:152
#26 0x0804c8fd in FNI_Dispatch_Void (method_pointer=137396408, narg_words=1, 
    _argptr=0xbfffef50, exception=0xbfffef68) at ../../include/precisec.c:34
#27 0x0804ecd8 in FNI_CallStaticVoidMethodV (env=0x8549220, clazz=0x4000003c, 
    methodID=0x84f3028, args=0xbfffefac) at jni-invoke.c:194
#28 0x0804e4af in FNI_CallStaticVoidMethod (env=0x8549220, clazz=0x4000003c, 
    methodID=0x84f3028) at jni-invoke.c:117
#29 0x08048818 in main (argc=1, argv=0xbffff054) at startup.c:272
#30 0x08155502 in __libc_start_main ()
    at _Class_java_lang_NumberFormatException.c:298
(gdb) 


__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/



From MAILER-DAEMON Tue Mar 04 15:36:06 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18qJ8v-0001Ak-00
	for mharc-classpath@gnu.org; Tue, 04 Mar 2003 15:36:05 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18qJ8s-0001Ad-00
	for classpath@gnu.org; Tue, 04 Mar 2003 15:36:02 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18qJ8q-0001AH-00
	for classpath@gnu.org; Tue, 04 Mar 2003 15:36:01 -0500
Received: from node1c5f.a2000.nl ([62.108.28.95] helo=nescio.wildebeest.org)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18qJ8q-0001AD-00
	for classpath@gnu.org; Tue, 04 Mar 2003 15:36:00 -0500
Received: from elsschot.wildebeest.org ([192.168.1.26] ident=mark)
	by nescio.wildebeest.org with esmtp (Exim 3.35 #1 (Debian))
	id 18qJ8L-0007JA-00; Tue, 04 Mar 2003 21:35:29 +0100
From: Mark Wielaard <mark@klomp.org>
To: Jeroen Frijters <jeroen@sumatra.nl>
In-Reply-To: <5C38B761F205B54BA59FF611A65C62480118AE@lembu.sumatrasoftware.com>
References: 
	 <5C38B761F205B54BA59FF611A65C62480118AE@lembu.sumatrasoftware.com>
Content-Type: text/plain
Organization: 
Message-Id: <1046810157.14250.15.camel@elsschot>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.2.2 
Date: 04 Mar 2003 21:35:57 +0100
Content-Transfer-Encoding: 7bit
cc: classpath@gnu.org
Subject: Re: Small ZipFile patch
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Tue, 04 Mar 2003 20:36:02 -0000

On Tue, 2003-03-04 at 15:11, Jeroen Frijters wrote:
> Hi,
> 
> ZipFile has a finalizer (it shouldn't!) and that tries to close the
> RandomAccessFile, even the RandomAccessFile never was created, this
> causes an NPE during finalization, not a big deal, but since .NET 1.1
> decided to print these to the console, it's kind of distracting.

Ewh. That can only happen when the constructor threw an exception. Hmmm,
interesting fact that the finalizer is also called in such cases. Hadn't
realized that. It means that when finalize is called the Object could be
in some very unexpected state.

If it really helps you, we can install your patch. But it seems you have
a bit of a problem here in your VM. Finalizer are allowed to throw
exceptions and this should not cause such side effects as printing to
some stream. What happens in other cases in your VM? Wouldn't it make
more sense to encapsulate any java finalize() method (if an class
overrides the default one in Object) with something that catches any
exceptions so that the .NET runtime doesn't print them to some output
channel?

> ZipFile really shouldn't have a finalizer though (if you have a pure
> Java implementation). Only classes that own native resources should
> have finalizers.

Actually, it should have a finalizer since the spec says it has a
finalizer. And according to the spec that finalizer will call the
close() method of that object.It is easy to follow the spec here, I
don't think we shouldn't do it if it is so easy.  It helps people to
migrate from some proprietary implementation to our free one. 

> BTW 2, in gnu\java\nio\ServerSocketChannelImpl.java and
> gnu\java\nio\SocketChannelImpl.java both have method called
> finalize*r* and that probably should be finalize (although since these
> classes do not seem to own any native resources, they really don't
> need a finalizer).

Michael, could you look at this?

Cheers,

Mark




From MAILER-DAEMON Tue Mar 04 17:23:09 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18qKkU-0001zK-00
	for mharc-classpath@gnu.org; Tue, 04 Mar 2003 17:18:58 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18qKk3-0001jp-00
	for classpath@gnu.org; Tue, 04 Mar 2003 17:18:31 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18qKjm-0001Lp-00
	for classpath@gnu.org; Tue, 04 Mar 2003 17:18:18 -0500
Received: from 62-177-154-234.bbeyond.nl ([62.177.154.234]
	helo=LEMBU.sumatrasoftware.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)	id 18qKjP-0000rM-00
	for classpath@gnu.org; Tue, 04 Mar 2003 17:17:51 -0500
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Date: Tue, 4 Mar 2003 23:16:56 +0100
Message-ID: <5C38B761F205B54BA59FF611A65C62480118B4@lembu.sumatrasoftware.com>
X-MimeOLE: Produced By Microsoft Exchange V6.5.6803.0
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: Small ZipFile patch
Thread-Index: AcLijYq5o3tvK16DRhqlkEjMZ+hWGgAC4RUQ
From: "Jeroen Frijters" <jeroen@sumatra.nl>
To: "Mark Wielaard" <mark@klomp.org>
cc: classpath@gnu.org
Subject: RE: Small ZipFile patch
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Tue, 04 Mar 2003 22:18:57 -0000

Mark Wielaard wrote:
> On Tue, 2003-03-04 at 15:11, Jeroen Frijters wrote:
> > Hi,
> >=20
> > ZipFile has a finalizer (it shouldn't!) and that tries to close the
> > RandomAccessFile, even the RandomAccessFile never was created, this
> > causes an NPE during finalization, not a big deal, but=20
> since .NET 1.1
> > decided to print these to the console, it's kind of distracting.
>=20
> Ewh. That can only happen when the constructor threw an=20
> exception. Hmmm,
> interesting fact that the finalizer is also called in such=20
> cases. Hadn't
> realized that. It means that when finalize is called the=20
> Object could be in some very unexpected state.

Yep. You can do some very tricky things with this. For every non-final
class with a non-final finalize it is possible to obtain an initialized
reference to an instance of that class *without* running a constructor
by taking advantage of the fact that the finalizer runs even if the
constructor was never invoked.

> If it really helps you, we can install your patch. But it=20
> seems you have
> a bit of a problem here in your VM. Finalizer are allowed to throw
> exceptions and this should not cause such side effects as printing to
> some stream. What happens in other cases in your VM? Wouldn't it make
> more sense to encapsulate any java finalize() method (if an class
> overrides the default one in Object) with something that catches any
> exceptions so that the .NET runtime doesn't print them to some output
> channel?

Yes, you're right, ignore the patch, I'll fix my VM.

> > ZipFile really shouldn't have a finalizer though (if you have a pure
> > Java implementation). Only classes that own native resources should
> > have finalizers.
>=20
> Actually, it should have a finalizer since the spec says it has a
> finalizer. And according to the spec that finalizer will call the
> close() method of that object.It is easy to follow the spec here, I
> don't think we shouldn't do it if it is so easy.  It helps people to
> migrate from some proprietary implementation to our free one.=20

In that case the spec is broken. I really don't have a problem with it
being there, but I just want to point out that it is really bad design
to do anything in a finalizer other than releasing native resources. If
ZipFile is implemented using RandomAccessFile which uses FileDescriptor
which has a finalize, the FileDescriptor finalize may run before the
ZipFile finalize and thus the close will fail (unpredictably). This is
why it is bad design.

Regards,
Jeroen



From MAILER-DAEMON Tue Mar 04 17:46:47 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18qL9O-000719-00
	for mharc-classpath@gnu.org; Tue, 04 Mar 2003 17:44:42 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18qL9K-0006u2-00
	for classpath@gnu.org; Tue, 04 Mar 2003 17:44:38 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18qL8i-0006Ve-00
	for classpath@gnu.org; Tue, 04 Mar 2003 17:44:03 -0500
Received: from pop2a.ripco.com ([209.100.227.25])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18qL8V-0006PJ-00
	for classpath@gnu.org; Tue, 04 Mar 2003 17:43:47 -0500
Received: (from arenn@localhost)
	by pop2a.ripco.com (8.11.0/8.11.0) id h24Mhrb02094
	for classpath@gnu.org; Tue, 4 Mar 2003 16:43:53 -0600 (CST)
Date: Tue, 4 Mar 2003 16:43:53 -0600
From: "Aaron M. Renn" <arenn@urbanophile.com>
To: classpath@gnu.org
Message-ID: <20030304224353.GA2006@urbanophile.com>
Mail-Followup-To: "Aaron M. Renn" <arenn@urbanophile.com>,
	classpath@gnu.org
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.4i
Organization: GNU's Not Unix!
Subject: New IO Native Provider Interface
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Tue, 04 Mar 2003 22:44:40 -0000

I modified the java.io package to do native I/O (except for the File class)
along the lines of what I posted last week.  Please take a look and let
me know ASAP if anything is broken.  I'm especially keen to hear from the
gcj people on how close this comes to allowing us to merge these classes.
This also corrects the problems recently discussed of finalization in
classes like FileInputStream since right now only FileDescriptor deals
with native file descriptors and native methods.

-- 
Aaron M. Renn (arenn@urbanophile.com) http://www.urbanophile.com/arenn/




From MAILER-DAEMON Tue Mar 04 17:57:03 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18qLLL-0007K0-00
	for mharc-classpath@gnu.org; Tue, 04 Mar 2003 17:57:03 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18qLLI-0007I4-00
	for classpath@gnu.org; Tue, 04 Mar 2003 17:57:00 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18qLLG-0007GA-00
	for classpath@gnu.org; Tue, 04 Mar 2003 17:56:59 -0500
Received: from node1c5f.a2000.nl ([62.108.28.95] helo=nescio.wildebeest.org)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18qLKo-00070T-00
	for classpath@gnu.org; Tue, 04 Mar 2003 17:56:30 -0500
Received: from elsschot.wildebeest.org ([192.168.1.26] ident=mark)
	by nescio.wildebeest.org with esmtp (Exim 3.35 #1 (Debian))
	id 18qLKI-0007YN-00; Tue, 04 Mar 2003 23:55:58 +0100
From: Mark Wielaard <mark@klomp.org>
To: Jeroen Frijters <jeroen@sumatra.nl>
In-Reply-To: <5C38B761F205B54BA59FF611A65C62480118B4@lembu.sumatrasoftware.com>
References: 
	 <5C38B761F205B54BA59FF611A65C62480118B4@lembu.sumatrasoftware.com>
Content-Type: multipart/mixed; boundary="=-LDyWeiuQc1KRULmE6zo0"
Organization: 
Message-Id: <1046818586.14237.77.camel@elsschot>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.2.2 
Date: 04 Mar 2003 23:56:26 +0100
cc: classpath@gnu.org
Subject: RE: Small ZipFile patch
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Tue, 04 Mar 2003 22:57:01 -0000


--=-LDyWeiuQc1KRULmE6zo0
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Hi,

On Tue, 2003-03-04 at 23:16, Jeroen Frijters wrote:
> Yep. You can do some very tricky things with this. For every non-final
> class with a non-final finalize it is possible to obtain an initialized
> reference to an instance of that class *without* running a constructor
> by taking advantage of the fact that the finalizer runs even if the
> constructor was never invoked.

Ugh. That is terrible for trying to keep some sane security framework.
I tried the attached class which overrides RandomAccessFile. It first
installs a SecurityManager to prevent the class from actually writing to
some file, but then tries anyway by using the back-from-dead object
returned by the finalizer. The results are interesting:

kaffe 1.0.7 doesn't throw any exceptions but also doesn't write to the
file.

Kissme CVS+Classpath CVS correctly throws SecurityException then dumps
core.

gij from CVS gives the interesting:

Exception in thread "main" java.lang.ExceptionInInitializerError
*** Got java.lang.NoClassDefFoundError: gnu.gcj.runtime.NameFinder while
trying
to print stack trace.
Aborted

Blackdown-1.4.1-beta correctly gives AccessControlException and then:

Unexpected Signal : 11 occurred at PC=0x403A264C
Function=(null)+0x403A264C
Library=/opt/j2sdk1.4.1/jre/lib/i386/client/libjvm.so

Eeewwwww.

Good night,

Mark

--=-LDyWeiuQc1KRULmE6zo0
Content-Disposition: inline; filename=IRAF.java
Content-Type: text/x-java; name=IRAF.java; charset=ISO-8859-15
Content-Transfer-Encoding: 7bit

import java.io.*;

public class IRAF extends RandomAccessFile
{
    static RandomAccessFile raf;

    IRAF(String file) throws IOException
    {
      super(file, "rw");
    }

    protected void finalize()
    {
      raf = this;
    }

    public static void main(String args[])
    {
      System.setSecurityManager(new SecurityManager());
      try { new IRAF(args[0]); } catch (Throwable t) { t.printStackTrace(); }

      while (raf == null)
      {
	new Object(); // Generate some garbage till the finalizer triggers.
      }

      try { raf.write(0xff); } catch (Throwable t) { t.printStackTrace(); }
    }
}

--=-LDyWeiuQc1KRULmE6zo0--




From MAILER-DAEMON Tue Mar 04 18:08:47 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18qLWf-0007ji-00
	for mharc-classpath@gnu.org; Tue, 04 Mar 2003 18:08:45 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18qLWY-0007U9-00
	for classpath@gnu.org; Tue, 04 Mar 2003 18:08:38 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18qLVR-0006YX-00
	for classpath@gnu.org; Tue, 04 Mar 2003 18:07:29 -0500
Received: from node1c5f.a2000.nl ([62.108.28.95] helo=nescio.wildebeest.org)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18qLVK-0006FS-00
	for classpath@gnu.org; Tue, 04 Mar 2003 18:07:22 -0500
Received: from elsschot.wildebeest.org ([192.168.1.26] ident=mark)
	by nescio.wildebeest.org with esmtp (Exim 3.35 #1 (Debian))
	id 18qLUn-0007dN-00; Wed, 05 Mar 2003 00:06:49 +0100
From: Mark Wielaard <mark@klomp.org>
To: Jeroen Frijters <jeroen@sumatra.nl>
In-Reply-To: <1046818586.14237.77.camel@elsschot>
References: 
	 <5C38B761F205B54BA59FF611A65C62480118B4@lembu.sumatrasoftware.com>
	 <1046818586.14237.77.camel@elsschot>
Content-Type: text/plain
Organization: 
Message-Id: <1046819237.14250.84.camel@elsschot>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.2.2 
Date: 05 Mar 2003 00:07:17 +0100
Content-Transfer-Encoding: 7bit
cc: classpath@gnu.org
Subject: RE: Small ZipFile patch
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Tue, 04 Mar 2003 23:08:43 -0000

Hi,

Forgot the most important one for sure:

$ mono --noinline --share-code bin/ikvm.exe IRAF testfile
java.lang.SecurityException: Operation not allowed
        at java.lang.SecurityManager.checkPermission(<unknown>)
        at java.lang.SecurityManager.checkWrite(<unknown>)
        at java.io.RandomAccessFile.<init>(<unknown>)
        at java.io.RandomAccessFile.<init>(<unknown>)
        at IRAF.main(<unknown>)
        at IRAF.main(<unknown>)
Killed

Note that it is killed because it rapidly eats up all memory in the
system.

Cheers,

Mark




From MAILER-DAEMON Tue Mar 04 18:15:28 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18qLd9-0000K7-00
	for mharc-classpath@gnu.org; Tue, 04 Mar 2003 18:15:27 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18qLd6-0000GN-00
	for classpath@gnu.org; Tue, 04 Mar 2003 18:15:24 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18qLd3-0000Eg-00
	for classpath@gnu.org; Tue, 04 Mar 2003 18:15:22 -0500
Received: from ms-smtp-03.southeast.rr.com ([24.93.67.84])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18qLd2-0000DX-00
	for classpath@gnu.org; Tue, 04 Mar 2003 18:15:20 -0500
Received: from mail5.nc.rr.com (fe5 [24.93.67.52])h24NEGi6016580;
	Tue, 4 Mar 2003 18:14:16 -0500 (EST)
Received: from lyta.haphazard.org ([66.57.9.48]) by mail5.nc.rr.com  with
	Microsoft SMTPSVC(5.5.1877.757.75);	 Tue, 4 Mar 2003 18:13:07 -0500
Received: by lyta.haphazard.org (Postfix, from userid 500)
	id 11563BEA92; Tue,  4 Mar 2003 18:15:04 -0500 (EST)
Sender: cbj@haphazard.org
To: "Aaron M. Renn" <arenn@urbanophile.com>
References: <20030304224353.GA2006@urbanophile.com>
From: Brian Jones <cbj@gnu.org>
Date: 04 Mar 2003 18:15:03 -0500
In-Reply-To: <20030304224353.GA2006@urbanophile.com>
Message-ID: <m3smu2d8qw.fsf@lyta.haphazard.org>
Lines: 16
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: classpath@gnu.org
Subject: Re: New IO Native Provider Interface
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Tue, 04 Mar 2003 23:15:26 -0000

"Aaron M. Renn" <arenn@urbanophile.com> writes:

> I modified the java.io package to do native I/O (except for the File class)
> along the lines of what I posted last week.  Please take a look and let
> me know ASAP if anything is broken.  I'm especially keen to hear from the
> gcj people on how close this comes to allowing us to merge these classes.
> This also corrects the problems recently discussed of finalization in
> classes like FileInputStream since right now only FileDescriptor deals
> with native file descriptors and native methods.

Did you happen to try running the java.io Mauve tests with your
changes and Kissme?

Brian
-- 
Brian Jones <cbj@gnu.org>



From MAILER-DAEMON Tue Mar 04 18:36:17 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18qLwi-0006qU-00
	for mharc-classpath@gnu.org; Tue, 04 Mar 2003 18:35:40 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18qLvP-00062O-00
	for classpath@gnu.org; Tue, 04 Mar 2003 18:34:19 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18qLu6-0005CB-00
	for classpath@gnu.org; Tue, 04 Mar 2003 18:32:59 -0500
Received: from ms-smtp-02.southeast.rr.com ([24.93.67.83])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18qLsh-0004eL-00
	for classpath@gnu.org; Tue, 04 Mar 2003 18:31:31 -0500
Received: from mail3.nc.rr.com (fe3 [24.93.67.50])h24NTTbB001398;
	Tue, 4 Mar 2003 18:29:29 -0500 (EST)
Received: from lyta.haphazard.org ([66.57.9.48]) by mail3.nc.rr.com  with
	Microsoft SMTPSVC(5.5.1877.757.75);	 Tue, 4 Mar 2003 18:28:57 -0500
Received: by lyta.haphazard.org (Postfix, from userid 500)
	id B6050BEA92; Tue,  4 Mar 2003 18:30:38 -0500 (EST)
Sender: cbj@haphazard.org
To: wbeebee@alum.mit.edu
References: <20030304174141.51303.qmail@web41602.mail.yahoo.com>
From: Brian Jones <cbj@gnu.org>
Date: 04 Mar 2003 18:30:38 -0500
In-Reply-To: <20030304174141.51303.qmail@web41602.mail.yahoo.com>
Message-ID: <m3of4qd80x.fsf@lyta.haphazard.org>
Lines: 20
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: classpath@gnu.org
Subject: Re: Classpath AWT problems (or gtk problems...)
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Tue, 04 Mar 2003 23:35:38 -0000

Wes Beebee <wbeebee@yahoo.com> writes:

> I'm having difficulty with Frame.setVisible(true) using Classpath.
> 
> I've compiled Classpath using FLEX - and I suspect that perhaps the
> resource/gnu/java/awt/peer/gtk/font.properties file may not have the
> right font for my system (RedHat Linux 7.3 with gtk+-1.2.10).

Did you try running TestAWT (see classpath/gnu/java/awt/peer/gtk/TestAWT.java)?  

I've recently ran this on Red Hat 8.0 with Kissme (We do have problems
with the AWT, it isn't complete yet, but I think you should be able to
at least see a Frame).  

It's not entirely clear to me from the FLEX web pages how to generate
something usable by the runtime.

Brian
-- 
Brian Jones <cbj@gnu.org>



From MAILER-DAEMON Tue Mar 04 18:38:55 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18qLzT-00080j-00
	for mharc-classpath@gnu.org; Tue, 04 Mar 2003 18:38:31 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18qLul-0005XW-00
	for classpath@gnu.org; Tue, 04 Mar 2003 18:33:39 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18qLuA-0005ES-00
	for classpath@gnu.org; Tue, 04 Mar 2003 18:33:03 -0500
Received: from pop2a.ripco.com ([209.100.227.25])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18qLss-0004hD-00
	for classpath@gnu.org; Tue, 04 Mar 2003 18:31:42 -0500
Received: (from arenn@localhost)
	by pop2a.ripco.com (8.11.0/8.11.0) id h24NVoq04481
	for classpath@gnu.org; Tue, 4 Mar 2003 17:31:50 -0600 (CST)
Date: Tue, 4 Mar 2003 17:31:50 -0600
From: "Aaron M. Renn" <arenn@urbanophile.com>
To: classpath@gnu.org
Message-ID: <20030304233150.GA4221@urbanophile.com>
Mail-Followup-To: "Aaron M. Renn" <arenn@urbanophile.com>,
	classpath@gnu.org
References: <20030304224353.GA2006@urbanophile.com>
	<m3smu2d8qw.fsf@lyta.haphazard.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <m3smu2d8qw.fsf@lyta.haphazard.org>
User-Agent: Mutt/1.4i
Organization: GNU's Not Unix!
Subject: Re: New IO Native Provider Interface
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Tue, 04 Mar 2003 23:38:29 -0000

Brian Jones (cbj@gnu.org) wrote:
> Did you happen to try running the java.io Mauve tests with your
> changes and Kissme?

Yes.  All of the java.io tests passed except the ones that weren't
passing before.

-- 
Aaron M. Renn (arenn@urbanophile.com) http://www.urbanophile.com/arenn/




From MAILER-DAEMON Tue Mar 04 18:44:54 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18qM5R-0004EA-00
	for mharc-classpath@gnu.org; Tue, 04 Mar 2003 18:44:41 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18qM5G-0003j7-00
	for classpath@gnu.org; Tue, 04 Mar 2003 18:44:30 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18qM5A-0003Uc-00
	for classpath@gnu.org; Tue, 04 Mar 2003 18:44:25 -0500
Received: from amsfep16-int.chello.nl ([213.46.243.26])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18qM4x-0003B3-00
	for classpath@gnu.org; Tue, 04 Mar 2003 18:44:12 -0500
Received: from node-c-675d.a2000.nl ([62.194.103.93])
	by amsfep16-int.chello.nlESMTP
	<20030304234410.JHYR21699.amsfep16-int.chello.nl@node-c-675d.a2000.nl>
	for <classpath@gnu.org>; Wed, 5 Mar 2003 00:44:10 +0100
From: Dhek Bhun Kho <bhun@chello.nl>
To: classpath@gnu.org
In-Reply-To: <m3of4qd80x.fsf@lyta.haphazard.org>
References: <20030304174141.51303.qmail@web41602.mail.yahoo.com>
	 <m3of4qd80x.fsf@lyta.haphazard.org>
Content-Type: text/plain
Organization: 
Message-Id: <1046824959.10107.20.camel@tasslehof.bhun.net>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.2.1- 
Date: 05 Mar 2003 01:42:39 +0100
Content-Transfer-Encoding: 7bit
Subject: Re: Classpath AWT problems (or gtk problems...)
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Tue, 04 Mar 2003 23:44:35 -0000

Hey Brian,

> with the AWT, it isn't complete yet, but I think you should be able to
> at least see a Frame).  
Does this work with gcj too? I had a hard time to get the native peers
to work, either I get nothing on the screen or I get 'returned\nexited'.

My papers came through from the copyright, I am currently busy with
something personal, but will start delving into the code in about 1-2
weeks. I saw Mark posted a patch for the object stream class. I'll try
it this week. I was thinking about digging into AWT or serialization, is
this is good idea or is there something else needing more attention
(like documentation or something).

Greets




From MAILER-DAEMON Tue Mar 04 19:07:17 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18qMPh-0002ui-00
	for mharc-classpath@gnu.org; Tue, 04 Mar 2003 19:05:37 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18qMPb-0002fP-00
	for classpath@gnu.org; Tue, 04 Mar 2003 19:05:31 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18qMPR-0002Wb-00
	for classpath@gnu.org; Tue, 04 Mar 2003 19:05:22 -0500
Received: from mail.peakpeak.com ([207.174.178.17] helo=gash2.peakpeak.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18qMPK-0002OU-00
	for classpath@gnu.org; Tue, 04 Mar 2003 19:05:14 -0500
Received: from fleche.redhat.com (te0190.peakpeak.com [204.144.238.190])
	by gash2.peakpeak.com (8.9.3/8.9.3) with ESMTP id RAA03663;
	Tue, 4 Mar 2003 17:05:03 -0700
Received: by fleche.redhat.com (Postfix, from userid 1000)
	id B42F64F8610; Tue,  4 Mar 2003 16:57:09 -0700 (MST)
To: Dhek Bhun Kho <bhun@chello.nl>
References: <20030304174141.51303.qmail@web41602.mail.yahoo.com>
	<m3of4qd80x.fsf@lyta.haphazard.org>
	<1046824959.10107.20.camel@tasslehof.bhun.net>
From: Tom Tromey <tromey@redhat.com>
X-Attribution: Tom
X-Zippy: ..  ich bin in einem dusenjet ins jahr 53 vor chr...
 ich lande im antiken Rom...  einige gladiatoren spielen scrabble...
 ich rieche PIZZA...
Date: 04 Mar 2003 16:57:09 -0700
In-Reply-To: <1046824959.10107.20.camel@tasslehof.bhun.net>
Message-ID: <874r6ihei2.fsf@fleche.redhat.com>
Lines: 10
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: classpath@gnu.org
Subject: Re: Classpath AWT problems (or gtk problems...)
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
Reply-To: tromey@redhat.com
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Wed, 05 Mar 2003 00:05:35 -0000

>>>>> ">" == Dhek Bhun Kho <bhun@chello.nl> writes:

>> Does this work with gcj too? I had a hard time to get the native peers
>> to work, either I get nothing on the screen or I get 'returned\nexited'.

Yes, you can run a gcj-compiled TestAWT (or use gij).
You have to be using the 3.4 (aka cvs trunk) gcj, since the Gtk peers
aren't in any other release.

Tom



From MAILER-DAEMON Tue Mar 04 19:17:36 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18qMb3-0008IY-00
	for mharc-classpath@gnu.org; Tue, 04 Mar 2003 19:17:21 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18qMaE-0007ut-00
	for classpath@gnu.org; Tue, 04 Mar 2003 19:16:30 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18qMaC-0007tn-00
	for classpath@gnu.org; Tue, 04 Mar 2003 19:16:28 -0500
Received: from 62-177-154-234.bbeyond.nl ([62.177.154.234]
	helo=LEMBU.sumatrasoftware.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)	id 18qMZo-0007rj-00
	for classpath@gnu.org; Tue, 04 Mar 2003 19:16:04 -0500
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: multipart/mixed;
	boundary="----_=_NextPart_001_01C2E2AC.4566B46A"
Date: Wed, 5 Mar 2003 01:15:04 +0100
Message-ID: <5C38B761F205B54BA59FF611A65C62480118B6@lembu.sumatrasoftware.com>
X-MimeOLE: Produced By Microsoft Exchange V6.5.6803.0
X-MS-Has-Attach: yes
X-MS-TNEF-Correlator: 
Thread-Topic: Small ZipFile patch
Thread-Index: AcLioq/EWGKIi/dfTYO8MMrkMTKBMwAB4lmQ
From: "Jeroen Frijters" <jeroen@sumatra.nl>
To: "Mark Wielaard" <mark@klomp.org>
cc: classpath@gnu.org
Subject: RE: Small ZipFile patch
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Wed, 05 Mar 2003 00:17:19 -0000

This is a multi-part message in MIME format.

------_=_NextPart_001_01C2E2AC.4566B46A
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Mono uses a conservative GC, so may be they just don't notice that IRAF
is garbage. On .NET ikvm runs fine:
C:\>ikvm IRAF foo
java.lang.SecurityException: Operation not allowed
        at java.lang.SecurityManager.checkPermission(Unknown Source)
        at java.lang.SecurityManager.checkWrite(Unknown Source)
        at java.io.RandomAccessFile.<init>(Unknown Source)
        at java.io.RandomAccessFile.<init>(Unknown Source)
        at IRAF.main(Unknown Source)
        at IRAF.main(Unknown Source)
java.lang.NullPointerException
        at java.io.RandomAccessFile.write(Unknown Source)
        at IRAF.main(Unknown Source)
        at IRAF.main(Unknown Source)

Another interesting trick with the finalizer is creating instances of
classes that have a private constructor! The attached runtime.j creates
an instance of (a subclass of) java.lang.Runtime. Doesn't work on ikvm,
because it ignores "new" without a corresponding call to the
constructor. It could be considered a bug in Sun's verifier that it
allows a class without a constructor, what do the other VMs do with this
code?

Regards,
Jeroen


> =20
> =20
> -----Original Message-----
> From: Mark Wielaard [mailto:mark@klomp.org]=20
> Sent: Wednesday, March 05, 2003 00:07
> To: Jeroen Frijters
> Cc: classpath@gnu.org
>=20
> Hi,
>=20
> Forgot the most important one for sure:
>=20
> $ mono --noinline --share-code bin/ikvm.exe IRAF testfile
> java.lang.SecurityException: Operation not allowed
>         at java.lang.SecurityManager.checkPermission(<unknown>)
>         at java.lang.SecurityManager.checkWrite(<unknown>)
>         at java.io.RandomAccessFile.<init>(<unknown>)
>         at java.io.RandomAccessFile.<init>(<unknown>)
>         at IRAF.main(<unknown>)
>         at IRAF.main(<unknown>)
> Killed
>=20
> Note that it is killed because it rapidly eats up all memory in the
> system.
>=20
> Cheers,
>=20
> Mark
>=20
>=20

------_=_NextPart_001_01C2E2AC.4566B46A
Content-Type: application/octet-stream;
	name="runtime.j"
Content-Transfer-Encoding: base64
Content-Description: runtime.j
Content-Disposition: attachment;
	filename="runtime.j"

LmNsYXNzIHB1YmxpYyBydW50aW1lDQouc3VwZXIgamF2YS9sYW5nL1J1bnRpbWUNCg0KLmZpZWxk
IHN0YXRpYyBGIExydW50aW1lOw0KDQoubWV0aG9kIHByb3RlY3RlZCBmaW5hbGl6ZSgpVg0KICAg
LmxpbWl0IHN0YWNrIDENCg0KICAgYWxvYWRfMA0KICAgcHV0c3RhdGljIHJ1bnRpbWUvRiBMcnVu
dGltZTsNCiAgIHJldHVybg0KDQouZW5kIG1ldGhvZA0KDQoubWV0aG9kIHB1YmxpYyBzdGF0aWMg
bWFpbihbTGphdmEvbGFuZy9TdHJpbmc7KVYNCiAgIC5saW1pdCBzdGFjayA1DQogICAubGltaXQg
bG9jYWxzIDQNCg0KICAgbmV3IHJ1bnRpbWUNCiAgIHBvcA0KICAgaW52b2tlc3RhdGljIGphdmEv
bGFuZy9TeXN0ZW0vZ2MoKVYNCiAgIGludm9rZXN0YXRpYyBqYXZhL2xhbmcvU3lzdGVtL3J1bkZp
bmFsaXphdGlvbigpVg0KDQogICBnZXRzdGF0aWMgamF2YS9sYW5nL1N5c3RlbS9vdXQgTGphdmEv
aW8vUHJpbnRTdHJlYW07DQogICBnZXRzdGF0aWMgcnVudGltZS9GIExydW50aW1lOw0KICAgaW52
b2tldmlydHVhbCBqYXZhL2lvL1ByaW50U3RyZWFtL3ByaW50bG4oTGphdmEvbGFuZy9PYmplY3Q7
KVYNCiAgIHJldHVybg0KDQouZW5kIG1ldGhvZA0K

------_=_NextPart_001_01C2E2AC.4566B46A
Content-Type: application/octet-stream;
	name="runtime.class"
Content-Transfer-Encoding: base64
Content-Description: runtime.class
Content-Disposition: attachment;
	filename="runtime.class"

yv66vgADAC0AIgEAB3ByaW50bG4JAA4AHwEAFShMamF2YS9sYW5nL09iamVjdDspVgwACQAhAQAT
amF2YS9pby9QcmludFN0cmVhbQEAD3J1bkZpbmFsaXphdGlvbgEAEWphdmEvbGFuZy9SdW50aW1l
AQAKU291cmNlRmlsZQEAAmdjAQABRgEABENvZGUJABsAHAwABgAhBwAZAQADb3V0AQAHcnVudGlt
ZQcABQEACXJ1bnRpbWUuagoAEQAWAQAEbWFpbgEAFihbTGphdmEvbGFuZy9TdHJpbmc7KVYMAAEA
AwEAFUxqYXZhL2lvL1ByaW50U3RyZWFtOwoADgANAQAQamF2YS9sYW5nL1N5c3RlbQEACUxydW50
aW1lOwcAEAwACgAaCgAOAAQBAAhmaW5hbGl6ZQwADwAXBwAHAQADKClWACEAGwAgAAAAAQAIAAoA
GgAAAAIABAAeACEAAQALAAAAEQABAAEAAAAFKrMADLEAAAAAAAkAFAAVAAEACwAAACAABQAEAAAA
FLsAG1e4AB24ABiyAAKyAAy2ABOxAAAAAAABAAgAAAACABI=

------_=_NextPart_001_01C2E2AC.4566B46A--



From MAILER-DAEMON Tue Mar 04 19:57:29 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18qNDo-0004Sx-00
	for mharc-classpath@gnu.org; Tue, 04 Mar 2003 19:57:24 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18qNCc-0003hT-00
	for classpath@gnu.org; Tue, 04 Mar 2003 19:56:10 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18qNCW-0003WU-00
	for classpath@gnu.org; Tue, 04 Mar 2003 19:56:05 -0500
Received: from mail.peakpeak.com ([207.174.178.17] helo=gash2.peakpeak.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18qNCJ-0003BW-00
	for classpath@gnu.org; Tue, 04 Mar 2003 19:55:51 -0500
Received: from fleche.redhat.com (te0190.peakpeak.com [204.144.238.190])
	by gash2.peakpeak.com (8.9.3/8.9.3) with ESMTP id RAA14832;
	Tue, 4 Mar 2003 17:55:49 -0700
Received: by fleche.redhat.com (Postfix, from userid 1000)
	id 7FCA44F8610; Tue,  4 Mar 2003 17:47:56 -0700 (MST)
To: "Jeroen Frijters" <jeroen@sumatra.nl>
References: <5C38B761F205B54BA59FF611A65C62480118B6@lembu.sumatrasoftware.com>
From: Tom Tromey <tromey@redhat.com>
X-Attribution: Tom
X-Zippy: I need "RONDO".
Date: 04 Mar 2003 17:47:56 -0700
In-Reply-To: <5C38B761F205B54BA59FF611A65C62480118B6@lembu.sumatrasoftware.com>
Message-ID: <87wujefxkz.fsf@fleche.redhat.com>
Lines: 29
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: Mark Wielaard <mark@klomp.org>
cc: classpath@gnu.org
Subject: Re: Small ZipFile patch
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
Reply-To: tromey@redhat.com
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Wed, 05 Mar 2003 00:57:23 -0000

>>>>> "Jeroen" == Jeroen Frijters <jeroen@sumatra.nl> writes:

Jeroen> Another interesting trick with the finalizer is creating
Jeroen> instances of classes that have a private constructor! The
Jeroen> attached runtime.j creates an instance of (a subclass of)
Jeroen> java.lang.Runtime.

Interesting test case.

With gij this prints `null', but that's probably because the GC and
finalization don't actually occur.

Jeroen> It could be considered a bug in Sun's verifier that it allows
Jeroen> a class without a constructor, what do the other VMs do with
Jeroen> this code?

Both Sun 1.4 and IBM 1.3 print a non-null `runtime' object.

Have you read this?

http://www.lsd-pl.net/documents/javasecurity-1.0.0.pdf

It seems like your technique could be also used to circumvent the
security check in the ClassLoader constructor.


I wonder what Sun has to say about this.

Tom



From MAILER-DAEMON Tue Mar 04 22:02:32 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18qPAu-0006Hl-00
	for mharc-classpath@gnu.org; Tue, 04 Mar 2003 22:02:32 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18qPAr-0006Fj-00
	for classpath@gnu.org; Tue, 04 Mar 2003 22:02:29 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18qPAq-0006CD-00
	for classpath@gnu.org; Tue, 04 Mar 2003 22:02:28 -0500
Received: from ms-smtp-02.southeast.rr.com ([24.93.67.83])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18qPAp-0006AU-00
	for classpath@gnu.org; Tue, 04 Mar 2003 22:02:27 -0500
Received: from mail3.nc.rr.com (fe3 [24.93.67.50])h2530sbB005222;
	Tue, 4 Mar 2003 22:00:54 -0500 (EST)
Received: from lyta.haphazard.org ([66.57.9.48]) by mail3.nc.rr.com  with
	Microsoft SMTPSVC(5.5.1877.757.75);	 Tue, 4 Mar 2003 22:00:24 -0500
Received: by lyta.haphazard.org (Postfix, from userid 500)
	id A90F4BEA92; Tue,  4 Mar 2003 22:02:04 -0500 (EST)
Sender: cbj@haphazard.org
To: Dhek Bhun Kho <bhun@chello.nl>
References: <20030304174141.51303.qmail@web41602.mail.yahoo.com>
	<m3of4qd80x.fsf@lyta.haphazard.org>
	<1046824959.10107.20.camel@tasslehof.bhun.net>
From: Brian Jones <cbj@gnu.org>
Date: 04 Mar 2003 22:02:04 -0500
In-Reply-To: <1046824959.10107.20.camel@tasslehof.bhun.net>
Message-ID: <m3k7fecy8j.fsf@lyta.haphazard.org>
Lines: 17
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: classpath@gnu.org
Subject: Re: Classpath AWT problems (or gtk problems...)
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Wed, 05 Mar 2003 03:02:30 -0000

Dhek Bhun Kho <bhun@chello.nl> writes:

> My papers came through from the copyright, I am currently busy with
> something personal, but will start delving into the code in about 1-2
> weeks. I saw Mark posted a patch for the object stream class. I'll try
> it this week. I was thinking about digging into AWT or serialization, is
> this is good idea or is there something else needing more attention
> (like documentation or something).

Both AWT and serialization are good areas to delve into.  If
serialization is more interesting to you then check out 'serialize'
and 'serialcompat' parts of japitools.  We should check serialized
compatibility with 1.1 through current releases.

Brian
-- 
Brian Jones <cbj@gnu.org>



From MAILER-DAEMON Wed Mar 05 03:21:36 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18qU8U-00038l-00
	for mharc-classpath@gnu.org; Wed, 05 Mar 2003 03:20:22 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18qU83-0002hq-00
	for classpath@gnu.org; Wed, 05 Mar 2003 03:19:55 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18qU7f-0002JK-00
	for classpath@gnu.org; Wed, 05 Mar 2003 03:19:33 -0500
Received: from 62-177-154-234.bbeyond.nl ([62.177.154.234]
	helo=LEMBU.sumatrasoftware.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)	id 18qU7Y-00022S-00
	for classpath@gnu.org; Wed, 05 Mar 2003 03:19:24 -0500
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Date: Wed, 5 Mar 2003 09:18:27 +0100
Message-ID: <5C38B761F205B54BA59FF611A65C62480118B8@lembu.sumatrasoftware.com>
X-MimeOLE: Produced By Microsoft Exchange V6.5.6803.0
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: Small ZipFile patch
Thread-Index: AcLisdqg1JSM+G0XQXaTVSZZKAUlkQAPTuxw
From: "Jeroen Frijters" <jeroen@sumatra.nl>
To: <tromey@redhat.com>
cc: Mark Wielaard <mark@klomp.org>
cc: classpath@gnu.org
Subject: RE: Small ZipFile patch
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Wed, 05 Mar 2003 08:20:20 -0000

Tom Tromey wrote:
> Jeroen> Another interesting trick with the finalizer is creating
> Jeroen> instances of classes that have a private constructor! The
> Jeroen> attached runtime.j creates an instance of (a subclass of)
> Jeroen> java.lang.Runtime.
>=20
> Interesting test case.
>=20
> With gij this prints `null', but that's probably because the GC and
> finalization don't actually occur.
>=20
> Jeroen> It could be considered a bug in Sun's verifier that it allows
> Jeroen> a class without a constructor, what do the other VMs do with
> Jeroen> this code?
>=20
> Both Sun 1.4 and IBM 1.3 print a non-null `runtime' object.
>=20
> Have you read this?
>=20
> http://www.lsd-pl.net/documents/javasecurity-1.0.0.pdf

Not sure. I have the pdf sitting on my desktop, so either I did or I'm
planning to ;-)

> It seems like your technique could be also used to circumvent the
> security check in the ClassLoader constructor.
>=20
>=20
> I wonder what Sun has to say about this.

Sun's ClassLoader has a hack that prevents this from being exploitable:
http://www.securingjava.com/chapter-five/chapter-five-8.html

Regards,
Jeroen



From MAILER-DAEMON Wed Mar 05 04:29:50 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18qVDi-00049X-00
	for mharc-classpath@gnu.org; Wed, 05 Mar 2003 04:29:50 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18qVDf-00048e-00
	for classpath@gnu.org; Wed, 05 Mar 2003 04:29:47 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18qVDe-00047I-00
	for classpath@gnu.org; Wed, 05 Mar 2003 04:29:47 -0500
Received: from amsfep11-int.chello.nl ([213.46.243.20])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18qVDc-00042q-00; Wed, 05 Mar 2003 04:29:44 -0500
Received: from node-c-675d.a2000.nl ([62.194.103.93])
	by amsfep11-int.chello.nlESMTP
	<20030305092943.RRNU9305.amsfep11-int.chello.nl@node-c-675d.a2000.nl>;
	Wed, 5 Mar 2003 10:29:43 +0100
From: Dhek Bhun Kho <bhun@chello.nl>
To: Brian Jones <cbj@gnu.org>
In-Reply-To: <m3k7fecy8j.fsf@lyta.haphazard.org>
References: <20030304174141.51303.qmail@web41602.mail.yahoo.com>
	 <m3of4qd80x.fsf@lyta.haphazard.org>
	 <1046824959.10107.20.camel@tasslehof.bhun.net>
	 <m3k7fecy8j.fsf@lyta.haphazard.org>
Content-Type: text/plain
Organization: 
Message-Id: <1046860094.2198.7.camel@tasslehof.bhun.net>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.2.1- 
Date: 05 Mar 2003 11:28:14 +0100
Content-Transfer-Encoding: 7bit
cc: classpath@gnu.org
Subject: Re: Classpath AWT problems (or gtk problems...)
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Wed, 05 Mar 2003 09:29:48 -0000

> serialization is more interesting to you then check out 'serialize'
> and 'serialcompat' parts of japitools.  We should check serialized
> compatibility with 1.1 through current releases.
Ok. Will do that. 

Thanks.

Bhun.




From MAILER-DAEMON Wed Mar 05 05:11:48 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18qVrm-0005nn-00
	for mharc-classpath@gnu.org; Wed, 05 Mar 2003 05:11:14 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18qVrf-0005fP-00
	for classpath@gnu.org; Wed, 05 Mar 2003 05:11:07 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18qVrc-0005b2-00
	for classpath@gnu.org; Wed, 05 Mar 2003 05:11:04 -0500
Received: from 62-177-154-234.bbeyond.nl ([62.177.154.234]
	helo=LEMBU.sumatrasoftware.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)	id 18qVrY-0005T6-00
	for classpath@gnu.org; Wed, 05 Mar 2003 05:11:00 -0500
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Date: Wed, 5 Mar 2003 11:10:02 +0100
X-MimeOLE: Produced By Microsoft Exchange V6.5.6803.0
Message-ID: <5C38B761F205B54BA59FF611A65C62480118BA@lembu.sumatrasoftware.com>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: New IO Native Provider Interface
Thread-Index: AcLin9ELFmhA9JuwSfeVmkwS1mEchgAWH7Ww
From: "Jeroen Frijters" <jeroen@sumatra.nl>
To: "Aaron M. Renn" <arenn@urbanophile.com>,
	<classpath@gnu.org>
Subject: RE: New IO Native Provider Interface
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Wed, 05 Mar 2003 10:11:11 -0000

Hi,

Great job, this is almost exactly like I envisioned it. A few minor
suggestions:

- FileOutputStream should not request read access, so the modes should
be "w" and "a"
- write(byte[] buf, long offset, long length) should not use longs for
offset and length
- nativeReadByte shouldn't return a long
- I don't think available() should return negative numbers

I'm still in doubt as to whether there should be a VMFileDescriptor. For
now, I actually reimplemented FileDescriptor and because the public
interface is fairly small, I feel this works well and it saves the
overhead of another layer of indirection.

Regards,
Jeroen

> =20
> =20
> -----Original Message-----
> From: Aaron M. Renn [mailto:arenn@urbanophile.com]=20
> Sent: Tuesday, March 04, 2003 23:44
> To: classpath@gnu.org
>=20
> I modified the java.io package to do native I/O (except for=20
> the File class)
> along the lines of what I posted last week.  Please take a=20
> look and let
> me know ASAP if anything is broken.  I'm especially keen to=20
> hear from the
> gcj people on how close this comes to allowing us to merge=20
> these classes.
> This also corrects the problems recently discussed of finalization in
> classes like FileInputStream since right now only FileDescriptor deals
> with native file descriptors and native methods.
>=20
> --=20
> Aaron M. Renn (arenn@urbanophile.com)=20
> http://www.urbanophile.com/arenn/
>=20
>=20
>=20
> _______________________________________________
> Classpath mailing list
> Classpath@gnu.org
> http://mail.gnu.org/mailman/listinfo/classpath
>=20



From MAILER-DAEMON Wed Mar 05 10:21:40 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18qaf1-0004Rx-00
	for mharc-classpath@gnu.org; Wed, 05 Mar 2003 10:18:23 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18qaev-0004K0-00
	for classpath@gnu.org; Wed, 05 Mar 2003 10:18:17 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18qadq-0003cx-00
	for classpath@gnu.org; Wed, 05 Mar 2003 10:17:11 -0500
Received: from anis.telecom.uqam.ca ([132.208.250.6] helo=uqam.ca)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18qad5-0002tT-00; Wed, 05 Mar 2003 10:16:23 -0500
Received: from anis.telecom.uqam.ca (anis.telecom.uqam.ca [132.208.250.6])
	by sortant.uqam.ca (8.12.8/8.12.1) with SMTP id h25F0CRT009070;
	Wed, 5 Mar 2003 10:00:50 -0500 (EST)
Received: from antivirus.uqam.ca ([127.0.0.1])
 by anis.telecom.uqam.ca (NAVGW 2.5.1.12) with SMTP id M2003030510005031025
 ; Wed, 05 Mar 2003 10:00:50 -0500
Received: from localhost (perseval.info.uqam.ca [132.208.137.96])
	h25Ew5Ui008431;	Wed, 5 Mar 2003 09:58:05 -0500 (EST)
X-Spam-Filter: Filtre-Uqam re:  abuse@uqam.ca
Received: from localhost ([127.0.0.1] helo=uqam.ca)
	by localhost with esmtp (Exim 3.36 #1 (Debian))
	id 18qaLM-0000K3-00; Wed, 05 Mar 2003 09:58:04 -0500
Message-ID: <3E66107C.6050700@uqam.ca>
Date: Wed, 05 Mar 2003 09:58:04 -0500
From: "Prof. Etienne M. Gagnon" <etienne.gagnon@uqam.ca>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US;
	rv:1.2.1) Gecko/20021226 Debian/1.2.1-9
X-Accept-Language: fr-ca, en-ca, en-us
MIME-Version: 1.0
To: Brian Jones <cbj@gnu.org>
References: <3E646FF3.5080906@aicas.com> <m33cm3e0tx.fsf@lyta.haphazard.org>
In-Reply-To: <m33cm3e0tx.fsf@lyta.haphazard.org>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
cc: "Dr. Torsten Rupp" <rupp@aicas.com>
cc: Classpath@gnu.org
Subject: Re: C native layer (pre-announcement)
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Wed, 05 Mar 2003 15:18:22 -0000

Hi Brian,

I will attempt to answer some of your questions.  Dr. Rupp will probably correct 
any error I make in my answers.

> I'm confused about when to worry about this.  Does it matter for
> synchronized methods?

Yes, as the system/library call you are doing might also be done by *another* 
method on *another* thread.

>  Does it matter for all native code?

Of course.

>  Does ANSI
> define what is reentrant?

Posix does, which is what most of Classpath's native code relies on.

Etienne

-- 
Etienne M. Gagnon, Ph.D.             http://www.info.uqam.ca/~egagnon/
SableVM:                                       http://www.sablevm.org/
SableCC:                                       http://www.sablecc.org/




From MAILER-DAEMON Wed Mar 05 12:27:39 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18qcfg-000161-00
	for mharc-classpath@gnu.org; Wed, 05 Mar 2003 12:27:12 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18qce4-0000KK-00
	for classpath@gnu.org; Wed, 05 Mar 2003 12:25:32 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18qcXE-00062q-00
	for classpath@gnu.org; Wed, 05 Mar 2003 12:18:29 -0500
Received: from mail.peakpeak.com ([207.174.178.17] helo=gash2.peakpeak.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18qcW2-0005Jx-00
	for classpath@gnu.org; Wed, 05 Mar 2003 12:17:14 -0500
Received: from fleche.redhat.com (te0190.peakpeak.com [204.144.238.190])
	by gash2.peakpeak.com (8.9.3/8.9.3) with ESMTP id KAA28304;
	Wed, 5 Mar 2003 10:17:11 -0700
Received: by fleche.redhat.com (Postfix, from userid 1000)
	id 1A0994F8610; Wed,  5 Mar 2003 10:09:28 -0700 (MST)
To: "Jeroen Frijters" <jeroen@sumatra.nl>
References: <5C38B761F205B54BA59FF611A65C62480118B8@lembu.sumatrasoftware.com>
From: Tom Tromey <tromey@redhat.com>
X-Attribution: Tom
X-Zippy: Everything will be ALL RIGHT if we can just remember things about
 ALGEBRA.. or SOCCER..  or SOCIALISM..
Date: 05 Mar 2003 10:09:28 -0700
In-Reply-To: <5C38B761F205B54BA59FF611A65C62480118B8@lembu.sumatrasoftware.com>
Message-ID: <874r6hg2pj.fsf@fleche.redhat.com>
Lines: 9
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: Mark Wielaard <mark@klomp.org>
cc: classpath@gnu.org
Subject: Re: Small ZipFile patch
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
Reply-To: tromey@redhat.com
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Wed, 05 Mar 2003 17:27:10 -0000

>>>>> "Jeroen" == Jeroen Frijters <jeroen@sumatra.nl> writes:

Jeroen> Sun's ClassLoader has a hack that prevents this from being exploitable:
Jeroen> http://www.securingjava.com/chapter-five/chapter-five-8.html

Sounds like we need this in ClassLoader and in any other class that
performs security checks in its constructor.

Tom



From MAILER-DAEMON Wed Mar 05 14:33:57 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18qedM-00055R-00
	for mharc-classpath@gnu.org; Wed, 05 Mar 2003 14:32:56 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18qecv-0004og-00
	for classpath@gnu.org; Wed, 05 Mar 2003 14:32:29 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18qecB-0004We-00
	for classpath@gnu.org; Wed, 05 Mar 2003 14:31:43 -0500
Received: from mail03.svc.cra.dublin.eircom.net ([159.134.118.19])
	by monty-python.gnu.org with smtp (Exim 4.10.13)
	id 18qeZh-0001Zp-00
	for classpath@gnu.org; Wed, 05 Mar 2003 14:29:09 -0500
Received: (qmail 45243 messnum 3730219 invoked from
	network[194.125.175.139/ts14-139.dublin.indigo.ie]); 5 Mar 2003 19:27:50 -0000
Received: from ts14-139.dublin.indigo.ie (HELO ?192.168.2.54?)
	(194.125.175.139)
	by mail03.svc.cra.dublin.eircom.net (qp 45243) with SMTP;
	5 Mar 2003 19:27:50 -0000
From: John Leuner <jewel@pixie.co.za>
To: classpath@gnu.org
Content-Type: text/plain
Organization: 
Message-Id: <1046891991.428.293.camel@cmalu>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.2.0 
Date: 05 Mar 2003 19:19:51 +0000
Content-Transfer-Encoding: 7bit
Subject: TestAWT
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Wed, 05 Mar 2003 19:32:55 -0000

I was trying to debug a GTK peer crash with kissme and TestAWT, but
while investigating this I noticed some strange behaviour for the Dialog
window.

Running this on the linux JDK from IBM and also on a Windows machine, I
noticed that you have to push the OK button twice to close the Dialog
window.

Has anyone else seen this?

I looked at the code and it just calls dispose(), but only appears to
work the second time.

-- 
John Leuner <jewel@pixie.co.za>




From MAILER-DAEMON Wed Mar 05 14:58:52 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18qeyC-0005AM-00
	for mharc-classpath@gnu.org; Wed, 05 Mar 2003 14:54:28 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18qew7-0004av-00
	for classpath@gnu.org; Wed, 05 Mar 2003 14:52:19 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18qemF-0000io-00
	for classpath@gnu.org; Wed, 05 Mar 2003 14:42:08 -0500
Received: from mail.peakpeak.com ([207.174.178.17] helo=gash2.peakpeak.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18qej6-00084u-00
	for classpath@gnu.org; Wed, 05 Mar 2003 14:38:52 -0500
Received: from fleche.redhat.com (tf0021.peakpeak.com [204.144.239.21])
	by gash2.peakpeak.com (8.9.3/8.9.3) with ESMTP id MAA06223;
	Wed, 5 Mar 2003 12:38:49 -0700
Received: by fleche.redhat.com (Postfix, from userid 1000)
	id 0AB474F8610; Wed,  5 Mar 2003 12:31:07 -0700 (MST)
To: John Leuner <jewel@pixie.co.za>
References: <1046891991.428.293.camel@cmalu>
From: Tom Tromey <tromey@redhat.com>
X-Attribution: Tom
X-Zippy: I will establish the first SHOPPING MALL in NUTLEY, New Jersey...
Date: 05 Mar 2003 12:31:06 -0700
In-Reply-To: <1046891991.428.293.camel@cmalu>
Message-ID: <87el5ld30l.fsf@fleche.redhat.com>
Lines: 15
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: classpath@gnu.org
Subject: Re: TestAWT
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
Reply-To: tromey@redhat.com
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Wed, 05 Mar 2003 19:54:26 -0000

>>>>> "John" == John Leuner <jewel@pixie.co.za> writes:

John> Running this on the linux JDK from IBM and also on a Windows machine, I
John> noticed that you have to push the OK button twice to close the Dialog
John> window.

John> Has anyone else seen this?

The peers have all kinds of bugs.  This is probably one.

As I recall for me the dialog window never closes.
This probably means there is an additional bug in our AWT java code.
(I'm always running TestAWT against libgcj.)

Tom



From MAILER-DAEMON Wed Mar 05 16:47:31 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18qgi8-00068m-00
	for mharc-classpath@gnu.org; Wed, 05 Mar 2003 16:46:00 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18qggu-0005aD-00
	for classpath@gnu.org; Wed, 05 Mar 2003 16:44:44 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18qggT-0005Jg-00
	for classpath@gnu.org; Wed, 05 Mar 2003 16:44:18 -0500
Received: from pop2a.ripco.com ([209.100.227.25])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18qgdN-00043v-00
	for classpath@gnu.org; Wed, 05 Mar 2003 16:41:05 -0500
Received: (from arenn@localhost)
	by pop2a.ripco.com (8.11.0/8.11.0) id h25LfEn27455
	for classpath@gnu.org; Wed, 5 Mar 2003 15:41:14 -0600 (CST)
Date: Wed, 5 Mar 2003 15:41:14 -0600
From: "Aaron M. Renn" <arenn@urbanophile.com>
To: classpath@gnu.org
Message-ID: <20030305214114.GA26935@urbanophile.com>
Mail-Followup-To: "Aaron M. Renn" <arenn@urbanophile.com>,
	classpath@gnu.org
References: <5C38B761F205B54BA59FF611A65C62480118BA@lembu.sumatrasoftware.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <5C38B761F205B54BA59FF611A65C62480118BA@lembu.sumatrasoftware.com>
User-Agent: Mutt/1.4i
Organization: GNU's Not Unix!
Subject: Re: New IO Native Provider Interface
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Wed, 05 Mar 2003 21:45:58 -0000

Jeroen Frijters (jeroen@sumatra.nl) wrote:
> Great job, this is almost exactly like I envisioned it. A few minor
> suggestions:

Thanks.
 
> - FileOutputStream should not request read access, so the modes should
> be "w" and "a"

Good observation.  Have you actually tested the JDK to see what it
does in this situation?  Is the file actually opened "write only"?

> - write(byte[] buf, long offset, long length) should not use longs for
> offset and length

I take it that you are referring to the Java write() method I added to the
FileDescriptor class and not the nativeWriteBuf() method.  I'm ok with
modifying this.  I do typically want to use longs for native calls.

> - nativeReadByte shouldn't return a long

Why not?  All of the rest of the native methods that return values
return longs.

> - I don't think available() should return negative numbers

Does it?  I certainly didn't intend for it to.

Thanks for the feedback.
 
-- 
Aaron M. Renn (arenn@urbanophile.com) http://www.urbanophile.com/arenn/




From MAILER-DAEMON Wed Mar 05 21:42:01 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18qlKb-0001GJ-00
	for mharc-classpath@gnu.org; Wed, 05 Mar 2003 21:42:01 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18qlKY-0001Fh-00
	for classpath@gnu.org; Wed, 05 Mar 2003 21:41:58 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18qlKX-0001Ee-00
	for classpath@gnu.org; Wed, 05 Mar 2003 21:41:57 -0500
Received: from ms-smtp-03.southeast.rr.com ([24.93.67.84])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18qlKW-0001DC-00
	for classpath@gnu.org; Wed, 05 Mar 2003 21:41:57 -0500
Received: from mail4.nc.rr.com (fe4 [24.93.67.51])h262erH4025054;
	Wed, 5 Mar 2003 21:40:53 -0500 (EST)
Received: from lyta.haphazard.org ([66.57.9.48]) by mail4.nc.rr.com  with
	Microsoft SMTPSVC(5.5.1877.757.75);	 Wed, 5 Mar 2003 21:43:20 -0500
Received: by lyta.haphazard.org (Postfix, from userid 500)
	id D219FBE69E; Wed,  5 Mar 2003 21:41:36 -0500 (EST)
Sender: cbj@haphazard.org
To: "Jeroen Frijters" <jeroen@sumatra.nl>
References: <5C38B761F205B54BA59FF611A65C624801185D@lembu.sumatrasoftware.com>
From: Brian Jones <cbj@gnu.org>
Date: 05 Mar 2003 21:41:36 -0500
In-Reply-To: <5C38B761F205B54BA59FF611A65C624801185D@lembu.sumatrasoftware.com>
Message-ID: <m3adg9cj33.fsf@lyta.haphazard.org>
Lines: 18
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: classpath@gnu.org
Subject: Re: java.io.File patch
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Thu, 06 Mar 2003 02:41:59 -0000

"Jeroen Frijters" <jeroen@sumatra.nl> writes:

> Hi,
> 
> Attached is a patch for object serialization, to use the proper classes
> when getting and setting fields in the object (and when calling
> readObject/writeObject). Also some minor changes to make caching the
> Field and Method objects possible in the future.
> 
> I submitted the patch to Savannah as 1107.

Mark, are you waiting for receipt of the assignment before committing
this?

Brian

-- 
Brian Jones <cbj@gnu.org>



From MAILER-DAEMON Wed Mar 05 21:44:34 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18qlN3-0004lQ-00
	for mharc-classpath@gnu.org; Wed, 05 Mar 2003 21:44:33 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18qlN1-0004em-00
	for classpath@gnu.org; Wed, 05 Mar 2003 21:44:31 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18qlMz-0004cB-00
	for classpath@gnu.org; Wed, 05 Mar 2003 21:44:30 -0500
Received: from ms-smtp-02.southeast.rr.com ([24.93.67.83])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18qlMz-0004Zt-00
	for classpath@gnu.org; Wed, 05 Mar 2003 21:44:29 -0500
Received: from mail5.nc.rr.com (fe5 [24.93.67.52])h262gtbF026180;
	Wed, 5 Mar 2003 21:42:56 -0500 (EST)
Received: from lyta.haphazard.org ([66.57.9.48]) by mail5.nc.rr.com  with
	Microsoft SMTPSVC(5.5.1877.757.75);	 Wed, 5 Mar 2003 21:42:14 -0500
Received: by lyta.haphazard.org (Postfix, from userid 500)
	id 138C8BE69E; Wed,  5 Mar 2003 21:44:09 -0500 (EST)
Sender: cbj@haphazard.org
To: "Jeroen Frijters" <jeroen@sumatra.nl>
References: <5C38B761F205B54BA59FF611A65C62480118A6@lembu.sumatrasoftware.com>
From: Brian Jones <cbj@gnu.org>
Date: 05 Mar 2003 21:44:08 -0500
In-Reply-To: <5C38B761F205B54BA59FF611A65C62480118A6@lembu.sumatrasoftware.com>
Message-ID: <m34r6hciyv.fsf@lyta.haphazard.org>
Lines: 17
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: classpath@gnu.org
Subject: Re: Class loader optimization patch
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Thu, 06 Mar 2003 02:44:31 -0000

"Jeroen Frijters" <jeroen@sumatra.nl> writes:

> Hi,
> 
> I made another attempt at reducing the number of ClassNotFoundExceptions
> that are thrown when loading a class, this time I believe the patch can
> be integrated without breaking anything. No API changes and existing
> code should continue to run fine. If the VM implementation of
> VMClassLoader.loadClass throws a ClassNotFoundException, fine, but with
> this patch it can also return null, and thus prevent the creation of a
> (in some cases) useless exception object.

Okay to apply this patch?

Brian
-- 
Brian Jones <cbj@gnu.org>



From MAILER-DAEMON Thu Mar 06 00:58:10 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18qoM8-0003IC-00
	for mharc-classpath@gnu.org; Thu, 06 Mar 2003 00:55:48 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18qoLy-0002p7-00
	for classpath@gnu.org; Thu, 06 Mar 2003 00:55:38 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18qoLp-0002Oy-00
	for classpath@gnu.org; Thu, 06 Mar 2003 00:55:32 -0500
Received: from mail.peakpeak.com ([207.174.178.17] helo=gash2.peakpeak.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18qoLl-0001I4-00
	for classpath@gnu.org; Thu, 06 Mar 2003 00:55:25 -0500
Received: from fleche.redhat.com (tf0021.peakpeak.com [204.144.239.21])
	by gash2.peakpeak.com (8.9.3/8.9.3) with ESMTP id WAA16152;
	Wed, 5 Mar 2003 22:54:57 -0700
Received: by fleche.redhat.com (Postfix, from userid 1000)
	id 1B4C54F8610; Wed,  5 Mar 2003 22:47:18 -0700 (MST)
To: Dalibor Topic <robilad@yahoo.com>
References: <20030304152309.49045.qmail@web10009.mail.yahoo.com>
From: Tom Tromey <tromey@redhat.com>
X-Attribution: Tom
X-Zippy: I am KING BOMBA of Sicily!..I will marry LUCILLE BALL next Friday!
Date: 05 Mar 2003 22:47:17 -0700
In-Reply-To: <20030304152309.49045.qmail@web10009.mail.yahoo.com>
Message-ID: <87k7fd6o7u.fsf@fleche.redhat.com>
Lines: 14
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: Jeroen Frijters <jeroen@sumatra.nl>
cc: classpath@gnu.org
Subject: Re: More finalize woes
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
Reply-To: tromey@redhat.com
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Thu, 06 Mar 2003 05:55:47 -0000

>>>>> "Dalibor" == Dalibor Topic <robilad@yahoo.com> writes:

>> java.util.zip.[De|In]flater both have an empty finalize method "for
>> compatibility". Is this really necessary?

Dalibor> Yes, in order to have reflection on these methods
Dalibor> working. A pretty good reason in my opinion.

I'm not so sure.  It seems to me that anybody using reflection has to
be aware of, and understand, the Java binary compatibility rules.
Implementing or not implementing finalize doesn't affect binary
compatibility, so it should be a change we are free to make.

Tom



From MAILER-DAEMON Thu Mar 06 01:56:37 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18qpIy-0003rS-00
	for mharc-classpath@gnu.org; Thu, 06 Mar 2003 01:56:36 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18qpIw-0003qq-00
	for classpath@gnu.org; Thu, 06 Mar 2003 01:56:34 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18qpIs-0003pt-00
	for classpath@gnu.org; Thu, 06 Mar 2003 01:56:34 -0500
Received: from pop2a.ripco.com ([209.100.227.25])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18qpFJ-0003Fz-00
	for classpath@gnu.org; Thu, 06 Mar 2003 01:52:49 -0500
Received: (from arenn@localhost)
	by pop2a.ripco.com (8.11.0/8.11.0) id h266qkW16928
	for classpath@gnu.org; Thu, 6 Mar 2003 00:52:46 -0600 (CST)
Date: Thu, 6 Mar 2003 00:52:46 -0600
From: "Aaron M. Renn" <arenn@urbanophile.com>
To: classpath@gnu.org
Message-ID: <20030306065246.GA16716@urbanophile.com>
Mail-Followup-To: "Aaron M. Renn" <arenn@urbanophile.com>,
	classpath@gnu.org
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.4i
Organization: GNU's Not Unix!
Subject: More java.io
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Thu, 06 Mar 2003 06:56:35 -0000

Ok, moving on in the gcj/classpath merger.

1.  I'm thinking we should adopt the gcj LineNumberReader.  It appears to
be more efficient.  However, skip() is definitely buggy (inserting regular
skip()'s into your code leads to more lines than the file actually has).
All Mauve tests pass, so I'll try to add an update soon.

2.  On java.io.File, similar to the FileDescriptor stuff, I'd like to propose
a unified provider interface.  Comments:

o I like to pass the filename to avoid gratuitous JNI lookups.
o I do not want to adopt the "overloaded" stat and access methods of
  gcj, I'd rather have one method per lookup
o I'd like to name consistently with FileDescriptor
o Minimizing native functionality, I want to return a full directory
 listing to Java and filter at that level instead of the gjc approach.

Here's the list.  Please comment.

  static void initNative();
  boolean nativeCreate(String name);
  boolean nativeDelete(String name);
  boolean nativeRename(String src, String dest);
  boolean nativeMkdir(String name);
  boolean nativeGetLastModified(String path);
  boolean nativeSetLastModified(String path);
  long nativeGetLength(String path);
  String nativeGetCanonicalPath(String path);
  boolean nativeExists(String path);
  boolean nativeIsAbsolute(String path);
  boolean nativeIsFile(String path);
  boolean nativeIsDirectory(String path);
  boolean nativeIsHidden(String path);
  boolean nativeCanRead(String path);
  boolean nativeCanWrite(String path);
  boolean nativeSetReadOnly(String path);
  String[] nativeListRoots();
  String[] nativeListDirectory(String path);

-- 
Aaron M. Renn (arenn@urbanophile.com) http://www.urbanophile.com/arenn/




From MAILER-DAEMON Thu Mar 06 02:17:26 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18qpd0-0002j7-00
	for mharc-classpath@gnu.org; Thu, 06 Mar 2003 02:17:18 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18qpcn-0002VN-00
	for classpath@gnu.org; Thu, 06 Mar 2003 02:17:05 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18qpcB-0002B9-00
	for classpath@gnu.org; Thu, 06 Mar 2003 02:16:30 -0500
Received: from 62-177-154-234.bbeyond.nl ([62.177.154.234]
	helo=LEMBU.sumatrasoftware.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)	id 18qpbx-00027w-00
	for classpath@gnu.org; Thu, 06 Mar 2003 02:16:13 -0500
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: multipart/mixed;
	boundary="----_=_NextPart_001_01C2E3B0.22121A9A"
Date: Thu, 6 Mar 2003 08:15:14 +0100
X-MimeOLE: Produced By Microsoft Exchange V6.5.6803.0
Message-ID: <5C38B761F205B54BA59FF611A65C62480118BF@lembu.sumatrasoftware.com>
X-MS-Has-Attach: yes
X-MS-TNEF-Correlator: 
Thread-Topic: New IO Native Provider Interface
Thread-Index: AcLjYM2txE7ulQjcSuaaToBaPM6IMwATD6RQ
From: "Jeroen Frijters" <jeroen@sumatra.nl>
To: "Aaron M. Renn" <arenn@urbanophile.com>,
	<classpath@gnu.org>
Subject: RE: New IO Native Provider Interface
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Thu, 06 Mar 2003 07:17:16 -0000

This is a multi-part message in MIME format.

------_=_NextPart_001_01C2E3B0.22121A9A
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Hi,

Aaron M. Renn wrote:
> Jeroen Frijters (jeroen@sumatra.nl) wrote:
> > - FileOutputStream should not request read access, so the=20
> modes should
> > be "w" and "a"
>=20
> Good observation.  Have you actually tested the JDK to see what it
> does in this situation?  Is the file actually opened "write only"?

Yes, I have. Test code is attached (it should fail with
"java.io.IOException: Access is denied"). Additionally, FileOutputStream
(when it is not in append mode) should truncate the file if it already
exists, so it also needs to use a different mode because of this.

> > - write(byte[] buf, long offset, long length) should not=20
> use longs for
> > offset and length
>=20
> I take it that you are referring to the Java write() method I=20
> added to the
> FileDescriptor class and not the nativeWriteBuf() method.  I'm ok with
> modifying this. =20

Yes.

>I do typically want to use longs for native calls.

Why? Is it expensive to use ints on 64 bit architectures?

> > - nativeReadByte shouldn't return a long
>=20
> Why not?  All of the rest of the native methods that return values
> return longs.

I missed the others. IMHO only file offsets and native pointers should
be long, all others should be the most natural type. In this case I
think that's int.

> > - I don't think available() should return negative numbers
>=20
> Does it?  I certainly didn't intend for it to.

Not it doesn't, sorry, apparantly I wasn't awake yet.

Regards,
Jeroen

P.S. I'm going on vacation for a week and I won't be able to read my
e-mail.

------_=_NextPart_001_01C2E3B0.22121A9A
Content-Type: application/octet-stream;
	name="iotest.java"
Content-Transfer-Encoding: base64
Content-Description: iotest.java
Content-Disposition: attachment;
	filename="iotest.java"

aW1wb3J0IGphdmEuaW8uKjsNCg0KY2xhc3MgaW90ZXN0DQp7DQpwdWJsaWMgc3RhdGljIHZvaWQg
bWFpbihTdHJpbmdbXSBhcmdzKSB0aHJvd3MgRXhjZXB0aW9uDQp7DQpGaWxlT3V0cHV0U3RyZWFt
IGZvcyA9IG5ldyBGaWxlT3V0cHV0U3RyZWFtKCJmb28udHh0Iik7DQpmb3Mud3JpdGUoImZvbyIu
Z2V0Qnl0ZXMoKSk7DQpGaWxlSW5wdXRTdHJlYW0gZmlzID0gbmV3IEZpbGVJbnB1dFN0cmVhbShm
b3MuZ2V0RkQoKSk7DQpTeXN0ZW0ub3V0LnByaW50bG4oZmlzLnJlYWQoKSk7DQp9DQp9

------_=_NextPart_001_01C2E3B0.22121A9A--



From MAILER-DAEMON Thu Mar 06 02:36:38 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18qpvh-0005gI-00
	for mharc-classpath@gnu.org; Thu, 06 Mar 2003 02:36:37 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18qpvf-0005bZ-00
	for classpath@gnu.org; Thu, 06 Mar 2003 02:36:35 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18qpvd-0005XM-00
	for classpath@gnu.org; Thu, 06 Mar 2003 02:36:34 -0500
Received: from piglet.dstc.edu.au ([130.102.176.1])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18qpvc-0005LP-00
	for classpath@gnu.org; Thu, 06 Mar 2003 02:36:33 -0500
Received: from dstc.edu.au (soluble.dstc.edu.au [130.102.176.43])
	by piglet.dstc.edu.au (8.12.8/8.12.8) with ESMTP id h267aL27015766;
	Thu, 6 Mar 2003 17:36:22 +1000 (EST)
Message-Id: <200303060736.h267aL27015766@piglet.dstc.edu.au>
X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4
To: "Jeroen Frijters" <jeroen@sumatra.nl>
In-Reply-To: Message from "Jeroen Frijters" <jeroen@sumatra.nl> 
	<5C38B761F205B54BA59FF611A65C62480118BF@lembu.sumatrasoftware.com> 
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Date: Thu, 06 Mar 2003 17:36:21 +1000
From: Stephen Crawley <crawley@dstc.edu.au>
X-Virus-Scanned: Message: ok
X-Scanned-By: MIMEDefang 2.9 (www dot roaringpenguin dot com slash mimedefang)
cc: "Aaron M. Renn" <arenn@urbanophile.com>
cc: crawley@piglet.dstc.edu.au
cc: classpath@gnu.org
Subject: Re: New IO Native Provider Interface 
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Thu, 06 Mar 2003 07:36:36 -0000


> Aaron M. Renn wrote:
> > Jeroen Frijters (jeroen@sumatra.nl) wrote:
> > > - FileOutputStream should not request read access, so the=20
> > modes should
> > > be "w" and "a"
> >=20
> > Good observation.  Have you actually tested the JDK to see what it
> > does in this situation?  Is the file actually opened "write only"?
> 
> Yes, I have. Test code is attached (it should fail with
> "java.io.IOException: Access is denied"). Additionally, FileOutputStream
> (when it is not in append mode) should truncate the file if it already
> exists, so it also needs to use a different mode because of this.

With JDK 1.4.1_01, your test case gives:

  Exception in thread "main" java.io.IOException: Bad file number
        at java.io.FileInputStream.read(Native Method)
        at iotest.main(iotest.java:10)





From MAILER-DAEMON Thu Mar 06 03:49:04 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18qr36-0004Qi-00
	for mharc-classpath@gnu.org; Thu, 06 Mar 2003 03:48:20 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18qr24-0003SA-00
	for classpath@gnu.org; Thu, 06 Mar 2003 03:47:16 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18qqwO-00020T-00
	for classpath@gnu.org; Thu, 06 Mar 2003 03:41:25 -0500
Received: from web10005.mail.yahoo.com ([216.136.130.41])
	by monty-python.gnu.org with smtp (Exim 4.10.13)
	id 18qqvB-0001h0-00
	for classpath@gnu.org; Thu, 06 Mar 2003 03:40:09 -0500
Message-ID: <20030306084008.74263.qmail@web10005.mail.yahoo.com>
Received: from [62.104.211.66] by web10005.mail.yahoo.com via HTTP;
	Thu, 06 Mar 2003 00:40:08 PST
Date: Thu, 6 Mar 2003 00:40:08 -0800 (PST)
From: Dalibor Topic <robilad@yahoo.com>
To: tromey@redhat.com
In-Reply-To: <87k7fd6o7u.fsf@fleche.redhat.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: Jeroen Frijters <jeroen@sumatra.nl>
cc: classpath@gnu.org
Subject: Re: More finalize woes
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Thu, 06 Mar 2003 08:48:19 -0000

hi Tom,

--- Tom Tromey <tromey@redhat.com> wrote:
> >>>>> "Dalibor" == Dalibor Topic <robilad@yahoo.com>
> writes:
> 
> >> java.util.zip.[De|In]flater both have an empty
> finalize method "for
> >> compatibility". Is this really necessary?
> 
> Dalibor> Yes, in order to have reflection on these
> methods
> Dalibor> working. A pretty good reason in my
> opinion.
> 
> I'm not so sure.  It seems to me that anybody using
> reflection has to
> be aware of, and understand, the Java binary
> compatibility rules.
> Implementing or not implementing finalize doesn't
> affect binary
> compatibility, so it should be a change we are free
> to make.

Here's a somewhat made up example:

you're writing an automated black box test generator.
In order to generate tests, your generator scans each
class for its declared public and protected methods.
Methods that take no parameters and don't start with
'get', 'is' or 'has' are assumed to change state of an
object in some way (like 'close', 'end', 'finalize'
do).

Your generator ends up with a different set of test
cases for Classpath and for JDK. This may not be what
you want but it's what you get when methods are left
out ;)

Even worse, if you're using reflection to invoke the
methods in tests, then your tests generated on JDK
will no longer work on classpath.

I've wrote some code that does similar things for
debugging kaffe's class library, and it can be really
interesting what sorts of bugs one can find in
reflection code using it ;)

beside, the 'least surprise' argument applies here as
well. If I extend Classpath's Deflater to implement my
own SuperfastNativeDeflater, then I'd like to rely on
finalize() calling end(), as the spec says. Otherwise
my extended class is going to leak memory all over
Classpath if I'm not familiar with contents of
Classpath's java.util.zip.Deflator sources ;)

cheers,
dalibor topic

__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/



From MAILER-DAEMON Thu Mar 06 05:29:58 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18qsdK-0004vu-00
	for mharc-classpath@gnu.org; Thu, 06 Mar 2003 05:29:50 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18qscR-0004CT-00
	for classpath@gnu.org; Thu, 06 Mar 2003 05:28:55 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18qsc0-0003vp-00
	for classpath@gnu.org; Thu, 06 Mar 2003 05:28:36 -0500
Received: from nat.acunia.com ([194.7.211.211] helo=mail.acunia.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18qsbx-0003kC-00
	for classpath@gnu.org; Thu, 06 Mar 2003 05:28:25 -0500
Received: from sophocles.leuven.intern.acunia.com
	(sophocles.leuven.intern.acunia.com [10.0.1.34])
	by mail.acunia.com (8.11.6/8.11.6) with ESMTP id h26ASCt20445;
	Thu, 6 Mar 2003 11:28:12 +0100
Date: Thu, 6 Mar 2003 10:50:39 +0100 (CET)
From: Chris Gray <chris.gray@acunia.com>
X-X-Sender: gray@sophocles.leuven.intern.acunia.com
To: Tom Tromey <tromey@redhat.com>
In-Reply-To: <87k7fd6o7u.fsf@fleche.redhat.com>
Message-ID: <Pine.LNX.4.44.0303061044180.12353-100000@sophocles.leuven.intern.acunia.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
cc: Jeroen Frijters <jeroen@sumatra.nl>
cc: classpath@gnu.org
cc: Dalibor Topic <robilad@yahoo.com>
Subject: Re: More finalize woes
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Thu, 06 Mar 2003 10:29:48 -0000

On 5 Mar 2003, Tom Tromey wrote:

> >>>>> "Dalibor" == Dalibor Topic <robilad@yahoo.com> writes:
> 
> >> java.util.zip.[De|In]flater both have an empty finalize method "for
> >> compatibility". Is this really necessary?
> 
> Dalibor> Yes, in order to have reflection on these methods
> Dalibor> working. A pretty good reason in my opinion.
> 
> I'm not so sure.  It seems to me that anybody using reflection has to
> be aware of, and understand, the Java binary compatibility rules.
> Implementing or not implementing finalize doesn't affect binary
> compatibility, so it should be a change we are free to make.

I think the main problem lies elsewhere. If you subclass a class which has 
a finalizer and your subclass needs to do some finalization of its own, 
then your finalizer needs to contain a call to super.finalize(). If the 
published API doesn't show a finalizer then you wouldn't include this 
statement. That's not an argument against trivial finalizers provided for 
"compatibility", but it it's a strong argument agains non-trivial 
finalizers where the public API has none: there's areal likelihood that 
someone will subclass your class and fail to invoke your finalizer.

Regards

-- 

Chris Gray

VM Architect, ACUNIA





From MAILER-DAEMON Thu Mar 06 05:53:49 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18qt0V-000527-00
	for mharc-classpath@gnu.org; Thu, 06 Mar 2003 05:53:47 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18qt0J-0004pN-00
	for classpath@gnu.org; Thu, 06 Mar 2003 05:53:35 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18qt00-0003xl-00
	for classpath@gnu.org; Thu, 06 Mar 2003 05:53:18 -0500
Received: from mailgate5.cinetic.de ([217.72.192.165])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18qszi-0003dc-00
	for classpath@gnu.org; Thu, 06 Mar 2003 05:52:58 -0500
Received: from web.de (fmomail01.dlan.cinetic.de [172.20.1.45])
	SMTP id h26Aqvp03007
	for classpath@gnu.org; Thu, 6 Mar 2003 11:52:57 +0100
Date: Thu, 6 Mar 2003 11:52:57 +0100
Message-Id: <200303061052.h26Aqvp03007@mailgate5.cinetic.de>
MIME-Version: 1.0
Organization: http://freemail.web.de/
From: Clemens Eisserer <Linuxhippy@web.de>
To: classpath@gnu.org
Precedence: fm-user
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Subject: Want to help in integrating swing.
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Thu, 06 Mar 2003 10:53:38 -0000

Hi there!

Frst I want to thank you for what you've been done, Java is a so great language, its not fine that only one big company can control the whole java-market.
Classpath is great!

I come from GCJ, I'm not very experienced in Java-Hacking, but I want to help with SWING, because I think its extremly useful for me and of course for others.
The only thing I know is, that GCJ has a more or less complete AWT-Integration, which with 3.2 I wasnt able to work with.
I'm now building 3.3 to see the current state of integration.

Because swing is completly independent of native stuff, it should theoreticaly be possible, to code SWING for both, GNU-Classpath and GCJs one, that means the SWING-Stuff could be merged simply to GCJ, without chabging the source. Am I right?

I want to ask, if you need help, how functional the swing-implementation is, and how I could help.
EG. how useable are JButton, JLabel, etc. Is GridBagLayout ready....

I wanna help, help, help. I want to have compiled swing-apps ;-)

cu Clemens Eisserer

______________________________________________________________________________
Bequemer und billiger - SMS mit FreeMail verschicken! Mehr Information
unter: http://freemail.web.de/features/?mc=021147




From MAILER-DAEMON Thu Mar 06 07:50:34 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18quoX-00014T-00
	for mharc-classpath@gnu.org; Thu, 06 Mar 2003 07:49:33 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18quoE-0000h8-00
	for classpath@gnu.org; Thu, 06 Mar 2003 07:49:14 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18quoA-0000YA-00
	for classpath@gnu.org; Thu, 06 Mar 2003 07:49:12 -0500
Received: from ms-smtp-03.southeast.rr.com ([24.93.67.84])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18quo2-0000GS-00
	for classpath@gnu.org; Thu, 06 Mar 2003 07:49:02 -0500
Received: from mail3.nc.rr.com (fe3 [24.93.67.50])h26CluH4001095;
	Thu, 6 Mar 2003 07:47:56 -0500 (EST)
Received: from lyta.haphazard.org ([66.57.9.48]) by mail3.nc.rr.com  with
	Microsoft SMTPSVC(5.5.1877.757.75);	 Thu, 6 Mar 2003 07:46:56 -0500
Received: by lyta.haphazard.org (Postfix, from userid 500)
	id 88882BE69E; Thu,  6 Mar 2003 07:48:39 -0500 (EST)
Sender: cbj@haphazard.org
To: "Aaron M. Renn" <arenn@urbanophile.com>
References: <20030306065246.GA16716@urbanophile.com>
From: Brian Jones <cbj@gnu.org>
Date: 06 Mar 2003 07:48:39 -0500
In-Reply-To: <20030306065246.GA16716@urbanophile.com>
Message-ID: <m3r89kbqzc.fsf@lyta.haphazard.org>
Lines: 28
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: aicas@aicas.com
cc: siebert@aicas.com
cc: classpath@gnu.org
cc: anwalt@aicas.com
cc: rupp@aicas.com
Subject: Re: More java.io
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Thu, 06 Mar 2003 12:49:30 -0000

"Aaron M. Renn" <arenn@urbanophile.com> writes:

> Ok, moving on in the gcj/classpath merger.
> 
> 1.  I'm thinking we should adopt the gcj LineNumberReader.  It appears to
> be more efficient.  However, skip() is definitely buggy (inserting regular
> skip()'s into your code leads to more lines than the file actually has).
> All Mauve tests pass, so I'll try to add an update soon.
> 
> 2.  On java.io.File, similar to the FileDescriptor stuff, I'd like to propose
> a unified provider interface.  Comments:
> 
> o I like to pass the filename to avoid gratuitous JNI lookups.
> o I do not want to adopt the "overloaded" stat and access methods of
>   gcj, I'd rather have one method per lookup
> o I'd like to name consistently with FileDescriptor
> o Minimizing native functionality, I want to return a full directory
>  listing to Java and filter at that level instead of the gjc approach.
> 
> Here's the list.  Please comment.

I'd like to give Aicas a chance to get their native changes in before
they need to compensate again for large native lib changes.  To those
at Aicas, how is that going?

Brian
-- 
Brian Jones <cbj@gnu.org>



From MAILER-DAEMON Thu Mar 06 07:57:41 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18quvY-0001Xz-00
	for mharc-classpath@gnu.org; Thu, 06 Mar 2003 07:56:48 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18quvR-0001OX-00
	for classpath@gnu.org; Thu, 06 Mar 2003 07:56:41 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18quvM-0001BB-00
	for classpath@gnu.org; Thu, 06 Mar 2003 07:56:36 -0500
Received: from faui25.informatik.uni-erlangen.de ([131.188.32.25])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18quv6-00010a-00
	for classpath@gnu.org; Thu, 06 Mar 2003 07:56:20 -0500
Received: from cs.vu.nl (faui24m.informatik.uni-erlangen.de [131.188.32.121])
	NAA11478; Thu, 6 Mar 2003 13:56:11 +0100 (MET)
Message-ID: <3E67456A.9090809@cs.vu.nl>
Date: Thu, 06 Mar 2003 13:56:10 +0100
From: Ronald Veldema <rveldema@cs.vu.nl>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3a) Gecko/20021212
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: Clemens Eisserer <Linuxhippy@web.de>
References: <200303061052.h26Aqvp03007@mailgate5.cinetic.de>
In-Reply-To: <200303061052.h26Aqvp03007@mailgate5.cinetic.de>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
cc: classpath@gnu.org
Subject: Re: Want to help in integrating swing.
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Thu, 06 Mar 2003 12:56:46 -0000

Hi Clemens,
    I did the initial implementation and others patched it up a bit 
since then.
I was able to get a window with some buttons in them working.
However, they do not look like the real deal and other components
don't work at all yet.
In short what is missing is:
    - basic and metal PLAF's (these can be copied from others perhaps.
    there are some fairly complete PLAF implementations on they web,
    GPL-ed with a little luck as well)
    - editor support (JText*, JEdit*)
    - JList needs to be brought up.
    - etc.
I stopped at some point because the awt implementation wasn't up to it.
R.

Clemens Eisserer wrote:

>Hi there!
>
>Frst I want to thank you for what you've been done, Java is a so great language, its not fine that only one big company can control the whole java-market.
>Classpath is great!
>
>I come from GCJ, I'm not very experienced in Java-Hacking, but I want to help with SWING, because I think its extremly useful for me and of course for others.
>The only thing I know is, that GCJ has a more or less complete AWT-Integration, which with 3.2 I wasnt able to work with.
>I'm now building 3.3 to see the current state of integration.
>
>Because swing is completly independent of native stuff, it should theoreticaly be possible, to code SWING for both, GNU-Classpath and GCJs one, that means the SWING-Stuff could be merged simply to GCJ, without chabging the source. Am I right?
>
>I want to ask, if you need help, how functional the swing-implementation is, and how I could help.
>EG. how useable are JButton, JLabel, etc. Is GridBagLayout ready....
>
>I wanna help, help, help. I want to have compiled swing-apps ;-)
>
>cu Clemens Eisserer
>
>______________________________________________________________________________
>Bequemer und billiger - SMS mit FreeMail verschicken! Mehr Information
>unter: http://freemail.web.de/features/?mc=021147
>
>
>
>_______________________________________________
>Classpath mailing list
>Classpath@gnu.org
>http://mail.gnu.org/mailman/listinfo/classpath
>
>  
>





From MAILER-DAEMON Thu Mar 06 08:05:20 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18qv3o-0007oT-00
	for mharc-classpath@gnu.org; Thu, 06 Mar 2003 08:05:20 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18qv3a-0007gL-00
	for classpath@gnu.org; Thu, 06 Mar 2003 08:05:06 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18qv3W-0007d7-00
	for classpath@gnu.org; Thu, 06 Mar 2003 08:05:03 -0500
Received: from ms-smtp-03.southeast.rr.com ([24.93.67.84])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18qv3L-0007UM-00
	for classpath@gnu.org; Thu, 06 Mar 2003 08:04:51 -0500
Received: from mail3.nc.rr.com (fe3 [24.93.67.50])h26D3mH4009546;
	Thu, 6 Mar 2003 08:03:48 -0500 (EST)
Received: from lyta.haphazard.org ([66.57.9.48]) by mail3.nc.rr.com  with
	Microsoft SMTPSVC(5.5.1877.757.75);	 Thu, 6 Mar 2003 08:02:48 -0500
Received: by lyta.haphazard.org (Postfix, from userid 500)
	id 791F5BE69E; Thu,  6 Mar 2003 08:04:31 -0500 (EST)
Sender: cbj@haphazard.org
To: "Jeroen Frijters" <jeroen@sumatra.nl>
References: <5C38B761F205B54BA59FF611A65C62480118BF@lembu.sumatrasoftware.com>
From: Brian Jones <cbj@gnu.org>
Date: 06 Mar 2003 08:04:31 -0500
In-Reply-To: <5C38B761F205B54BA59FF611A65C62480118BF@lembu.sumatrasoftware.com>
Message-ID: <m3n0k8bq8w.fsf@lyta.haphazard.org>
Lines: 33
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: "Aaron M. Renn" <arenn@urbanophile.com>
cc: classpath@gnu.org
Subject: Re: New IO Native Provider Interface
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Thu, 06 Mar 2003 13:05:19 -0000

"Jeroen Frijters" <jeroen@sumatra.nl> writes:

> > > - write(byte[] buf, long offset, long length) should not 
> > use longs for
> > > offset and length
> > 
> > I take it that you are referring to the Java write() method I 
> > added to the
> > FileDescriptor class and not the nativeWriteBuf() method.  I'm ok with
> > modifying this.  
> 
> Yes.
> 
> >I do typically want to use longs for native calls.
> 
> Why? Is it expensive to use ints on 64 bit architectures?
> 
> > > - nativeReadByte shouldn't return a long
> > 
> > Why not?  All of the rest of the native methods that return values
> > return longs.
> 
> I missed the others. IMHO only file offsets and native pointers should
> be long, all others should be the most natural type. In this case I
> think that's int.

I couldn't find an example where 'read' methods ever returned
something other than int.  I think that offsets could be 'long' on
some file systems but the public API is limited on a number of classes
in this respect.

-- 
Brian Jones <cbj@gnu.org>



From MAILER-DAEMON Thu Mar 06 11:02:12 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18qxnT-00074l-00
	for mharc-classpath@gnu.org; Thu, 06 Mar 2003 11:00:39 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18qxmz-0006iA-00
	for classpath@gnu.org; Thu, 06 Mar 2003 11:00:09 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18qxjY-0004s4-00
	for classpath@gnu.org; Thu, 06 Mar 2003 10:56:36 -0500
Received: from mail.peakpeak.com ([207.174.178.17] helo=gash2.peakpeak.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18qxjB-0004pC-00
	for classpath@gnu.org; Thu, 06 Mar 2003 10:56:13 -0500
Received: from fleche.redhat.com (tf0021.peakpeak.com [204.144.239.21])
	by gash2.peakpeak.com (8.9.3/8.9.3) with ESMTP id IAA08430;
	Thu, 6 Mar 2003 08:56:06 -0700
Received: by fleche.redhat.com (Postfix, from userid 1000)
	id 956524F8610; Thu,  6 Mar 2003 08:48:31 -0700 (MST)
To: Dalibor Topic <robilad@yahoo.com>
References: <20030306084008.74263.qmail@web10005.mail.yahoo.com>
From: Tom Tromey <tromey@redhat.com>
X-Attribution: Tom
X-Zippy: Do I have a lifestyle yet?
Date: 06 Mar 2003 08:48:31 -0700
In-Reply-To: <20030306084008.74263.qmail@web10005.mail.yahoo.com>
Message-ID: <87bs0o7ay8.fsf@fleche.redhat.com>
Lines: 21
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: Jeroen Frijters <jeroen@sumatra.nl>
cc: classpath@gnu.org
Subject: Re: More finalize woes
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
Reply-To: tromey@redhat.com
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Thu, 06 Mar 2003 16:00:38 -0000

>>>>> "Dalibor" == Dalibor Topic <robilad@yahoo.com> writes:

Dalibor> Your generator ends up with a different set of test cases for
Dalibor> Classpath and for JDK. This may not be what you want but it's
Dalibor> what you get when methods are left out ;)

This is an interesting example.  I'm not so sure that what you end up
with is incorrect in a significant way, though.  Or perhaps you'd
prefer to write your test generator to look at all the methods,
inherited or declared, in a given class.

Dalibor> beside, the 'least surprise' argument applies here as
Dalibor> well. If I extend Classpath's Deflater to implement my own
Dalibor> SuperfastNativeDeflater, then I'd like to rely on finalize()
Dalibor> calling end(), as the spec says.

In cases where there is a finalizer with a documented effect, I agree
we must implement it.  I'm just talking about trivial finalizers -- I
think we don't need those.

Tom



From MAILER-DAEMON Thu Mar 06 11:06:49 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18qxlV-0005nG-00
	for mharc-classpath@gnu.org; Thu, 06 Mar 2003 10:58:37 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18qxhj-0004b4-00
	for classpath@gnu.org; Thu, 06 Mar 2003 10:54:43 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18qxhM-0004KS-00
	for classpath@gnu.org; Thu, 06 Mar 2003 10:54:21 -0500
Received: from mail.peakpeak.com ([207.174.178.17] helo=gash2.peakpeak.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18qxfh-0003rc-00
	for classpath@gnu.org; Thu, 06 Mar 2003 10:52:37 -0500
Received: from fleche.redhat.com (tf0021.peakpeak.com [204.144.239.21])
	by gash2.peakpeak.com (8.9.3/8.9.3) with ESMTP id IAA07373;
	Thu, 6 Mar 2003 08:52:29 -0700
Received: by fleche.redhat.com (Postfix, from userid 1000)
	id 0CC7C4F8610; Thu,  6 Mar 2003 08:44:54 -0700 (MST)
To: Chris Gray <chris.gray@acunia.com>
References: <Pine.LNX.4.44.0303061044180.12353-100000@sophocles.leuven.intern.acunia.com>
From: Tom Tromey <tromey@redhat.com>
X-Attribution: Tom
X-Zippy: OKAY!!  Turn on the sound ONLY for TRYNEL CARPETING,
 FULLY-EQUIPPED R.V.'S and FLOATATION SYSTEMS!!
Date: 06 Mar 2003 08:44:53 -0700
In-Reply-To: <Pine.LNX.4.44.0303061044180.12353-100000@sophocles.leuven.intern.acunia.com>
Message-ID: <87fzq07b4a.fsf@fleche.redhat.com>
Lines: 17
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: Jeroen Frijters <jeroen@sumatra.nl>
cc: classpath@gnu.org
cc: Dalibor Topic <robilad@yahoo.com>
Subject: Re: More finalize woes
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
Reply-To: tromey@redhat.com
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Thu, 06 Mar 2003 15:58:36 -0000

>>>>> "Chris" == Chris Gray <chris.gray@acunia.com> writes:

Chris> I think the main problem lies elsewhere. If you subclass a
Chris> class which has a finalizer and your subclass needs to do some
Chris> finalization of its own, then your finalizer needs to contain a
Chris> call to super.finalize(). If the published API doesn't show a
Chris> finalizer then you wouldn't include this statement.

But that in itself is a bug.  Binary compatibility rules allow a class
implementor to add a finalize method at any time in the future.  For
this reason, all finalizers should call super.finalize().  In fact, if
we add an empty finalize method, then that is a potential (if
unlikely) bug -- if we ever add a finalizer in a superclass, oops.

This doesn't mean that people don't do it, I guess.

Tom



From MAILER-DAEMON Thu Mar 06 12:13:21 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18qyq8-0004Ro-00
	for mharc-classpath@gnu.org; Thu, 06 Mar 2003 12:07:28 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18qypy-0004Ni-00
	for classpath@gnu.org; Thu, 06 Mar 2003 12:07:18 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18qyoT-0003wf-00
	for classpath@gnu.org; Thu, 06 Mar 2003 12:05:46 -0500
Received: from smtp.easynet.ch ([217.8.192.20] helo=smtp1.mail.ch.easynet.net)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18qyl0-0003P0-00
	for classpath@gnu.org; Thu, 06 Mar 2003 12:02:11 -0500
Received: from [192.168.1.33] (220.152.dyn-adsl.customer.ch.easynet.net
	[217.8.220.152])
	by smtp1.mail.ch.easynet.net (Postfix) with ESMTP id 0D65B4A2FF
	for <classpath@gnu.org>; Thu,  6 Mar 2003 17:57:08 +0100 (CET)
From: Sascha Brawer <brawer@acm.org>
To: GNU Classpath <classpath@gnu.org>
Date: Thu, 6 Mar 2003 18:01:59 +0100
Message-Id: <20030306170159.25563@smtp.mail.ch.easynet.net>
In-Reply-To: <87fzq07b4a.fsf@fleche.redhat.com>
References: <87fzq07b4a.fsf@fleche.redhat.com>
X-Mailer: CTM PowerMail 3.1.1 carbon <http://www.ctmdev.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Subject: Re: More finalize woes
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Thu, 06 Mar 2003 17:07:22 -0000

Tom Tromey <tromey@redhat.com> wrote on Thu, 6 Mar 2003 08:44:53 -0700:

>Binary compatibility rules allow a class
>implementor to add a finalize method at any time in the future.  For
>this reason, all finalizers should call super.finalize().  In fact, if
>we add an empty finalize method, then that is a potential (if
>unlikely) bug -- if we ever add a finalizer in a superclass, oops.

So, should a Java-to-Bytecode compiler emit a warning if a finalize()
implementation does not call super.finalize()? This might be a suggestion
for gcj, jikes, javac etc. Also, we might want to add a note to the
Classpath hacker's guide.

-- Sascha





From MAILER-DAEMON Thu Mar 06 12:23:09 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18qz4i-0001Ee-00
	for mharc-classpath@gnu.org; Thu, 06 Mar 2003 12:22:32 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18qz0h-0008CS-00
	for classpath@gnu.org; Thu, 06 Mar 2003 12:18:23 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18qyuQ-00064r-00
	for classpath@gnu.org; Thu, 06 Mar 2003 12:11:54 -0500
Received: from web10006.mail.yahoo.com ([216.136.130.42])
	by monty-python.gnu.org with smtp (Exim 4.10.13)
	id 18qylO-0003Q8-00
	for classpath@gnu.org; Thu, 06 Mar 2003 12:02:34 -0500
Message-ID: <20030306170233.49322.qmail@web10006.mail.yahoo.com>
Received: from [139.19.20.90] by web10006.mail.yahoo.com via HTTP;
	Thu, 06 Mar 2003 09:02:33 PST
Date: Thu, 6 Mar 2003 09:02:33 -0800 (PST)
From: Dalibor Topic <robilad@yahoo.com>
To: tromey@redhat.com
In-Reply-To: <87bs0o7ay8.fsf@fleche.redhat.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: Jeroen Frijters <jeroen@sumatra.nl>
cc: classpath@gnu.org
Subject: Re: More finalize woes
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Thu, 06 Mar 2003 17:22:31 -0000


--- Tom Tromey <tromey@redhat.com> wrote:
> >>>>> "Dalibor" == Dalibor Topic <robilad@yahoo.com>
> writes:
> 
> Dalibor> Your generator ends up with a different set
> of test cases for
> Dalibor> Classpath and for JDK. This may not be what
> you want but it's
> Dalibor> what you get when methods are left out ;)
> 
> This is an interesting example.  I'm not so sure
> that what you end up
> with is incorrect in a significant way, though.  Or
> perhaps you'd
> prefer to write your test generator to look at all
> the methods,
> inherited or declared, in a given class.

I'd prefer to run an 'inheritance chain' of tests, so
a CharArrayReader should pass its own black box tests,
and the tests for Reader as well, for example.

> Dalibor> beside, the 'least surprise' argument
> applies here as
> Dalibor> well. If I extend Classpath's Deflater to
> implement my own
> Dalibor> SuperfastNativeDeflater, then I'd like to
> rely on finalize()
> Dalibor> calling end(), as the spec says.
> 
> In cases where there is a finalizer with a
> documented effect, I agree
> we must implement it.  I'm just talking about
> trivial finalizers -- I
> think we don't need those.

I'm wondering if there are any trivial finalizers in
the spec, or just 'underdocumented' ones ;)

cheers,
dalibor topic

__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/



From MAILER-DAEMON Thu Mar 06 13:12:29 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18qzr3-0001iO-00
	for mharc-classpath@gnu.org; Thu, 06 Mar 2003 13:12:29 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18qzk8-0008GC-00
	for classpath@gnu.org; Thu, 06 Mar 2003 13:05:20 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18qzjC-0007nQ-00
	for classpath@gnu.org; Thu, 06 Mar 2003 13:04:23 -0500
Received: from mail.peakpeak.com ([207.174.178.17] helo=gash2.peakpeak.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18qzfo-0006nJ-00
	for classpath@gnu.org; Thu, 06 Mar 2003 13:00:52 -0500
Received: from fleche.redhat.com (tf0021.peakpeak.com [204.144.239.21])
	by gash2.peakpeak.com (8.9.3/8.9.3) with ESMTP id LAA11183;
	Thu, 6 Mar 2003 11:00:40 -0700
Received: by fleche.redhat.com (Postfix, from userid 1000)
	id 62B2B4F8610; Thu,  6 Mar 2003 10:53:09 -0700 (MST)
To: "Jeroen Frijters" <jeroen@sumatra.nl>
References: <5C38B761F205B54BA59FF611A65C62480118BA@lembu.sumatrasoftware.com>
From: Tom Tromey <tromey@redhat.com>
X-Attribution: Tom
X-Zippy: INSIDE, I have the same personality disorder as LUCY RICARDO!!
Date: 06 Mar 2003 10:53:09 -0700
In-Reply-To: <5C38B761F205B54BA59FF611A65C62480118BA@lembu.sumatrasoftware.com>
Message-ID: <873cm05qm2.fsf@fleche.redhat.com>
Lines: 25
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: "Aaron M. Renn" <arenn@urbanophile.com>
cc: classpath@gnu.org
Subject: Re: New IO Native Provider Interface
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
Reply-To: tromey@redhat.com
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Thu, 06 Mar 2003 18:12:27 -0000

>>>>> "Jeroen" == Jeroen Frijters <jeroen@sumatra.nl> writes:

Jeroen> - FileOutputStream should not request read access, so the modes should
Jeroen> be "w" and "a"

I have a slight preference to use ints for the flags, not Strings.

Jeroen> - write(byte[] buf, long offset, long length) should not use longs for
Jeroen> offset and length
Jeroen> - nativeReadByte shouldn't return a long

Agreed.  In general the argument and return types should match what
the higher-level API is capable of.  So for instance the byte argument
to nativeWriteByte should just be an `int', as that is what is used in
the other layers.  Then we don't need casts anywhere.

I don't understand why there is a nativeValid method and checks for
nativeFd==-1.  Shouldn't these be the same?  If not, when will they be
different?  I think I see `nativeValid' as testing `is this
FileDescriptor valid?'.

In close(), if nativeClose throws an exception, won't the
FileDescriptor be left in an inconsistent state?

Tom



From MAILER-DAEMON Thu Mar 06 13:24:21 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18r00I-0004DL-00
	for mharc-classpath@gnu.org; Thu, 06 Mar 2003 13:22:02 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18qzyH-0003h1-00
	for classpath@gnu.org; Thu, 06 Mar 2003 13:19:57 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18qzsA-00023o-00
	for classpath@gnu.org; Thu, 06 Mar 2003 13:13:38 -0500
Received: from mail.peakpeak.com ([207.174.178.17] helo=gash2.peakpeak.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18qzpT-0001Sn-00
	for classpath@gnu.org; Thu, 06 Mar 2003 13:10:51 -0500
Received: from fleche.redhat.com (tf0021.peakpeak.com [204.144.239.21])
	by gash2.peakpeak.com (8.9.3/8.9.3) with ESMTP id LAA14678;
	Thu, 6 Mar 2003 11:10:48 -0700
Received: by fleche.redhat.com (Postfix, from userid 1000)
	id CF5EA4F8610; Thu,  6 Mar 2003 11:03:16 -0700 (MST)
To: "Aaron M. Renn" <arenn@urbanophile.com>
References: <20030306065246.GA16716@urbanophile.com>
From: Tom Tromey <tromey@redhat.com>
X-Attribution: Tom
X-Zippy: GOOD-NIGHT, everybody..  Now I have to go administer FIRST-AID
 to my pet LEISURE SUIT!!
Date: 06 Mar 2003 11:03:16 -0700
In-Reply-To: <20030306065246.GA16716@urbanophile.com>
Message-ID: <87y93s4bkr.fsf@fleche.redhat.com>
Lines: 31
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: classpath@gnu.org
Subject: Re: More java.io
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
Reply-To: tromey@redhat.com
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Thu, 06 Mar 2003 18:22:00 -0000

>>>>> "Aaron" == Aaron M Renn <arenn@urbanophile.com> writes:

Aaron> 2.  On java.io.File, similar to the FileDescriptor stuff, I'd
Aaron> like to propose a unified provider interface.  Comments:

Aaron> o I like to pass the filename to avoid gratuitous JNI lookups.
Aaron> o I do not want to adopt the "overloaded" stat and access methods of
Aaron>   gcj, I'd rather have one method per lookup
Aaron> o I'd like to name consistently with FileDescriptor
Aaron> o Minimizing native functionality, I want to return a full directory
Aaron>  listing to Java and filter at that level instead of the gjc approach.

These all sound good.

Aaron>   boolean nativeCreate(String name);

These should all be static if they take the name explicitly.

Looks great to me.


I think for FileDescriptor libgcj may remain with its own
implementation, to avoid another layer of calls for all the I/O
operations.  (Though maybe this is foolish optimization.  I'm not
fully decided yet.)  In any case we'll standardize on the Classpath
API so that all the classes that use FileDescriptor will be merged.

For File, the above looks like something we could use with no
problems.

Tom



From MAILER-DAEMON Thu Mar 06 13:30:13 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18r06M-0006As-00
	for mharc-classpath@gnu.org; Thu, 06 Mar 2003 13:28:18 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18r06K-00069F-00
	for classpath@gnu.org; Thu, 06 Mar 2003 13:28:16 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18r02h-00056q-00
	for classpath@gnu.org; Thu, 06 Mar 2003 13:24:31 -0500
Received: from mail.peakpeak.com ([207.174.178.17] helo=gash2.peakpeak.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18qzs7-00021z-00
	for classpath@gnu.org; Thu, 06 Mar 2003 13:13:35 -0500
Received: from fleche.redhat.com (tf0021.peakpeak.com [204.144.239.21])
	by gash2.peakpeak.com (8.9.3/8.9.3) with ESMTP id LAA15455;
	Thu, 6 Mar 2003 11:13:30 -0700
Received: by fleche.redhat.com (Postfix, from userid 1000)
	id 3AFB74F8610; Thu,  6 Mar 2003 11:06:00 -0700 (MST)
To: Clemens Eisserer <Linuxhippy@web.de>
References: <200303061052.h26Aqvp03007@mailgate5.cinetic.de>
From: Tom Tromey <tromey@redhat.com>
X-Attribution: Tom
X-Zippy: Mr and Mrs PED, can I borrow 26.7% of the RAYON TEXTILE production
 of the INDONESIAN archipelago?
Date: 06 Mar 2003 11:06:00 -0700
In-Reply-To: <200303061052.h26Aqvp03007@mailgate5.cinetic.de>
Message-ID: <87u1eg4bg7.fsf@fleche.redhat.com>
Lines: 22
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: classpath@gnu.org
Subject: Re: Want to help in integrating swing.
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
Reply-To: tromey@redhat.com
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Thu, 06 Mar 2003 18:28:17 -0000

>>>>> "Clemens" == Clemens Eisserer <Linuxhippy@web.de> writes:

Clemens> Because swing is completly independent of native stuff, it
Clemens> should theoreticaly be possible, to code SWING for both,
Clemens> GNU-Classpath and GCJs one, that means the SWING-Stuff could
Clemens> be merged simply to GCJ, without chabging the source. Am I
Clemens> right?

Yes.

Clemens> I want to ask, if you need help, how functional the
Clemens> swing-implementation is, and how I could help.  EG. how
Clemens> useable are JButton, JLabel, etc. Is GridBagLayout ready....

GridBagLayout doesn't exist at all.

We might be able to use Acunia's implementation.  I think their
license permits this.  We should probably ask to be polite.  Failing
that, this class would be a nice project to start with.  It is both
complicated and self-contained.

Tom



From MAILER-DAEMON Thu Mar 06 13:49:33 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18r0QP-0002kt-00
	for mharc-classpath@gnu.org; Thu, 06 Mar 2003 13:49:01 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18r0Q8-0002KR-00
	for classpath@gnu.org; Thu, 06 Mar 2003 13:48:44 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18r0Q5-0002B3-00
	for classpath@gnu.org; Thu, 06 Mar 2003 13:48:41 -0500
Received: from smtp.wp.pl ([212.77.101.161])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18r0Pe-0001CN-00
	for classpath@gnu.org; Thu, 06 Mar 2003 13:48:14 -0500
Received: (WP-SMTPD 14069 invoked from network); 6 Mar 2003 18:47:57 -0000
Received: from mizzar.multicon.pl (HELO wp.pl) (abies00@[213.77.83.2])
          (envelope-sender <abies00@wp.pl>)
          by smtp.wp.pl (wp-smtpd) with SMTP
          for <classpath@gnu.org>; 6 Mar 2003 18:47:57 -0000
Message-ID: <3E6797C3.1080307@wp.pl>
Date: Thu, 06 Mar 2003 19:47:31 +0100
From: Artur Biesiadowski <abies00@wp.pl>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
	rv:1.3a) Gecko/20021212
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: GNU Classpath <classpath@gnu.org>
References: <87fzq07b4a.fsf@fleche.redhat.com>
	<20030306170159.25563@smtp.mail.ch.easynet.net>
In-Reply-To: <20030306170159.25563@smtp.mail.ch.easynet.net>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-AntiVirus: skaner antywirusowy poczty Wirtualnej Polski S. A.
X-WP-ChangeAV: 0
Subject: Re: More finalize woes
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
Reply-To: abies@pg.gda.pl
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Thu, 06 Mar 2003 18:48:54 -0000

Sascha Brawer wrote:

> So, should a Java-to-Bytecode compiler emit a warning if a finalize()
> implementation does not call super.finalize()? This might be a suggestion
> for gcj, jikes, javac etc. Also, we might want to add a note to the
> Classpath hacker's guide.

What about classes inheriting directly from Object ? Should they also be 
forced to call super.finalize() ?

Artur




From MAILER-DAEMON Thu Mar 06 13:51:33 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18r0Sj-0004T5-00
	for mharc-classpath@gnu.org; Thu, 06 Mar 2003 13:51:25 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18r0ST-0004IC-00
	for classpath@gnu.org; Thu, 06 Mar 2003 13:51:09 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18r0RS-0003jb-00
	for classpath@gnu.org; Thu, 06 Mar 2003 13:50:07 -0500
Received: from octopussy.utanet.at ([213.90.36.45])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18r0Qz-0003P2-00
	for classpath@gnu.org; Thu, 06 Mar 2003 13:49:37 -0500
Received: from plenty.utanet.at ([213.90.36.9])
	by octopussy.utanet.at with esmtp (Exim 4.10)
	id 18r0Qu-000716-00
	for classpath@gnu.org; Thu, 06 Mar 2003 19:49:32 +0100
Received: from linzu1-209-67.utaonline.at ([212.152.209.67] helo=web.de)
	by plenty.utanet.at with esmtp (Exim 4.10)
	id 18r0Qt-0001GE-00
	for classpath@gnu.org; Thu, 06 Mar 2003 19:49:32 +0100
Message-ID: <3E679839.4020806@web.de>
Date: Thu, 06 Mar 2003 19:49:29 +0100
From: Linuxhippy <linuxhippy@web.de>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; de-DE;
	rv:1.0.2) Gecko/20030208 Netscape/7.02
X-Accept-Language: de-de, de
MIME-Version: 1.0
To: classpath@gnu.org
References: <200303061052.h26Aqvp03007@mailgate5.cinetic.de>
	<3E67456A.9090809@cs.vu.nl>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Subject: Re: Want to help in integrating swing.
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Thu, 06 Mar 2003 18:51:18 -0000

Hi Ronald!

Thanks for answering me!

  > Hi Clemens,
  >    I did the initial implementation and others patched it up a bit
  > since then.
  > I was able to get a window with some buttons in them working.
  > However, they do not look like the real deal and other components
  > don't work at all yet.

Hmm, sounds great! Does that mean that theres a basis on which somebody
can work on?
It doesnt matter how functional it is now, only if it is clean and
extendable.

  > In short what is missing is:
  >    - basic and metal PLAF's (these can be copied from others perhaps.
  >    there are some fairly complete PLAF implementations on they web,
  >    GPL-ed with a little luck as well)
  >    - editor support (JText*, JEdit*)
  >    - JList needs to be brought up.
  >    - etc.
  > I stopped at some point because the awt implementation wasn't up to it.

Hmmm, I thought about that.
I dont want to like playing around with making AWT better, >I'm not a
good coder, and that lowlevel-stuff is not enough funny for me...
I hope very much that in near future more people will work on
awt-support in gcj, it is really bad at now.
How good is AWT now? Are there still some essential parts missing?
Would it be better to use JDK1.1.8 and extend it. But that would maybe
make it incompatible with classpath...


Thanks for answering my question!

  >
  >
  > Clemens Eisserer wrote:
  >
  >> Hi there!
  >>
  >> Frst I want to thank you for what you've been done, Java is a so
  >> great language, its not fine that only one big company can control
  >> the whole java-market.
  >> Classpath is great!
  >>
  >> I come from GCJ, I'm not very experienced in Java-Hacking, but I want
  >> to help with SWING, because I think its extremly useful for me and of
  >> course for others.
  >> The only thing I know is, that GCJ has a more or less complete
  >> AWT-Integration, which with 3.2 I wasnt able to work with.
  >> I'm now building 3.3 to see the current state of integration.
  >>
  >> Because swing is completly independent of native stuff, it should
  >> theoreticaly be possible, to code SWING for both, GNU-Classpath and
  >> GCJs one, that means the SWING-Stuff could be merged simply to GCJ,
  >> without chabging the source. Am I right?
  >>
  >> I want to ask, if you need help, how functional the
  >> swing-implementation is, and how I could help.
  >> EG. how useable are JButton, JLabel, etc. Is GridBagLayout ready....
  >>
  >> I wanna help, help, help. I want to have compiled swing-apps ;-)
  >>
  >> cu Clemens Eisserer
  >>
  >>
______________________________________________________________________________ 


  >>
  >> Bequemer und billiger - SMS mit FreeMail verschicken! Mehr Information
  >> unter: http://freemail.web.de/features/?mc=021147
  >>
  >>
  >>
  >> _______________________________________________
  >> Classpath mailing list
  >> Classpath@gnu.org
  >> http://mail.gnu.org/mailman/listinfo/classpath
  >>
  >>
  >>
  >
  >
  >







From MAILER-DAEMON Thu Mar 06 14:00:13 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18r0ax-00017g-00
	for mharc-classpath@gnu.org; Thu, 06 Mar 2003 13:59:55 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18r0aL-0000a0-00
	for classpath@gnu.org; Thu, 06 Mar 2003 13:59:17 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18r0Xz-0007VC-00
	for classpath@gnu.org; Thu, 06 Mar 2003 13:56:52 -0500
Received: from faui25.informatik.uni-erlangen.de ([131.188.32.25])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18r0Xt-0007RU-00
	for classpath@gnu.org; Thu, 06 Mar 2003 13:56:45 -0500
Received: from cs.vu.nl (faui24m.informatik.uni-erlangen.de [131.188.32.121])
	TAA14273; Thu, 6 Mar 2003 19:56:43 +0100 (MET)
Message-ID: <3E6799EB.9000604@cs.vu.nl>
Date: Thu, 06 Mar 2003 19:56:43 +0100
From: Ronald Veldema <rveldema@cs.vu.nl>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3a) Gecko/20021212
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: Linuxhippy <linuxhippy@web.de>, classpath@gnu.org
References: <200303061052.h26Aqvp03007@mailgate5.cinetic.de>
	<3E67456A.9090809@cs.vu.nl> <3E679839.4020806@web.de>
In-Reply-To: <3E679839.4020806@web.de>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Subject: Re: Want to help in integrating swing.
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Thu, 06 Mar 2003 18:59:53 -0000


When I played around with it, it was using kaffe's awt and my
own Javacompiler.
Luckily enough, I've added few comments in the code to
make it more readable ! It's fairly clean though and yes
there are no native calls in there. Simply taking the
javax.swing dir and using another awt/jvm should be easy.
R.

Linuxhippy wrote:

> Hi Ronald!
>
> Thanks for answering me!
>
>  > Hi Clemens,
>  >    I did the initial implementation and others patched it up a bit
>  > since then.
>  > I was able to get a window with some buttons in them working.
>  > However, they do not look like the real deal and other components
>  > don't work at all yet.
>
> Hmm, sounds great! Does that mean that theres a basis on which somebody
> can work on?
> It doesnt matter how functional it is now, only if it is clean and
> extendable.
>
>  > In short what is missing is:
>  >    - basic and metal PLAF's (these can be copied from others perhaps.
>  >    there are some fairly complete PLAF implementations on they web,
>  >    GPL-ed with a little luck as well)
>  >    - editor support (JText*, JEdit*)
>  >    - JList needs to be brought up.
>  >    - etc.
>  > I stopped at some point because the awt implementation wasn't up to 
> it.
>
> Hmmm, I thought about that.
> I dont want to like playing around with making AWT better, >I'm not a
> good coder, and that lowlevel-stuff is not enough funny for me...
> I hope very much that in near future more people will work on
> awt-support in gcj, it is really bad at now.
> How good is AWT now? Are there still some essential parts missing?
> Would it be better to use JDK1.1.8 and extend it. But that would maybe
> make it incompatible with classpath...
>
>
> Thanks for answering my question!
>
>  >
>  >
>  > Clemens Eisserer wrote:
>  >
>  >> Hi there!
>  >>
>  >> Frst I want to thank you for what you've been done, Java is a so
>  >> great language, its not fine that only one big company can control
>  >> the whole java-market.
>  >> Classpath is great!
>  >>
>  >> I come from GCJ, I'm not very experienced in Java-Hacking, but I want
>  >> to help with SWING, because I think its extremly useful for me and of
>  >> course for others.
>  >> The only thing I know is, that GCJ has a more or less complete
>  >> AWT-Integration, which with 3.2 I wasnt able to work with.
>  >> I'm now building 3.3 to see the current state of integration.
>  >>
>  >> Because swing is completly independent of native stuff, it should
>  >> theoreticaly be possible, to code SWING for both, GNU-Classpath and
>  >> GCJs one, that means the SWING-Stuff could be merged simply to GCJ,
>  >> without chabging the source. Am I right?
>  >>
>  >> I want to ask, if you need help, how functional the
>  >> swing-implementation is, and how I could help.
>  >> EG. how useable are JButton, JLabel, etc. Is GridBagLayout ready....
>  >>
>  >> I wanna help, help, help. I want to have compiled swing-apps ;-)
>  >>
>  >> cu Clemens Eisserer
>  >>
>  >>
> ______________________________________________________________________________
>
>  >>
>  >> Bequemer und billiger - SMS mit FreeMail verschicken! Mehr 
> Information
>  >> unter: http://freemail.web.de/features/?mc=021147
>  >>
>  >>
>  >>
>  >> _______________________________________________
>  >> Classpath mailing list
>  >> Classpath@gnu.org
>  >> http://mail.gnu.org/mailman/listinfo/classpath
>  >>
>  >>
>  >>
>  >
>  >
>  >
>
>
>
>
>
>
> _______________________________________________
> Classpath mailing list
> Classpath@gnu.org
> http://mail.gnu.org/mailman/listinfo/classpath
>





From MAILER-DAEMON Thu Mar 06 18:27:05 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18r4lV-0004ut-00
	for mharc-classpath@gnu.org; Thu, 06 Mar 2003 18:27:05 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18r4lS-0004t2-00
	for classpath@gnu.org; Thu, 06 Mar 2003 18:27:02 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18r4lQ-0004rB-00
	for classpath@gnu.org; Thu, 06 Mar 2003 18:27:01 -0500
Received: from mail00.svc.cra.dublin.eircom.net ([159.134.118.16])
	by monty-python.gnu.org with smtp (Exim 4.10.13)
	id 18r4j6-00042l-00
	for classpath@gnu.org; Thu, 06 Mar 2003 18:24:37 -0500
Received: (qmail 19537 messnum 619633 invoked from
	network[194.125.172.156/ts12-156.dublin.indigo.ie]); 6 Mar 2003 23:24:29 -0000
Received: from ts12-156.dublin.indigo.ie (HELO ?192.168.2.54?)
	(194.125.172.156)
	by mail00.svc.cra.dublin.eircom.net (qp 19537) with SMTP;
	6 Mar 2003 23:24:29 -0000
From: John Leuner <jewel@pixie.co.za>
To: tromey@redhat.com
In-Reply-To: <87el5ld30l.fsf@fleche.redhat.com>
References: <1046891991.428.293.camel@cmalu>
	 <87el5ld30l.fsf@fleche.redhat.com>
Content-Type: text/plain
Organization: 
Message-Id: <1046968860.428.296.camel@cmalu>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.2.0 
Date: 06 Mar 2003 23:16:31 +0000
Content-Transfer-Encoding: 7bit
cc: classpath@gnu.org
Subject: Re: TestAWT
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Thu, 06 Mar 2003 23:27:03 -0000

Yes, what I am saying is that our AWT code is wrong. We should probably
fix this before we using it as a test.

But I don't know how to fix it, what is wrong with calling "dispose()"
when the OK button is clicked?

John Leuner


On Wed, 2003-03-05 at 19:31, Tom Tromey wrote:
> >>>>> "John" == John Leuner <jewel@pixie.co.za> writes:
> 
> John> Running this on the linux JDK from IBM and also on a Windows machine, I
> John> noticed that you have to push the OK button twice to close the Dialog
> John> window.
> 
> John> Has anyone else seen this?
> 
> The peers have all kinds of bugs.  This is probably one.
> 
> As I recall for me the dialog window never closes.
> This probably means there is an additional bug in our AWT java code.
> (I'm always running TestAWT against libgcj.)
> 
> Tom
> 
> 
> _______________________________________________
> Classpath mailing list
> Classpath@gnu.org
> http://mail.gnu.org/mailman/listinfo/classpath
-- 
John Leuner <jewel@pixie.co.za>




From MAILER-DAEMON Thu Mar 06 18:53:56 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18r5B9-00011o-00
	for mharc-classpath@gnu.org; Thu, 06 Mar 2003 18:53:35 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18r5Az-0000qy-00
	for classpath@gnu.org; Thu, 06 Mar 2003 18:53:25 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18r5Ab-0000PQ-00
	for classpath@gnu.org; Thu, 06 Mar 2003 18:53:01 -0500
Received: from adsl-63-194-81-26.dsl.snfc21.pacbell.net ([63.194.81.26]
	helo=InterJet.dellroad.org)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)	id 18r52z-0005RJ-00
	for classpath@gnu.org; Thu, 06 Mar 2003 18:45:09 -0500
Received: from arch20m.dellroad.org (arch20m.dellroad.org [10.1.1.20])
	by InterJet.dellroad.org (8.9.1a/8.9.1) with ESMTP id PAA73795
	for <classpath@gnu.org>; Thu, 6 Mar 2003 15:40:45 -0800 (PST)
Received: from arch20m.dellroad.org (localhost [127.0.0.1])
	by arch20m.dellroad.org (8.12.6/8.12.6) with ESMTP id h26Nein6021084
	for <classpath@gnu.org>; Thu, 6 Mar 2003 15:40:44 -0800 (PST)
	(envelope-from archie@arch20m.dellroad.org)
Received: (from archie@localhost)
	by arch20m.dellroad.org (8.12.6/8.12.6/Submit) id h26NeiuW021083
	for classpath@gnu.org; Thu, 6 Mar 2003 15:40:44 -0800 (PST)
	(envelope-from archie)
From: Archie Cobbs <archie@dellroad.org>
Message-Id: <200303062340.h26NeiuW021083@arch20m.dellroad.org>
To: classpath@gnu.org
Date: Thu, 6 Mar 2003 15:40:44 -0800 (PST)
X-Mailer: ELM [version 2.4ME+ PL99b (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
Subject: Small patch for Thread.java
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Thu, 06 Mar 2003 23:53:27 -0000

Hi,

Here's a patch that might help the next VM implementor after me... :-)

Thanks,
-Archie

__________________________________________________________________________
Archie Cobbs     *     Precision I/O      *     http://www.precisionio.com

--- /home/archie/classpath/classpath-0.05/vm/reference/java/lang/Thread.java	Thu Oct  3 09:07:34 2002
+++ Thread.java	Thu Mar  6 15:38:04 2003
@@ -279,7 +295,14 @@
   }
 
   /**
-   * Get the currently executing Thread.
+   * Get the currently executing Thread. In the situation that the
+   * currently running thread was created by native code and doesn't
+   * have an associated Thread object yet, currentThread() should set
+   * a flag and then attempt to construct and return a new Thread object.
+   * When currentThread() is invoked again recursively by the Thread
+   * constructor, the flag will already be set and in that second case
+   * currentThread() should just return null. currentThread() should not
+   * return a non-null value until after the constructor has returned.
    *
    * @return the currently executing Thread
    */



From MAILER-DAEMON Thu Mar 06 19:28:04 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18r5iV-0000tO-00
	for mharc-classpath@gnu.org; Thu, 06 Mar 2003 19:28:03 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18r5iT-0000sI-00
	for classpath@gnu.org; Thu, 06 Mar 2003 19:28:01 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18r5iR-0000rj-00
	for classpath@gnu.org; Thu, 06 Mar 2003 19:28:00 -0500
Received: from piglet.dstc.edu.au ([130.102.176.1])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18r5hx-0000bB-00
	for classpath@gnu.org; Thu, 06 Mar 2003 19:27:29 -0500
Received: from dstc.edu.au (soluble.dstc.edu.au [130.102.176.43])
	by piglet.dstc.edu.au (8.12.8/8.12.8) with ESMTP id h270RL27014848;
	Fri, 7 Mar 2003 10:27:21 +1000 (EST)
Message-Id: <200303070027.h270RL27014848@piglet.dstc.edu.au>
X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4
To: abies@pg.gda.pl
In-Reply-To: Message from Artur Biesiadowski <abies00@wp.pl> 
   of "Thu, 06 Mar 2003 19:47:31 +0100." <3E6797C3.1080307@wp.pl> 
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Date: Fri, 07 Mar 2003 10:27:21 +1000
From: Stephen Crawley <crawley@dstc.edu.au>
X-Virus-Scanned: Message: ok
X-Scanned-By: MIMEDefang 2.9 (www dot roaringpenguin dot com slash mimedefang)
cc: crawley@piglet.dstc.edu.au
cc: GNU Classpath <classpath@gnu.org>
Subject: Re: More finalize woes 
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Fri, 07 Mar 2003 00:28:02 -0000

> Sascha Brawer wrote:
> 
> > So, should a Java-to-Bytecode compiler emit a warning if a finalize()
> > implementation does not call super.finalize()? This might be a suggestion
> > for gcj, jikes, javac etc. Also, we might want to add a note to the
> > Classpath hacker's guide.
> 
> What about classes inheriting directly from Object ? Should they also be 
> forced to call super.finalize() ?

I'd say yes.  A compiler cannot know what the target VM's implementation of
java.lang.Object.finalize() does, and hence whether calling it is necessary.  
An unnecessary call to java.lang.Object.finalize() won't hurt anyone.
Besides, this would only be a compiler warning, and the user would be
free to ignore it.

-- Steve




From MAILER-DAEMON Thu Mar 06 20:27:50 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18r6eM-0006e5-00
	for mharc-classpath@gnu.org; Thu, 06 Mar 2003 20:27:50 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18r6dR-00065h-00
	for classpath@gnu.org; Thu, 06 Mar 2003 20:26:53 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18r6d7-0005zB-00
	for classpath@gnu.org; Thu, 06 Mar 2003 20:26:34 -0500
Received: from mail.peakpeak.com ([207.174.178.17] helo=gash2.peakpeak.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18r6d0-0005xh-00
	for classpath@gnu.org; Thu, 06 Mar 2003 20:26:26 -0500
Received: from fleche.redhat.com (tf0021.peakpeak.com [204.144.239.21])
	by gash2.peakpeak.com (8.9.3/8.9.3) with ESMTP id SAA02344;
	Thu, 6 Mar 2003 18:26:24 -0700
Received: by fleche.redhat.com (Postfix, from userid 1000)
	id 2D2874F8610; Thu,  6 Mar 2003 18:18:56 -0700 (MST)
To: Linuxhippy <linuxhippy@web.de>
References: <200303061052.h26Aqvp03007@mailgate5.cinetic.de>
	<3E67456A.9090809@cs.vu.nl> <3E679839.4020806@web.de>
From: Tom Tromey <tromey@redhat.com>
X-Attribution: Tom
X-Zippy: I was making donuts and now I'm on a bus!
Date: 06 Mar 2003 18:18:56 -0700
In-Reply-To: <3E679839.4020806@web.de>
Message-ID: <87k7fc0y9r.fsf@fleche.redhat.com>
Lines: 17
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: classpath@gnu.org
Subject: Re: Want to help in integrating swing.
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
Reply-To: tromey@redhat.com
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Fri, 07 Mar 2003 01:27:48 -0000

>>>>> "Clemens" == Clemens Eisserer <linuxhippy@web.de> writes:

Clemens> How good is AWT now? Are there still some essential parts missing?

AWT is good enough to run simple applications.
There are also parts missing.

Clemens> Would it be better to use JDK1.1.8 and extend it. But that
Clemens> would maybe make it incompatible with classpath...

In theory you could write Swing on top of any AWT implementation.  If
it can run on Sun's AWT, but still compile in the Classpath tree, then
I think that would be fine for us.  (If it were done cleanly,
following the API correctly, etc.)  Someday our AWT would be able to
run it too.

Tom



From MAILER-DAEMON Thu Mar 06 20:28:10 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18r6bJ-0005PB-00
	for mharc-classpath@gnu.org; Thu, 06 Mar 2003 20:24:41 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18r6bG-0005Mk-00
	for classpath@gnu.org; Thu, 06 Mar 2003 20:24:38 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18r6bD-0005KI-00
	for classpath@gnu.org; Thu, 06 Mar 2003 20:24:36 -0500
Received: from mail.peakpeak.com ([207.174.178.17] helo=gash2.peakpeak.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18r6bC-0005In-00
	for classpath@gnu.org; Thu, 06 Mar 2003 20:24:34 -0500
Received: from fleche.redhat.com (tf0021.peakpeak.com [204.144.239.21])
	by gash2.peakpeak.com (8.9.3/8.9.3) with ESMTP id SAA01882;
	Thu, 6 Mar 2003 18:24:30 -0700
Received: by fleche.redhat.com (Postfix, from userid 1000)
	id C04054F8610; Thu,  6 Mar 2003 18:17:02 -0700 (MST)
To: John Leuner <jewel@pixie.co.za>
References: <1046891991.428.293.camel@cmalu>
	<87el5ld30l.fsf@fleche.redhat.com> <1046968860.428.296.camel@cmalu>
From: Tom Tromey <tromey@redhat.com>
X-Attribution: Tom
X-Zippy: YUGGA-HUGGA-BUGGA-TUGGA!!  HEY-HEY!!  A TRAIN STATION!!  No, a POST
 OFFICE!!  An OCEAN LINER!!  No, I think it's a CAFETERIA!!!
Date: 06 Mar 2003 18:17:02 -0700
In-Reply-To: <1046968860.428.296.camel@cmalu>
Message-ID: <87of4o0ycx.fsf@fleche.redhat.com>
Lines: 20
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: classpath@gnu.org
Subject: Re: TestAWT
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
Reply-To: tromey@redhat.com
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Fri, 07 Mar 2003 01:24:39 -0000

John> But I don't know how to fix it, what is wrong with calling
John> "dispose()" when the OK button is clicked?

I think that is probably what we should do.  Maybe calling hide() is better?
dispose() destroys the peer.

Looking at Sun's javadoc and comparing it to our Dialog.java, it looks
like we are missing code.  Our show() doesn't support modal
operation.  Our hide() and dispose() don't either.

Looking at GtkDialogPeer, it looks like we don't do any event handling
there at all.  And in the native code (..._GtkWindowPeer.c) we don't
seem to handle modality.

Also I notice that the argument to GtkWindow.create is passed directly
to gtk_window_new().  This seems fragile -- it means our Java code has
to have the correct value for gtk constants (which are presumably
opaque).

Tom



From MAILER-DAEMON Thu Mar 06 20:34:23 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18r6kh-0004QK-00
	for mharc-classpath@gnu.org; Thu, 06 Mar 2003 20:34:23 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18r6ka-000424-00
	for classpath@gnu.org; Thu, 06 Mar 2003 20:34:16 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18r6jE-0001i5-00
	for classpath@gnu.org; Thu, 06 Mar 2003 20:32:53 -0500
Received: from adsl-216-102-199-253.dsl.snfc21.pacbell.net ([216.102.199.253]
	helo=bothner.com)	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18r6iw-0001Xd-00
	for classpath@gnu.org; Thu, 06 Mar 2003 20:32:34 -0500
Received: from bothner.com (eureka.bothner.com [192.168.1.9])
	by bothner.com (8.12.5/8.12.5) with ESMTP id h271XKj5021521;
	Thu, 6 Mar 2003 17:33:21 -0800
Message-ID: <3E67F09C.6080906@bothner.com>
Date: Thu, 06 Mar 2003 17:06:36 -0800
From: Per Bothner <per@bothner.com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3b) Gecko/20030210
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: Stephen Crawley <crawley@dstc.edu.au>
References: <200303070027.h270RL27014848@piglet.dstc.edu.au>
In-Reply-To: <200303070027.h270RL27014848@piglet.dstc.edu.au>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
cc: GNU Classpath <classpath@gnu.org>
Subject: Re: More finalize woes
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Fri, 07 Mar 2003 01:34:21 -0000

Stephen Crawley wrote:
> I'd say yes.  A compiler cannot know what the target VM's implementation of
> java.lang.Object.finalize() does, and hence whether calling it is necessary.

It can know that any *correct* implementation of Object.finalize is
a no-op, so there is no reason it call it.  It is hard to imagine any
use for a non-empty Object.finalize; any VM-specific actions on
object cleanup should be part of the run-time system instead.

> An unnecessary call to java.lang.Object.finalize() won't hurt anyone.

Well, there is always performance ...

> Besides, this would only be a compiler warning, and the user would be
> free to ignore it.

Many projects, including gcc itself, prohibit warnings.
-- 
	--Per Bothner
per@bothner.com   http://www.bothner.com/per/




From MAILER-DAEMON Thu Mar 06 21:31:43 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18r7dw-0006M2-00
	for mharc-classpath@gnu.org; Thu, 06 Mar 2003 21:31:28 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18r7dt-0006JS-00
	for classpath@gnu.org; Thu, 06 Mar 2003 21:31:25 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18r7ds-0006JH-00
	for classpath@gnu.org; Thu, 06 Mar 2003 21:31:25 -0500
Received: from piglet.dstc.edu.au ([130.102.176.1])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18r7dm-0006Ho-00
	for classpath@gnu.org; Thu, 06 Mar 2003 21:31:18 -0500
Received: from dstc.edu.au (soluble.dstc.edu.au [130.102.176.43])
	by piglet.dstc.edu.au (8.12.8/8.12.8) with ESMTP id h272V427025919;
	Fri, 7 Mar 2003 12:31:04 +1000 (EST)
Message-Id: <200303070231.h272V427025919@piglet.dstc.edu.au>
X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4
To: Per Bothner <per@bothner.com>
In-Reply-To: Message from Per Bothner <per@bothner.com> 
   of "Thu, 06 Mar 2003 17:06:36 PST." <3E67F09C.6080906@bothner.com> 
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Date: Fri, 07 Mar 2003 12:31:04 +1000
From: Stephen Crawley <crawley@dstc.edu.au>
X-Virus-Scanned: Message: ok
X-Scanned-By: MIMEDefang 2.9 (www dot roaringpenguin dot com slash mimedefang)
cc: crawley@piglet.dstc.edu.au
cc: Stephen Crawley <crawley@dstc.edu.au>
cc: GNU Classpath <classpath@gnu.org>
Subject: Re: More finalize woes 
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Fri, 07 Mar 2003 02:31:26 -0000

> Stephen Crawley wrote:
> > I'd say yes.  A compiler cannot know what the target VM's implementat=
ion of
> > java.lang.Object.finalize() does, and hence whether calling it is nec=
essary.
> =

> It can know that any *correct* implementation of Object.finalize is
> a no-op, so there is no reason it call it.  It is hard to imagine any
> use for a non-empty Object.finalize; any VM-specific actions on
> object cleanup should be part of the run-time system instead.

You are technically correct.  The JLS actually states that:

  "The finalize method declared in class Object takes no action."

However, I can envisage wanting to use Classpath / Jikes / gcj in
experimental JVMs where Object.finalize needs to do something.  Strictly =

speaking, this would not be pure Java.  But I would prefer to have the
Java compiler point out missing calls to super.finalize() in this case
on the basis that:

  1)  the missing calls are "bad style", in general and in particular [*]=


  2)  treating direct subclass of Object as a special case makes
      the compiler

[*  Calling "super.finalize" in a finalizer  for a direct subclass of Obj=
ect =

    insulates the programmer from problems if he/she changes the inherita=
nce =

    structure.  Note: the programmer may be using a different Java compil=
er
    by then ... ]

> > An unnecessary call to java.lang.Object.finalize() won't hurt anyone.=

> =

> Well, there is always performance ...

Insignificant, IMO.  The number of objects that have finalizers is very
small.  Besides, even if the application programmer went mad and put
finalizer methods in lots of classes, the cost of calling
Object.finalize would be swamped by the cost of setting up the stacks
etcetera to call the most-derived finalizer.

The JLS also goes on to say the following:

  "For efficiency, an implementation may keep track of classes that do =

   not override the finalize method of class Object, or override it in =

   a trivial way, such as:

     protected void finalize() throws Throwable {
	super.finalize();
     }

   We encourage implementations to treat such objects as having a finaliz=
er =

   that is not overridden, and to finalize them more efficiently, as =

   described in =A712.6.1."

I think it is arguable that a JVM could optimize away >>all<< calls to
super.finalize() that bind to Object.finalize().  This would make the
performance question moot ... for such JVMs.

> > Besides, this would only be a compiler warning, and the user would be=

> > free to ignore it.
> =

> Many projects, including gcc itself, prohibit warnings.

If project policy strictly prohibits warnings, it must wear the cost of
code to circumvent the warnings.  In this case, the cost will be
vanishingly small, at least in realistic examples.  Alternatively, it
should tweak the compiler or build process to suppress these warnings.

-- Steve





From MAILER-DAEMON Thu Mar 06 21:37:27 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18r7ji-0000Vo-00
	for mharc-classpath@gnu.org; Thu, 06 Mar 2003 21:37:26 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18r7jf-0000Mi-00
	for classpath@gnu.org; Thu, 06 Mar 2003 21:37:23 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18r7jd-0000Hk-00
	for classpath@gnu.org; Thu, 06 Mar 2003 21:37:21 -0500
Received: from piglet.dstc.edu.au ([130.102.176.1])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18r7ja-0008TU-00
	for classpath@gnu.org; Thu, 06 Mar 2003 21:37:18 -0500
Received: from dstc.edu.au (soluble.dstc.edu.au [130.102.176.43])
	by piglet.dstc.edu.au (8.12.8/8.12.8) with ESMTP id h272b727026327;
	Fri, 7 Mar 2003 12:37:07 +1000 (EST)
Message-Id: <200303070237.h272b727026327@piglet.dstc.edu.au>
X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4
To: Stephen Crawley <crawley@dstc.edu.au>
In-Reply-To: Message from Stephen Crawley <crawley@dstc.edu.au> 
	<200303070231.h272V427025919@piglet.dstc.edu.au> 
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Date: Fri, 07 Mar 2003 12:37:07 +1000
From: Stephen Crawley <crawley@dstc.edu.au>
X-Virus-Scanned: Message: ok
X-Scanned-By: MIMEDefang 2.9 (www dot roaringpenguin dot com slash mimedefang)
cc: crawley@piglet.dstc.edu.au
cc: Per Bothner <per@bothner.com>
cc: GNU Classpath <classpath@gnu.org>
Subject: Re: More finalize woes 
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Fri, 07 Mar 2003 02:37:25 -0000


Whoops:

>  2)  treating direct subclass of Object as a special case makes
>      the compiler
         
   2)  treating direct subclass of Object as a special case makes 
       the compiler more complicated




From MAILER-DAEMON Thu Mar 06 21:48:49 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18r7uj-0000Px-00
	for mharc-classpath@gnu.org; Thu, 06 Mar 2003 21:48:49 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18r7ug-0000Nh-00
	for classpath@gnu.org; Thu, 06 Mar 2003 21:48:46 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18r7tk-0008Lk-00
	for classpath@gnu.org; Thu, 06 Mar 2003 21:47:49 -0500
Received: from adsl-216-102-199-253.dsl.snfc21.pacbell.net ([216.102.199.253]
	helo=bothner.com)	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18r7tc-0008E7-00
	for classpath@gnu.org; Thu, 06 Mar 2003 21:47:40 -0500
Received: from bothner.com (eureka.bothner.com [192.168.1.9])
	by bothner.com (8.12.5/8.12.5) with ESMTP id h272mdj5021872;
	Thu, 6 Mar 2003 18:48:39 -0800
Message-ID: <3E680241.20408@bothner.com>
Date: Thu, 06 Mar 2003 18:21:53 -0800
From: Per Bothner <per@bothner.com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3b) Gecko/20030210
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: Stephen Crawley <crawley@dstc.edu.au>
References: <200303070231.h272V427025919@piglet.dstc.edu.au>
In-Reply-To: <200303070231.h272V427025919@piglet.dstc.edu.au>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by bothner.com id
	h272mdj5021872
cc: GNU Classpath <classpath@gnu.org>
Subject: Re: More finalize woes
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Fri, 07 Mar 2003 02:48:47 -0000

Stephen Crawley wrote:
> [*  Calling "super.finalize" in a finalizer  for a direct subclass of O=
bject=20
>     insulates the programmer from problems if he/she changes the inheri=
tance=20
>     structure.

That's a reasonable point.  However ...

> Insignificant, IMO.  The number of objects that have finalizers is very
> small.

IIRC all objects technicaly have finalizer.  The question is which
objects have non-trivial finalizers.  If (to allow changing class
hierarchies as above) you require all classes to contain:

   public void finalize () { super.finalize(); }

(which is a logical extension of what you said), then it becomes
more difficult to detect non-trivial finalizers.  Not very
difficulat, mind you, just a little less trivial, if I may say so.

> Besides, even if the application programmer went mad and put
> finalizer methods in lots of classes, the cost of calling
> Object.finalize would be swamped by the cost of setting up the stacks
> etcetera to call the most-derived finalizer.

I'm not sure what "setting up the stacks etcetera" refers to.
However, objects with (non-trivial) finalizers are quite expensive
in many Java implementations.

> The JLS also goes on to say the following:
 >    ...
>    We encourage implementations to treat such objects as having a final=
izer=20
>    that is not overridden, and to finalize them more efficiently, as=20
>    described in =A712.6.1."
>=20
> I think it is arguable that a JVM could optimize away >>all<< calls to
> super.finalize() that bind to Object.finalize().  This would make the
> performance question moot ... for such JVMs.

True.

> If project policy strictly prohibits warnings, it must wear the cost of
> code to circumvent the warnings.  In this case, the cost will be
> vanishingly small, at least in realistic examples.

Yes, but only if the JVM does the recommended optimization.
I don't know if GCJ does.
--=20
	--Per Bothner
per@bothner.com   http://www.bothner.com/per/




From MAILER-DAEMON Thu Mar 06 22:48:43 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18r8qh-0000HQ-00
	for mharc-classpath@gnu.org; Thu, 06 Mar 2003 22:48:43 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18r8qf-0000Ga-00
	for classpath@gnu.org; Thu, 06 Mar 2003 22:48:41 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18r8qd-0000CR-00
	for classpath@gnu.org; Thu, 06 Mar 2003 22:48:40 -0500
Received: from piglet.dstc.edu.au ([130.102.176.1])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18r8qc-00005L-00
	for classpath@gnu.org; Thu, 06 Mar 2003 22:48:38 -0500
Received: from dstc.edu.au (soluble.dstc.edu.au [130.102.176.43])
	by piglet.dstc.edu.au (8.12.8/8.12.8) with ESMTP id h273mT27002003;
	Fri, 7 Mar 2003 13:48:29 +1000 (EST)
Message-Id: <200303070348.h273mT27002003@piglet.dstc.edu.au>
X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4
To: Per Bothner <per@bothner.com>
In-Reply-To: Message from Per Bothner <per@bothner.com> 
   of "Thu, 06 Mar 2003 18:21:53 PST." <3E680241.20408@bothner.com> 
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Date: Fri, 07 Mar 2003 13:48:29 +1000
From: Stephen Crawley <crawley@dstc.edu.au>
X-Virus-Scanned: Message: ok
X-Scanned-By: MIMEDefang 2.9 (www dot roaringpenguin dot com slash mimedefang)
cc: crawley@piglet.dstc.edu.au
cc: Stephen Crawley <crawley@dstc.edu.au>
cc: GNU Classpath <classpath@gnu.org>
Subject: Re: More finalize woes 
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Fri, 07 Mar 2003 03:48:41 -0000


> IIRC all objects technicaly have finalizer.  The question is which
> objects have non-trivial finalizers.  If (to allow changing class
> hierarchies as above) you require all classes to contain:
> =

>    public void finalize () { super.finalize(); }

The JLS spec calls that a trivial finalizer ...

> (which is a logical extension of what you said), =


It is NOT a logical extension of what I'm saying. I'm saying that
non-trivial finalizers should always include a call to super.finalize().
It does NOT follow that every class should have a finalizer.  =


Adding a trivial finalizer does NOT help in the event that the
programmer changes the classes position in the class hierarchy.
But having a (previously redundant) super.finalize() call in a
non-trivial finalize method may turn out to be a GOOD THING.

> I'm not sure what "setting up the stacks etcetera" refers to.
> However, objects with (non-trivial) finalizers are quite expensive
> in many Java implementations.

Yes ... but 90% of the cost is incurred before the most-derived
finalizer is called, or after it returns.  And even when the finalizer
is called, the cost of executing the instance's finalization code will
be far greater than the cost of a call to java.lang.Object.finalize
=2E.. which is going to return in a JVM instruction or two.

-- Steve




From MAILER-DAEMON Thu Mar 06 23:17:21 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18r9IN-0007cQ-00
	for mharc-classpath@gnu.org; Thu, 06 Mar 2003 23:17:19 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18r9IK-0007UW-00
	for classpath@gnu.org; Thu, 06 Mar 2003 23:17:17 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18r9IC-00073U-00
	for classpath@gnu.org; Thu, 06 Mar 2003 23:17:12 -0500
Received: from mail.peakpeak.com ([207.174.178.17] helo=gash2.peakpeak.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18r9IA-0006vZ-00
	for classpath@gnu.org; Thu, 06 Mar 2003 23:17:07 -0500
Received: from fleche.redhat.com (tf0021.peakpeak.com [204.144.239.21])
	by gash2.peakpeak.com (8.9.3/8.9.3) with ESMTP id VAA07753;
	Thu, 6 Mar 2003 21:16:39 -0700
Received: by fleche.redhat.com (Postfix, from userid 1000)
	id 731214F8610; Thu,  6 Mar 2003 21:09:14 -0700 (MST)
To: Per Bothner <per@bothner.com>
References: <200303070231.h272V427025919@piglet.dstc.edu.au>
	<3E680241.20408@bothner.com>
From: Tom Tromey <tromey@redhat.com>
X-Attribution: Tom
X-Zippy: I was in EXCRUCIATING PAIN until I started reading JACK AND JILL
 Magazine!!
Date: 06 Mar 2003 21:09:14 -0700
In-Reply-To: <3E680241.20408@bothner.com>
Message-ID: <87d6l324yd.fsf@fleche.redhat.com>
Lines: 66
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: Stephen Crawley <crawley@dstc.edu.au>
cc: GNU Classpath <classpath@gnu.org>
Subject: Re: More finalize woes
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
Reply-To: tromey@redhat.com
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Fri, 07 Mar 2003 04:17:18 -0000

Stephen> However, I can envisage wanting to use Classpath / Jikes /
Stephen> gcj in experimental JVMs where Object.finalize needs to do
Stephen> something.

Seems like an experimental VM like that would have to do its work
under the hood, given that Object.finalize is documented as doing
nothing.

Stephen> [* Calling "super.finalize" in a finalizer for a direct
Stephen> subclass of Object insulates the programmer from problems if
Stephen> he/she changes the inheritance structure.  Note: the
Stephen> programmer may be using a different Java compiler by then
Stephen> ... ]

Yeah, I think it makes some sense from a maintenance/refactoring point
of view.  This doesn't affect Classpath, though, since the hierarchy
won't be changing (one presumes).

Stephen> 2) treating direct subclass of Object as a special case makes
Stephen> the compiler complicated

I'm not swayed by this; the cost of this really doesn't seem
important.  Plus this is the sort of thing it is trivial to write a
regression test for.

However, adding a warning like this is probably not warranted.
Ideally a Java programmer would treat the standard library as a kind
of black box, and always call super.finalize().  However, not all
classes inherit from the standard library; the programmer might know
that this call is unnecessary and want to omit (for style reasons if
nothing else).

Per> If (to allow changing class hierarchies as above) you require all
Per> classes to contain:
Per>    public void finalize () { super.finalize(); }

You only need to call super.finalize() if you are already adding a
finalizer.  Otherwise you can just inherit the superclass finalize.

I think Object.finalize is a corner case.

Such a call should be very cheap: super calls are always inlineable (I
assume most JITs would inline, and thus eliminate, this call), and
even if not, the cost of the call will be dwarfed by the cost of
finalizing in the first place.  (FWIW right now I don't think gcj will
inline this.)

Still, there doesn't seem to be much point in requiring it.
We already know it won't do anything.

Stephen> If project policy strictly prohibits warnings, it must wear
Stephen> the cost of code to circumvent the warnings.  In this case,
Stephen> the cost will be vanishingly small, at least in realistic
Stephen> examples.

Per> Yes, but only if the JVM does the recommended optimization.
Per> I don't know if GCJ does.

I lost track of which optimization you mean.  gcj won't register a
finalizer for a method that inherits Object.finalize (in fact we have
a special allocation path for the no-finalizer case).  It will for all
other finalizers (trivial or not).  We could recognize trivial
finalizers without much trouble; a long time ago I had a patch to do
it.  There didn't seem to be much point in it though.

Tom



From MAILER-DAEMON Thu Mar 06 23:27:45 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18r9SI-00069e-00
	for mharc-classpath@gnu.org; Thu, 06 Mar 2003 23:27:34 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18r9S9-00063Q-00
	for classpath@gnu.org; Thu, 06 Mar 2003 23:27:25 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18r9Rv-0005uf-00
	for classpath@gnu.org; Thu, 06 Mar 2003 23:27:11 -0500
Received: from ms-smtp-03.southeast.rr.com ([24.93.67.84])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18r9Rn-0005Ue-00
	for classpath@gnu.org; Thu, 06 Mar 2003 23:27:03 -0500
Received: from mail3.nc.rr.com (fe3 [24.93.67.50])h274PlH4005097;
	Thu, 6 Mar 2003 23:25:47 -0500 (EST)
Received: from lyta.haphazard.org ([66.57.9.48]) by mail3.nc.rr.com  with
	Microsoft SMTPSVC(5.5.1877.757.75);	 Thu, 6 Mar 2003 23:24:47 -0500
Received: by lyta.haphazard.org (Postfix, from userid 500)
	id 83062BE69E; Thu,  6 Mar 2003 23:26:28 -0500 (EST)
Sender: cbj@haphazard.org
To: Per Bothner <per@bothner.com>
References: <200303070027.h270RL27014848@piglet.dstc.edu.au>
	<3E67F09C.6080906@bothner.com>
From: Brian Jones <cbj@gnu.org>
Date: 06 Mar 2003 23:26:28 -0500
In-Reply-To: <3E67F09C.6080906@bothner.com>
Message-ID: <m3el5jby4r.fsf@lyta.haphazard.org>
Lines: 9
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: Stephen Crawley <crawley@dstc.edu.au>
cc: GNU Classpath <classpath@gnu.org>
Subject: Re: More finalize woes
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Fri, 07 Mar 2003 04:27:32 -0000

Per Bothner <per@bothner.com> writes:

> Many projects, including gcc itself, prohibit warnings.

Then what is the purpose of -Wall?  :)

Brian
-- 
Brian Jones <cbj@gnu.org>



From MAILER-DAEMON Fri Mar 07 02:17:41 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18rC6v-0003hW-00
	for mharc-classpath@gnu.org; Fri, 07 Mar 2003 02:17:41 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18rC5s-00039d-00
	for classpath@gnu.org; Fri, 07 Mar 2003 02:16:36 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18rC5O-00033n-00
	for classpath@gnu.org; Fri, 07 Mar 2003 02:16:07 -0500
Received: from adsl-216-102-199-253.dsl.snfc21.pacbell.net ([216.102.199.253]
	helo=bothner.com)	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18rC5D-00031t-00; Fri, 07 Mar 2003 02:15:56 -0500
Received: from bothner.com (eureka.bothner.com [192.168.1.9])
	by bothner.com (8.12.5/8.12.5) with ESMTP id h277Gxj5022796;
	Thu, 6 Mar 2003 23:16:59 -0800
Message-ID: <3E68411D.20205@bothner.com>
Date: Thu, 06 Mar 2003 22:50:05 -0800
From: Per Bothner <per@bothner.com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3b) Gecko/20030210
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: Brian Jones <cbj@gnu.org>
References: <200303070027.h270RL27014848@piglet.dstc.edu.au>
	<3E67F09C.6080906@bothner.com> <m3el5jby4r.fsf@lyta.haphazard.org>
In-Reply-To: <m3el5jby4r.fsf@lyta.haphazard.org>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
cc: GNU Classpath <classpath@gnu.org>
Subject: Re: More finalize woes
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Fri, 07 Mar 2003 07:17:38 -0000

Brian Jones wrote:
> Per Bothner <per@bothner.com> writes:
> >Many projects, including gcc itself, prohibit warnings.
> 
> Then what is the purpose of -Wall?  :)

To enable a bunch of warnings for questionable code.
The CVS head of gcc is compiled with -Wall -Werror.
The latter turns warnings into errors, to force people
to clean up their code.
-- 
	--Per Bothner
per@bothner.com   http://www.bothner.com/per/




From MAILER-DAEMON Fri Mar 07 02:23:40 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18rCCi-00053h-00
	for mharc-classpath@gnu.org; Fri, 07 Mar 2003 02:23:40 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18rCCf-0004yk-00
	for classpath@gnu.org; Fri, 07 Mar 2003 02:23:37 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18rCCe-0004yZ-00
	for classpath@gnu.org; Fri, 07 Mar 2003 02:23:37 -0500
Received: from adsl-216-102-199-253.dsl.snfc21.pacbell.net ([216.102.199.253]
	helo=bothner.com)	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18rCCe-0004wU-00
	for classpath@gnu.org; Fri, 07 Mar 2003 02:23:36 -0500
Received: from bothner.com (eureka.bothner.com [192.168.1.9])
	by bothner.com (8.12.5/8.12.5) with ESMTP id h277ORj5022841;
	Thu, 6 Mar 2003 23:24:28 -0800
Message-ID: <3E6842DD.7080006@bothner.com>
Date: Thu, 06 Mar 2003 22:57:33 -0800
From: Per Bothner <per@bothner.com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3b) Gecko/20030210
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: Stephen Crawley <crawley@dstc.edu.au>
References: <200303070348.h273mT27002003@piglet.dstc.edu.au>
In-Reply-To: <200303070348.h273mT27002003@piglet.dstc.edu.au>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
cc: GNU Classpath <classpath@gnu.org>
Subject: Re: More finalize woes
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Fri, 07 Mar 2003 07:23:38 -0000

tephen Crawley wrote:
> It is NOT a logical extension of what I'm saying. I'm saying that
> non-trivial finalizers should always include a call to super.finalize().

In "contract-oriented" programming more generally, every method
that overrides another should super-call the latter.  (The
langauges Simula67 (the first object-orineted language) and BETA
enforce this by turning this around:  Instead of a overriding
method calling super, the base methiod calls INNER to call the
overriding method.)

> It does NOT follow that every class should have a finalizer.

Ok.

> Adding a trivial finalizer does NOT help in the event that the
> programmer changes the classes position in the class hierarchy.
> But having a (previously redundant) super.finalize() call in a
> non-trivial finalize method may turn out to be a GOOD THING.

True.  I wasn't thinking clearly.

I still don't think it is a good idea reason to call super,finalize
if super is Object - and I don't think we should warn in that case.
-- 
	--Per Bothner
per@bothner.com   http://www.bothner.com/per/




From MAILER-DAEMON Fri Mar 07 07:19:57 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18rGoX-0006dx-00
	for mharc-classpath@gnu.org; Fri, 07 Mar 2003 07:19:01 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18rGmq-0005aZ-00
	for classpath@gnu.org; Fri, 07 Mar 2003 07:17:16 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18rGlO-0004zv-00
	for classpath@gnu.org; Fri, 07 Mar 2003 07:15:46 -0500
Received: from mailgate5.cinetic.de ([217.72.192.165])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18rGl9-0004sR-00
	for classpath@gnu.org; Fri, 07 Mar 2003 07:15:31 -0500
Received: from web.de (fmomail01.dlan.cinetic.de [172.20.1.45])
	SMTP id h27CFS820453
	for classpath@gnu.org; Fri, 7 Mar 2003 13:15:28 +0100
Date: Fri, 7 Mar 2003 13:15:28 +0100
Message-Id: <200303071215.h27CFS820453@mailgate5.cinetic.de>
MIME-Version: 1.0
Organization: http://freemail.web.de/
From: Clemens Eisserer <Linuxhippy@web.de>
To: classpath@gnu.org
Precedence: fm-user
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Subject: Re: Re: Want to help in integrating swing.
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Fri, 07 Mar 2003 12:19:00 -0000

Hi there!

I hope this will be the last question for a long time, I've downloaded all SWING-Tuts I know and nearly every java-doc provided by sun ;-)

> In theory you could write Swing on top of any AWT implementation.  If
> it can run on Sun's AWT, but still compile in the Classpath tree, then
> I think that would be fine for us.  (If it were done cleanly,
> following the API correctly, etc.)  Someday our AWT would be able to
> run it too.

Sorry, my English is not the best, so I did not exactly understand the question.

Did you mean that I should build it with Classpath's-AWT or with SUNs-AWT?
What I did not understand was the part "but compiles in the classpath tree". Does that mean compile using classpath-awt or suns one?

Btw. GridBagLayout will have to wait some time. I want to implement the funpart first ;-)

Mfg Linxuhippy



______________________________________________________________________________
Mit der Auslands-SMS von WEB.DE FreeMail erreichen Sie Ihre Freunde auf
der ganzen Welt - http://freemail.web.de/features/?mc=021171




From MAILER-DAEMON Fri Mar 07 09:04:30 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18rIRQ-0004x5-00
	for mharc-classpath@gnu.org; Fri, 07 Mar 2003 09:03:17 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18rIQr-0004Fh-00
	for classpath@gnu.org; Fri, 07 Mar 2003 09:02:41 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18rIQN-00040D-00
	for classpath@gnu.org; Fri, 07 Mar 2003 09:02:11 -0500
Received: from web10002.mail.yahoo.com ([216.136.130.38])
	by monty-python.gnu.org with smtp (Exim 4.10.13)
	id 18rIOT-0003Uv-00
	for classpath@gnu.org; Fri, 07 Mar 2003 09:00:13 -0500
Message-ID: <20030307140011.56516.qmail@web10002.mail.yahoo.com>
Received: from [139.19.20.90] by web10002.mail.yahoo.com via HTTP;
	Fri, 07 Mar 2003 06:00:11 PST
Date: Fri, 7 Mar 2003 06:00:11 -0800 (PST)
From: Dalibor Topic <robilad@yahoo.com>
To: Clemens Eisserer <Linuxhippy@web.de>, classpath@gnu.org
In-Reply-To: <200303071215.h27CFS820453@mailgate5.cinetic.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Subject: Re: Re: Want to help in integrating swing.
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Fri, 07 Mar 2003 14:03:15 -0000


--- Clemens Eisserer <Linuxhippy@web.de> wrote:
> Hi there!
> 
> I hope this will be the last question for a long
> time, I've downloaded all SWING-Tuts I know and
> nearly every java-doc provided by sun ;-)
> 
> > In theory you could write Swing on top of any AWT
> implementation.  If
> > it can run on Sun's AWT, but still compile in the
> Classpath tree, then
> > I think that would be fine for us.  (If it were
> done cleanly,
> > following the API correctly, etc.)  Someday our
> AWT would be able to
> > run it too.
> 
> Sorry, my English is not the best, so I did not
> exactly understand the question.
> 
> Did you mean that I should build it with
> Classpath's-AWT or with SUNs-AWT?
> What I did not understand was the part "but compiles
> in the classpath tree". Does that mean compile using
> classpath-awt or suns one?

As SWING is supposed to be pure java, you can use
either Sun's AWT to work with or Classpath's AWT.
Whatever you build, should be compilable against both,
as long as it stays pure java and only uses the
specified AWT apis.

I'd recommend using Sun's AWT, if you want to focus on
writing a SWING implementation, and using Classpath's
AWT if you want to focus in improving the state of AWT
support in Classpath first.

cheers,
dalibor topic

__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/



From MAILER-DAEMON Fri Mar 07 09:29:15 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18rIqR-0005rI-00
	for mharc-classpath@gnu.org; Fri, 07 Mar 2003 09:29:07 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18rIpu-0005Rf-00
	for classpath@gnu.org; Fri, 07 Mar 2003 09:28:34 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18rIoj-0004tC-00
	for classpath@gnu.org; Fri, 07 Mar 2003 09:27:21 -0500
Received: from mailgate5.cinetic.de ([217.72.192.165])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18rIoe-0004p9-00
	for classpath@gnu.org; Fri, 07 Mar 2003 09:27:17 -0500
Received: from web.de (fmomail01.dlan.cinetic.de [172.20.1.45])
	SMTP id h27ERC826578
	for classpath@gnu.org; Fri, 7 Mar 2003 15:27:12 +0100
Date: Fri, 7 Mar 2003 15:27:12 +0100
Message-Id: <200303071427.h27ERC826578@mailgate5.cinetic.de>
MIME-Version: 1.0
Organization: http://freemail.web.de/
From: Clemens Eisserer <Linuxhippy@web.de>
To: classpath@gnu.org
Precedence: fm-user
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Subject: Re: Re: Re: Want to help in integrating swing. Really last question.
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Fri, 07 Mar 2003 14:28:59 -0000

Hi there!

> I'd recommend using Sun's AWT, if you want to focus on
> writing a SWING implementation, and using Classpath's
> AWT if you want to focus in improving the state of AWT
> support in Classpath first.
My questions is, if it would be a problem  to contribute to classpath, when the contributed code doesnt work with classpath alone. I definitive want to write only swing, awt is to complex for me (I'm not a really good code) with all its peers, etc.
I also think it would be better to work first with Sun-AWT because on this way I dont need to ship arround bugs, which would maybe cause the code ditry. 

Sorry for my nerving, thanks for your patience!!

Mfg Clemens




______________________________________________________________________________
Ihre Freunde sind in Italien? Schicken Sie ihnen trotzdem eine SMS
mit WEB.DE FreeMail http://freemail.web.de/features/?mc=021172




From MAILER-DAEMON Fri Mar 07 10:40:36 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18rJxU-0003bx-00
	for mharc-classpath@gnu.org; Fri, 07 Mar 2003 10:40:28 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18rJx9-0003DF-00
	for classpath@gnu.org; Fri, 07 Mar 2003 10:40:07 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18rJwW-0002a0-00
	for classpath@gnu.org; Fri, 07 Mar 2003 10:39:30 -0500
Received: from pop2a.ripco.com ([209.100.227.25])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18rJvZ-0001WK-00
	for classpath@gnu.org; Fri, 07 Mar 2003 10:38:29 -0500
Received: (from arenn@localhost)
	by pop2a.ripco.com (8.11.0/8.11.0) id h27Fcla01665;
	Fri, 7 Mar 2003 09:38:47 -0600 (CST)
Date: Fri, 7 Mar 2003 09:38:47 -0600
From: "Aaron M. Renn" <arenn@urbanophile.com>
To: Clemens Eisserer <Linuxhippy@web.de>
Message-ID: <20030307153847.GA1509@urbanophile.com>
Mail-Followup-To: "Aaron M. Renn" <arenn@urbanophile.com>,
	Clemens Eisserer <Linuxhippy@web.de>, classpath@gnu.org
References: <200303071215.h27CFS820453@mailgate5.cinetic.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <200303071215.h27CFS820453@mailgate5.cinetic.de>
User-Agent: Mutt/1.4i
Organization: GNU's Not Unix!
cc: classpath@gnu.org
Subject: Re: Re: Want to help in integrating swing.
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Fri, 07 Mar 2003 15:40:26 -0000

Clemens Eisserer (Linuxhippy@web.de) wrote:
> > In theory you could write Swing on top of any AWT implementation.  If
> > it can run on Sun's AWT, but still compile in the Classpath tree, then
> > I think that would be fine for us.  (If it were done cleanly,
> > following the API correctly, etc.)  Someday our AWT would be able to
> > run it too.
> 
> Sorry, my English is not the best, so I did not exactly understand the question.
> 
> Did you mean that I should build it with Classpath's-AWT or with SUNs-AWT?
> What I did not understand was the part "but compiles in the classpath tree". Does that mean compile using classpath-awt or suns one?

I think what was intended was that you write your Swing code against
Sun's AWT in the JDK.  The Classpath AWT does not work currently and probably
lacks many features needed for a proper Swing implementation.  If you are
able to write a functional drop in replacement for Swing using the JDK,
it should automatically work with Classpath once our own base AWT is complete.
 
-- 
Aaron M. Renn (arenn@urbanophile.com) http://www.urbanophile.com/arenn/




From MAILER-DAEMON Fri Mar 07 11:58:41 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18rLA2-0007LS-00
	for mharc-classpath@gnu.org; Fri, 07 Mar 2003 11:57:30 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18rL4Q-0005h6-00
	for classpath@gnu.org; Fri, 07 Mar 2003 11:51:42 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18rL2k-0005Ct-00
	for classpath@gnu.org; Fri, 07 Mar 2003 11:50:01 -0500
Received: from nat.acunia.com ([194.7.211.211] helo=mail.acunia.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18rL2j-0005B3-00
	for classpath@gnu.org; Fri, 07 Mar 2003 11:49:57 -0500
Received: from sophocles.leuven.intern.acunia.com
	(sophocles.leuven.intern.acunia.com [10.0.1.34])
	by mail.acunia.com (8.11.6/8.11.6) with ESMTP id h27GnSt05070;
	Fri, 7 Mar 2003 17:49:29 +0100
Date: Fri, 7 Mar 2003 17:11:49 +0100 (CET)
From: Chris Gray <chris.gray@acunia.com>
X-X-Sender: gray@sophocles.leuven.intern.acunia.com
To: Stephen Crawley <crawley@dstc.edu.au>
In-Reply-To: <200303070027.h270RL27014848@piglet.dstc.edu.au>
Message-ID: <Pine.LNX.4.44.0303071708090.13206-100000@sophocles.leuven.intern.acunia.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
cc: crawley@piglet.dstc.edu.au
cc: GNU Classpath <classpath@gnu.org>
cc: abies@pg.gda.pl
Subject: Re: More finalize woes 
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Fri, 07 Mar 2003 16:57:28 -0000

On Fri, 7 Mar 2003, Stephen Crawley wrote:
> An unnecessary call to java.lang.Object.finalize() won't hurt anyone.

Be careful: IIRC we once had a bug in Wonka which made _every_ instance
appear to be finalizable, and the effect on performance was um, noticeable ...

-- 

Chris Gray

VM Architect, ACUNIA





From MAILER-DAEMON Fri Mar 07 13:01:34 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18rM9l-00019b-00
	for mharc-classpath@gnu.org; Fri, 07 Mar 2003 13:01:17 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18rM9P-0000mr-00
	for classpath@gnu.org; Fri, 07 Mar 2003 13:00:55 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18rM96-0000GG-00
	for classpath@gnu.org; Fri, 07 Mar 2003 13:00:40 -0500
Received: from mail.peakpeak.com ([207.174.178.17] helo=gash2.peakpeak.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18rM8r-0007nS-00
	for classpath@gnu.org; Fri, 07 Mar 2003 13:00:21 -0500
Received: from fleche.redhat.com (tf0021.peakpeak.com [204.144.239.21])
	by gash2.peakpeak.com (8.9.3/8.9.3) with ESMTP id LAA12472;
	Fri, 7 Mar 2003 11:00:10 -0700
Received: by fleche.redhat.com (Postfix, from userid 1000)
	id 94DA04F8610; Fri,  7 Mar 2003 10:52:49 -0700 (MST)
To: Clemens Eisserer <Linuxhippy@web.de>
References: <200303071427.h27ERC826578@mailgate5.cinetic.de>
From: Tom Tromey <tromey@redhat.com>
X-Attribution: Tom
X-Zippy: After THIS, let's go to PHILADELPHIA and have TRIPLETS!!
Date: 07 Mar 2003 10:52:49 -0700
In-Reply-To: <200303071427.h27ERC826578@mailgate5.cinetic.de>
Message-ID: <8765qvxdvy.fsf@fleche.redhat.com>
Lines: 13
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: classpath@gnu.org
Subject: Re: Want to help in integrating swing. Really last question.
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
Reply-To: tromey@redhat.com
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Fri, 07 Mar 2003 18:01:15 -0000

>>>>> "Clemens" == Clemens Eisserer <Linuxhippy@web.de> writes:

Clemens> My questions is, if it would be a problem to contribute to
Clemens> classpath, when the contributed code doesnt work with
Clemens> classpath alone.

Provided that the code is using the documented AWT API, I don't
think there is a problem if it doesn't run using the Classpath AWT.

Ideally the code would compile when using Classpath as the base library.
Even that is negotiable.

Tom



From MAILER-DAEMON Fri Mar 07 14:58:35 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18rNxv-0006Aa-00
	for mharc-classpath@gnu.org; Fri, 07 Mar 2003 14:57:11 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18rNxV-000631-00
	for classpath@gnu.org; Fri, 07 Mar 2003 14:56:45 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18rNvr-0005cy-00
	for classpath@gnu.org; Fri, 07 Mar 2003 14:55:07 -0500
Received: from pop2a.ripco.com ([209.100.227.25])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18rNul-0004tV-00
	for classpath@gnu.org; Fri, 07 Mar 2003 14:53:55 -0500
Received: (from arenn@localhost)
	by pop2a.ripco.com (8.11.0/8.11.0) id h27JsAc13612;
	Fri, 7 Mar 2003 13:54:10 -0600 (CST)
Date: Fri, 7 Mar 2003 13:54:10 -0600
From: "Aaron M. Renn" <arenn@urbanophile.com>
To: Tom Tromey <tromey@redhat.com>
Message-ID: <20030307195410.GA13422@urbanophile.com>
Mail-Followup-To: "Aaron M. Renn" <arenn@urbanophile.com>,
	Tom Tromey <tromey@redhat.com>, classpath@gnu.org
References: <20030306065246.GA16716@urbanophile.com>
	<87y93s4bkr.fsf@fleche.redhat.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <87y93s4bkr.fsf@fleche.redhat.com>
User-Agent: Mutt/1.4i
Organization: GNU's Not Unix!
cc: classpath@gnu.org
Subject: Re: More java.io
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Fri, 07 Mar 2003 19:57:10 -0000

Tom Tromey (tromey@redhat.com) wrote:
> Aaron> 2.  On java.io.File, similar to the FileDescriptor stuff, I'd
> Aaron> like to propose a unified provider interface.  Comments:
> 
> Aaron> o I like to pass the filename to avoid gratuitous JNI lookups.
> Aaron> o I do not want to adopt the "overloaded" stat and access methods of
> Aaron>   gcj, I'd rather have one method per lookup
> Aaron> o I'd like to name consistently with FileDescriptor
> Aaron> o Minimizing native functionality, I want to return a full directory
> Aaron>  listing to Java and filter at that level instead of the gjc approach.
> 
> These all sound good.

Cool.
 
> Aaron>   boolean nativeCreate(String name);
> 
> These should all be static if they take the name explicitly.

Well, it is similar to what I did with FileDescriptor. Everything
probably could have been static there as well because we pass in the
file descriptor.  Still, it is solely to keep from having to do a
painful JNI field lookup and the method really is associated with
an instance of File.  Is there any particular reason to prefer
instance vs. static methods or vice versa?
 
> I think for FileDescriptor libgcj may remain with its own
> implementation, to avoid another layer of calls for all the I/O
> operations.  (Though maybe this is foolish optimization.  I'm not
> fully decided yet.)  In any case we'll standardize on the Classpath
> API so that all the classes that use FileDescriptor will be merged.

Good.  If you want changes, feel free to ask (or make them yourself).
The new FileDescriptor API is very close to the gcj one so implementing
it would be easy.  If you want to throw that "position" back in there
as a private instance variable, I'm ok with that too.

Brian says we're waiting for some additional native code contributions.
I want to figure that out then get File modified.

-- 
Aaron M. Renn (arenn@urbanophile.com) http://www.urbanophile.com/arenn/




From MAILER-DAEMON Fri Mar 07 15:04:05 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18rO3m-0000Vo-00
	for mharc-classpath@gnu.org; Fri, 07 Mar 2003 15:03:14 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18rO1u-0007qk-00
	for classpath@gnu.org; Fri, 07 Mar 2003 15:01:18 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18rO1H-0007YW-00
	for classpath@gnu.org; Fri, 07 Mar 2003 15:00:40 -0500
Received: from pop2a.ripco.com ([209.100.227.25])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18rO01-0007K6-00
	for classpath@gnu.org; Fri, 07 Mar 2003 14:59:21 -0500
Received: (from arenn@localhost)
	by pop2a.ripco.com (8.11.0/8.11.0) id h27JxYh13861;
	Fri, 7 Mar 2003 13:59:34 -0600 (CST)
Date: Fri, 7 Mar 2003 13:59:33 -0600
From: "Aaron M. Renn" <arenn@urbanophile.com>
To: Tom Tromey <tromey@redhat.com>
Message-ID: <20030307195933.GB13422@urbanophile.com>
Mail-Followup-To: "Aaron M. Renn" <arenn@urbanophile.com>,
	Tom Tromey <tromey@redhat.com>, Jeroen Frijters <jeroen@sumatra.nl>,
	classpath@gnu.org
References: <5C38B761F205B54BA59FF611A65C62480118BA@lembu.sumatrasoftware.com>
	<873cm05qm2.fsf@fleche.redhat.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <873cm05qm2.fsf@fleche.redhat.com>
User-Agent: Mutt/1.4i
Organization: GNU's Not Unix!
cc: Jeroen Frijters <jeroen@sumatra.nl>
cc: classpath@gnu.org
Subject: Re: New IO Native Provider Interface
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Fri, 07 Mar 2003 20:03:13 -0000

Tom Tromey (tromey@redhat.com) wrote:
> Jeroen> - FileOutputStream should not request read access, so the modes should
> Jeroen> be "w" and "a"
> 
> I have a slight preference to use ints for the flags, not Strings.

I typically prefer ints as well.  However, since RandomAccessFile uses
strings for the access mode, I stayed with that approach.
 
> Jeroen> - write(byte[] buf, long offset, long length) should not use longs for
> Jeroen> offset and length
> Jeroen> - nativeReadByte shouldn't return a long
> 
> Agreed.  In general the argument and return types should match what
> the higher-level API is capable of.  So for instance the byte argument
> to nativeWriteByte should just be an `int', as that is what is used in
> the other layers.  Then we don't need casts anywhere.

I'm happy to make everything an int.  I think we only need a few things
like nativeFd to be longs in order to assure 64bit compatibility.  What do 
you think?
 
> I don't understand why there is a nativeValid method and checks for
> nativeFd==-1.  Shouldn't these be the same?  If not, when will they be
> different?  I think I see `nativeValid' as testing `is this
> FileDescriptor valid?'.

The Classpath implementation does a random operation on the file descriptor
to see if it works as an extra test.  It probably isn't really necessary.
Can we always guarantee that we'll never have to do a native call to
verify the validity of a file descriptor?  Can we just rely on the -1
always?

I did put -1 checks and lots of other validity checks into the Java method
wrappering ever native operation.  No need to drop to native to do checks
that are just going to fail.

> In close(), if nativeClose throws an exception, won't the
> FileDescriptor be left in an inconsistent state?

I'll take a look.  I think we should make sure that the file is marked
closed no matter what.  (What else would we do?  Leave it open and let
someone try to close it again?)_

-- 
Aaron M. Renn (arenn@urbanophile.com) http://www.urbanophile.com/arenn/




From MAILER-DAEMON Sat Mar 08 04:50:58 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18rayo-0003IY-00
	for mharc-classpath@gnu.org; Sat, 08 Mar 2003 04:50:58 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18rayl-0003CS-00
	for classpath@gnu.org; Sat, 08 Mar 2003 04:50:55 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18rayg-00032W-00
	for classpath@gnu.org; Sat, 08 Mar 2003 04:50:53 -0500
Received: from amsfep12-int.chello.nl ([213.46.243.18])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18rayg-0002xf-00
	for classpath@gnu.org; Sat, 08 Mar 2003 04:50:50 -0500
Received: from node-c-048a.a2000.nl ([62.194.4.138])
	by amsfep12-int.chello.nlESMTP
	<20030308095046.SLZJ21189.amsfep12-int.chello.nl@node-c-048a.a2000.nl>;
	Sat, 8 Mar 2003 10:50:46 +0100
From: Dhek Bhun Kho <bhun@chello.nl>
To: classpath@gnu.org
In-Reply-To: <8765qvxdvy.fsf@fleche.redhat.com>
References: <200303071427.h27ERC826578@mailgate5.cinetic.de>
	 <8765qvxdvy.fsf@fleche.redhat.com>
Content-Type: text/plain
Organization: 
Message-Id: <1047120658.2185.5.camel@tasslehof.bhun.net>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.2.2- 
Date: 08 Mar 2003 11:50:59 +0100
Content-Transfer-Encoding: 7bit
Subject: Re: Want to help in integrating swing. Really last question.
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sat, 08 Mar 2003 09:50:56 -0000

Op vr 07-03-2003, om 18:52 schreef Tom Tromey:

> Clemens> My questions is, if it would be a problem to contribute to
> Clemens> classpath, when the contributed code doesnt work with
> Clemens> classpath alone.
> 
> Provided that the code is using the documented AWT API, I don't
> think there is a problem if it doesn't run using the Classpath AWT.

So the best bet would be starting off getting all the funny parts of the
JComponent to work on a JDK 1.1 reference implementation? (Again I can
be a complete moron now and then). I hope get to start some coding at
the end of this week.

Ey Clemens, do you have some shared webspace somewhere? Want to work
together on this? Otherwise we'd be working in parallel on the same
areas: waste of time.

(I saw a stack trace last night on the usenet. Note: it seems the SunVM
is using GL4Java in the 1.4 jdk (or is that old news? It is no real
importance to get Swing implemented)


--- 
Johnson's First Law: When any mechanical contrivance fails, it will do
so at the most inconvenient possible time.




From MAILER-DAEMON Sat Mar 08 05:12:59 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18rbK6-000453-00
	for mharc-classpath@gnu.org; Sat, 08 Mar 2003 05:12:58 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18rbK4-00040b-00
	for classpath@gnu.org; Sat, 08 Mar 2003 05:12:56 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18rbK1-0003yO-00
	for classpath@gnu.org; Sat, 08 Mar 2003 05:12:55 -0500
Received: from mailgate5.cinetic.de ([217.72.192.165])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18rbK1-0003vK-00
	for classpath@gnu.org; Sat, 08 Mar 2003 05:12:53 -0500
Received: from web.de (fmomail01.dlan.cinetic.de [172.20.1.45])
	SMTP id h28ACq819540
	for classpath@gnu.org; Sat, 8 Mar 2003 11:12:52 +0100
Date: Sat, 8 Mar 2003 11:12:52 +0100
Message-Id: <200303081012.h28ACq819540@mailgate5.cinetic.de>
MIME-Version: 1.0
Organization: http://freemail.web.de/
From: Clemens Eisserer <Linuxhippy@web.de>
To: classpath@gnu.org
Precedence: fm-user
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Subject: Re: Re: Want to help in integrating swing. Really last question.
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sat, 08 Mar 2003 10:12:56 -0000

Hi!
Hi!

> So the best bet would be starting off getting all the funny parts of the
> JComponent to work on a JDK 1.1 reference implementation? (Again I can
> be a complete moron now and then). I hope get to start some coding at
> the end of this week.
I used a jdk1.2 where I removed all the swing-stuff out of the JDK.
Because jdk1.1 doesnt support inner classes which are used in swing-programs.

> Ey Clemens, do you have some shared webspace somewhere? Want to work
> together on this? Otherwise we'd be working in parallel on the same
> areas: waste of time.
Hmmm, what do you think about soureforge?

> (I saw a stack trace last night on the usenet. Note: it seems the SunVM
> is using GL4Java in the 1.4 jdk (or is that old news? It is no real
> importance to get Swing implemented)
Hmm, I thought a bit about that. 
I think its better we do it normal on the top of awt-drawing-functions, otherwise we need to implement a lightweight awt....

cu Linuxhippy


______________________________________________________________________________
Keine Lust, immer Ihre Adressdaten in eine E-Mail zu schreiben? Mit der
vCard ist Schluss damit! Infos - http://freemail.web.de/features/?mc=021153




From MAILER-DAEMON Sat Mar 08 06:06:31 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18rc8l-0001gK-00
	for mharc-classpath@gnu.org; Sat, 08 Mar 2003 06:05:19 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18rc7o-0001OI-00
	for classpath@gnu.org; Sat, 08 Mar 2003 06:04:20 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18rc7c-0001J3-00
	for classpath@gnu.org; Sat, 08 Mar 2003 06:04:15 -0500
Received: from smtp.wp.pl ([212.77.101.161])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18rc7Z-00014W-00
	for classpath@gnu.org; Sat, 08 Mar 2003 06:04:06 -0500
Received: (WP-SMTPD 5994 invoked from network); 8 Mar 2003 11:04:01 -0000
Received: from mizzar.multicon.pl (HELO wp.pl) (abies00@[213.77.83.2])
          (envelope-sender <abies00@wp.pl>)
          by smtp.wp.pl (wp-smtpd) with SMTP
          for <classpath@gnu.org>; 8 Mar 2003 11:04:00 -0000
Message-ID: <3E69CE1D.50502@wp.pl>
Date: Sat, 08 Mar 2003 12:03:57 +0100
From: Artur Biesiadowski <abies00@wp.pl>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
	rv:1.3a) Gecko/20021212
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: GNU Classpath <classpath@gnu.org>
References: <200303071427.h27ERC826578@mailgate5.cinetic.de>
	<8765qvxdvy.fsf@fleche.redhat.com>
	<1047120658.2185.5.camel@tasslehof.bhun.net>
In-Reply-To: <1047120658.2185.5.camel@tasslehof.bhun.net>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-AntiVirus: skaner antywirusowy poczty Wirtualnej Polski S. A.
X-WP-ChangeAV: 0
Subject: Re: Want to help in integrating swing. Really last question.
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
Reply-To: abies@pg.gda.pl
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sat, 08 Mar 2003 11:05:17 -0000

Dhek Bhun Kho wrote:

> (I saw a stack trace last night on the usenet. Note: it seems the SunVM
> is using GL4Java in the 1.4 jdk (or is that old news? It is no real
> importance to get Swing implemented)

How have you came to conclusion that SunVM actually uses GL4Java ? There 
is no such point in this stack trace which hints about this - even if 
there would be, I would expect that given person has replaced awt 
toolkit by hand.

Sun uses DirectX on windows platform, with more or less success, but it 
does NOT use opengl - and certainly not this specific implementation 
(GL4Java).

Artur




From MAILER-DAEMON Sat Mar 08 08:23:54 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18reIr-0002RP-00
	for mharc-classpath@gnu.org; Sat, 08 Mar 2003 08:23:53 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18reIo-0002HQ-00
	for classpath@gnu.org; Sat, 08 Mar 2003 08:23:50 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18reIa-0001tu-00
	for classpath@gnu.org; Sat, 08 Mar 2003 08:23:38 -0500
Received: from smtp.easynet.ch ([217.8.192.20] helo=smtp1.mail.ch.easynet.net)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18reHX-0000ri-00
	for classpath@gnu.org; Sat, 08 Mar 2003 08:22:31 -0500
Received: from [192.168.1.33] (197.41.dyn-adsl.customer.ch.easynet.net
	[217.8.197.41])	by smtp1.mail.ch.easynet.net (Postfix) with ESMTP
	id D9D684A316; Sat,  8 Mar 2003 14:17:07 +0100 (CET)
From: Sascha Brawer <brawer@acm.org>
To: GNU Classpath <classpath@gnu.org>
Date: Sat, 8 Mar 2003 14:22:15 +0100
Message-Id: <20030308132215.9104@smtp.mail.ch.easynet.net>
In-Reply-To: <3E69CE1D.50502@wp.pl>
References: <3E69CE1D.50502@wp.pl>
X-Mailer: CTM PowerMail 3.1.1 carbon <http://www.ctmdev.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
cc: abies@pg.gda.pl
Subject: Re: Want to help in integrating swing. Really last question.
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sat, 08 Mar 2003 13:23:52 -0000

Artur Biesiadowski <abies00@wp.pl> wrote on Sat, 8 Mar 2003 12:03:57 +0100:

>Sun uses DirectX on windows platform, with more or less success, but it 
>does NOT use opengl - and certainly not this specific implementation 
>(GL4Java).

However, there exists a library which allows the Sun Java 2D
implementation to run on top of OpenGL (using GL4Java). See http://
www.cs.umd.edu/hcil/agile2d/

-- Sascha Brawer





From MAILER-DAEMON Sat Mar 08 09:34:47 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18rfPC-0007UI-00
	for mharc-classpath@gnu.org; Sat, 08 Mar 2003 09:34:30 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18rfOh-0006Ji-00
	for classpath@gnu.org; Sat, 08 Mar 2003 09:33:59 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18rfNX-0004hD-00
	for classpath@gnu.org; Sat, 08 Mar 2003 09:32:49 -0500
Received: from smtp.wp.pl ([212.77.101.161])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18rfMn-0004IX-00
	for classpath@gnu.org; Sat, 08 Mar 2003 09:32:02 -0500
Received: (WP-SMTPD 24671 invoked from network); 8 Mar 2003 14:31:59 -0000
Received: from mizzar.multicon.pl (HELO wp.pl) (abies00@[213.77.83.2])
          (envelope-sender <abies00@wp.pl>)
          by smtp.wp.pl (wp-smtpd) with SMTP
          for <classpath@gnu.org>; 8 Mar 2003 14:31:59 -0000
Message-ID: <3E69FEE2.9000600@wp.pl>
Date: Sat, 08 Mar 2003 15:32:02 +0100
From: Artur Biesiadowski <abies00@wp.pl>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
	rv:1.3a) Gecko/20021212
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: GNU Classpath <classpath@gnu.org>
References: <3E69CE1D.50502@wp.pl>
	<20030308132215.9104@smtp.mail.ch.easynet.net>
In-Reply-To: <20030308132215.9104@smtp.mail.ch.easynet.net>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-AntiVirus: skaner antywirusowy poczty Wirtualnej Polski S. A.
X-WP-ChangeAV: 0
Subject: Opengl java2d implementation (Was: Re: Want to help in integrating
 swing. Really last question.)
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
Reply-To: abies@pg.gda.pl
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sat, 08 Mar 2003 14:34:27 -0000

Sascha Brawer wrote:
> 
> However, there exists a library which allows the Sun Java 2D
> implementation to run on top of OpenGL (using GL4Java). See http://
> www.cs.umd.edu/hcil/agile2d/

Yes, I know, it was discussed on this list two or three months ago. 
Their implementation covers basic 2d functionality, but none of really 
complicated stuff is implemented (raster-based functionality, meaning 
composites, paints, etc). I have done some experiments on implementing 
opengl java2d myself, but it seems that full software path has to be 
implemented anyway for most complicated cases. Which leaves opengl only 
for acceleration (and not as I have hoped, for simplifying part of 
implementation).

Question is if classpath will have any benefits from having 70% complete 
accelerated java2d implementation, at the same time requiring additional 
100% work to get rest of stuff implemented (not just 30%, as base stuff 
would need to be reimplemented to pure-software path), plus code being a 
lot more complicated due to need for fallbacks from acceleration 
everywhere ?

Artur




From MAILER-DAEMON Sat Mar 08 10:02:22 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18rfpA-0005zg-00
	for mharc-classpath@gnu.org; Sat, 08 Mar 2003 10:01:20 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18rfop-00053n-00
	for classpath@gnu.org; Sat, 08 Mar 2003 10:00:59 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18rfok-0004p1-00
	for classpath@gnu.org; Sat, 08 Mar 2003 10:00:57 -0500
Received: from ms-smtp-03.southeast.rr.com ([24.93.67.84])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18rfoN-0004Aw-00
	for classpath@gnu.org; Sat, 08 Mar 2003 10:00:31 -0500
Received: from mail3.nc.rr.com (fe3 [24.93.67.50])h28ExRH6014898;
	Sat, 8 Mar 2003 09:59:27 -0500 (EST)
Received: from lyta.haphazard.org ([66.57.9.48]) by mail3.nc.rr.com  with
	Microsoft SMTPSVC(5.5.1877.757.75);	 Sat, 8 Mar 2003 09:58:26 -0500
Received: by lyta.haphazard.org (Postfix, from userid 500)
	id 45FF7BE69E; Sat,  8 Mar 2003 10:00:30 -0500 (EST)
Sender: cbj@haphazard.org
To: Clemens Eisserer <Linuxhippy@web.de>
References: <200303081012.h28ACq819540@mailgate5.cinetic.de>
From: Brian Jones <cbj@gnu.org>
Date: 08 Mar 2003 10:00:30 -0500
In-Reply-To: <200303081012.h28ACq819540@mailgate5.cinetic.de>
Message-ID: <m3of4l52ep.fsf@lyta.haphazard.org>
Lines: 14
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: classpath@gnu.org
Subject: Re: Want to help in integrating swing. Really last question.
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sat, 08 Mar 2003 15:01:14 -0000

Clemens Eisserer <Linuxhippy@web.de> writes:

> > Ey Clemens, do you have some shared webspace somewhere? Want to work
> > together on this? Otherwise we'd be working in parallel on the same
> > areas: waste of time.
>
> Hmmm, what do you think about soureforge?

Btw, you can have access to Classpath's CVS after we've taken care of
assignment paperwork.  How does that sound?

Brian
-- 
Brian Jones <cbj@gnu.org>



From MAILER-DAEMON Sat Mar 08 10:45:04 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18rgVT-00014A-00
	for mharc-classpath@gnu.org; Sat, 08 Mar 2003 10:45:03 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18rgVR-000137-00
	for classpath@gnu.org; Sat, 08 Mar 2003 10:45:01 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18rgVQ-0000zd-00
	for classpath@gnu.org; Sat, 08 Mar 2003 10:45:00 -0500
Received: from adsl-216-102-199-253.dsl.snfc21.pacbell.net ([216.102.199.253]
	helo=bothner.com)	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18rgVP-0000uf-00; Sat, 08 Mar 2003 10:44:59 -0500
Received: from bothner.com (eureka.bothner.com [192.168.1.9])
	by bothner.com (8.12.8/8.12.8) with ESMTP id h28FkApj011977;
	Sat, 8 Mar 2003 07:46:11 -0800
Message-ID: <3E6A09C2.5030008@bothner.com>
Date: Sat, 08 Mar 2003 07:18:26 -0800
From: Per Bothner <per@bothner.com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3b) Gecko/20030210
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: Brian Jones <cbj@gnu.org>
References: <200303081012.h28ACq819540@mailgate5.cinetic.de>
	<m3of4l52ep.fsf@lyta.haphazard.org>
In-Reply-To: <m3of4l52ep.fsf@lyta.haphazard.org>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
cc: classpath@gnu.org
Subject: Re: Want to help in integrating swing. Really last question.
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sat, 08 Mar 2003 15:45:02 -0000

Brian Jones wrote:
> Clemens Eisserer <Linuxhippy@web.de> writes:
> 
> 
>>>Ey Clemens, do you have some shared webspace somewhere? Want to work
>>>together on this? Otherwise we'd be working in parallel on the same
>>>areas: waste of time.
>>
>>Hmmm, what do you think about soureforge?
> 
> 
> Btw, you can have access to Classpath's CVS after we've taken care of
> assignment paperwork.  How does that sound?

We want to avoid sourceforge, especially for GNU projects.
Better to use savannah.gnu.org (not just for GNU projects).

 > Btw, you can have access to Classpath's CVS after we've taken care of
 > assignment paperwork.  How does that sound?

Which sounds like the best solution.
-- 
	--Per Bothner
per@bothner.com   http://www.bothner.com/per/




From MAILER-DAEMON Sat Mar 08 10:54:53 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18rge0-00031s-00
	for mharc-classpath@gnu.org; Sat, 08 Mar 2003 10:53:52 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18rgdm-0002to-00
	for classpath@gnu.org; Sat, 08 Mar 2003 10:53:38 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18rgdg-0002ky-00
	for classpath@gnu.org; Sat, 08 Mar 2003 10:53:33 -0500
Received: from octopussy.utanet.at ([213.90.36.45])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18rgdX-0002RJ-00
	for classpath@gnu.org; Sat, 08 Mar 2003 10:53:23 -0500
Received: from paris.utanet.at ([213.90.36.7])
	by octopussy.utanet.at with esmtp (Exim 4.10)
	id 18rgdV-0007nN-00
	for classpath@gnu.org; Sat, 08 Mar 2003 16:53:21 +0100
Received: from linzu1-208-13.utaonline.at ([212.152.208.13] helo=web.de)
	by paris.utanet.at with esmtp (Exim 4.10)
	id 18rgdU-0005ko-00
	for classpath@gnu.org; Sat, 08 Mar 2003 16:53:21 +0100
Message-ID: <3E6A11E9.6010002@web.de>
Date: Sat, 08 Mar 2003 16:53:13 +0100
From: Linuxhippy <linuxhippy@web.de>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; de-DE;
	rv:1.0.2) Gecko/20030208 Netscape/7.02
X-Accept-Language: de-de, de
MIME-Version: 1.0
To: classpath@gnu.org
References: <200303081012.h28ACq819540@mailgate5.cinetic.de>
	<m3of4l52ep.fsf@lyta.haphazard.org>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Subject: Re: Want to help in integrating swing. Really last question.
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sat, 08 Mar 2003 15:53:50 -0000

Hi there!

>Btw, you can have access to Classpath's CVS after we've taken care of
>assignment paperwork.  How does that sound?
>
Sounds also good too, puh its time for learnin CVS.

@SWING:
I looked at the sources of Classpath today, and puh, it seems harder 
than i thought first.
Maybe I didnt say it before, I'm not so experienced with swing, I spent 
most time playing with native peers.

So please do not expect "Great, this guy will solve all our problems".
I'm not an very experienced coder , but I love OpenSource-Software 
(althought i dont understand those gnu or nothing people) and I want to 
give my best. I'm now 17 and starting with June15th there are now more 
tests at school, which means really hard coding time.

So please be not angry, if anything doesnt work like expected, I'll give 
my best, and I promise to work hard!

Btw.: Does anybody know good tutorials about the swing-internals, 
because its not allowed to look at sun-sources, its for a newbie like me 
quite hard to work only with apidoc.

Thanks for all,
cu Clemens




From MAILER-DAEMON Sat Mar 08 11:47:34 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18rhTZ-0005wn-00
	for mharc-classpath@gnu.org; Sat, 08 Mar 2003 11:47:09 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18rhTN-0005Uv-00
	for classpath@gnu.org; Sat, 08 Mar 2003 11:46:57 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18rhT7-0004c7-00
	for classpath@gnu.org; Sat, 08 Mar 2003 11:46:43 -0500
Received: from web10003.mail.yahoo.com ([216.136.130.39])
	by monty-python.gnu.org with smtp (Exim 4.10.13)
	id 18rhSY-0003pO-00
	for classpath@gnu.org; Sat, 08 Mar 2003 11:46:06 -0500
Message-ID: <20030308164605.49773.qmail@web10003.mail.yahoo.com>
Received: from [139.19.20.90] by web10003.mail.yahoo.com via HTTP;
	Sat, 08 Mar 2003 08:46:05 PST
Date: Sat, 8 Mar 2003 08:46:05 -0800 (PST)
From: Dalibor Topic <robilad@yahoo.com>
To: Linuxhippy <linuxhippy@web.de>, classpath@gnu.org
In-Reply-To: <3E6A11E9.6010002@web.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Subject: Re: Want to help in integrating swing. Really last question.
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sat, 08 Mar 2003 16:47:07 -0000


--- Linuxhippy <linuxhippy@web.de> wrote:

> Btw.: Does anybody know good tutorials about the
> swing-internals, 
> because its not allowed to look at sun-sources, its
> for a newbie like me 
> quite hard to work only with apidoc.

Unfortunately, I'm not aware of an offer of similar
quality like the 'Java Class Libraries' by Chen et.
al. for SWING.

There is Sun's Swing tutorial [1], which provides a
reasonable overview of how the things are supposed to
be used.

You can read some interesting articles on SWING on the
SWING connection [2].

The apparently rather good Swing book by Robinson and
Vorobiev is avaliable online [3].

hope this helps,
dalibor topic

[1]
http://java.sun.com/docs/books/javatutorial/jfc.html
[2] http://java.sun.com/products/jfc/tsc/index.html
[3] http://manning.spindoczine.com/sbe/


__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/



From MAILER-DAEMON Sat Mar 08 15:51:43 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18rlIE-00057T-00
	for mharc-classpath@gnu.org; Sat, 08 Mar 2003 15:51:42 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18rlHy-0004tt-00
	for classpath@gnu.org; Sat, 08 Mar 2003 15:51:26 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18rlGt-00042b-00
	for classpath@gnu.org; Sat, 08 Mar 2003 15:50:20 -0500
Received: from ms-smtp-03.southeast.rr.com ([24.93.67.84])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18rlGd-0003PN-00
	for classpath@gnu.org; Sat, 08 Mar 2003 15:50:03 -0500
Received: from mail4.nc.rr.com (fe4 [24.93.67.51])h28KlZHc001251;
	Sat, 8 Mar 2003 15:48:58 -0500 (EST)
Received: from lyta.haphazard.org ([66.57.9.48]) by mail4.nc.rr.com  with
	Microsoft SMTPSVC(5.5.1877.757.75);	 Sat, 8 Mar 2003 15:50:36 -0500
Received: by lyta.haphazard.org (Postfix, from userid 500)
	id BF6FEBE69E; Sat,  8 Mar 2003 15:49:09 -0500 (EST)
Sender: cbj@haphazard.org
To: Dalibor Topic <robilad@yahoo.com>
References: <20030308164605.49773.qmail@web10003.mail.yahoo.com>
From: Brian Jones <cbj@gnu.org>
Date: 08 Mar 2003 15:49:09 -0500
In-Reply-To: <20030308164605.49773.qmail@web10003.mail.yahoo.com>
Message-ID: <m3el5h4m9m.fsf@lyta.haphazard.org>
Lines: 38
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: classpath@gnu.org
cc: Linuxhippy <linuxhippy@web.de>
Subject: Re: Want to help in integrating swing. Really last question.
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sat, 08 Mar 2003 20:51:40 -0000

Dalibor Topic <robilad@yahoo.com> writes:

> --- Linuxhippy <linuxhippy@web.de> wrote:
> 
> > Btw.: Does anybody know good tutorials about the
> > swing-internals, 
> > because its not allowed to look at sun-sources, its
> > for a newbie like me 
> > quite hard to work only with apidoc.
> 
> Unfortunately, I'm not aware of an offer of similar
> quality like the 'Java Class Libraries' by Chen et.
> al. for SWING.
> 
> There is Sun's Swing tutorial [1], which provides a
> reasonable overview of how the things are supposed to
> be used.
> 
> You can read some interesting articles on SWING on the
> SWING connection [2].
> 
> The apparently rather good Swing book by Robinson and
> Vorobiev is avaliable online [3].
> 
> hope this helps,
> dalibor topic
> 
> [1]
> http://java.sun.com/docs/books/javatutorial/jfc.html
> [2] http://java.sun.com/products/jfc/tsc/index.html
> [3] http://manning.spindoczine.com/sbe/

O'Reilly's Swing book offers a little insight into the internals of
Swing, it does talk about making your own L&F.

Brian
-- 
Brian Jones <cbj@gnu.org>



From MAILER-DAEMON Sat Mar 08 16:09:27 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18rlZJ-0002GC-00
	for mharc-classpath@gnu.org; Sat, 08 Mar 2003 16:09:21 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18rlZ3-0001pJ-00
	for classpath@gnu.org; Sat, 08 Mar 2003 16:09:05 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18rlYI-00014Y-00
	for classpath@gnu.org; Sat, 08 Mar 2003 16:08:18 -0500
Received: from 12-235-115-156.client.attbi.com ([12.235.115.156] helo=blossom)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18rlXn-0000Oc-00
	for classpath@gnu.org; Sat, 08 Mar 2003 16:07:47 -0500
Received: from dexter ([192.168.0.2])
	by blossom with esmtp (Exim 3.35 #1 (Debian))
	id 18rlXl-0003Jo-00; Sat, 08 Mar 2003 13:07:45 -0800
From: Casey Marshall <rsdio@metastatic.org>
To: Classpath <classpath@gnu.org>
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="=-idxAuwzY9D60KVl6Ojqq"
Organization: 
Message-Id: <1047157664.2226.6.camel@dexter.attbi.com>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.2.1- 
Date: 08 Mar 2003 13:07:44 -0800
cc: GCC Java <java-patches@gcc.gnu.org>
cc: Tom Tromey <tromey@redhat.com>
Subject: [PATCH] java.security miscellany
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sat, 08 Mar 2003 21:09:09 -0000


--=-idxAuwzY9D60KVl6Ojqq
Content-Type: multipart/mixed; boundary="=-/14rktsROOHq8FIxovao"


--=-/14rktsROOHq8FIxovao
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Attached are the java.security patches I posted earlier, reformatted
slightly. My paperwork for GCC and Classpath is through (I haven't
gotten the photocopies back, but Jessica sent me a message saying they
have been accepted).

I am having some difficulties talking with subversions right now;
hopefully the patches are not corrupt.

Cheers,

--=20
Casey Marshall || rsdio@metastatic.org

--=-/14rktsROOHq8FIxovao
Content-Disposition: attachment; filename=libjava.patch
Content-Type: text/x-patch; name=libjava.patch; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Index: libjava/Makefile.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/gcc/gcc/libjava/Makefile.am,v
retrieving revision 1.277
diff -u -r1.277 Makefile.am
--- libjava/Makefile.am	13 Feb 2003 07:45:57 -0000	1.277
+++ libjava/Makefile.am	8 Mar 2003 20:50:52 -0000
@@ -2237,6 +2237,7 @@
 java/security/DigestInputStream.java \
 java/security/DomainCombiner.java \
 java/security/DummyMessageDigest.java \
+java/security/Engine.java \
 java/security/GeneralSecurityException.java \
 java/security/Guard.java \
 java/security/GuardedObject.java \
Index: libjava/java/security/AlgorithmParameterGenerator.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/gcc/gcc/libjava/java/security/AlgorithmParameterGenerato=
r.java,v
retrieving revision 1.2
diff -u -r1.2 AlgorithmParameterGenerator.java
--- libjava/java/security/AlgorithmParameterGenerator.java	22 Jan 2002 22:4=
0:30 -0000	1.2
+++ libjava/java/security/AlgorithmParameterGenerator.java	8 Mar 2003 20:50=
:55 -0000
@@ -1,5 +1,5 @@
 /* AlgorithmParameterGenerator.java --- Algorithm Parameter Generator
-   Copyright (C) 1999 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2003 Free Software Foundation, Inc.
=20
 This file is part of GNU Classpath.
=20
@@ -39,20 +39,43 @@
 import java.security.spec.AlgorithmParameterSpec;
=20
 /**
-   AlgorithmParameterGenerator is used to generate=20
-   algorithm parameters for specified algorithms.
-   This class is used to generate the algorithm parameters
-   for a specific algorithm.
-
-   @since JDK 1.2
-   @author Mark Benvenuto
+ * Algorithm parameter generators produce {@link AlgorithmParameters}
+ * for various cryptographic algorithms.
+ *
+ * <p>Parameter generation my be done in an either algorithm-independent
+ * or -dependent fashion. The algorithm-independent way takes only a
+ * single integer argument (or a default) that is typically interpreted
+ * as the "size" -- for example in the case of the <acronym
+ * name=3D"Digital Signature Algorithm">DSA</acronym> signature
+ * algorithm this is the size of the prime modulus, in bits.
+ *
+ * <p>The algorithm-dependent approach takes a parameter specification
+ * as its argument (an implementation of {@link AlgorithmParameterSpec}),
+ * and from that produces the appropriate algorithm parameters.
+ *
+ * @see AlgorithmParameters
+ * @see AlgorithmParameterSpec
+ * @since JDK 1.2
+ * @author Mark Benvenuto
+ * @author Casey Marshall
  */
 public class AlgorithmParameterGenerator
 {
+
+  // Constants and fields.
+  // ---------------------------------------------------------------------=
---
+
+  /** Service name for algorithm parameter generators. */
+  private static final String ALGORITHM_PARAMETER_GENERATOR =3D
+    "AlgorithmParameterGenerator";
+
   private AlgorithmParameterGeneratorSpi paramGenSpi;
   private Provider provider;
   private String algorithm;
=20
+  // Constructor.
+  // ---------------------------------------------------------------------=
---
+
   /**
      Creates an instance of AlgorithmParameters
=20
@@ -69,25 +92,19 @@
     this.algorithm =3D algorithm;
   }
=20
-  /**
-     Returns the name of the algorithm used
-
-     @return A string with the name of the algorithm
-   */
-  public final String getAlgorithm()
-  {
-    return algorithm;
-  }
+  // Class methods.
+  // ---------------------------------------------------------------------=
---
=20
   /**=20
-     Gets an instance of the AlgorithmParameterGenerator class=20
-     which generates algorithm parameters for the specified algorithm.=20
-     If the algorithm is not found then, it throws NoSuchAlgorithmExceptio=
n.
-
-     @param algorithm the name of algorithm to choose
-     @return a AlgorithmParameterGenerator repesenting the desired algorit=
hm
-
-     @throws NoSuchAlgorithmException if the algorithm is not implemented =
by providers
+   * Gets an instance of the AlgorithmParameterGenerator class=20
+   * which generates algorithm parameters for the specified algorithm.=20
+   * If the algorithm is not found then, it throws NoSuchAlgorithmExceptio=
n.
+   *
+   * @param algorithm the name of algorithm to choose
+   * @return a AlgorithmParameterGenerator repesenting the desired algorit=
hm
+   *
+   * @throws NoSuchAlgorithmException if the algorithm is not implemented =
by
+   *         providers, or if the implmementation cannot be instantiated.
    */
   public static AlgorithmParameterGenerator getInstance(String algorithm)
     throws NoSuchAlgorithmException
@@ -96,65 +113,90 @@
=20
     for (int i =3D 0; i < p.length; i++)
       {
-	String classname =3D
-	  p[i].getProperty("AlgorithmParameterGenerator." + algorithm);
-	if (classname !=3D null)
-	  return getInstance(classname, algorithm, p[i]);
+        try
+          {
+            return getInstance(algorithm, p[i]);
+          }
+        catch (NoSuchAlgorithmException ignore)
+          {
+          }
       }
=20
     throw new NoSuchAlgorithmException(algorithm);
   }
=20
   /**=20
-     Gets an instance of the AlgorithmParameterGenerator class=20
-     which generates algorithm parameters for the specified algorithm.=20
-     If the algorithm is not found then, it throws NoSuchAlgorithmExceptio=
n.
-
-     @param algorithm the name of algorithm to choose
-     @param provider the name of the provider to find the algorithm in
-     @return a AlgorithmParameterGenerator repesenting the desired algorit=
hm
-
-     @throws NoSuchAlgorithmException if the algorithm is not implemented =
by the provider
-     @throws NoSuchProviderException if the provider is not found
+   * Get an algorithm parameter generator for the given algorithm from
+   * the named provider.
+   *
+   * @param algorithm the name of algorithm to choose
+   * @param provider the name of the provider to find the algorithm in
+   * @return an AlgorithmParameterGenerator for the desired algorithm
+   *
+   * @throws NoSuchAlgorithmException if the algorithm is not implemented
+   *         by the provider, or if the implementation cannot be
+   *         instantiated.
+   * @throws NoSuchProviderException If there is no provider named
+   *         <code>provider</code> currently installed.
+   * @throws IllegalArgumentException If <code>provider</code> is null
+   *         or empty.
    */
-  public static AlgorithmParameterGenerator getInstance(String algorithm,
-							String provider)
-    throws NoSuchAlgorithmException, NoSuchProviderException
+  public static AlgorithmParameterGenerator
+  getInstance(String algorithm, String provider)
+  throws NoSuchAlgorithmException, NoSuchProviderException
   {
+    if (provider =3D=3D null || provider.length() =3D=3D 0)
+      throw new IllegalArgumentException("Illegal provider");
+
     Provider p =3D Security.getProvider(provider);
     if (p =3D=3D null)
       throw new NoSuchProviderException();
=20
-    return getInstance(p.
-		       getProperty("AlgorithmParameterGenerator." +
-				   algorithm), algorithm, p);
+    return getInstance(algorithm, p);
   }
=20
-  private static AlgorithmParameterGenerator getInstance(String classname,
-							 String algorithm,
-							 Provider provider)
-    throws NoSuchAlgorithmException
+  /**
+   * Get an algorithm parameter generator for the given algorithm from
+   * the specified provider.
+   *
+   * @param algorithm The algorithm to get the parameter generator for.
+   * @param provider  The provider to get the implementation from.
+   * @throws NoSuchAlgorithmException If the provider does not implement
+   *         a parameter generator for the given algorithm, or if the
+   *         implementation cannot be instantiated.
+   * @throws IllegalArgumentExcpetion If <code>provider</code> is null.
+   * @since 1.4
+   */
+  public static AlgorithmParameterGenerator
+  getInstance(String algorithm, Provider provider)
+  throws NoSuchAlgorithmException
   {
-
+    if (provider =3D=3D null)
+      throw new IllegalArgumentException("Illegal provider");
     try
       {
-	return new
-	  AlgorithmParameterGenerator((AlgorithmParameterGeneratorSpi) Class.
-				      forName(classname).newInstance(),
-				      provider, algorithm);
-      }
-    catch (ClassNotFoundException cnfe)
-      {
-	throw new NoSuchAlgorithmException("Class not found");
+        return new AlgorithmParameterGenerator(
+          (AlgorithmParameterGeneratorSpi) Engine.getInstance(
+            ALGORITHM_PARAMETER_GENERATOR, algorithm, provider),
+          provider, algorithm);
       }
-    catch (InstantiationException ie)
+    catch (ClassCastException cce)
       {
-	throw new NoSuchAlgorithmException("Class instantiation failed");
-      }
-    catch (IllegalAccessException iae)
-      {
-	throw new NoSuchAlgorithmException("Illegal Access");
+        throw new NoSuchAlgorithmException(algorithm);
       }
+  }
+
+  // Instance methods.
+  // ---------------------------------------------------------------------=
---
+
+  /**
+     Returns the name of the algorithm used
+
+     @return A string with the name of the algorithm
+   */
+  public final String getAlgorithm()
+  {
+    return algorithm;
   }
=20
   /**
Index: libjava/java/security/AlgorithmParameters.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/gcc/gcc/libjava/java/security/AlgorithmParameters.java,v
retrieving revision 1.2
diff -u -r1.2 AlgorithmParameters.java
--- libjava/java/security/AlgorithmParameters.java	22 Jan 2002 22:40:30 -00=
00	1.2
+++ libjava/java/security/AlgorithmParameters.java	8 Mar 2003 20:50:55 -000=
0
@@ -1,5 +1,5 @@
 /* AlgorithmParameters.java --- Algorithm Parameters Implementation Class
-   Copyright (C) 1999 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2003 Free Software Foundation, Inc.
=20
 This file is part of GNU Classpath.
=20
@@ -35,26 +35,43 @@
 obligated to do so.  If you do not wish to do so, delete this
 exception statement from your version. */
=20
-
 package java.security;
+
 import java.security.spec.InvalidParameterSpecException;
 import java.security.spec.AlgorithmParameterSpec;
 import java.io.IOException;
=20
 /**
-   AlgorithmParameters is the Algorithm Parameters class which=20
-   provides an interface through which to modify parameters for=20
-   classes. This class is used to manage the algorithm parameters.
-
-   @since JDK 1.2
-   @author Mark Benvenuto
+ * An opaque representation of a cryptographic algorithm's parameters.
+ *
+ * <p>This class provides methods for encoding and decoding algorithm
+ * parameters to and from standard formats (<acronym
+ * name=3D"Abstract Syntax Notation One">ASN.1</acronym> for example), and
+ * for translating parameters to and from transparent representations
+ * (subclasses of {@link AlgorithmParameterSpec}).
+ *
+ * @see AlgorithmParameterGenerator
+ * @see AlgorithmParameterSpec
+ * @since JDK 1.2
+ * @author Mark Benvenuto
+ * @author Casey Marshall
  */
 public class AlgorithmParameters
 {
+
+  // Constants and fields.
+  // ---------------------------------------------------------------------=
---
+
+  /** Service name for algorithm parameters. */
+  private static final String ALGORITHM_PARAMETERS =3D "AlgorithmParameter=
s";
+
   private AlgorithmParametersSpi paramSpi;
   private Provider provider;
   private String algorithm;
=20
+  // Constructor.
+  // ---------------------------------------------------------------------=
---
+
   /**
      Creates an instance of AlgorithmParameters
=20
@@ -70,28 +87,17 @@
     this.algorithm =3D algorithm;
   }
=20
-  /**
-     Returns the name of the algorithm used
+  // Class methods.
+  // ---------------------------------------------------------------------=
---
=20
-     @return A string with the name of the algorithm
-   */
-  public final String getAlgorithm()
-  {
-    return algorithm;
-  }
-
-  /**=20
-     Gets an instance of the AlgorithmParameters class representing
-     the specified algorithm parameters. If the algorithm is not=20
-     found then, it throws NoSuchAlgorithmException.
-
-     The returned AlgorithmParameters must still be intialized with
-     init().
-
-     @param algorithm the name of algorithm to choose
-     @return a AlgorithmParameters repesenting the desired algorithm
-
-     @throws NoSuchAlgorithmException if the algorithm is not implemented =
by providers
+  /**
+   * Returns an instance of AlgorithmParameters for the given algorithm.
+   *
+   * @param algorithm the name of algorithm to choose
+   * @return An AlgorithmParameters for the given algorithm
+   * @throws NoSuchAlgorithmException If no provider implements algorithm
+   *         parameters for the given algorithm or if no implementation
+   *         can be instantiated.
    */
   public static AlgorithmParameters getInstance(String algorithm) throws
     NoSuchAlgorithmException
@@ -100,68 +106,86 @@
=20
     for (int i =3D 0; i < p.length; i++)
       {
-	String classname =3D
-	  p[i].getProperty("AlgorithmParameters." + algorithm);
-	if (classname !=3D null)
-	  return getInstance(classname, algorithm, p[i]);
+        try
+          {
+            return getInstance(algorithm, p[i]);
+          }
+        catch (NoSuchAlgorithmException ignored)
+          {
+          }
       }
=20
     throw new NoSuchAlgorithmException(algorithm);
   }
=20
-  /**=20
-     Gets an instance of the AlgorithmParameters class representing
-     the specified algorithm parameters from the specified provider.=20
-     If the algorithm is not found then, it throws=20
-     NoSuchAlgorithmException. If the provider is not found, then=20
-     it throws NoSuchProviderException.
-
-     The returned AlgorithmParameters must still be intialized with
-     init().
-
-     @param algorithm the name of algorithm to choose
-     @param provider the name of the provider to find the algorithm in
-     @return a AlgorithmParameters repesenting the desired algorithm
-
-     @throws NoSuchAlgorithmException if the algorithm is not implemented =
by the provider
-     @throws NoSuchProviderException if the provider is not found
+  /**
+   * Returns an instance of AlgorithmParameters for the given algorithm
+   * from the named provider.
+   *
+   * @param algorithm the name of algorithm to choose
+   * @param provider the name of the provider to find the algorithm in
+   * @return a AlgorithmParameters repesenting the desired algorithm
+   * @throws NoSuchAlgorithmException if the algorithm is not implemented =
by
+   *         the provider, or if the implementation cannot be instantiated=
.
+   * @throws NoSuchProviderException If no provider named <code>provider</=
code>
+   *         is installed.
+   * @throws IllegalArgumentException If <code>provider</code> is null
+   *         or is empty.
    */
-  public static AlgorithmParameters getInstance(String algorithm,
-						String provider) throws
-    NoSuchAlgorithmException, NoSuchProviderException
+  public static AlgorithmParameters
+  getInstance(String algorithm, String provider)
+  throws NoSuchAlgorithmException, NoSuchProviderException
   {
+    if (provider =3D=3D null || provider.length() =3D=3D 0)
+      throw new IllegalArgumentException("Illegal provider");
+
     Provider p =3D Security.getProvider(provider);
     if (p =3D=3D null)
       throw new NoSuchProviderException();
=20
-    return getInstance(p.getProperty("AlgorithmParameters." + algorithm),
-		       algorithm, p);
+    return getInstance(algorithm, p);
   }
=20
-  private static AlgorithmParameters getInstance(String classname,
-						 String algorithm,
-						 Provider provider)
-    throws NoSuchAlgorithmException
+  /**
+   * Returns an instance of AlgorithmParameters for the given algorithm
+   * from the specified provider.
+   *
+   * @param algorithm the name of algorithm to choose
+   * @param provider the name of the provider to find the algorithm in
+   * @return a AlgorithmParameters repesenting the desired algorithm
+   * @throws NoSuchAlgorithmException if the algorithm is not implemented =
by
+   *         the provider, or if the implementation cannot be instantiated=
.
+   * @throws IllegalArgumentException If <code>provider</code> is null.
+   */
+  public static AlgorithmParameters
+  getInstance(String algorithm, Provider provider)
+  throws NoSuchAlgorithmException
   {
-
+    if (provider =3D=3D null)
+      throw new IllegalArgumentException("Illegal provider");
     try
       {
-	return new AlgorithmParameters((AlgorithmParametersSpi) Class.
-				       forName(classname).newInstance(),
-				       provider, algorithm);
+        return new AlgorithmParameters((AlgorithmParametersSpi)
+          Engine.getInstance(ALGORITHM_PARAMETERS, algorithm, provider),
+          provider, algorithm);
       }
-    catch (ClassNotFoundException cnfe)
+    catch (ClassCastException cce)
       {
-	throw new NoSuchAlgorithmException("Class not found");
-      }
-    catch (InstantiationException ie)
-      {
-	throw new NoSuchAlgorithmException("Class instantiation failed");
-      }
-    catch (IllegalAccessException iae)
-      {
-	throw new NoSuchAlgorithmException("Illegal Access");
+        throw new NoSuchAlgorithmException(algorithm);
       }
+  }
+
+  // Instnace methods.
+  // ---------------------------------------------------------------------=
---
+
+  /**
+     Returns the name of the algorithm used
+
+     @return A string with the name of the algorithm
+   */
+  public final String getAlgorithm()
+  {
+    return algorithm;
   }
=20
   /**
Index: libjava/java/security/Engine.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: libjava/java/security/Engine.java
diff -N libjava/java/security/Engine.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ libjava/java/security/Engine.java	8 Mar 2003 20:50:55 -0000
@@ -0,0 +1,152 @@
+/* Engine -- generic getInstance method.
+   Copyright (C) 2003  Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+package java.security;
+
+/**
+ * Generic implementation of the getInstance methods in the various
+ * engine classes in java.security.
+ * <p>
+ * These classes ({@link java.security.Signature} for example) can be
+ * thought of as the "chrome, upholstery, and steering wheel", and the SPI
+ * (service provider interface, e.g. {@link java.security.SignatureSpi})
+ * classes can be thought of as the "engine" -- providing the actual
+ * functionality of whatever cryptographic algorithm the instance
+ * represents.
+ *
+ * @see Provider
+ * @author Casey Marshall=20
+ */
+final class Engine
+{
+
+  // Constants.
+  // ---------------------------------------------------------------------=
---
+
+  /** Prefix for aliases. */
+  private static final String ALG_ALIAS =3D "Alg.Alias.";
+
+  /** Maximum number of aliases to try. */
+  private static final int MAX_ALIASES =3D 5;
+
+  // Constructor.
+  // ---------------------------------------------------------------------=
---
+
+  /** This class cannot be instantiated. */
+  private Engine() { }
+
+  // Class method.
+  // ---------------------------------------------------------------------=
---
+
+  /**
+   * Get the implementation for <i>algorithm</i> for service
+   * <i>service</i> from <i>provider</i>. The service is e.g.
+   * "Signature", and the algorithm "DSA".
+   *
+   * @param service   The service name.
+   * @param algorithm The name of the algorithm to get.
+   * @param provider  The provider to get the implementation from.
+   * @return The engine class for the specified algorithm; the object
+   *         returned is typically a subclass of the SPI class for that
+   *         service, but callers should check that this is so.
+   * @throws NoSuchAlgorithmException If the implementation cannot be
+   *         found or cannot be instantiated.
+   * @throws IllegalArgumentException If any of the three arguments are nu=
ll.
+   */
+  static Object
+  getInstance(String service, String algorithm, Provider provider)
+  throws NoSuchAlgorithmException
+  {
+    if (service =3D=3D null || algorithm =3D=3D null || provider =3D=3D nu=
ll)
+      throw new IllegalArgumentException();
+
+    // If there is no property "service.algorithm"
+    if (provider.getProperty(service + "." + algorithm) =3D=3D null)
+      {
+        // Iterate through aliases, until we find the class name or resolv=
e
+        // too many aliases.
+        String alias =3D null;
+        int count =3D 0;
+        while ((alias =3D provider.getProperty(
+                ALG_ALIAS + service + "." + algorithm)) !=3D null)
+          {
+            if (algorithm.equals(alias))  // Refers to itself!
+              break;
+            algorithm =3D alias;
+            if (count++ > MAX_ALIASES)
+              throw new NoSuchAlgorithmException("too many aliases");
+          }
+        if (provider.getProperty(service + "." + algorithm) =3D=3D null)
+          throw new NoSuchAlgorithmException(algorithm);
+      }
+
+    // Find and instantiate the implementation.
+    Class clazz =3D null;
+    ClassLoader loader =3D provider.getClass().getClassLoader();
+    String error =3D algorithm;
+    try
+      {
+        if (loader !=3D null)
+          clazz =3D loader.loadClass(provider.getProperty(service+"."+algo=
rithm));
+        else
+          clazz =3D Class.forName(provider.getProperty(service+"."+algorit=
hm));
+        return clazz.newInstance();
+      }
+    catch (ClassNotFoundException cnfe)
+      {
+        error =3D "class not found: " + algorithm;
+      }
+    catch (IllegalAccessException iae)
+      {
+        error =3D "illegal access: " + iae.getMessage();
+      }
+    catch (InstantiationException ie)
+      {
+        error =3D "instantiation exception: " + ie.getMessage();
+      }
+    catch (ExceptionInInitializerError eiie)
+      {
+        error =3D "exception in initializer: " + eiie.getMessage();
+      }
+    catch (SecurityException se)
+      {
+        error =3D "security exception: " + se.getMessage();
+      }
+
+    throw new NoSuchAlgorithmException(error);
+  }
+}
Index: libjava/java/security/KeyFactory.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/gcc/gcc/libjava/java/security/KeyFactory.java,v
retrieving revision 1.2
diff -u -r1.2 KeyFactory.java
--- libjava/java/security/KeyFactory.java	22 Jan 2002 22:40:30 -0000	1.2
+++ libjava/java/security/KeyFactory.java	8 Mar 2003 20:50:55 -0000
@@ -1,5 +1,5 @@
 /* KeyFactory.java --- Key Factory Class
-   Copyright (C) 1999 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2003 Free Software Foundation, Inc.
=20
 This file is part of GNU Classpath.
=20
@@ -36,31 +36,42 @@
 exception statement from your version. */
=20
 package java.security;
+
 import java.security.spec.KeySpec;
 import java.security.spec.InvalidKeySpecException;
=20
 /**
-   Key factories are used to convert keys (opaque cryptographic=20
-   keys of type Key) into key specifications (transparent=20
-   representations of the underlying key material).
-
-   Key factories are bi-directional. They allow a key class=20
-   to be converted into a key specification (key material) and
-   back again.
-
-   For example DSA public keys can be specified as=20
-   DSAPublicKeySpec or X509EncodedKeySpec. The key factory
-   translate these key specifications.=20
-
-   @since JDK 1.2
-   @author Mark Benvenuto
+ * Key factories are used to convert keys (opaque cryptographic keys of
+ * type {@link Key}) to and from key specifications (transparent
+ * representations of the underlying key material), and to translate
+ * keys into vendor-specific types.
+ *
+ * <p>For example, DSA public keys can be specified as {@link
+ * java.security.spec.DSAPublicKeySpec} or {@link
+ * java.security.spec.X509EncodedKeySpec}, and DSA key factories can
+ * translate these key specifications into instances of {@link
+ * java.security.interfaces.DSAKey}.
+ *
+ * @since JDK 1.2
+ * @author Mark Benvenuto
+ * @author Casey Marshall
  */
 public class KeyFactory
 {
+
+  // Constants and fields.
+  // ---------------------------------------------------------------------=
---
+
+  /** The service name for key factories. */
+  private static final String KEY_FACTORY =3D "KeyFactory";
+
   private KeyFactorySpi keyFacSpi;
   private Provider provider;
   private String algorithm;
=20
+  // Constructors.
+  // ---------------------------------------------------------------------=
---
+
   /**
      Constructs a new keyFactory with the specified parameters.
=20
@@ -76,15 +87,16 @@
     this.algorithm =3D algorithm;
   }
=20
-  /**=20
-     Gets an instance of the KeyFactory class representing
-     the specified key factory. If the algorithm is not=20
-     found then, it throws NoSuchAlgorithmException.
-
-     @param algorithm the name of algorithm to choose
-     @return a KeyFactory repesenting the desired algorithm
+  // Class methods.
+  // ---------------------------------------------------------------------=
---
=20
-     @throws NoSuchAlgorithmException if the algorithm is not implemented =
by providers
+  /**
+   * Get a key factory from the first provider that implements it.
+   *
+   * @param algorithm the name of algorithm to choose
+   * @return a KeyFactory repesenting the desired algorithm
+   * @throws NoSuchAlgorithmException If the algorithm is not implemented
+   *         by providers or if the implementation cannot be instantiated.
    */
   public static KeyFactory getInstance(String algorithm)
     throws NoSuchAlgorithmException
@@ -93,63 +105,73 @@
=20
     for (int i =3D 0; i < p.length; i++)
       {
-	String classname =3D p[i].getProperty("KeyFactory." + algorithm);
-	if (classname !=3D null)
-	  return getInstance(classname, algorithm, p[i]);
+        try
+          {
+            return getInstance(algorithm, p[i]);
+          }
+        catch (NoSuchAlgorithmException ignore)
+          {
+          }
       }
=20
     throw new NoSuchAlgorithmException(algorithm);
   }
=20
-  /**=20
-     Gets an instance of the KeyFactory class representing
-     the specified key factory from the specified provider.=20
-     If the algorithm is not found then, it throws=20
-     NoSuchAlgorithmException. If the provider is not found, then=20
-     it throws NoSuchProviderException.
-
-     @param algorithm the name of algorithm to choose
-     @param provider the name of the provider to find the algorithm in
-     @return a KeyFactory repesenting the desired algorithm
-
-     @throws NoSuchAlgorithmException if the algorithm is not implemented =
by the provider
-     @throws NoSuchProviderException if the provider is not found
+  /**
+   * Get a key factory from a named provider.
+   *
+   * @param algorithm The name of the algorithm.
+   * @param provider  The name of the provider.
+   * @return a KeyFactory for the desired algorithm
+   * @throws NoSuchAlgorithmException If the algorithm is not implemented
+   *         by the provider or if the implementation cannot be instantiat=
ed.
+   * @throws NoSuchProviderException If the provider is not found.
+   * @throws IllegalArgumentException If <code>provider</code> is null or
+   *         is empty.
    */
   public static KeyFactory getInstance(String algorithm, String provider)
     throws NoSuchAlgorithmException, NoSuchProviderException
   {
+    if (provider =3D=3D null || provider.length() =3D=3D 0)
+      throw new IllegalArgumentException("Illegal provider");
+
     Provider p =3D Security.getProvider(provider);
     if (p =3D=3D null)
       throw new NoSuchProviderException();
=20
-    return getInstance(p.getProperty("KeyFactory." + algorithm),
-		       algorithm, p);
+    return getInstance(algorithm, p);
   }
=20
-  private static KeyFactory getInstance(String classname,
-					String algorithm,
-					Provider provider)
-    throws NoSuchAlgorithmException
+  /**
+   * Get a key factory from the specified provider.
+   *
+   * @param algorithm The name of the algorithm.
+   * @param provider  The provider to get the implementation from.
+   * @return A key factory for the given algorithm.
+   * @throws NoSuchAlgorithmException If the provider does not implement
+   *         the given algorithm, or if the implementation cannot be
+   *         instantiated.
+   * @throws IllegalArgumentException If <code>provider</code> is null.
+   */
+  public static KeyFactory getInstance(String algorithm, Provider provider=
)
+  throws NoSuchAlgorithmException
   {
-
+    if (provider =3D=3D null)
+      throw new IllegalArgumentException("Illegal provider");
     try
       {
-	return new KeyFactory((KeyFactorySpi) Class.forName(classname).
-			      newInstance(), provider, algorithm);
+        return new KeyFactory((KeyFactorySpi)
+          Engine.getInstance(KEY_FACTORY, algorithm, provider),
+          provider, algorithm);
       }
-    catch (ClassNotFoundException cnfe)
+    catch (ClassCastException cce)
       {
-	throw new NoSuchAlgorithmException("Class not found");
-      }
-    catch (InstantiationException ie)
-      {
-	throw new NoSuchAlgorithmException("Class instantiation failed");
-      }
-    catch (IllegalAccessException iae)
-      {
-	throw new NoSuchAlgorithmException("Illegal Access");
+        throw new NoSuchAlgorithmException(algorithm);
       }
   }
+
+  // Instance methods.
+  // ---------------------------------------------------------------------=
---
=20
   /**
      Gets the provider that the class is from.
Index: libjava/java/security/KeyPairGenerator.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/gcc/gcc/libjava/java/security/KeyPairGenerator.java,v
retrieving revision 1.4
diff -u -r1.4 KeyPairGenerator.java
--- libjava/java/security/KeyPairGenerator.java	17 Nov 2002 00:10:24 -0000	=
1.4
+++ libjava/java/security/KeyPairGenerator.java	8 Mar 2003 20:50:55 -0000
@@ -1,5 +1,5 @@
 /* KeyPairGenerator.java --- Key Pair Generator Class
-   Copyright (C) 1999, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc.
=20
 This file is part of GNU Classpath.
=20
@@ -40,25 +40,34 @@
 import java.security.spec.AlgorithmParameterSpec;
=20
 /**
-   KeyPairGenerator is the class used to generate key pairs
-   for a security algorithm.
-
-   The KeyPairGenerator is created with the getInstance()
-   methods. The class is used to generate public and private
-   keys for an algorithm and associate it with=20
-   algorithm parameters.
-
-   @author Mark Benvenuto
+ * An interface to a key pair generator. Key pairs are used in various
+ * <i>public-key</i> cryptographic algorithms, such as digital signing,
+ * key agreement, and asymmetric cryptography.
+ *
+ * @see Signature
+ * @see KeyPair
+ * @author Mark Benvenuto
+ * @author Casey Marshall
  */
 public abstract class KeyPairGenerator extends KeyPairGeneratorSpi
 {
+
+  // Constants and fields.
+  // ---------------------------------------------------------------------=
---
+
+  /** The service name for key pair generators. */
+  private static final String KEY_PAIR_GENERATOR =3D "KeyPairGenerator";
+
   Provider provider;
   private String algorithm;
=20
-  /**
-     Constructs a new KeyPairGenerator
+  // Constructors.
+  // ---------------------------------------------------------------------=
---
=20
-     @param algorithm the algorithm to use
+  /**
+   * Constructs a new KeyPairGenerator
+   *
+   * @param algorithm the algorithm to use
    */
   protected KeyPairGenerator(String algorithm)
   {
@@ -66,60 +75,58 @@
     this.provider =3D null;
   }
=20
-  /**
-     Returns the name of the algorithm used
-
-     @return A string with the name of the algorithm
-   */
-  public String getAlgorithm()
-  {
-    return algorithm;
-  }
-
-  /**=20
-     Gets an instance of the KeyPairGenerator class=20
-     which generates key pairs for the specified algorithm.=20
-     If the algorithm is not found then, it throws NoSuchAlgorithmExceptio=
n.
-
-     @param algorithm the name of algorithm to choose
-     @return a AlgorithmParameterGenerator repesenting the desired algorit=
hm
+  // Class methods.
+  // ---------------------------------------------------------------------=
---
=20
-     @throws NoSuchAlgorithmException if the algorithm is not implemented =
by
-     				      providers
+  /**
+   * Get a key pair generator for the specified algorithm from the first
+   * provider that implements it.
+   *
+   * @param algorithm the name of algorithm to choose
+   * @return a AlgorithmParameterGenerator repesenting the desired algorit=
hm
+   * @throws NoSuchAlgorithmException if the algorithm is not implemented =
by
+   *         any installed provider or if no implementation can be
+   *         instantiated.
    */
-  public static KeyPairGenerator getInstance(String algorithm) throws
-    NoSuchAlgorithmException
+  public static KeyPairGenerator getInstance(String algorithm)
+  throws NoSuchAlgorithmException
   {
     Provider[] p =3D Security.getProviders();
=20
     for (int i =3D 0; i < p.length; i++)
       {
-	try
-	  {
-	    return getInstance(algorithm, p[i]);
-	  }
-	catch (NoSuchAlgorithmException ignored) {}
+        try
+          {
+            return getInstance(algorithm, p[i]);
+          }
+        catch (NoSuchAlgorithmException ignored)
+          {
+          }
       }
=20
     throw new NoSuchAlgorithmException(algorithm);
   }
=20
-  /**=20
-     Gets an instance of the KeyPairGenerator class=20
-     which generates key pairs for the specified algorithm.=20
-     If the algorithm is not found then, it throws NoSuchAlgorithmExceptio=
n.
-
-     @param algorithm the name of algorithm to choose
-     @param provider the name of the provider to find the algorithm in
-     @return a AlgorithmParameterGenerator repesenting the desired algorit=
hm
-
-     @throws NoSuchAlgorithmException if the algorithm is not implemented =
by
-     				      the provider
-     @throws NoSuchProviderException if the provider is not found
+  /**
+   * Get a key pair generator for the specified algorithm from the named
+   * provider.
+   *
+   * @param algorithm The name of the algorithm.
+   * @param provider  The name of the provider.
+   * @return A KeyPairGenerator for the desired algorithm.
+   * @throws NoSuchAlgorithmException If the algorithm is not implemented =
by
+   *         the provider or if the implementation cannot be instantiated.
+   * @throws NoSuchProviderException If no provider named
+   *         <code>provider</code> is installed.
+   * @throws IllegalArgumentException If <code>provider</code> is null
+   *         or is empty.
    */
   public static KeyPairGenerator getInstance(String algorithm, String prov=
ider)
-    throws NoSuchAlgorithmException, NoSuchProviderException
+  throws NoSuchAlgorithmException, NoSuchProviderException
   {
+    if (provider =3D=3D null || provider.length() =3D=3D 0)
+      throw new IllegalArgumentException("Illegal provider");
+
     Provider p =3D Security.getProvider(provider);
     if (p =3D=3D null)
       throw new NoSuchProviderException(provider);
@@ -127,63 +134,51 @@
     return getInstance(algorithm, p);
   }
=20
-  private static KeyPairGenerator getInstance(String algorithm, Provider p=
)
-    throws NoSuchAlgorithmException
-  {
-    // try the name as is
-    String className =3D p.getProperty("KeyPairGenerator." + algorithm);
-    if (className =3D=3D null) { // try all uppercase
-      String upper =3D algorithm.toUpperCase();
-      className =3D p.getProperty("KeyPairGenerator." + upper);
-      if (className =3D=3D null) { // try if it's an alias
-        String alias =3D p.getProperty("Alg.Alias.KeyPairGenerator." + alg=
orithm);
-        if (alias =3D=3D null) { // try all-uppercase alias name
-          alias =3D p.getProperty("Alg.Alias.KeyPairGenerator." + upper);
-          if (alias =3D=3D null) { // spit the dummy
-            throw new NoSuchAlgorithmException(algorithm);
-          }
-        }
-        className =3D p.getProperty("KeyPairGenerator." + alias);
-        if (className =3D=3D null) {
-          throw new NoSuchAlgorithmException(algorithm);
-        }
-      }
-    }
-    return getInstance(className, algorithm, p);
-  }
-
-  private static KeyPairGenerator getInstance(String classname,
-					      String algorithm,
-					      Provider provider)
-    throws NoSuchAlgorithmException
-  {
-    try
-      {
-	Object o =3D Class.forName(classname).newInstance();
-	KeyPairGenerator kpg;
-	if (o instanceof KeyPairGeneratorSpi)
-	  kpg =3D new DummyKeyPairGenerator((KeyPairGeneratorSpi) o, algorithm);
-	else
-	  {
-	    kpg =3D (KeyPairGenerator) o;
-	    kpg.algorithm =3D algorithm;
-	  }
-
-	kpg.provider =3D provider;
-	return kpg;
-      }
-    catch (ClassNotFoundException cnfe)
-      {
-	throw new NoSuchAlgorithmException("Class not found");
-      }
-    catch (InstantiationException ie)
+  /**
+   * Get a key pair generator for the specified algorithm from the given
+   * provider.
+   *
+   * @param algorithm The name of the algorithm.
+   * @param provider  The provider.
+   * @return A KeyPairGenerator for the desired algorithm.
+   * @throws NoSuchAlgorithmException If the algorithm is not implemented =
by
+   *         the provider or if the implementation cannot be instantiated.
+   * @throws IllegalArgumentException If <code>provider</code> is null.
+   * @since 1.4
+   */
+  public static KeyPairGenerator
+  getInstance(String algorithm, Provider provider)
+  throws NoSuchAlgorithmException
+  {
+    if (provider =3D=3D null)
+      throw new IllegalArgumentException("Illegal provider");
+
+    Object o =3D Engine.getInstance(KEY_PAIR_GENERATOR, algorithm, provide=
r);
+    KeyPairGenerator result =3D null;
+    if (o instanceof KeyPairGeneratorSpi)
       {
-	throw new NoSuchAlgorithmException("Class instantiation failed");
+        result =3D new DummyKeyPairGenerator((KeyPairGeneratorSpi) o, algo=
rithm);
       }
-    catch (IllegalAccessException iae)
+    else if (o instanceof KeyPairGenerator)
       {
-	throw new NoSuchAlgorithmException("Illegal Access");
+        result =3D (KeyPairGenerator) o;
+        result.algorithm =3D algorithm;
       }
+    result.provider =3D provider;
+    return result;
+  }
+
+  // Instance methods.
+  // ---------------------------------------------------------------------=
---
+
+  /**
+     Returns the name of the algorithm used
+
+     @return A string with the name of the algorithm
+   */
+  public String getAlgorithm()
+  {
+    return algorithm;
   }
=20
   /**
Index: libjava/java/security/KeyStore.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/gcc/gcc/libjava/java/security/KeyStore.java,v
retrieving revision 1.3
diff -u -r1.3 KeyStore.java
--- libjava/java/security/KeyStore.java	18 Nov 2002 18:09:35 -0000	1.3
+++ libjava/java/security/KeyStore.java	8 Mar 2003 20:50:57 -0000
@@ -1,5 +1,5 @@
 /* KeyStore.java --- Key Store Class
-   Copyright (C) 1999, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc.
=20
 This file is part of GNU Classpath.
=20
@@ -44,37 +44,52 @@
 import java.util.Enumeration;
=20
 /**
-   Keystore represents an in-memory collection of keys and=20
-   certificates. There are two types of entries:
-
-   * Key Entry
-
-   This type of keystore entry store sensitive crytographic key
-   information in a protected format.Typically this is a secret=20
-   key or a private key with a certificate chain.
-
-
-   * Trusted Ceritificate Entry
-
-   This type of keystore entry contains a single public key=20
-   certificate belonging to annother entity. It is called trusted
-   because the keystore owner trusts that the certificates
-   belongs to the subject (owner) of the certificate.
-
-   The keystore contains an "alias" string for each entry.=20
-
-   The structure and persistentence of the key store is not=20
-   specified. Any method could be used to protect sensitive=20
-   (private or secret) keys. Smart cards or integrated=20
-   cryptographic engines could be used or the keystore could=20
-   be simply stored in a file.=20
+ * Keystore represents an in-memory collection of keys and=20
+ * certificates. There are two types of entries:
+ *
+ * <dl>
+ * <dt>Key Entry</dt>
+ *
+ * <dd><p>This type of keystore entry store sensitive crytographic key
+ * information in a protected format.Typically this is a secret=20
+ * key or a private key with a certificate chain.</p></dd>
+ *
+ * <dt>Trusted Ceritificate Entry</dt>
+ *
+ * <dd><p>This type of keystore entry contains a single public key=20
+ * certificate belonging to annother entity. It is called trusted
+ * because the keystore owner trusts that the certificates
+ * belongs to the subject (owner) of the certificate.</p></dd>
+ * </dl>
+ *
+ * <p>Entries in a key store are referred to by their "alias": a simple
+ * unique string.
+ *
+ * <p>The structure and persistentence of the key store is not=20
+ * specified. Any method could be used to protect sensitive=20
+ * (private or secret) keys. Smart cards or integrated=20
+ * cryptographic engines could be used or the keystore could=20
+ * be simply stored in a file.</p>
+ *
+ * @see java.security.cert.Certificate
+ * @see Key
  */
 public class KeyStore
 {
+
+  // Constants and fields.
+  // ---------------------------------------------------------------------=
---
+
+  /** Service name for key stores. */
+  private static final String KEY_STORE =3D "KeyStore";
+
   private KeyStoreSpi keyStoreSpi;
   private Provider provider;
   private String type;
=20
+  // Constructors.
+  // ---------------------------------------------------------------------=
---
+
   /**
      Creates an instance of KeyStore
=20
@@ -89,16 +104,18 @@
     this.type =3D type;
   }
=20
-  /**=20
-     Gets an instance of the KeyStore class representing
-     the specified keystore. If the type is not=20
-     found then, it throws KeyStoreException.
-
-     @param type the type of keystore to choose
-
-     @return a KeyStore repesenting the desired type
+  // Class methods.
+  // ---------------------------------------------------------------------=
---
=20
-     @throws KeyStoreException if the type of keystore is not implemented =
by providers
+  /**=20
+   * Gets an instance of the KeyStore class representing
+   * the specified keystore. If the type is not=20
+   * found then, it throws KeyStoreException.
+   *
+   * @param type the type of keystore to choose
+   * @return a KeyStore repesenting the desired type
+   * @throws KeyStoreException if the type of keystore is not implemented
+   *         by providers or the implementation cannot be instantiated.
    */
   public static KeyStore getInstance(String type) throws KeyStoreException
   {
@@ -106,95 +123,102 @@
=20
     for (int i =3D 0; i < p.length; i++)
       {
-	String classname =3D p[i].getProperty("KeyStore." + type);
-	if (classname !=3D null)
-	  return getInstance(classname, type, p[i]);
+        try
+          {
+            return getInstance(type, p[i]);
+          }
+        catch (KeyStoreException ignore)
+          {
+          }
       }
=20
     throw new KeyStoreException(type);
   }
=20
   /**=20
-     Gets an instance of the KeyStore class representing
-     the specified key store from the specified provider.=20
-     If the type is not found then, it throws KeyStoreException.=20
-     If the provider is not found, then it throws=20
-     NoSuchProviderException.
-
-     @param type the type of keystore to choose
-     @param provider the provider name
-
-     @return a KeyStore repesenting the desired type
-
-     @throws KeyStoreException if the type of keystore is not=20
-              implemented by the given provider
-     @throws NoSuchProviderException if the provider is not found
-     @throws IllegalArgumentException if the provider string is=20
-               null or empty
+   * Gets an instance of the KeyStore class representing
+   * the specified key store from the specified provider.=20
+   * If the type is not found then, it throws KeyStoreException.=20
+   * If the provider is not found, then it throws=20
+   * NoSuchProviderException.
+   *
+   * @param type the type of keystore to choose
+   * @param provider the provider name
+   * @return a KeyStore repesenting the desired type
+   * @throws KeyStoreException if the type of keystore is not=20
+   *          implemented by the given provider
+   * @throws NoSuchProviderException if the provider is not found
+   * @throws IllegalArgumentException if the provider string is=20
+   *           null or empty
    */
   public static KeyStore getInstance(String type, String provider)
     throws KeyStoreException, NoSuchProviderException
   {
     if (provider =3D=3D null || provider.length() =3D=3D 0)
       throw new IllegalArgumentException("Illegal provider");
+
     Provider p =3D Security.getProvider(provider);
     if (p =3D=3D null)
       throw new NoSuchProviderException();
=20
-    return getInstance(p.getProperty("KeyStore." + type), type, p);
+    return getInstance(type, p);
   }
=20
   /**=20
-     Gets an instance of the KeyStore class representing
-     the specified key store from the specified provider.=20
-     If the type is not found then, it throws KeyStoreException.=20
-     If the provider is not found, then it throws=20
-     NoSuchProviderException.
-
-     @param type the type of keystore to choose
-     @param provider the keystore provider
-
-     @return a KeyStore repesenting the desired type
-
-     @throws KeyStoreException if the type of keystore is not=20
-              implemented by the given provider
-     @throws IllegalArgumentException if the provider object is null
-     @since 1.4
+   * Gets an instance of the KeyStore class representing
+   * the specified key store from the specified provider.=20
+   * If the type is not found then, it throws KeyStoreException.=20
+   * If the provider is not found, then it throws=20
+   * NoSuchProviderException.
+   *
+   * @param type the type of keystore to choose
+   * @param provider the keystore provider
+   * @return a KeyStore repesenting the desired type
+   * @throws KeyStoreException if the type of keystore is not=20
+   *          implemented by the given provider
+   * @throws IllegalArgumentException if the provider object is null
+   * @since 1.4
    */
   public static KeyStore getInstance(String type, Provider provider)
     throws KeyStoreException=20
   {
     if (provider =3D=3D null)
       throw new IllegalArgumentException("Illegal provider");
-
-    return getInstance(provider.getProperty("KeyStore." + type),
-		       type, provider);
-  }
-
-  private static KeyStore getInstance(String classname,
-				      String type,
-				      Provider provider)
-    throws KeyStoreException
-  {
     try
       {
-	return new KeyStore((KeyStoreSpi) Class.forName(classname).
-			    newInstance(), provider, type);
-      }
-    catch (ClassNotFoundException cnfe)
-      {
-	throw new KeyStoreException("Class not found");
+        return new KeyStore(
+          (KeyStoreSpi) Engine.getInstance(KEY_STORE, type, provider),
+          provider, type);
       }
-    catch (InstantiationException ie)
+    catch (NoSuchAlgorithmException nsae)
       {
-	throw new KeyStoreException("Class instantiation failed");
+        throw new KeyStoreException(type);
       }
-    catch (IllegalAccessException iae)
+    catch (ClassCastException cce)
       {
-	throw new KeyStoreException("Illegal Access");
+        throw new KeyStoreException(type);
       }
   }
=20
+  /**
+   * Returns the default KeyStore type. This method looks up the
+   * type in <JAVA_HOME>/lib/security/java.security with the=20
+   * property "keystore.type" or if that fails then "jks" .
+   */
+  public static final String getDefaultType()
+  {
+    // Security reads every property in java.security so it=20
+    // will return this property if it exists.=20
+    String tmp =3D Security.getProperty("keystore.type");
+
+    if (tmp =3D=3D null)
+      tmp =3D "jks";
+
+    return tmp;
+  }
+
+  // Instance methods.
+  // ---------------------------------------------------------------------=
---
=20
   /**
      Gets the provider that the class is from.
@@ -471,21 +495,4 @@
     keyStoreSpi.engineLoad(stream, password);
   }
=20
-  /**
-     Returns the default KeyStore type. This method looks up the
-     type in <JAVA_HOME>/lib/security/java.security with the=20
-     property "keystore.type" or if that fails then "jks" .
-   */
-  public static final String getDefaultType()
-  {
-    String tmp;
-    //Security reads every property in java.security so it=20
-    //will return this property if it exists.=20
-    tmp =3D Security.getProperty("keystore.type");
-
-    if (tmp =3D=3D null)
-      tmp =3D "jks";
-
-    return tmp;
-  }
 }
Index: libjava/java/security/MessageDigest.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/gcc/gcc/libjava/java/security/MessageDigest.java,v
retrieving revision 1.8
diff -u -r1.8 MessageDigest.java
--- libjava/java/security/MessageDigest.java	17 Nov 2002 00:10:24 -0000	1.8
+++ libjava/java/security/MessageDigest.java	8 Mar 2003 20:50:58 -0000
@@ -1,6 +1,5 @@
-
 /* MessageDigest.java --- The message digest interface.
-   Copyright (C) 1999, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc.
=20
 This file is part of GNU Classpath.
=20
@@ -38,17 +37,53 @@
=20
 package java.security;
=20
+/**
+ * An interface to message digest algorithms. A message digest
+ * algorithm takes as input a variable number of bytes and produces a
+ * fixed-length "fingerprint" of this data, with the property that it is
+ * computationally infeasible to (a) determine the source data from a
+ * given message digest, or (b) find two input texts that produce the same
+ * digest. Message digests are commonly used for ensuring the integrity
+ * or authenticity of data, and are used at the core of many signature
+ * and message authentication algorithms.
+ * <p>
+ * To get an implementation of a message digest, query the {@link
+ * #getInstance(java.lang.String)} method with the name of the
+ * algorithm, e.g.:
+ *
+ * <blockquote>
+ * <code>MessageDigest md =3D MessageDigest.getInstance("SHA1");</code>
+ * </blockquote>
+ *
+ * <p>
+ * What algorithms are available depend upon what providers are
+ * installed and what message digests they implement.
+ *=20
+ * @see MessageDigestSpi
+ * @see Provider
+ * @since JDK 1.1
+ */
 public abstract class MessageDigest extends MessageDigestSpi
 {
+
+  // Constants and fields.
+  // ---------------------------------------------------------------------=
---
+
+  /** The service name for message digests. */
+  private static final String MESSAGE_DIGEST =3D "MessageDigest";
+
   private String algorithm;
   Provider provider;
   private byte[] lastDigest;
=20
-  /**
-     Creates a MessageDigest representing the specified
-     algorithm.
+  // Constructors.
+  // ---------------------------------------------------------------------=
---
=20
-     @param algorithm the name of digest algorithm to choose
+  /**
+   * Creates a MessageDigest representing the specified
+   * algorithm.
+   *
+   * @param algorithm the name of digest algorithm to choose
    */
   protected MessageDigest(String algorithm)
   {
@@ -56,130 +91,109 @@
     provider =3D null;
   }
=20
-  /**=20
-     Gets an instance of the MessageDigest class representing
-     the specified digest. If the algorithm is not found then,=20
-     it throws NoSuchAlgorithmException.
+  // Class methods.
+  // ---------------------------------------------------------------------=
---
=20
-     @param algorithm the name of digest algorithm to choose
-     @return a MessageDigest representing the desired algorithm
-
-     @exception NoSuchAlgorithmException if the algorithm is not implement=
ed by
-    					 providers
+  /**
+   * Get a message digest from the first provider that implements it.
+   *
+   * @param algorithm The name of digest algorithm.
+   * @return An instance of the desired message digest.
+   * @throws NoSuchAlgorithmException If the algorithm is not implemented
+   *         by any installed provider.
+   * @see #getInstance(java.lang.String,java.lang.String)
+   * @see #getInstance(java.lang.String,java.security.Provider)
    */
   public static MessageDigest getInstance(String algorithm)
-    throws NoSuchAlgorithmException
+  throws NoSuchAlgorithmException
   {
     Provider[] p =3D Security.getProviders();
     for (int i =3D 0; i < p.length; i++)
       {
-	try
-	  {
-	    return getInstance(algorithm, p[i]);
-	  }
-	catch (NoSuchAlgorithmException ignored) {}
+        try
+          {
+            return getInstance(algorithm, p[i]);
+          }
+        catch (NoSuchAlgorithmException ignored)
+          {
+          }
       }
=20
     throw new NoSuchAlgorithmException(algorithm);
   }
=20
-  /**=20
-     Gets an instance of the MessageDigest class representing
-     the specified digest from the specified provider. If the=20
-     algorithm is not found then, it throws NoSuchAlgorithmException.
-     If the provider is not found, then it throws
-     NoSuchProviderException.
-
-     @param algorithm the name of digest algorithm to choose
-     @param provider the name of the provider to find the algorithm in
-     @return a MessageDigest representing the desired algorithm
-
-     @exception NoSuchAlgorithmException if the algorithm is not implement=
ed by
-     					 the provider
-     @exception NoSuchProviderException if the provider is not found
+  /**
+   * Get a message digest from a named provider.
+   *
+   * @param algorithm The name of digest algorithm.
+   * @param provider  The name of the provider.
+   * @return An instance of the desired message digest.
+   *
+   * @throws NoSuchAlgorithmException if the algorithm is not implemented =
by
+   *         the provider, or if the implementation cannot be instantiated=
.
+   * @throws NoSuchProviderException If no provider named
+   *         <code>provider</code> is currently installed.
+   * @throws IllegalArgumentException If <code>provider</code> is null
+   *         or is empty.
+   * @see #getInstance(java.lang.String,java.security.Provider)
    */
-
   public static MessageDigest getInstance(String algorithm, String provide=
r)
-    throws NoSuchAlgorithmException, NoSuchProviderException
+  throws NoSuchAlgorithmException, NoSuchProviderException
   {
-    Provider p =3D Security.getProvider(provider);
+    if (provider =3D=3D null || provider.length() =3D=3D 0)
+      throw new IllegalArgumentException("Illegal provider");
=20
+    Provider p =3D Security.getProvider(provider);
     if (p =3D=3D null)
       throw new NoSuchProviderException(provider);
=20
     return getInstance(algorithm, p);
   }
=20
-  private static MessageDigest getInstance(String algorithm, Provider p)
-    throws NoSuchAlgorithmException
-  {
-    // try the name as is
-    String className =3D p.getProperty("MessageDigest." + algorithm);
-    if (className =3D=3D null) { // try all uppercase
-      String upper =3D algorithm.toUpperCase();
-      className =3D p.getProperty("MessageDigest." + upper);
-      if (className =3D=3D null) { // try if it's an alias
-        String alias =3D p.getProperty("Alg.Alias.MessageDigest." +algorit=
hm);
-        if (alias =3D=3D null) { // try all-uppercase alias name
-          alias =3D p.getProperty("Alg.Alias.MessageDigest." +upper);
-          if (alias =3D=3D null) { // spit the dummy
-            throw new NoSuchAlgorithmException(algorithm);
-          }
-        }
-        className =3D p.getProperty("MessageDigest." + alias);
-        if (className =3D=3D null) {
-          throw new NoSuchAlgorithmException(algorithm);
-        }
-      }
-    }
-    return getInstance(className, algorithm, p);
-  }
-
-  private static MessageDigest getInstance(String classname,
-					   String algorithm,
-					   Provider provider)
+  /**
+   * Gets an implementation of the specified message digest algorithm
+   * from the specified provider.
+   *
+   * @param algorithm The message digest algorithm's name.
+   * @param provider  The provider from which to get the implementation.
+   * @throws NoSuchAlgorithmException If the provider does not implement
+   *         the algorithm, or if the implementation cannot be
+   *         instantiated.
+   * @throws IllegalArgumentException If <code>provider</code> is null.
+   * @since 1.4
+   */
+  public static MessageDigest getInstance(String algorithm, Provider provi=
der)
     throws NoSuchAlgorithmException
   {
-    if (classname =3D=3D null)
-      throw new NoSuchAlgorithmException(algorithm);
-
+    if (provider =3D=3D null)
+      throw new IllegalArgumentException("Illegal provider");
     MessageDigest result =3D null;
-    try
+    Object o =3D Engine.getInstance(MESSAGE_DIGEST, algorithm, provider);
+   =20
+    if (o instanceof MessageDigestSpi)
       {
-        Object obj =3D Class.forName(classname).newInstance();
-        if (obj instanceof MessageDigest) {
-          result =3D (MessageDigest) obj;
-          result.algorithm =3D algorithm;
-        } else if (obj instanceof MessageDigestSpi) {
-          result =3D new DummyMessageDigest((MessageDigestSpi) obj, algori=
thm);
-        } else {
-          throw new ClassCastException("Class "+classname+" from Provider =
"
-              +provider.getName()
-              +" does not extend java.security.MessageDigestSpi");
-        }
-        result.provider =3D provider;
-        return result;
+        result =3D new DummyMessageDigest((MessageDigestSpi) o, algorithm)=
;
       }
-    catch (ClassNotFoundException cnfe)
+    else if (o instanceof MessageDigest)
       {
-	throw new NoSuchAlgorithmException(algorithm + ": Class not found.");
+        result =3D (MessageDigest) o;
+        result.algorithm =3D algorithm;
       }
-    catch (InstantiationException ie)
+    else
       {
-	throw new NoSuchAlgorithmException(algorithm
-					   + ": Class instantiation failed.");
-      }
-    catch (IllegalAccessException iae)
-      {
-	throw new NoSuchAlgorithmException(algorithm + ": Illegal Access");
+        throw new NoSuchAlgorithmException(algorithm);
       }
+    result.provider =3D provider;
+    return result;
   }
=20
+  // Instance methods.
+  // ---------------------------------------------------------------------=
---
=20
   /**
-     Gets the provider that the MessageDigest is from.
-
-     @return the provider the this MessageDigest
+   * Gets the provider that the MessageDigest is from.
+   *
+   * @return The provider of this message digest implementation.
    */
   public final Provider getProvider()
   {
@@ -187,9 +201,9 @@
   }
=20
   /**
-     Updates the digest with the byte.
-
-     @param input byte to update the digest with
+   * Updates the digest with a single byte.
+   *
+   * @param input The byte to update the digest with.
    */
   public void update(byte input)
   {
@@ -197,32 +211,32 @@
   }
=20
   /**
-     Updates the digest with the bytes from the array from the
-     specified offset to the specified length.
-
-     @param input bytes to update the digest with
-     @param offset the offset to start at
-     @param len length of the data to update with
+   * Updates the digest with a portion of a byte array.
+   *
+   * @param input  The bytes to update the digest with.
+   * @param offset The offset to start at in the array.
+   * @param len    The number of bytes to update.
    */
-  public void update(byte[]input, int offset, int len)
+  public void update(byte[] input, int offset, int len)
   {
     engineUpdate(input, offset, len);
   }
=20
   /**
-     Updates the digest with the bytes from the array.
-
-     @param input bytes to update the digest with
+   * Updates the digest with an entire byte array.
+   *
+   * @param input The bytes to update the digest with.
+   * @see #update(byte[],int,int)
    */
-  public void update(byte[]input)
+  public void update(byte[] input)
   {
     engineUpdate(input, 0, input.length);
   }
=20
   /**
-     Computes the digest of the stored data.
-
-     @return a byte array representing the message digest
+   * Computes the final digest of the stored data, and resets this instanc=
e.
+   *
+   * @return a byte array representing the message digest
    */
   public byte[] digest()
   {
@@ -230,13 +244,13 @@
   }
=20
   /**
-     Computes the final digest of the stored bytes and returns
-     them.=20
-
-     @param buf An array of bytes to store the digest
-     @param offset An offset to start storing the digest at
-     @param len The length of the buffer
-     @return Returns the length of the buffer
+   * Computes the final digest of the stored bytes and stores it into
+   * the given byte array, returning the number of bytes stored.
+   *
+   * @param buf    An array of bytes to store the digest.
+   * @param offset The offset to start storing the digest at.
+   * @param len    The maximum number of bytes to store in the array.
+   * @return The number of bytes stored into <code>buf</code>
    */
   public int digest(byte[]buf, int offset, int len) throws DigestException
   {
Index: libjava/java/security/SecureRandom.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/gcc/gcc/libjava/java/security/SecureRandom.java,v
retrieving revision 1.8
diff -u -r1.8 SecureRandom.java
--- libjava/java/security/SecureRandom.java	13 Feb 2003 17:00:22 -0000	1.8
+++ libjava/java/security/SecureRandom.java	8 Mar 2003 20:50:58 -0000
@@ -42,14 +42,24 @@
 import java.util.Enumeration;
=20
 /**
-   SecureRandom is the class interface for using SecureRandom
-   providers. It provides an interface to the SecureRandomSpi
-   engine so that programmers can generate pseudo-random numbers.
-
-   @author Mark Benvenuto <ivymccough@worldnet.att.net>
+ * An interface to a cryptographically secure pseudo-random number
+ * generator (PRNG). Random (or at least unguessable) numbers are used
+ * in all areas of security and cryptography, from the generation of
+ * keys and initialization vectors to the generation of random padding
+ * bytes.
+ *
+ * @author Mark Benvenuto <ivymccough@worldnet.att.net>
+ * @author Casey Marshall
  */
 public class SecureRandom extends Random
 {
+
+  // Constants and fields.
+  // ---------------------------------------------------------------------=
---
+
+  /** Service name for PRNGs. */
+  private static final String SECURE_RANDOM =3D "SecureRandom";
+
   static final long serialVersionUID =3D 4940670005562187L;
=20
   //Serialized Field
@@ -60,6 +70,9 @@
   SecureRandomSpi secureRandomSpi =3D null;
   byte[] state =3D null;
=20
+  // Constructors.
+  // ---------------------------------------------------------------------=
---
+
   /**
      Default constructor for SecureRandom. It constructs a=20
      new SecureRandom by instantating the first SecureRandom=20
@@ -69,7 +82,7 @@
      on the first call to getnextBytes it will force a seed.
=20
      It is maintained for backwards compatibility and programs
-     should use getInstance.
+     should use {@link #getInstance(java.lang.String)}.
    */
   public SecureRandom()
   {
@@ -88,20 +101,20 @@
           {
             key =3D (String) e.nextElement();
             if (key.startsWith("SECURERANDOM."))
-	      {
-		if ((classname =3D p[i].getProperty(key)) !=3D null)
-		  {
-		    try
-		      {
-			secureRandomSpi =3D (SecureRandomSpi) Class.
-			  forName(classname).newInstance();
-			provider =3D p[i];
-			return;
-		      }
-		    catch (Throwable ignore) { }
-		  }
-	      }
-	  }
+              {
+                if ((classname =3D p[i].getProperty(key)) !=3D null)
+                  {
+                    try
+                      {
+                        secureRandomSpi =3D (SecureRandomSpi) Class.
+                          forName(classname).newInstance();
+                        provider =3D p[i];
+                        return;
+                      }
+                    catch (Throwable ignore) { }
+                  }
+              }
+          }
       }
=20
     // Nothing found. Fall back to SHA1PRNG
@@ -141,15 +154,17 @@
     this.provider =3D provider;
   }
=20
-  /**
-     Returns an instance of a SecureRandom. It creates the class
-     for the specified algorithm if it exists from a provider.
-
-     @param algorithm A SecureRandom algorithm to use
+  // Class methods.
+  // ---------------------------------------------------------------------=
---
=20
-     @return Returns a new SecureRandom implmenting the chosen algorithm
-
-     @throws NoSuchAlgorithmException if the algorithm cannot be found
+  /**
+   * Returns an instance of a SecureRandom. It creates the class from
+   * the first provider that implements it.
+   *
+   * @param algorithm The algorithm name.
+   * @return A new SecureRandom implmenting the given algorithm.
+   * @throws NoSuchAlgorithmException If no installed provider implements
+   *         the given algorithm.
    */
   public static SecureRandom getInstance(String algorithm) throws
     NoSuchAlgorithmException
@@ -157,11 +172,13 @@
     Provider p[] =3D Security.getProviders();
     for (int i =3D 0; i < p.length; i++)
       {
-	try
-	  {
-	    return getInstance(algorithm, p[i]);
-	  }
-	catch (NoSuchAlgorithmException ignored) { }
+        try
+          {
+            return getInstance(algorithm, p[i]);
+          }
+        catch (NoSuchAlgorithmException ignored)
+          {
+          }
       }
=20
     // None found.
@@ -169,21 +186,26 @@
   }
=20
   /**
-     Returns an instance of a SecureRandom. It creates the class
-     for the specified algorithm from the specified provider.
-
-     @param algorithm A SecureRandom algorithm to use
-     @param provider A security provider to use
-
-     @return Returns a new SecureRandom implmenting the chosen algorithm
-
-     @throws NoSuchAlgorithmException if the algorithm cannot be found
-     @throws NoSuchProviderException if the provider cannot be found
+   * Returns an instance of a SecureRandom. It creates the class
+   * for the specified algorithm from the named provider.
+   *
+   * @param algorithm The algorithm name.
+   * @param provider  The provider name.
+   * @return A new SecureRandom implmenting the chosen algorithm.
+   * @throws NoSuchAlgorithmException If the named provider does not imple=
ment
+   *         the algorithm, or if the implementation cannot be
+   *         instantiated.
+   * @throws NoSuchProviderException If no provider named
+   *         <code>provider</code> is currently installed.
+   * @throws IllegalArgumentException If <code>provider</code> is null
+   *         or is empty.
    */
-  public static SecureRandom getInstance(String algorithm,
-					 String provider) throws
-    NoSuchAlgorithmException, NoSuchProviderException
+  public static SecureRandom getInstance(String algorithm, String provider=
)
+  throws NoSuchAlgorithmException, NoSuchProviderException
   {
+    if (provider =3D=3D null || provider.length() =3D=3D 0)
+      throw new IllegalArgumentException("Illegal provider");
+
     Provider p =3D Security.getProvider(provider);
     if (p =3D=3D null)
       throw new NoSuchProviderException();
@@ -192,88 +214,35 @@
   }
=20
   /**
-     Returns an instance of a SecureRandom. It creates the class for
-     the specified algorithm from the given provider.
-
-     @param algorithm The SecureRandom algorithm to create.
-     @param provider  The provider to get the instance from.
-
-     @throws NoSuchAlgorithmException If the algorithm cannot be found, or
-             if the class cannot be instantiated.
-   */
-  public static SecureRandom getInstance(String algorithm,
-                                         Provider provider) throws
-    NoSuchAlgorithmException
-  {
-    return getInstance(algorithm, provider, true);
-  }
-
-  /**
-     Creates the instance of SecureRandom, recursing to resolve aliases.
-
-     @param algorithm The SecureRandom algorithm to create.
-     @param provider  The provider to get the implementation from.
-     @param recurse   Whether or not to recurse to resolve aliases.
-
-     @throws NoSuchAlgorithmException If the algorithm cannot be found,
-             if there are too many aliases, or if the class cannot be
-             instantiated.
-   */
-  private static SecureRandom getInstance(String algorithm,
-                                          Provider provider,
-                                          boolean recurse)
-    throws NoSuchAlgorithmException
-  {
-    String msg =3D algorithm;
-    for (Enumeration e =3D provider.propertyNames(); e.hasMoreElements(); =
)
+   * Returns an instance of a SecureRandom. It creates the class for
+   * the specified algorithm from the given provider.
+   *
+   * @param algorithm The SecureRandom algorithm to create.
+   * @param provider  The provider to get the instance from.
+   * @throws NoSuchAlgorithmException If the algorithm cannot be found, or
+   *         if the class cannot be instantiated.
+   * @throws IllegalArgumentException If <code>provider</code> is null.
+   */
+  public static SecureRandom getInstance(String algorithm, Provider provid=
er)
+  throws NoSuchAlgorithmException
+  {
+    if (provider =3D=3D null)
+      throw new IllegalArgumentException("Illegal provider");
+    try
       {
-        // We could replace the boolean with an integer, incrementing it
-        // every
-        String key =3D (String) e.nextElement();
-        if (key.startsWith("SECURERANDOM.")
-            && key.substring(13).equalsIgnoreCase(algorithm))
-	  {
-	    try
-	      {
-		Class c =3D Class.forName(provider.getProperty(key));
-		return new SecureRandom((SecureRandomSpi) c.newInstance(),
-					provider);
-	      }
-	    catch (Throwable ignored) { }
-	  }
-	else if (key.startsWith("ALG.ALIAS.SECURERANDOM.")
-		 && key.substring(23).equalsIgnoreCase(algorithm) && recurse)
-	  {
-	    try
-	      {
-		// First see if this alias refers to a class in this
-		// provider.
-		return getInstance(provider.getProperty(key), provider, false);
-	      }
-	    catch (NoSuchAlgorithmException nsae)
-	      {
-		Provider[] provs =3D Security.getProviders();
-		for (int i =3D 0; i < provs.length; i++)
-		  {
-		    if (provs[i] =3D=3D provider)
-		      continue;
-		    // Now try other providers for the implementation
-		    try
-		      {
-			return getInstance(provider.getProperty(key),
-					   provs[i], false);
-		      }
-		    catch (NoSuchAlgorithmException nsae2)
-		      {
-			msg =3D nsae2.getMessage();
-		      }
-		  }
-	      }
-	  }
+        return new SecureRandom((SecureRandomSpi)
+          Engine.getInstance(SECURE_RANDOM, algorithm, provider),
+          provider);
+      }
+    catch (ClassCastException cce)
+      {
+        throw new NoSuchAlgorithmException(algorithm);
       }
-    throw new NoSuchAlgorithmException(algorithm);
   }
=20
+  // Instance methods.
+  // ---------------------------------------------------------------------=
---
+
   /**
      Returns the provider being used by the current SecureRandom class.
=20
@@ -318,8 +287,8 @@
 		       (byte) (0xff & (seed >> 16)),
 		       (byte) (0xff & (seed >> 8)),
 		       (byte) (0xff & seed)
-	};
-	secureRandomSpi.engineSetSeed(tmp);
+        };
+        secureRandomSpi.engineSetSeed(tmp);
       }
   }
=20
Index: libjava/java/security/Signature.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/gcc/gcc/libjava/java/security/Signature.java,v
retrieving revision 1.4
diff -u -r1.4 Signature.java
--- libjava/java/security/Signature.java	17 Nov 2002 00:10:24 -0000	1.4
+++ libjava/java/security/Signature.java	8 Mar 2003 20:50:59 -0000
@@ -1,5 +1,5 @@
 /* Signature.java --- Signature Class
-   Copyright (C) 1999, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc.
=20
 This file is part of GNU Classpath.
=20
@@ -36,43 +36,61 @@
 exception statement from your version. */
=20
 package java.security;
+
 import java.security.spec.AlgorithmParameterSpec;
=20
 /**
-   Signature is used to provide an interface to digital signature=20
-   algorithms. Digital signatures provide authentication and data=20
-   integrity of digital data.=20
-
-   The GNU provider provides the NIST standard DSA which uses DSA=20
+   <p>Signature is an interface to digital signature algorithms. Digital
+   signatures provide authentication and data integrity of digital data.
+  =20
+   <p>The GNU provider provides the NIST standard DSA which uses DSA=20
    and SHA-1. It can be specified by SHA/DSA, SHA-1/DSA or its=20
    OID. If the RSA signature algorithm is provided then
    it could be MD2/RSA. MD5/RSA, or SHA-1/RSA. The algorithm must
-   be specified because there is no default.
+   be specified because there is no default.</p>
=20
-   Signature provides implementation-independent algorithms which=20
+   <p>Signature provides implementation-independent algorithms which=20
    are requested by the user through getInstance. It can be=20
    requested by specifying just the algorithm name or by=20
-   specifying both the algorithm name and provider name.=20
-
-   The three phases of using Signature are:
-
-   1. Initialing
-
-   * It must be initialized with a private key for signing.
-   * It must be initialized with a public key for verifying.
-
-   2. Updating
-
-   Update the bytes for signing or verifying with calls to update.
-
-   3. Signing or Verify the signature on the currently stored
-   bytes by calling sign or verify.
+   specifying both the algorithm name and provider name.
+  =20
+   <p>The three phases of using Signature are:</p>
+
+   <ol>
+   <li><b>Initialising.</b> The instance is initialized with either one of=
:
+
+   <ul>
+   <li>{@link #initSign(java.security.PrivateKey,java.security.SecureRando=
m)}
+   with a private key for signing.</li>
+   <li>{@link #initVerify(java.security.PublicKey)} with a public key or a
+   certificate for verifying.</li>
+   </ul></li>
+
+   <li><b>Updating.</b>
+
+   <p>Zero or more bytes may be added to the data being signed or verified=
,
+   depending on how this instance was initialized.</p></li>
+
+   <li><b>Signing or Verifying.</b>
+  =20
+   <p>The signature is then either produced over the data input with any o=
f
+   the {@link #sign()} methods, or a signatre is tested for validity with
+   {@link #verify(byte[])}.</p></li>
+   </ol>
=20
    @author Mark Benvenuto <ivymccough@worldnet.att.net>
+   @author Casey Marshall
    @since JDK 1.1
  */
 public abstract class Signature extends SignatureSpi
 {
+
+  // Constants and fields.
+  // ---------------------------------------------------------------------=
---
+
+  /** Service name for signatures. */
+  private static final String SIGNATURE =3D "Signature";
+
   /**
      Possible state variable which signifies if it has not been=20
      initialized.
@@ -99,6 +117,9 @@
   private String algorithm;
   Provider provider;
=20
+  // Constructor.
+  // ---------------------------------------------------------------------=
---
+
   /**
      Creates a new signature for this algorithm.
=20
@@ -110,16 +131,18 @@
     state =3D UNINITIALIZED;
   }
=20
-  /**
-     Gets an instance of the Signature class representing
-     the specified signature. If the algorithm is not found then,=20
-     it throws NoSuchAlgorithmException.
-
-     @param algorithm the name of signature algorithm to choose
-     @return a Signature repesenting the desired algorithm
+  // Class methods.
+  // ---------------------------------------------------------------------=
---
=20
-     @throws NoSuchAlgorithmException if the algorithm is not implemented =
by
-     				      providers
+  /**
+   * Gets an instance of the Signature class representing
+   * the specified signature. If the algorithm is not found then,=20
+   * it throws NoSuchAlgorithmException.
+   *
+   * @param algorithm the name of signature algorithm to choose
+   * @return a Signature repesenting the desired algorithm
+   * @throws NoSuchAlgorithmException if the algorithm is not implemented =
by
+   *         any currently installed provider.
    */
   public static Signature getInstance(String algorithm)
     throws NoSuchAlgorithmException
@@ -132,30 +155,38 @@
           {
             return getInstance(algorithm, p[i]);
           }
-        catch (NoSuchAlgorithmException ignored) {}
+        catch (NoSuchAlgorithmException ignored)
+          {
+          }
       }
=20
     throw new NoSuchAlgorithmException(algorithm);
   }
=20
   /**=20
-     Gets an instance of the Signature class representing
-     the specified signature from the specified provider. If the=20
-     algorithm is not found then, it throws NoSuchAlgorithmException.
-     If the provider is not found, then it throws
-     NoSuchProviderException.
-
-     @param algorithm the name of signature algorithm to choose
-     @param provider the name of the provider to find the algorithm in
-     @return a Signature repesenting the desired algorithm
-
-     @throws NoSuchAlgorithmException if the algorithm is not implemented =
by
-				      the provider
-     @throws NoSuchProviderException if the provider is not found
+   * Gets an instance of the Signature class representing
+   * the specified signature from the specified provider. If the=20
+   * algorithm is not found then, it throws NoSuchAlgorithmException.
+   * If the provider is not found, then it throws
+   * NoSuchProviderException.
+   *
+   * @param algorithm the name of signature algorithm to choose
+   * @param provider the name of the provider to find the algorithm in
+   * @return a Signature repesenting the desired algorithm
+   *
+   * @throws NoSuchAlgorithmException If the algorithm is not implemented =
by
+   *         the provider or if the implementation cannot be instatiated.
+   * @throws NoSuchProviderException If there is no provider named
+   *         <code>provider</code> currently installed.
+   * @throws IllegalArgumentException If <code>provider</code> is null or =
is
+   *         empty.
    */
   public static Signature getInstance(String algorithm, String provider)
     throws NoSuchAlgorithmException, NoSuchProviderException
   {
+    if (provider =3D=3D null || provider.length() =3D=3D 0)
+      throw new IllegalArgumentException("Illegal provider");
+
     Provider p =3D Security.getProvider(provider);
     if (p =3D=3D null)
       throw new NoSuchProviderException(provider);
@@ -163,65 +194,47 @@
     return getInstance(algorithm, p);
   }
=20
-  private static Signature getInstance(String algorithm, Provider p)
-    throws NoSuchAlgorithmException
-  {
-    // try the name as is
-    String className =3D p.getProperty("Signature." + algorithm);
-    if (className =3D=3D null) { // try all uppercase
-      String upper =3D algorithm.toUpperCase();
-      className =3D p.getProperty("Signature." + upper);
-      if (className =3D=3D null) { // try if it's an alias
-        String alias =3D p.getProperty("Alg.Alias.Signature." + algorithm)=
;
-        if (alias =3D=3D null) {
-          alias =3D p.getProperty("Alg.Alias.Signature." + upper);
-          if (alias =3D=3D null) { // spit the dummy
-            throw new NoSuchAlgorithmException(algorithm);
-          }
-        }
-        className =3D p.getProperty("Signature." + alias);
-        if (className =3D=3D null) {
-          throw new NoSuchAlgorithmException(algorithm);
-        }
-      }
-    }
-    return getInstance(className, algorithm, p);
-  }
-
-  private static Signature getInstance(String classname,
-				       String algorithm,
-				       Provider provider)
+  /**
+   * Gets an instance of the given signature algorithm from the
+   * specified provider.
+   *
+   * @param algorithm The name of the signature algorithm to create.
+   * @param provider  The provider to get the implementation from.
+   * @return An appropriate instance of Signature.
+   * @throws NoSuchAlgorithmException If the algorithm is not
+   *         implemented by the provider, or if the implementation
+   *         cannot be instantiated.
+   * @throws IllegalArgumentException If <code>provider</code> is null.
+   * @since 1.4
+   */
+  public static Signature getInstance(String algorithm, Provider provider)
     throws NoSuchAlgorithmException
   {
-    try
-      {
-	Object o =3D Class.forName(classname).newInstance();
-	Signature sig;
-	if (o instanceof SignatureSpi)
-	  sig =3D new DummySignature((SignatureSpi) o, algorithm);
-	else
-	  {
-	    sig =3D (Signature) o;
-	    sig.algorithm =3D algorithm;
-	  }
+    if (provider =3D=3D null)
+      throw new IllegalArgumentException("Illegal provider");
+    Signature result =3D null;
+    Object o =3D Engine.getInstance(SIGNATURE, algorithm, provider);
=20
-	sig.provider =3D provider;
-	return sig;
-      }
-    catch (ClassNotFoundException cnfe)
+    if (o instanceof SignatureSpi)
       {
-	throw new NoSuchAlgorithmException("Class not found");
+        result =3D new DummySignature((SignatureSpi) o, algorithm);
       }
-    catch (InstantiationException ie)
+    else if (o instanceof Signature)
       {
-	throw new NoSuchAlgorithmException("Class instantiation failed");
+        result =3D (Signature) o;
+        result.algorithm =3D algorithm;
       }
-    catch (IllegalAccessException iae)
+    else
       {
-	throw new NoSuchAlgorithmException("Illegal Access");
+        throw new NoSuchAlgorithmException(algorithm);
       }
+    result.provider =3D provider;
+    return result;
   }
=20
+  // Instance methods.
+  // ---------------------------------------------------------------------=
---
+
   /**
      Gets the provider that the Signature is from.
=20
@@ -262,13 +275,13 @@
     state =3D VERIFY;
     if (certificate.getType().equals("X509"))
       {
-	java.security.cert.X509Certificate cert =3D
-	  (java.security.cert.X509Certificate) certificate;
+        java.security.cert.X509Certificate cert =3D
+          (java.security.cert.X509Certificate) certificate;
=20
-	boolean[]array =3D cert.getKeyUsage();
-	if (array !=3D null && array[0] =3D=3D false)
-	  throw new InvalidKeyException
-	    ("KeyUsage of this Certificate indicates it cannot be used for digita=
l signing");
+        boolean[] array =3D cert.getKeyUsage();
+        if (array !=3D null && array[0] =3D=3D false)
+          throw new InvalidKeyException
+            ("KeyUsage of this Certificate indicates it cannot be used for=
 digital signing");
       }
     this.initVerify(certificate.getPublicKey());
   }
@@ -319,8 +332,8 @@
   {
     if (state =3D=3D SIGN)
       {
-	state =3D UNINITIALIZED;
-	return engineSign();
+        state =3D UNINITIALIZED;
+        return engineSign();
       }
     else
       throw new SignatureException();
@@ -355,8 +368,8 @@
   {
     if (state =3D=3D SIGN)
       {
-	state =3D UNINITIALIZED;
-	return engineSign(outbuf, offset, len);
+        state =3D UNINITIALIZED;
+        return engineSign(outbuf, offset, len);
       }
     else
       throw new SignatureException();
@@ -376,8 +389,8 @@
   {
     if (state =3D=3D VERIFY)
       {
-	state =3D UNINITIALIZED;
-	return engineVerify(signature);
+        state =3D UNINITIALIZED;
+        return engineVerify(signature);
       }
     else
       throw new SignatureException();

--=-/14rktsROOHq8FIxovao
Content-Disposition: attachment; filename=classpath.patch
Content-Type: text/x-patch; name=classpath.patch; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Index: java/security/AlgorithmParameterGenerator.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/classpath/classpath/java/security/AlgorithmParameterGene=
rator.java,v
retrieving revision 1.4
diff -u -r1.4 AlgorithmParameterGenerator.java
--- java/security/AlgorithmParameterGenerator.java	22 Jan 2002 22:27:00 -00=
00	1.4
+++ java/security/AlgorithmParameterGenerator.java	8 Mar 2003 20:59:03 -000=
0
@@ -1,5 +1,5 @@
 /* AlgorithmParameterGenerator.java --- Algorithm Parameter Generator
-   Copyright (C) 1999 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2003 Free Software Foundation, Inc.
=20
 This file is part of GNU Classpath.
=20
@@ -39,20 +39,43 @@
 import java.security.spec.AlgorithmParameterSpec;
=20
 /**
-   AlgorithmParameterGenerator is used to generate=20
-   algorithm parameters for specified algorithms.
-   This class is used to generate the algorithm parameters
-   for a specific algorithm.
-
-   @since JDK 1.2
-   @author Mark Benvenuto
+ * Algorithm parameter generators produce {@link AlgorithmParameters}
+ * for various cryptographic algorithms.
+ *
+ * <p>Parameter generation my be done in an either algorithm-independent
+ * or -dependent fashion. The algorithm-independent way takes only a
+ * single integer argument (or a default) that is typically interpreted
+ * as the "size" -- for example in the case of the <acronym
+ * name=3D"Digital Signature Algorithm">DSA</acronym> signature
+ * algorithm this is the size of the prime modulus, in bits.
+ *
+ * <p>The algorithm-dependent approach takes a parameter specification
+ * as its argument (an implementation of {@link AlgorithmParameterSpec}),
+ * and from that produces the appropriate algorithm parameters.
+ *
+ * @see AlgorithmParameters
+ * @see AlgorithmParameterSpec
+ * @since JDK 1.2
+ * @author Mark Benvenuto
+ * @author Casey Marshall
  */
 public class AlgorithmParameterGenerator
 {
+
+  // Constants and fields.
+  // ---------------------------------------------------------------------=
---
+
+  /** Service name for algorithm parameter generators. */
+  private static final String ALGORITHM_PARAMETER_GENERATOR =3D
+    "AlgorithmParameterGenerator";
+
   private AlgorithmParameterGeneratorSpi paramGenSpi;
   private Provider provider;
   private String algorithm;
=20
+  // Constructor.
+  // ---------------------------------------------------------------------=
---
+
   /**
      Creates an instance of AlgorithmParameters
=20
@@ -69,25 +92,19 @@
     this.algorithm =3D algorithm;
   }
=20
-  /**
-     Returns the name of the algorithm used
-
-     @return A string with the name of the algorithm
-   */
-  public final String getAlgorithm()
-  {
-    return algorithm;
-  }
+  // Class methods.
+  // ---------------------------------------------------------------------=
---
=20
   /**=20
-     Gets an instance of the AlgorithmParameterGenerator class=20
-     which generates algorithm parameters for the specified algorithm.=20
-     If the algorithm is not found then, it throws NoSuchAlgorithmExceptio=
n.
-
-     @param algorithm the name of algorithm to choose
-     @return a AlgorithmParameterGenerator repesenting the desired algorit=
hm
-
-     @throws NoSuchAlgorithmException if the algorithm is not implemented =
by providers
+   * Gets an instance of the AlgorithmParameterGenerator class=20
+   * which generates algorithm parameters for the specified algorithm.=20
+   * If the algorithm is not found then, it throws NoSuchAlgorithmExceptio=
n.
+   *
+   * @param algorithm the name of algorithm to choose
+   * @return a AlgorithmParameterGenerator repesenting the desired algorit=
hm
+   *
+   * @throws NoSuchAlgorithmException if the algorithm is not implemented =
by
+   *         providers, or if the implmementation cannot be instantiated.
    */
   public static AlgorithmParameterGenerator getInstance(String algorithm)
     throws NoSuchAlgorithmException
@@ -96,65 +113,90 @@
=20
     for (int i =3D 0; i < p.length; i++)
       {
-	String classname =3D
-	  p[i].getProperty("AlgorithmParameterGenerator." + algorithm);
-	if (classname !=3D null)
-	  return getInstance(classname, algorithm, p[i]);
+        try
+          {
+            return getInstance(algorithm, p[i]);
+          }
+        catch (NoSuchAlgorithmException ignore)
+          {
+          }
       }
=20
     throw new NoSuchAlgorithmException(algorithm);
   }
=20
   /**=20
-     Gets an instance of the AlgorithmParameterGenerator class=20
-     which generates algorithm parameters for the specified algorithm.=20
-     If the algorithm is not found then, it throws NoSuchAlgorithmExceptio=
n.
-
-     @param algorithm the name of algorithm to choose
-     @param provider the name of the provider to find the algorithm in
-     @return a AlgorithmParameterGenerator repesenting the desired algorit=
hm
-
-     @throws NoSuchAlgorithmException if the algorithm is not implemented =
by the provider
-     @throws NoSuchProviderException if the provider is not found
+   * Get an algorithm parameter generator for the given algorithm from
+   * the named provider.
+   *
+   * @param algorithm the name of algorithm to choose
+   * @param provider the name of the provider to find the algorithm in
+   * @return an AlgorithmParameterGenerator for the desired algorithm
+   *
+   * @throws NoSuchAlgorithmException if the algorithm is not implemented
+   *         by the provider, or if the implementation cannot be
+   *         instantiated.
+   * @throws NoSuchProviderException If there is no provider named
+   *         <code>provider</code> currently installed.
+   * @throws IllegalArgumentException If <code>provider</code> is null
+   *         or empty.
    */
-  public static AlgorithmParameterGenerator getInstance(String algorithm,
-							String provider)
-    throws NoSuchAlgorithmException, NoSuchProviderException
+  public static AlgorithmParameterGenerator
+  getInstance(String algorithm, String provider)
+  throws NoSuchAlgorithmException, NoSuchProviderException
   {
+    if (provider =3D=3D null || provider.length() =3D=3D 0)
+      throw new IllegalArgumentException("Illegal provider");
+
     Provider p =3D Security.getProvider(provider);
     if (p =3D=3D null)
       throw new NoSuchProviderException();
=20
-    return getInstance(p.
-		       getProperty("AlgorithmParameterGenerator." +
-				   algorithm), algorithm, p);
+    return getInstance(algorithm, p);
   }
=20
-  private static AlgorithmParameterGenerator getInstance(String classname,
-							 String algorithm,
-							 Provider provider)
-    throws NoSuchAlgorithmException
+  /**
+   * Get an algorithm parameter generator for the given algorithm from
+   * the specified provider.
+   *
+   * @param algorithm The algorithm to get the parameter generator for.
+   * @param provider  The provider to get the implementation from.
+   * @throws NoSuchAlgorithmException If the provider does not implement
+   *         a parameter generator for the given algorithm, or if the
+   *         implementation cannot be instantiated.
+   * @throws IllegalArgumentExcpetion If <code>provider</code> is null.
+   * @since 1.4
+   */
+  public static AlgorithmParameterGenerator
+  getInstance(String algorithm, Provider provider)
+  throws NoSuchAlgorithmException
   {
-
+    if (provider =3D=3D null)
+      throw new IllegalArgumentException("Illegal provider");
     try
       {
-	return new
-	  AlgorithmParameterGenerator((AlgorithmParameterGeneratorSpi) Class.
-				      forName(classname).newInstance(),
-				      provider, algorithm);
-      }
-    catch (ClassNotFoundException cnfe)
-      {
-	throw new NoSuchAlgorithmException("Class not found");
+        return new AlgorithmParameterGenerator(
+          (AlgorithmParameterGeneratorSpi) Engine.getInstance(
+            ALGORITHM_PARAMETER_GENERATOR, algorithm, provider),
+          provider, algorithm);
       }
-    catch (InstantiationException ie)
+    catch (ClassCastException cce)
       {
-	throw new NoSuchAlgorithmException("Class instantiation failed");
-      }
-    catch (IllegalAccessException iae)
-      {
-	throw new NoSuchAlgorithmException("Illegal Access");
+        throw new NoSuchAlgorithmException(algorithm);
       }
+  }
+
+  // Instance methods.
+  // ---------------------------------------------------------------------=
---
+
+  /**
+     Returns the name of the algorithm used
+
+     @return A string with the name of the algorithm
+   */
+  public final String getAlgorithm()
+  {
+    return algorithm;
   }
=20
   /**
Index: java/security/AlgorithmParameters.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/classpath/classpath/java/security/AlgorithmParameters.ja=
va,v
retrieving revision 1.4
diff -u -r1.4 AlgorithmParameters.java
--- java/security/AlgorithmParameters.java	22 Jan 2002 22:27:00 -0000	1.4
+++ java/security/AlgorithmParameters.java	8 Mar 2003 20:59:03 -0000
@@ -1,5 +1,5 @@
 /* AlgorithmParameters.java --- Algorithm Parameters Implementation Class
-   Copyright (C) 1999 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2003 Free Software Foundation, Inc.
=20
 This file is part of GNU Classpath.
=20
@@ -35,26 +35,43 @@
 obligated to do so.  If you do not wish to do so, delete this
 exception statement from your version. */
=20
-
 package java.security;
+
 import java.security.spec.InvalidParameterSpecException;
 import java.security.spec.AlgorithmParameterSpec;
 import java.io.IOException;
=20
 /**
-   AlgorithmParameters is the Algorithm Parameters class which=20
-   provides an interface through which to modify parameters for=20
-   classes. This class is used to manage the algorithm parameters.
-
-   @since JDK 1.2
-   @author Mark Benvenuto
+ * An opaque representation of a cryptographic algorithm's parameters.
+ *
+ * <p>This class provides methods for encoding and decoding algorithm
+ * parameters to and from standard formats (<acronym
+ * name=3D"Abstract Syntax Notation One">ASN.1</acronym> for example), and
+ * for translating parameters to and from transparent representations
+ * (subclasses of {@link AlgorithmParameterSpec}).
+ *
+ * @see AlgorithmParameterGenerator
+ * @see AlgorithmParameterSpec
+ * @since JDK 1.2
+ * @author Mark Benvenuto
+ * @author Casey Marshall
  */
 public class AlgorithmParameters
 {
+
+  // Constants and fields.
+  // ---------------------------------------------------------------------=
---
+
+  /** Service name for algorithm parameters. */
+  private static final String ALGORITHM_PARAMETERS =3D "AlgorithmParameter=
s";
+
   private AlgorithmParametersSpi paramSpi;
   private Provider provider;
   private String algorithm;
=20
+  // Constructor.
+  // ---------------------------------------------------------------------=
---
+
   /**
      Creates an instance of AlgorithmParameters
=20
@@ -70,28 +87,17 @@
     this.algorithm =3D algorithm;
   }
=20
-  /**
-     Returns the name of the algorithm used
+  // Class methods.
+  // ---------------------------------------------------------------------=
---
=20
-     @return A string with the name of the algorithm
-   */
-  public final String getAlgorithm()
-  {
-    return algorithm;
-  }
-
-  /**=20
-     Gets an instance of the AlgorithmParameters class representing
-     the specified algorithm parameters. If the algorithm is not=20
-     found then, it throws NoSuchAlgorithmException.
-
-     The returned AlgorithmParameters must still be intialized with
-     init().
-
-     @param algorithm the name of algorithm to choose
-     @return a AlgorithmParameters repesenting the desired algorithm
-
-     @throws NoSuchAlgorithmException if the algorithm is not implemented =
by providers
+  /**
+   * Returns an instance of AlgorithmParameters for the given algorithm.
+   *
+   * @param algorithm the name of algorithm to choose
+   * @return An AlgorithmParameters for the given algorithm
+   * @throws NoSuchAlgorithmException If no provider implements algorithm
+   *         parameters for the given algorithm or if no implementation
+   *         can be instantiated.
    */
   public static AlgorithmParameters getInstance(String algorithm) throws
     NoSuchAlgorithmException
@@ -100,68 +106,86 @@
=20
     for (int i =3D 0; i < p.length; i++)
       {
-	String classname =3D
-	  p[i].getProperty("AlgorithmParameters." + algorithm);
-	if (classname !=3D null)
-	  return getInstance(classname, algorithm, p[i]);
+        try
+          {
+            return getInstance(algorithm, p[i]);
+          }
+        catch (NoSuchAlgorithmException ignored)
+          {
+          }
       }
=20
     throw new NoSuchAlgorithmException(algorithm);
   }
=20
-  /**=20
-     Gets an instance of the AlgorithmParameters class representing
-     the specified algorithm parameters from the specified provider.=20
-     If the algorithm is not found then, it throws=20
-     NoSuchAlgorithmException. If the provider is not found, then=20
-     it throws NoSuchProviderException.
-
-     The returned AlgorithmParameters must still be intialized with
-     init().
-
-     @param algorithm the name of algorithm to choose
-     @param provider the name of the provider to find the algorithm in
-     @return a AlgorithmParameters repesenting the desired algorithm
-
-     @throws NoSuchAlgorithmException if the algorithm is not implemented =
by the provider
-     @throws NoSuchProviderException if the provider is not found
+  /**
+   * Returns an instance of AlgorithmParameters for the given algorithm
+   * from the named provider.
+   *
+   * @param algorithm the name of algorithm to choose
+   * @param provider the name of the provider to find the algorithm in
+   * @return a AlgorithmParameters repesenting the desired algorithm
+   * @throws NoSuchAlgorithmException if the algorithm is not implemented =
by
+   *         the provider, or if the implementation cannot be instantiated=
.
+   * @throws NoSuchProviderException If no provider named <code>provider</=
code>
+   *         is installed.
+   * @throws IllegalArgumentException If <code>provider</code> is null
+   *         or is empty.
    */
-  public static AlgorithmParameters getInstance(String algorithm,
-						String provider) throws
-    NoSuchAlgorithmException, NoSuchProviderException
+  public static AlgorithmParameters
+  getInstance(String algorithm, String provider)
+  throws NoSuchAlgorithmException, NoSuchProviderException
   {
+    if (provider =3D=3D null || provider.length() =3D=3D 0)
+      throw new IllegalArgumentException("Illegal provider");
+
     Provider p =3D Security.getProvider(provider);
     if (p =3D=3D null)
       throw new NoSuchProviderException();
=20
-    return getInstance(p.getProperty("AlgorithmParameters." + algorithm),
-		       algorithm, p);
+    return getInstance(algorithm, p);
   }
=20
-  private static AlgorithmParameters getInstance(String classname,
-						 String algorithm,
-						 Provider provider)
-    throws NoSuchAlgorithmException
+  /**
+   * Returns an instance of AlgorithmParameters for the given algorithm
+   * from the specified provider.
+   *
+   * @param algorithm the name of algorithm to choose
+   * @param provider the name of the provider to find the algorithm in
+   * @return a AlgorithmParameters repesenting the desired algorithm
+   * @throws NoSuchAlgorithmException if the algorithm is not implemented =
by
+   *         the provider, or if the implementation cannot be instantiated=
.
+   * @throws IllegalArgumentException If <code>provider</code> is null.
+   */
+  public static AlgorithmParameters
+  getInstance(String algorithm, Provider provider)
+  throws NoSuchAlgorithmException
   {
-
+    if (provider =3D=3D null)
+      throw new IllegalArgumentException("Illegal provider");
     try
       {
-	return new AlgorithmParameters((AlgorithmParametersSpi) Class.
-				       forName(classname).newInstance(),
-				       provider, algorithm);
+        return new AlgorithmParameters((AlgorithmParametersSpi)
+          Engine.getInstance(ALGORITHM_PARAMETERS, algorithm, provider),
+          provider, algorithm);
       }
-    catch (ClassNotFoundException cnfe)
+    catch (ClassCastException cce)
       {
-	throw new NoSuchAlgorithmException("Class not found");
-      }
-    catch (InstantiationException ie)
-      {
-	throw new NoSuchAlgorithmException("Class instantiation failed");
-      }
-    catch (IllegalAccessException iae)
-      {
-	throw new NoSuchAlgorithmException("Illegal Access");
+        throw new NoSuchAlgorithmException(algorithm);
       }
+  }
+
+  // Instnace methods.
+  // ---------------------------------------------------------------------=
---
+
+  /**
+     Returns the name of the algorithm used
+
+     @return A string with the name of the algorithm
+   */
+  public final String getAlgorithm()
+  {
+    return algorithm;
   }
=20
   /**
Index: java/security/Engine.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: java/security/Engine.java
diff -N java/security/Engine.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ java/security/Engine.java	8 Mar 2003 20:59:04 -0000
@@ -0,0 +1,152 @@
+/* Engine -- generic getInstance method.
+   Copyright (C) 2003  Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+package java.security;
+
+/**
+ * Generic implementation of the getInstance methods in the various
+ * engine classes in java.security.
+ * <p>
+ * These classes ({@link java.security.Signature} for example) can be
+ * thought of as the "chrome, upholstery, and steering wheel", and the SPI
+ * (service provider interface, e.g. {@link java.security.SignatureSpi})
+ * classes can be thought of as the "engine" -- providing the actual
+ * functionality of whatever cryptographic algorithm the instance
+ * represents.
+ *
+ * @see Provider
+ * @author Casey Marshall=20
+ */
+final class Engine
+{
+
+  // Constants.
+  // ---------------------------------------------------------------------=
---
+
+  /** Prefix for aliases. */
+  private static final String ALG_ALIAS =3D "Alg.Alias.";
+
+  /** Maximum number of aliases to try. */
+  private static final int MAX_ALIASES =3D 5;
+
+  // Constructor.
+  // ---------------------------------------------------------------------=
---
+
+  /** This class cannot be instantiated. */
+  private Engine() { }
+
+  // Class method.
+  // ---------------------------------------------------------------------=
---
+
+  /**
+   * Get the implementation for <i>algorithm</i> for service
+   * <i>service</i> from <i>provider</i>. The service is e.g.
+   * "Signature", and the algorithm "DSA".
+   *
+   * @param service   The service name.
+   * @param algorithm The name of the algorithm to get.
+   * @param provider  The provider to get the implementation from.
+   * @return The engine class for the specified algorithm; the object
+   *         returned is typically a subclass of the SPI class for that
+   *         service, but callers should check that this is so.
+   * @throws NoSuchAlgorithmException If the implementation cannot be
+   *         found or cannot be instantiated.
+   * @throws IllegalArgumentException If any of the three arguments are nu=
ll.
+   */
+  static Object
+  getInstance(String service, String algorithm, Provider provider)
+  throws NoSuchAlgorithmException
+  {
+    if (service =3D=3D null || algorithm =3D=3D null || provider =3D=3D nu=
ll)
+      throw new IllegalArgumentException();
+
+    // If there is no property "service.algorithm"
+    if (provider.getProperty(service + "." + algorithm) =3D=3D null)
+      {
+        // Iterate through aliases, until we find the class name or resolv=
e
+        // too many aliases.
+        String alias =3D null;
+        int count =3D 0;
+        while ((alias =3D provider.getProperty(
+                ALG_ALIAS + service + "." + algorithm)) !=3D null)
+          {
+            if (algorithm.equals(alias))  // Refers to itself!
+              break;
+            algorithm =3D alias;
+            if (count++ > MAX_ALIASES)
+              throw new NoSuchAlgorithmException("too many aliases");
+          }
+        if (provider.getProperty(service + "." + algorithm) =3D=3D null)
+          throw new NoSuchAlgorithmException(algorithm);
+      }
+
+    // Find and instantiate the implementation.
+    Class clazz =3D null;
+    ClassLoader loader =3D provider.getClass().getClassLoader();
+    String error =3D algorithm;
+    try
+      {
+        if (loader !=3D null)
+          clazz =3D loader.loadClass(provider.getProperty(service+"."+algo=
rithm));
+        else
+          clazz =3D Class.forName(provider.getProperty(service+"."+algorit=
hm));
+        return clazz.newInstance();
+      }
+    catch (ClassNotFoundException cnfe)
+      {
+        error =3D "class not found: " + algorithm;
+      }
+    catch (IllegalAccessException iae)
+      {
+        error =3D "illegal access: " + iae.getMessage();
+      }
+    catch (InstantiationException ie)
+      {
+        error =3D "instantiation exception: " + ie.getMessage();
+      }
+    catch (ExceptionInInitializerError eiie)
+      {
+        error =3D "exception in initializer: " + eiie.getMessage();
+      }
+    catch (SecurityException se)
+      {
+        error =3D "security exception: " + se.getMessage();
+      }
+
+    throw new NoSuchAlgorithmException(error);
+  }
+}
Index: java/security/KeyFactory.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/classpath/classpath/java/security/KeyFactory.java,v
retrieving revision 1.4
diff -u -r1.4 KeyFactory.java
--- java/security/KeyFactory.java	22 Jan 2002 22:27:00 -0000	1.4
+++ java/security/KeyFactory.java	8 Mar 2003 20:59:04 -0000
@@ -1,5 +1,5 @@
 /* KeyFactory.java --- Key Factory Class
-   Copyright (C) 1999 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2003 Free Software Foundation, Inc.
=20
 This file is part of GNU Classpath.
=20
@@ -36,31 +36,42 @@
 exception statement from your version. */
=20
 package java.security;
+
 import java.security.spec.KeySpec;
 import java.security.spec.InvalidKeySpecException;
=20
 /**
-   Key factories are used to convert keys (opaque cryptographic=20
-   keys of type Key) into key specifications (transparent=20
-   representations of the underlying key material).
-
-   Key factories are bi-directional. They allow a key class=20
-   to be converted into a key specification (key material) and
-   back again.
-
-   For example DSA public keys can be specified as=20
-   DSAPublicKeySpec or X509EncodedKeySpec. The key factory
-   translate these key specifications.=20
-
-   @since JDK 1.2
-   @author Mark Benvenuto
+ * Key factories are used to convert keys (opaque cryptographic keys of
+ * type {@link Key}) to and from key specifications (transparent
+ * representations of the underlying key material), and to translate
+ * keys into vendor-specific types.
+ *
+ * <p>For example, DSA public keys can be specified as {@link
+ * java.security.spec.DSAPublicKeySpec} or {@link
+ * java.security.spec.X509EncodedKeySpec}, and DSA key factories can
+ * translate these key specifications into instances of {@link
+ * java.security.interfaces.DSAKey}.
+ *
+ * @since JDK 1.2
+ * @author Mark Benvenuto
+ * @author Casey Marshall
  */
 public class KeyFactory
 {
+
+  // Constants and fields.
+  // ---------------------------------------------------------------------=
---
+
+  /** The service name for key factories. */
+  private static final String KEY_FACTORY =3D "KeyFactory";
+
   private KeyFactorySpi keyFacSpi;
   private Provider provider;
   private String algorithm;
=20
+  // Constructors.
+  // ---------------------------------------------------------------------=
---
+
   /**
      Constructs a new keyFactory with the specified parameters.
=20
@@ -76,15 +87,16 @@
     this.algorithm =3D algorithm;
   }
=20
-  /**=20
-     Gets an instance of the KeyFactory class representing
-     the specified key factory. If the algorithm is not=20
-     found then, it throws NoSuchAlgorithmException.
-
-     @param algorithm the name of algorithm to choose
-     @return a KeyFactory repesenting the desired algorithm
+  // Class methods.
+  // ---------------------------------------------------------------------=
---
=20
-     @throws NoSuchAlgorithmException if the algorithm is not implemented =
by providers
+  /**
+   * Get a key factory from the first provider that implements it.
+   *
+   * @param algorithm the name of algorithm to choose
+   * @return a KeyFactory repesenting the desired algorithm
+   * @throws NoSuchAlgorithmException If the algorithm is not implemented
+   *         by providers or if the implementation cannot be instantiated.
    */
   public static KeyFactory getInstance(String algorithm)
     throws NoSuchAlgorithmException
@@ -93,63 +105,73 @@
=20
     for (int i =3D 0; i < p.length; i++)
       {
-	String classname =3D p[i].getProperty("KeyFactory." + algorithm);
-	if (classname !=3D null)
-	  return getInstance(classname, algorithm, p[i]);
+        try
+          {
+            return getInstance(algorithm, p[i]);
+          }
+        catch (NoSuchAlgorithmException ignore)
+          {
+          }
       }
=20
     throw new NoSuchAlgorithmException(algorithm);
   }
=20
-  /**=20
-     Gets an instance of the KeyFactory class representing
-     the specified key factory from the specified provider.=20
-     If the algorithm is not found then, it throws=20
-     NoSuchAlgorithmException. If the provider is not found, then=20
-     it throws NoSuchProviderException.
-
-     @param algorithm the name of algorithm to choose
-     @param provider the name of the provider to find the algorithm in
-     @return a KeyFactory repesenting the desired algorithm
-
-     @throws NoSuchAlgorithmException if the algorithm is not implemented =
by the provider
-     @throws NoSuchProviderException if the provider is not found
+  /**
+   * Get a key factory from a named provider.
+   *
+   * @param algorithm The name of the algorithm.
+   * @param provider  The name of the provider.
+   * @return a KeyFactory for the desired algorithm
+   * @throws NoSuchAlgorithmException If the algorithm is not implemented
+   *         by the provider or if the implementation cannot be instantiat=
ed.
+   * @throws NoSuchProviderException If the provider is not found.
+   * @throws IllegalArgumentException If <code>provider</code> is null or
+   *         is empty.
    */
   public static KeyFactory getInstance(String algorithm, String provider)
     throws NoSuchAlgorithmException, NoSuchProviderException
   {
+    if (provider =3D=3D null || provider.length() =3D=3D 0)
+      throw new IllegalArgumentException("Illegal provider");
+
     Provider p =3D Security.getProvider(provider);
     if (p =3D=3D null)
       throw new NoSuchProviderException();
=20
-    return getInstance(p.getProperty("KeyFactory." + algorithm),
-		       algorithm, p);
+    return getInstance(algorithm, p);
   }
=20
-  private static KeyFactory getInstance(String classname,
-					String algorithm,
-					Provider provider)
-    throws NoSuchAlgorithmException
+  /**
+   * Get a key factory from the specified provider.
+   *
+   * @param algorithm The name of the algorithm.
+   * @param provider  The provider to get the implementation from.
+   * @return A key factory for the given algorithm.
+   * @throws NoSuchAlgorithmException If the provider does not implement
+   *         the given algorithm, or if the implementation cannot be
+   *         instantiated.
+   * @throws IllegalArgumentException If <code>provider</code> is null.
+   */
+  public static KeyFactory getInstance(String algorithm, Provider provider=
)
+  throws NoSuchAlgorithmException
   {
-
+    if (provider =3D=3D null)
+      throw new IllegalArgumentException("Illegal provider");
     try
       {
-	return new KeyFactory((KeyFactorySpi) Class.forName(classname).
-			      newInstance(), provider, algorithm);
+        return new KeyFactory((KeyFactorySpi)
+          Engine.getInstance(KEY_FACTORY, algorithm, provider),
+          provider, algorithm);
       }
-    catch (ClassNotFoundException cnfe)
+    catch (ClassCastException cce)
       {
-	throw new NoSuchAlgorithmException("Class not found");
-      }
-    catch (InstantiationException ie)
-      {
-	throw new NoSuchAlgorithmException("Class instantiation failed");
-      }
-    catch (IllegalAccessException iae)
-      {
-	throw new NoSuchAlgorithmException("Illegal Access");
+        throw new NoSuchAlgorithmException(algorithm);
       }
   }
+
+  // Instance methods.
+  // ---------------------------------------------------------------------=
---
=20
   /**
      Gets the provider that the class is from.
Index: java/security/KeyPairGenerator.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/classpath/classpath/java/security/KeyPairGenerator.java,=
v
retrieving revision 1.6
diff -u -r1.6 KeyPairGenerator.java
--- java/security/KeyPairGenerator.java	16 Nov 2002 23:28:25 -0000	1.6
+++ java/security/KeyPairGenerator.java	8 Mar 2003 20:59:05 -0000
@@ -1,5 +1,5 @@
 /* KeyPairGenerator.java --- Key Pair Generator Class
-   Copyright (C) 1999, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc.
=20
 This file is part of GNU Classpath.
=20
@@ -40,25 +40,34 @@
 import java.security.spec.AlgorithmParameterSpec;
=20
 /**
-   KeyPairGenerator is the class used to generate key pairs
-   for a security algorithm.
-
-   The KeyPairGenerator is created with the getInstance()
-   methods. The class is used to generate public and private
-   keys for an algorithm and associate it with=20
-   algorithm parameters.
-
-   @author Mark Benvenuto
+ * An interface to a key pair generator. Key pairs are used in various
+ * <i>public-key</i> cryptographic algorithms, such as digital signing,
+ * key agreement, and asymmetric cryptography.
+ *
+ * @see Signature
+ * @see KeyPair
+ * @author Mark Benvenuto
+ * @author Casey Marshall
  */
 public abstract class KeyPairGenerator extends KeyPairGeneratorSpi
 {
+
+  // Constants and fields.
+  // ---------------------------------------------------------------------=
---
+
+  /** The service name for key pair generators. */
+  private static final String KEY_PAIR_GENERATOR =3D "KeyPairGenerator";
+
   Provider provider;
   private String algorithm;
=20
-  /**
-     Constructs a new KeyPairGenerator
+  // Constructors.
+  // ---------------------------------------------------------------------=
---
=20
-     @param algorithm the algorithm to use
+  /**
+   * Constructs a new KeyPairGenerator
+   *
+   * @param algorithm the algorithm to use
    */
   protected KeyPairGenerator(String algorithm)
   {
@@ -66,60 +75,58 @@
     this.provider =3D null;
   }
=20
-  /**
-     Returns the name of the algorithm used
-
-     @return A string with the name of the algorithm
-   */
-  public String getAlgorithm()
-  {
-    return algorithm;
-  }
-
-  /**=20
-     Gets an instance of the KeyPairGenerator class=20
-     which generates key pairs for the specified algorithm.=20
-     If the algorithm is not found then, it throws NoSuchAlgorithmExceptio=
n.
-
-     @param algorithm the name of algorithm to choose
-     @return a AlgorithmParameterGenerator repesenting the desired algorit=
hm
+  // Class methods.
+  // ---------------------------------------------------------------------=
---
=20
-     @throws NoSuchAlgorithmException if the algorithm is not implemented =
by
-     				      providers
+  /**
+   * Get a key pair generator for the specified algorithm from the first
+   * provider that implements it.
+   *
+   * @param algorithm the name of algorithm to choose
+   * @return a AlgorithmParameterGenerator repesenting the desired algorit=
hm
+   * @throws NoSuchAlgorithmException if the algorithm is not implemented =
by
+   *         any installed provider or if no implementation can be
+   *         instantiated.
    */
-  public static KeyPairGenerator getInstance(String algorithm) throws
-    NoSuchAlgorithmException
+  public static KeyPairGenerator getInstance(String algorithm)
+  throws NoSuchAlgorithmException
   {
     Provider[] p =3D Security.getProviders();
=20
     for (int i =3D 0; i < p.length; i++)
       {
-	try
-	  {
-	    return getInstance(algorithm, p[i]);
-	  }
-	catch (NoSuchAlgorithmException ignored) {}
+        try
+          {
+            return getInstance(algorithm, p[i]);
+          }
+        catch (NoSuchAlgorithmException ignored)
+          {
+          }
       }
=20
     throw new NoSuchAlgorithmException(algorithm);
   }
=20
-  /**=20
-     Gets an instance of the KeyPairGenerator class=20
-     which generates key pairs for the specified algorithm.=20
-     If the algorithm is not found then, it throws NoSuchAlgorithmExceptio=
n.
-
-     @param algorithm the name of algorithm to choose
-     @param provider the name of the provider to find the algorithm in
-     @return a AlgorithmParameterGenerator repesenting the desired algorit=
hm
-
-     @throws NoSuchAlgorithmException if the algorithm is not implemented =
by
-     				      the provider
-     @throws NoSuchProviderException if the provider is not found
+  /**
+   * Get a key pair generator for the specified algorithm from the named
+   * provider.
+   *
+   * @param algorithm The name of the algorithm.
+   * @param provider  The name of the provider.
+   * @return A KeyPairGenerator for the desired algorithm.
+   * @throws NoSuchAlgorithmException If the algorithm is not implemented =
by
+   *         the provider or if the implementation cannot be instantiated.
+   * @throws NoSuchProviderException If no provider named
+   *         <code>provider</code> is installed.
+   * @throws IllegalArgumentException If <code>provider</code> is null
+   *         or is empty.
    */
   public static KeyPairGenerator getInstance(String algorithm, String prov=
ider)
-    throws NoSuchAlgorithmException, NoSuchProviderException
+  throws NoSuchAlgorithmException, NoSuchProviderException
   {
+    if (provider =3D=3D null || provider.length() =3D=3D 0)
+      throw new IllegalArgumentException("Illegal provider");
+
     Provider p =3D Security.getProvider(provider);
     if (p =3D=3D null)
       throw new NoSuchProviderException(provider);
@@ -127,63 +134,51 @@
     return getInstance(algorithm, p);
   }
=20
-  private static KeyPairGenerator getInstance(String algorithm, Provider p=
)
-    throws NoSuchAlgorithmException
-  {
-    // try the name as is
-    String className =3D p.getProperty("KeyPairGenerator." + algorithm);
-    if (className =3D=3D null) { // try all uppercase
-      String upper =3D algorithm.toUpperCase();
-      className =3D p.getProperty("KeyPairGenerator." + upper);
-      if (className =3D=3D null) { // try if it's an alias
-        String alias =3D p.getProperty("Alg.Alias.KeyPairGenerator." + alg=
orithm);
-        if (alias =3D=3D null) { // try all-uppercase alias name
-          alias =3D p.getProperty("Alg.Alias.KeyPairGenerator." + upper);
-          if (alias =3D=3D null) { // spit the dummy
-            throw new NoSuchAlgorithmException(algorithm);
-          }
-        }
-        className =3D p.getProperty("KeyPairGenerator." + alias);
-        if (className =3D=3D null) {
-          throw new NoSuchAlgorithmException(algorithm);
-        }
-      }
-    }
-    return getInstance(className, algorithm, p);
-  }
-
-  private static KeyPairGenerator getInstance(String classname,
-					      String algorithm,
-					      Provider provider)
-    throws NoSuchAlgorithmException
-  {
-    try
-      {
-	Object o =3D Class.forName(classname).newInstance();
-	KeyPairGenerator kpg;
-	if (o instanceof KeyPairGeneratorSpi)
-	  kpg =3D new DummyKeyPairGenerator((KeyPairGeneratorSpi) o, algorithm);
-	else
-	  {
-	    kpg =3D (KeyPairGenerator) o;
-	    kpg.algorithm =3D algorithm;
-	  }
-
-	kpg.provider =3D provider;
-	return kpg;
-      }
-    catch (ClassNotFoundException cnfe)
-      {
-	throw new NoSuchAlgorithmException("Class not found");
-      }
-    catch (InstantiationException ie)
+  /**
+   * Get a key pair generator for the specified algorithm from the given
+   * provider.
+   *
+   * @param algorithm The name of the algorithm.
+   * @param provider  The provider.
+   * @return A KeyPairGenerator for the desired algorithm.
+   * @throws NoSuchAlgorithmException If the algorithm is not implemented =
by
+   *         the provider or if the implementation cannot be instantiated.
+   * @throws IllegalArgumentException If <code>provider</code> is null.
+   * @since 1.4
+   */
+  public static KeyPairGenerator
+  getInstance(String algorithm, Provider provider)
+  throws NoSuchAlgorithmException
+  {
+    if (provider =3D=3D null)
+      throw new IllegalArgumentException("Illegal provider");
+
+    Object o =3D Engine.getInstance(KEY_PAIR_GENERATOR, algorithm, provide=
r);
+    KeyPairGenerator result =3D null;
+    if (o instanceof KeyPairGeneratorSpi)
       {
-	throw new NoSuchAlgorithmException("Class instantiation failed");
+        result =3D new DummyKeyPairGenerator((KeyPairGeneratorSpi) o, algo=
rithm);
       }
-    catch (IllegalAccessException iae)
+    else if (o instanceof KeyPairGenerator)
       {
-	throw new NoSuchAlgorithmException("Illegal Access");
+        result =3D (KeyPairGenerator) o;
+        result.algorithm =3D algorithm;
       }
+    result.provider =3D provider;
+    return result;
+  }
+
+  // Instance methods.
+  // ---------------------------------------------------------------------=
---
+
+  /**
+     Returns the name of the algorithm used
+
+     @return A string with the name of the algorithm
+   */
+  public String getAlgorithm()
+  {
+    return algorithm;
   }
=20
   /**
Index: java/security/KeyStore.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/classpath/classpath/java/security/KeyStore.java,v
retrieving revision 1.5
diff -u -r1.5 KeyStore.java
--- java/security/KeyStore.java	18 Nov 2002 18:04:38 -0000	1.5
+++ java/security/KeyStore.java	8 Mar 2003 20:59:06 -0000
@@ -1,5 +1,5 @@
 /* KeyStore.java --- Key Store Class
-   Copyright (C) 1999, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc.
=20
 This file is part of GNU Classpath.
=20
@@ -44,37 +44,52 @@
 import java.util.Enumeration;
=20
 /**
-   Keystore represents an in-memory collection of keys and=20
-   certificates. There are two types of entries:
-
-   * Key Entry
-
-   This type of keystore entry store sensitive crytographic key
-   information in a protected format.Typically this is a secret=20
-   key or a private key with a certificate chain.
-
-
-   * Trusted Ceritificate Entry
-
-   This type of keystore entry contains a single public key=20
-   certificate belonging to annother entity. It is called trusted
-   because the keystore owner trusts that the certificates
-   belongs to the subject (owner) of the certificate.
-
-   The keystore contains an "alias" string for each entry.=20
-
-   The structure and persistentence of the key store is not=20
-   specified. Any method could be used to protect sensitive=20
-   (private or secret) keys. Smart cards or integrated=20
-   cryptographic engines could be used or the keystore could=20
-   be simply stored in a file.=20
+ * Keystore represents an in-memory collection of keys and=20
+ * certificates. There are two types of entries:
+ *
+ * <dl>
+ * <dt>Key Entry</dt>
+ *
+ * <dd><p>This type of keystore entry store sensitive crytographic key
+ * information in a protected format.Typically this is a secret=20
+ * key or a private key with a certificate chain.</p></dd>
+ *
+ * <dt>Trusted Ceritificate Entry</dt>
+ *
+ * <dd><p>This type of keystore entry contains a single public key=20
+ * certificate belonging to annother entity. It is called trusted
+ * because the keystore owner trusts that the certificates
+ * belongs to the subject (owner) of the certificate.</p></dd>
+ * </dl>
+ *
+ * <p>Entries in a key store are referred to by their "alias": a simple
+ * unique string.
+ *
+ * <p>The structure and persistentence of the key store is not=20
+ * specified. Any method could be used to protect sensitive=20
+ * (private or secret) keys. Smart cards or integrated=20
+ * cryptographic engines could be used or the keystore could=20
+ * be simply stored in a file.</p>
+ *
+ * @see java.security.cert.Certificate
+ * @see Key
  */
 public class KeyStore
 {
+
+  // Constants and fields.
+  // ---------------------------------------------------------------------=
---
+
+  /** Service name for key stores. */
+  private static final String KEY_STORE =3D "KeyStore";
+
   private KeyStoreSpi keyStoreSpi;
   private Provider provider;
   private String type;
=20
+  // Constructors.
+  // ---------------------------------------------------------------------=
---
+
   /**
      Creates an instance of KeyStore
=20
@@ -89,16 +104,18 @@
     this.type =3D type;
   }
=20
-  /**=20
-     Gets an instance of the KeyStore class representing
-     the specified keystore. If the type is not=20
-     found then, it throws KeyStoreException.
-
-     @param type the type of keystore to choose
-
-     @return a KeyStore repesenting the desired type
+  // Class methods.
+  // ---------------------------------------------------------------------=
---
=20
-     @throws KeyStoreException if the type of keystore is not implemented =
by providers
+  /**=20
+   * Gets an instance of the KeyStore class representing
+   * the specified keystore. If the type is not=20
+   * found then, it throws KeyStoreException.
+   *
+   * @param type the type of keystore to choose
+   * @return a KeyStore repesenting the desired type
+   * @throws KeyStoreException if the type of keystore is not implemented
+   *         by providers or the implementation cannot be instantiated.
    */
   public static KeyStore getInstance(String type) throws KeyStoreException
   {
@@ -106,95 +123,102 @@
=20
     for (int i =3D 0; i < p.length; i++)
       {
-	String classname =3D p[i].getProperty("KeyStore." + type);
-	if (classname !=3D null)
-	  return getInstance(classname, type, p[i]);
+        try
+          {
+            return getInstance(type, p[i]);
+          }
+        catch (KeyStoreException ignore)
+          {
+          }
       }
=20
     throw new KeyStoreException(type);
   }
=20
   /**=20
-     Gets an instance of the KeyStore class representing
-     the specified key store from the specified provider.=20
-     If the type is not found then, it throws KeyStoreException.=20
-     If the provider is not found, then it throws=20
-     NoSuchProviderException.
-
-     @param type the type of keystore to choose
-     @param provider the provider name
-
-     @return a KeyStore repesenting the desired type
-
-     @throws KeyStoreException if the type of keystore is not=20
-              implemented by the given provider
-     @throws NoSuchProviderException if the provider is not found
-     @throws IllegalArgumentException if the provider string is=20
-               null or empty
+   * Gets an instance of the KeyStore class representing
+   * the specified key store from the specified provider.=20
+   * If the type is not found then, it throws KeyStoreException.=20
+   * If the provider is not found, then it throws=20
+   * NoSuchProviderException.
+   *
+   * @param type the type of keystore to choose
+   * @param provider the provider name
+   * @return a KeyStore repesenting the desired type
+   * @throws KeyStoreException if the type of keystore is not=20
+   *          implemented by the given provider
+   * @throws NoSuchProviderException if the provider is not found
+   * @throws IllegalArgumentException if the provider string is=20
+   *           null or empty
    */
   public static KeyStore getInstance(String type, String provider)
     throws KeyStoreException, NoSuchProviderException
   {
     if (provider =3D=3D null || provider.length() =3D=3D 0)
       throw new IllegalArgumentException("Illegal provider");
+
     Provider p =3D Security.getProvider(provider);
     if (p =3D=3D null)
       throw new NoSuchProviderException();
=20
-    return getInstance(p.getProperty("KeyStore." + type), type, p);
+    return getInstance(type, p);
   }
=20
   /**=20
-     Gets an instance of the KeyStore class representing
-     the specified key store from the specified provider.=20
-     If the type is not found then, it throws KeyStoreException.=20
-     If the provider is not found, then it throws=20
-     NoSuchProviderException.
-
-     @param type the type of keystore to choose
-     @param provider the keystore provider
-
-     @return a KeyStore repesenting the desired type
-
-     @throws KeyStoreException if the type of keystore is not=20
-              implemented by the given provider
-     @throws IllegalArgumentException if the provider object is null
-     @since 1.4
+   * Gets an instance of the KeyStore class representing
+   * the specified key store from the specified provider.=20
+   * If the type is not found then, it throws KeyStoreException.=20
+   * If the provider is not found, then it throws=20
+   * NoSuchProviderException.
+   *
+   * @param type the type of keystore to choose
+   * @param provider the keystore provider
+   * @return a KeyStore repesenting the desired type
+   * @throws KeyStoreException if the type of keystore is not=20
+   *          implemented by the given provider
+   * @throws IllegalArgumentException if the provider object is null
+   * @since 1.4
    */
   public static KeyStore getInstance(String type, Provider provider)
     throws KeyStoreException=20
   {
     if (provider =3D=3D null)
       throw new IllegalArgumentException("Illegal provider");
-
-    return getInstance(provider.getProperty("KeyStore." + type),
-		       type, provider);
-  }
-
-  private static KeyStore getInstance(String classname,
-				      String type,
-				      Provider provider)
-    throws KeyStoreException
-  {
     try
       {
-	return new KeyStore((KeyStoreSpi) Class.forName(classname).
-			    newInstance(), provider, type);
-      }
-    catch (ClassNotFoundException cnfe)
-      {
-	throw new KeyStoreException("Class not found");
+        return new KeyStore(
+          (KeyStoreSpi) Engine.getInstance(KEY_STORE, type, provider),
+          provider, type);
       }
-    catch (InstantiationException ie)
+    catch (NoSuchAlgorithmException nsae)
       {
-	throw new KeyStoreException("Class instantiation failed");
+        throw new KeyStoreException(type);
       }
-    catch (IllegalAccessException iae)
+    catch (ClassCastException cce)
       {
-	throw new KeyStoreException("Illegal Access");
+        throw new KeyStoreException(type);
       }
   }
=20
+  /**
+   * Returns the default KeyStore type. This method looks up the
+   * type in <JAVA_HOME>/lib/security/java.security with the=20
+   * property "keystore.type" or if that fails then "jks" .
+   */
+  public static final String getDefaultType()
+  {
+    // Security reads every property in java.security so it=20
+    // will return this property if it exists.=20
+    String tmp =3D Security.getProperty("keystore.type");
+
+    if (tmp =3D=3D null)
+      tmp =3D "jks";
+
+    return tmp;
+  }
+
+  // Instance methods.
+  // ---------------------------------------------------------------------=
---
=20
   /**
      Gets the provider that the class is from.
@@ -471,21 +495,4 @@
     keyStoreSpi.engineLoad(stream, password);
   }
=20
-  /**
-     Returns the default KeyStore type. This method looks up the
-     type in <JAVA_HOME>/lib/security/java.security with the=20
-     property "keystore.type" or if that fails then "jks" .
-   */
-  public static final String getDefaultType()
-  {
-    String tmp;
-    //Security reads every property in java.security so it=20
-    //will return this property if it exists.=20
-    tmp =3D Security.getProperty("keystore.type");
-
-    if (tmp =3D=3D null)
-      tmp =3D "jks";
-
-    return tmp;
-  }
 }
Index: java/security/MessageDigest.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/classpath/classpath/java/security/MessageDigest.java,v
retrieving revision 1.6
diff -u -r1.6 MessageDigest.java
--- java/security/MessageDigest.java	16 Nov 2002 23:28:25 -0000	1.6
+++ java/security/MessageDigest.java	8 Mar 2003 20:59:06 -0000
@@ -1,6 +1,5 @@
-
 /* MessageDigest.java --- The message digest interface.
-   Copyright (C) 1999, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc.
=20
 This file is part of GNU Classpath.
=20
@@ -38,17 +37,53 @@
=20
 package java.security;
=20
+/**
+ * An interface to message digest algorithms. A message digest
+ * algorithm takes as input a variable number of bytes and produces a
+ * fixed-length "fingerprint" of this data, with the property that it is
+ * computationally infeasible to (a) determine the source data from a
+ * given message digest, or (b) find two input texts that produce the same
+ * digest. Message digests are commonly used for ensuring the integrity
+ * or authenticity of data, and are used at the core of many signature
+ * and message authentication algorithms.
+ * <p>
+ * To get an implementation of a message digest, query the {@link
+ * #getInstance(java.lang.String)} method with the name of the
+ * algorithm, e.g.:
+ *
+ * <blockquote>
+ * <code>MessageDigest md =3D MessageDigest.getInstance("SHA1");</code>
+ * </blockquote>
+ *
+ * <p>
+ * What algorithms are available depend upon what providers are
+ * installed and what message digests they implement.
+ *=20
+ * @see MessageDigestSpi
+ * @see Provider
+ * @since JDK 1.1
+ */
 public abstract class MessageDigest extends MessageDigestSpi
 {
+
+  // Constants and fields.
+  // ---------------------------------------------------------------------=
---
+
+  /** The service name for message digests. */
+  private static final String MESSAGE_DIGEST =3D "MessageDigest";
+
   private String algorithm;
   Provider provider;
   private byte[] lastDigest;
=20
-  /**
-     Creates a MessageDigest representing the specified
-     algorithm.
+  // Constructors.
+  // ---------------------------------------------------------------------=
---
=20
-     @param algorithm the name of digest algorithm to choose
+  /**
+   * Creates a MessageDigest representing the specified
+   * algorithm.
+   *
+   * @param algorithm the name of digest algorithm to choose
    */
   protected MessageDigest(String algorithm)
   {
@@ -56,130 +91,109 @@
     provider =3D null;
   }
=20
-  /**=20
-     Gets an instance of the MessageDigest class representing
-     the specified digest. If the algorithm is not found then,=20
-     it throws NoSuchAlgorithmException.
+  // Class methods.
+  // ---------------------------------------------------------------------=
---
=20
-     @param algorithm the name of digest algorithm to choose
-     @return a MessageDigest representing the desired algorithm
-
-     @exception NoSuchAlgorithmException if the algorithm is not implement=
ed by
-    					 providers
+  /**
+   * Get a message digest from the first provider that implements it.
+   *
+   * @param algorithm The name of digest algorithm.
+   * @return An instance of the desired message digest.
+   * @throws NoSuchAlgorithmException If the algorithm is not implemented
+   *         by any installed provider.
+   * @see #getInstance(java.lang.String,java.lang.String)
+   * @see #getInstance(java.lang.String,java.security.Provider)
    */
   public static MessageDigest getInstance(String algorithm)
-    throws NoSuchAlgorithmException
+  throws NoSuchAlgorithmException
   {
     Provider[] p =3D Security.getProviders();
     for (int i =3D 0; i < p.length; i++)
       {
-	try
-	  {
-	    return getInstance(algorithm, p[i]);
-	  }
-	catch (NoSuchAlgorithmException ignored) {}
+        try
+          {
+            return getInstance(algorithm, p[i]);
+          }
+        catch (NoSuchAlgorithmException ignored)
+          {
+          }
       }
=20
     throw new NoSuchAlgorithmException(algorithm);
   }
=20
-  /**=20
-     Gets an instance of the MessageDigest class representing
-     the specified digest from the specified provider. If the=20
-     algorithm is not found then, it throws NoSuchAlgorithmException.
-     If the provider is not found, then it throws
-     NoSuchProviderException.
-
-     @param algorithm the name of digest algorithm to choose
-     @param provider the name of the provider to find the algorithm in
-     @return a MessageDigest representing the desired algorithm
-
-     @exception NoSuchAlgorithmException if the algorithm is not implement=
ed by
-     					 the provider
-     @exception NoSuchProviderException if the provider is not found
+  /**
+   * Get a message digest from a named provider.
+   *
+   * @param algorithm The name of digest algorithm.
+   * @param provider  The name of the provider.
+   * @return An instance of the desired message digest.
+   *
+   * @throws NoSuchAlgorithmException if the algorithm is not implemented =
by
+   *         the provider, or if the implementation cannot be instantiated=
.
+   * @throws NoSuchProviderException If no provider named
+   *         <code>provider</code> is currently installed.
+   * @throws IllegalArgumentException If <code>provider</code> is null
+   *         or is empty.
+   * @see #getInstance(java.lang.String,java.security.Provider)
    */
-
   public static MessageDigest getInstance(String algorithm, String provide=
r)
-    throws NoSuchAlgorithmException, NoSuchProviderException
+  throws NoSuchAlgorithmException, NoSuchProviderException
   {
-    Provider p =3D Security.getProvider(provider);
+    if (provider =3D=3D null || provider.length() =3D=3D 0)
+      throw new IllegalArgumentException("Illegal provider");
=20
+    Provider p =3D Security.getProvider(provider);
     if (p =3D=3D null)
       throw new NoSuchProviderException(provider);
=20
     return getInstance(algorithm, p);
   }
=20
-  private static MessageDigest getInstance(String algorithm, Provider p)
-    throws NoSuchAlgorithmException
-  {
-    // try the name as is
-    String className =3D p.getProperty("MessageDigest." + algorithm);
-    if (className =3D=3D null) { // try all uppercase
-      String upper =3D algorithm.toUpperCase();
-      className =3D p.getProperty("MessageDigest." + upper);
-      if (className =3D=3D null) { // try if it's an alias
-        String alias =3D p.getProperty("Alg.Alias.MessageDigest." +algorit=
hm);
-        if (alias =3D=3D null) { // try all-uppercase alias name
-          alias =3D p.getProperty("Alg.Alias.MessageDigest." +upper);
-          if (alias =3D=3D null) { // spit the dummy
-            throw new NoSuchAlgorithmException(algorithm);
-          }
-        }
-        className =3D p.getProperty("MessageDigest." + alias);
-        if (className =3D=3D null) {
-          throw new NoSuchAlgorithmException(algorithm);
-        }
-      }
-    }
-    return getInstance(className, algorithm, p);
-  }
-
-  private static MessageDigest getInstance(String classname,
-					   String algorithm,
-					   Provider provider)
+  /**
+   * Gets an implementation of the specified message digest algorithm
+   * from the specified provider.
+   *
+   * @param algorithm The message digest algorithm's name.
+   * @param provider  The provider from which to get the implementation.
+   * @throws NoSuchAlgorithmException If the provider does not implement
+   *         the algorithm, or if the implementation cannot be
+   *         instantiated.
+   * @throws IllegalArgumentException If <code>provider</code> is null.
+   * @since 1.4
+   */
+  public static MessageDigest getInstance(String algorithm, Provider provi=
der)
     throws NoSuchAlgorithmException
   {
-    if (classname =3D=3D null)
-      throw new NoSuchAlgorithmException(algorithm);
-
+    if (provider =3D=3D null)
+      throw new IllegalArgumentException("Illegal provider");
     MessageDigest result =3D null;
-    try
+    Object o =3D Engine.getInstance(MESSAGE_DIGEST, algorithm, provider);
+   =20
+    if (o instanceof MessageDigestSpi)
       {
-        Object obj =3D Class.forName(classname).newInstance();
-        if (obj instanceof MessageDigest) {
-          result =3D (MessageDigest) obj;
-          result.algorithm =3D algorithm;
-        } else if (obj instanceof MessageDigestSpi) {
-          result =3D new DummyMessageDigest((MessageDigestSpi) obj, algori=
thm);
-        } else {
-          throw new ClassCastException("Class "+classname+" from Provider =
"
-              +provider.getName()
-              +" does not extend java.security.MessageDigestSpi");
-        }
-        result.provider =3D provider;
-        return result;
+        result =3D new DummyMessageDigest((MessageDigestSpi) o, algorithm)=
;
       }
-    catch (ClassNotFoundException cnfe)
+    else if (o instanceof MessageDigest)
       {
-	throw new NoSuchAlgorithmException(algorithm + ": Class not found.");
+        result =3D (MessageDigest) o;
+        result.algorithm =3D algorithm;
       }
-    catch (InstantiationException ie)
+    else
       {
-	throw new NoSuchAlgorithmException(algorithm
-					   + ": Class instantiation failed.");
-      }
-    catch (IllegalAccessException iae)
-      {
-	throw new NoSuchAlgorithmException(algorithm + ": Illegal Access");
+        throw new NoSuchAlgorithmException(algorithm);
       }
+    result.provider =3D provider;
+    return result;
   }
=20
+  // Instance methods.
+  // ---------------------------------------------------------------------=
---
=20
   /**
-     Gets the provider that the MessageDigest is from.
-
-     @return the provider the this MessageDigest
+   * Gets the provider that the MessageDigest is from.
+   *
+   * @return The provider of this message digest implementation.
    */
   public final Provider getProvider()
   {
@@ -187,9 +201,9 @@
   }
=20
   /**
-     Updates the digest with the byte.
-
-     @param input byte to update the digest with
+   * Updates the digest with a single byte.
+   *
+   * @param input The byte to update the digest with.
    */
   public void update(byte input)
   {
@@ -197,32 +211,32 @@
   }
=20
   /**
-     Updates the digest with the bytes from the array from the
-     specified offset to the specified length.
-
-     @param input bytes to update the digest with
-     @param offset the offset to start at
-     @param len length of the data to update with
+   * Updates the digest with a portion of a byte array.
+   *
+   * @param input  The bytes to update the digest with.
+   * @param offset The offset to start at in the array.
+   * @param len    The number of bytes to update.
    */
-  public void update(byte[]input, int offset, int len)
+  public void update(byte[] input, int offset, int len)
   {
     engineUpdate(input, offset, len);
   }
=20
   /**
-     Updates the digest with the bytes from the array.
-
-     @param input bytes to update the digest with
+   * Updates the digest with an entire byte array.
+   *
+   * @param input The bytes to update the digest with.
+   * @see #update(byte[],int,int)
    */
-  public void update(byte[]input)
+  public void update(byte[] input)
   {
     engineUpdate(input, 0, input.length);
   }
=20
   /**
-     Computes the digest of the stored data.
-
-     @return a byte array representing the message digest
+   * Computes the final digest of the stored data, and resets this instanc=
e.
+   *
+   * @return a byte array representing the message digest
    */
   public byte[] digest()
   {
@@ -230,13 +244,13 @@
   }
=20
   /**
-     Computes the final digest of the stored bytes and returns
-     them.=20
-
-     @param buf An array of bytes to store the digest
-     @param offset An offset to start storing the digest at
-     @param len The length of the buffer
-     @return Returns the length of the buffer
+   * Computes the final digest of the stored bytes and stores it into
+   * the given byte array, returning the number of bytes stored.
+   *
+   * @param buf    An array of bytes to store the digest.
+   * @param offset The offset to start storing the digest at.
+   * @param len    The maximum number of bytes to store in the array.
+   * @return The number of bytes stored into <code>buf</code>
    */
   public int digest(byte[]buf, int offset, int len) throws DigestException
   {
Index: java/security/SecureRandom.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/classpath/classpath/java/security/SecureRandom.java,v
retrieving revision 1.9
diff -u -r1.9 SecureRandom.java
--- java/security/SecureRandom.java	13 Feb 2003 17:00:50 -0000	1.9
+++ java/security/SecureRandom.java	8 Mar 2003 20:59:07 -0000
@@ -42,14 +42,24 @@
 import java.util.Enumeration;
=20
 /**
-   SecureRandom is the class interface for using SecureRandom
-   providers. It provides an interface to the SecureRandomSpi
-   engine so that programmers can generate pseudo-random numbers.
-
-   @author Mark Benvenuto <ivymccough@worldnet.att.net>
+ * An interface to a cryptographically secure pseudo-random number
+ * generator (PRNG). Random (or at least unguessable) numbers are used
+ * in all areas of security and cryptography, from the generation of
+ * keys and initialization vectors to the generation of random padding
+ * bytes.
+ *
+ * @author Mark Benvenuto <ivymccough@worldnet.att.net>
+ * @author Casey Marshall
  */
 public class SecureRandom extends Random
 {
+
+  // Constants and fields.
+  // ---------------------------------------------------------------------=
---
+
+  /** Service name for PRNGs. */
+  private static final String SECURE_RANDOM =3D "SecureRandom";
+
   static final long serialVersionUID =3D 4940670005562187L;
=20
   //Serialized Field
@@ -60,6 +70,9 @@
   SecureRandomSpi secureRandomSpi =3D null;
   byte[] state =3D null;
=20
+  // Constructors.
+  // ---------------------------------------------------------------------=
---
+
   /**
      Default constructor for SecureRandom. It constructs a=20
      new SecureRandom by instantating the first SecureRandom=20
@@ -69,7 +82,7 @@
      on the first call to getnextBytes it will force a seed.
=20
      It is maintained for backwards compatibility and programs
-     should use getInstance.
+     should use {@link #getInstance(java.lang.String)}.
    */
   public SecureRandom()
   {
@@ -88,20 +101,20 @@
           {
             key =3D (String) e.nextElement();
             if (key.startsWith("SECURERANDOM."))
-	      {
-		if ((classname =3D p[i].getProperty(key)) !=3D null)
-		  {
-		    try
-		      {
-			secureRandomSpi =3D (SecureRandomSpi) Class.
-			  forName(classname).newInstance();
-			provider =3D p[i];
-			return;
-		      }
-		    catch (Throwable ignore) { }
-		  }
-	      }
-	  }
+              {
+                if ((classname =3D p[i].getProperty(key)) !=3D null)
+                  {
+                    try
+                      {
+                        secureRandomSpi =3D (SecureRandomSpi) Class.
+                          forName(classname).newInstance();
+                        provider =3D p[i];
+                        return;
+                      }
+                    catch (Throwable ignore) { }
+                  }
+              }
+          }
       }
=20
     // Nothing found. Fall back to SHA1PRNG
@@ -141,15 +154,17 @@
     this.provider =3D provider;
   }
=20
-  /**
-     Returns an instance of a SecureRandom. It creates the class
-     for the specified algorithm if it exists from a provider.
-
-     @param algorithm A SecureRandom algorithm to use
+  // Class methods.
+  // ---------------------------------------------------------------------=
---
=20
-     @return Returns a new SecureRandom implmenting the chosen algorithm
-
-     @throws NoSuchAlgorithmException if the algorithm cannot be found
+  /**
+   * Returns an instance of a SecureRandom. It creates the class from
+   * the first provider that implements it.
+   *
+   * @param algorithm The algorithm name.
+   * @return A new SecureRandom implmenting the given algorithm.
+   * @throws NoSuchAlgorithmException If no installed provider implements
+   *         the given algorithm.
    */
   public static SecureRandom getInstance(String algorithm) throws
     NoSuchAlgorithmException
@@ -157,11 +172,13 @@
     Provider p[] =3D Security.getProviders();
     for (int i =3D 0; i < p.length; i++)
       {
-	try
-	  {
-	    return getInstance(algorithm, p[i]);
-	  }
-	catch (NoSuchAlgorithmException ignored) { }
+        try
+          {
+            return getInstance(algorithm, p[i]);
+          }
+        catch (NoSuchAlgorithmException ignored)
+          {
+          }
       }
=20
     // None found.
@@ -169,21 +186,26 @@
   }
=20
   /**
-     Returns an instance of a SecureRandom. It creates the class
-     for the specified algorithm from the specified provider.
-
-     @param algorithm A SecureRandom algorithm to use
-     @param provider A security provider to use
-
-     @return Returns a new SecureRandom implmenting the chosen algorithm
-
-     @throws NoSuchAlgorithmException if the algorithm cannot be found
-     @throws NoSuchProviderException if the provider cannot be found
+   * Returns an instance of a SecureRandom. It creates the class
+   * for the specified algorithm from the named provider.
+   *
+   * @param algorithm The algorithm name.
+   * @param provider  The provider name.
+   * @return A new SecureRandom implmenting the chosen algorithm.
+   * @throws NoSuchAlgorithmException If the named provider does not imple=
ment
+   *         the algorithm, or if the implementation cannot be
+   *         instantiated.
+   * @throws NoSuchProviderException If no provider named
+   *         <code>provider</code> is currently installed.
+   * @throws IllegalArgumentException If <code>provider</code> is null
+   *         or is empty.
    */
-  public static SecureRandom getInstance(String algorithm,
-					 String provider) throws
-    NoSuchAlgorithmException, NoSuchProviderException
+  public static SecureRandom getInstance(String algorithm, String provider=
)
+  throws NoSuchAlgorithmException, NoSuchProviderException
   {
+    if (provider =3D=3D null || provider.length() =3D=3D 0)
+      throw new IllegalArgumentException("Illegal provider");
+
     Provider p =3D Security.getProvider(provider);
     if (p =3D=3D null)
       throw new NoSuchProviderException();
@@ -192,88 +214,35 @@
   }
=20
   /**
-     Returns an instance of a SecureRandom. It creates the class for
-     the specified algorithm from the given provider.
-
-     @param algorithm The SecureRandom algorithm to create.
-     @param provider  The provider to get the instance from.
-
-     @throws NoSuchAlgorithmException If the algorithm cannot be found, or
-             if the class cannot be instantiated.
-   */
-  public static SecureRandom getInstance(String algorithm,
-                                         Provider provider) throws
-    NoSuchAlgorithmException
-  {
-    return getInstance(algorithm, provider, true);
-  }
-
-  /**
-     Creates the instance of SecureRandom, recursing to resolve aliases.
-
-     @param algorithm The SecureRandom algorithm to create.
-     @param provider  The provider to get the implementation from.
-     @param recurse   Whether or not to recurse to resolve aliases.
-
-     @throws NoSuchAlgorithmException If the algorithm cannot be found,
-             if there are too many aliases, or if the class cannot be
-             instantiated.
-   */
-  private static SecureRandom getInstance(String algorithm,
-                                          Provider provider,
-                                          boolean recurse)
-    throws NoSuchAlgorithmException
-  {
-    String msg =3D algorithm;
-    for (Enumeration e =3D provider.propertyNames(); e.hasMoreElements(); =
)
+   * Returns an instance of a SecureRandom. It creates the class for
+   * the specified algorithm from the given provider.
+   *
+   * @param algorithm The SecureRandom algorithm to create.
+   * @param provider  The provider to get the instance from.
+   * @throws NoSuchAlgorithmException If the algorithm cannot be found, or
+   *         if the class cannot be instantiated.
+   * @throws IllegalArgumentException If <code>provider</code> is null.
+   */
+  public static SecureRandom getInstance(String algorithm, Provider provid=
er)
+  throws NoSuchAlgorithmException
+  {
+    if (provider =3D=3D null)
+      throw new IllegalArgumentException("Illegal provider");
+    try
       {
-        // We could replace the boolean with an integer, incrementing it
-        // every
-        String key =3D (String) e.nextElement();
-        if (key.startsWith("SECURERANDOM.")
-            && key.substring(13).equalsIgnoreCase(algorithm))
-	  {
-	    try
-	      {
-		Class c =3D Class.forName(provider.getProperty(key));
-		return new SecureRandom((SecureRandomSpi) c.newInstance(),
-					provider);
-	      }
-	    catch (Throwable ignored) { }
-	  }
-	else if (key.startsWith("ALG.ALIAS.SECURERANDOM.")
-		 && key.substring(23).equalsIgnoreCase(algorithm) && recurse)
-	  {
-	    try
-	      {
-		// First see if this alias refers to a class in this
-		// provider.
-		return getInstance(provider.getProperty(key), provider, false);
-	      }
-	    catch (NoSuchAlgorithmException nsae)
-	      {
-		Provider[] provs =3D Security.getProviders();
-		for (int i =3D 0; i < provs.length; i++)
-		  {
-		    if (provs[i] =3D=3D provider)
-		      continue;
-		    // Now try other providers for the implementation
-		    try
-		      {
-			return getInstance(provider.getProperty(key),
-					   provs[i], false);
-		      }
-		    catch (NoSuchAlgorithmException nsae2)
-		      {
-			msg =3D nsae2.getMessage();
-		      }
-		  }
-	      }
-	  }
+        return new SecureRandom((SecureRandomSpi)
+          Engine.getInstance(SECURE_RANDOM, algorithm, provider),
+          provider);
+      }
+    catch (ClassCastException cce)
+      {
+        throw new NoSuchAlgorithmException(algorithm);
       }
-    throw new NoSuchAlgorithmException(algorithm);
   }
=20
+  // Instance methods.
+  // ---------------------------------------------------------------------=
---
+
   /**
      Returns the provider being used by the current SecureRandom class.
=20
@@ -318,8 +287,8 @@
 		       (byte) (0xff & (seed >> 16)),
 		       (byte) (0xff & (seed >> 8)),
 		       (byte) (0xff & seed)
-	};
-	secureRandomSpi.engineSetSeed(tmp);
+        };
+        secureRandomSpi.engineSetSeed(tmp);
       }
   }
=20
Index: java/security/Signature.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/classpath/classpath/java/security/Signature.java,v
retrieving revision 1.6
diff -u -r1.6 Signature.java
--- java/security/Signature.java	16 Nov 2002 23:28:25 -0000	1.6
+++ java/security/Signature.java	8 Mar 2003 20:59:07 -0000
@@ -1,5 +1,5 @@
 /* Signature.java --- Signature Class
-   Copyright (C) 1999, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc.
=20
 This file is part of GNU Classpath.
=20
@@ -36,43 +36,61 @@
 exception statement from your version. */
=20
 package java.security;
+
 import java.security.spec.AlgorithmParameterSpec;
=20
 /**
-   Signature is used to provide an interface to digital signature=20
-   algorithms. Digital signatures provide authentication and data=20
-   integrity of digital data.=20
-
-   The GNU provider provides the NIST standard DSA which uses DSA=20
+   <p>Signature is an interface to digital signature algorithms. Digital
+   signatures provide authentication and data integrity of digital data.
+  =20
+   <p>The GNU provider provides the NIST standard DSA which uses DSA=20
    and SHA-1. It can be specified by SHA/DSA, SHA-1/DSA or its=20
    OID. If the RSA signature algorithm is provided then
    it could be MD2/RSA. MD5/RSA, or SHA-1/RSA. The algorithm must
-   be specified because there is no default.
+   be specified because there is no default.</p>
=20
-   Signature provides implementation-independent algorithms which=20
+   <p>Signature provides implementation-independent algorithms which=20
    are requested by the user through getInstance. It can be=20
    requested by specifying just the algorithm name or by=20
-   specifying both the algorithm name and provider name.=20
-
-   The three phases of using Signature are:
-
-   1. Initialing
-
-   * It must be initialized with a private key for signing.
-   * It must be initialized with a public key for verifying.
-
-   2. Updating
-
-   Update the bytes for signing or verifying with calls to update.
-
-   3. Signing or Verify the signature on the currently stored
-   bytes by calling sign or verify.
+   specifying both the algorithm name and provider name.
+  =20
+   <p>The three phases of using Signature are:</p>
+
+   <ol>
+   <li><b>Initialising.</b> The instance is initialized with either one of=
:
+
+   <ul>
+   <li>{@link #initSign(java.security.PrivateKey,java.security.SecureRando=
m)}
+   with a private key for signing.</li>
+   <li>{@link #initVerify(java.security.PublicKey)} with a public key or a
+   certificate for verifying.</li>
+   </ul></li>
+
+   <li><b>Updating.</b>
+
+   <p>Zero or more bytes may be added to the data being signed or verified=
,
+   depending on how this instance was initialized.</p></li>
+
+   <li><b>Signing or Verifying.</b>
+  =20
+   <p>The signature is then either produced over the data input with any o=
f
+   the {@link #sign()} methods, or a signatre is tested for validity with
+   {@link #verify(byte[])}.</p></li>
+   </ol>
=20
    @author Mark Benvenuto <ivymccough@worldnet.att.net>
+   @author Casey Marshall
    @since JDK 1.1
  */
 public abstract class Signature extends SignatureSpi
 {
+
+  // Constants and fields.
+  // ---------------------------------------------------------------------=
---
+
+  /** Service name for signatures. */
+  private static final String SIGNATURE =3D "Signature";
+
   /**
      Possible state variable which signifies if it has not been=20
      initialized.
@@ -99,6 +117,9 @@
   private String algorithm;
   Provider provider;
=20
+  // Constructor.
+  // ---------------------------------------------------------------------=
---
+
   /**
      Creates a new signature for this algorithm.
=20
@@ -110,16 +131,18 @@
     state =3D UNINITIALIZED;
   }
=20
-  /**
-     Gets an instance of the Signature class representing
-     the specified signature. If the algorithm is not found then,=20
-     it throws NoSuchAlgorithmException.
-
-     @param algorithm the name of signature algorithm to choose
-     @return a Signature repesenting the desired algorithm
+  // Class methods.
+  // ---------------------------------------------------------------------=
---
=20
-     @throws NoSuchAlgorithmException if the algorithm is not implemented =
by
-     				      providers
+  /**
+   * Gets an instance of the Signature class representing
+   * the specified signature. If the algorithm is not found then,=20
+   * it throws NoSuchAlgorithmException.
+   *
+   * @param algorithm the name of signature algorithm to choose
+   * @return a Signature repesenting the desired algorithm
+   * @throws NoSuchAlgorithmException if the algorithm is not implemented =
by
+   *         any currently installed provider.
    */
   public static Signature getInstance(String algorithm)
     throws NoSuchAlgorithmException
@@ -132,30 +155,38 @@
           {
             return getInstance(algorithm, p[i]);
           }
-        catch (NoSuchAlgorithmException ignored) {}
+        catch (NoSuchAlgorithmException ignored)
+          {
+          }
       }
=20
     throw new NoSuchAlgorithmException(algorithm);
   }
=20
   /**=20
-     Gets an instance of the Signature class representing
-     the specified signature from the specified provider. If the=20
-     algorithm is not found then, it throws NoSuchAlgorithmException.
-     If the provider is not found, then it throws
-     NoSuchProviderException.
-
-     @param algorithm the name of signature algorithm to choose
-     @param provider the name of the provider to find the algorithm in
-     @return a Signature repesenting the desired algorithm
-
-     @throws NoSuchAlgorithmException if the algorithm is not implemented =
by
-				      the provider
-     @throws NoSuchProviderException if the provider is not found
+   * Gets an instance of the Signature class representing
+   * the specified signature from the specified provider. If the=20
+   * algorithm is not found then, it throws NoSuchAlgorithmException.
+   * If the provider is not found, then it throws
+   * NoSuchProviderException.
+   *
+   * @param algorithm the name of signature algorithm to choose
+   * @param provider the name of the provider to find the algorithm in
+   * @return a Signature repesenting the desired algorithm
+   *
+   * @throws NoSuchAlgorithmException If the algorithm is not implemented =
by
+   *         the provider or if the implementation cannot be instatiated.
+   * @throws NoSuchProviderException If there is no provider named
+   *         <code>provider</code> currently installed.
+   * @throws IllegalArgumentException If <code>provider</code> is null or =
is
+   *         empty.
    */
   public static Signature getInstance(String algorithm, String provider)
     throws NoSuchAlgorithmException, NoSuchProviderException
   {
+    if (provider =3D=3D null || provider.length() =3D=3D 0)
+      throw new IllegalArgumentException("Illegal provider");
+
     Provider p =3D Security.getProvider(provider);
     if (p =3D=3D null)
       throw new NoSuchProviderException(provider);
@@ -163,65 +194,47 @@
     return getInstance(algorithm, p);
   }
=20
-  private static Signature getInstance(String algorithm, Provider p)
-    throws NoSuchAlgorithmException
-  {
-    // try the name as is
-    String className =3D p.getProperty("Signature." + algorithm);
-    if (className =3D=3D null) { // try all uppercase
-      String upper =3D algorithm.toUpperCase();
-      className =3D p.getProperty("Signature." + upper);
-      if (className =3D=3D null) { // try if it's an alias
-        String alias =3D p.getProperty("Alg.Alias.Signature." + algorithm)=
;
-        if (alias =3D=3D null) {
-          alias =3D p.getProperty("Alg.Alias.Signature." + upper);
-          if (alias =3D=3D null) { // spit the dummy
-            throw new NoSuchAlgorithmException(algorithm);
-          }
-        }
-        className =3D p.getProperty("Signature." + alias);
-        if (className =3D=3D null) {
-          throw new NoSuchAlgorithmException(algorithm);
-        }
-      }
-    }
-    return getInstance(className, algorithm, p);
-  }
-
-  private static Signature getInstance(String classname,
-				       String algorithm,
-				       Provider provider)
+  /**
+   * Gets an instance of the given signature algorithm from the
+   * specified provider.
+   *
+   * @param algorithm The name of the signature algorithm to create.
+   * @param provider  The provider to get the implementation from.
+   * @return An appropriate instance of Signature.
+   * @throws NoSuchAlgorithmException If the algorithm is not
+   *         implemented by the provider, or if the implementation
+   *         cannot be instantiated.
+   * @throws IllegalArgumentException If <code>provider</code> is null.
+   * @since 1.4
+   */
+  public static Signature getInstance(String algorithm, Provider provider)
     throws NoSuchAlgorithmException
   {
-    try
-      {
-	Object o =3D Class.forName(classname).newInstance();
-	Signature sig;
-	if (o instanceof SignatureSpi)
-	  sig =3D new DummySignature((SignatureSpi) o, algorithm);
-	else
-	  {
-	    sig =3D (Signature) o;
-	    sig.algorithm =3D algorithm;
-	  }
+    if (provider =3D=3D null)
+      throw new IllegalArgumentException("Illegal provider");
+    Signature result =3D null;
+    Object o =3D Engine.getInstance(SIGNATURE, algorithm, provider);
=20
-	sig.provider =3D provider;
-	return sig;
-      }
-    catch (ClassNotFoundException cnfe)
+    if (o instanceof SignatureSpi)
       {
-	throw new NoSuchAlgorithmException("Class not found");
+        result =3D new DummySignature((SignatureSpi) o, algorithm);
       }
-    catch (InstantiationException ie)
+    else if (o instanceof Signature)
       {
-	throw new NoSuchAlgorithmException("Class instantiation failed");
+        result =3D (Signature) o;
+        result.algorithm =3D algorithm;
       }
-    catch (IllegalAccessException iae)
+    else
       {
-	throw new NoSuchAlgorithmException("Illegal Access");
+        throw new NoSuchAlgorithmException(algorithm);
       }
+    result.provider =3D provider;
+    return result;
   }
=20
+  // Instance methods.
+  // ---------------------------------------------------------------------=
---
+
   /**
      Gets the provider that the Signature is from.
=20
@@ -262,13 +275,13 @@
     state =3D VERIFY;
     if (certificate.getType().equals("X509"))
       {
-	java.security.cert.X509Certificate cert =3D
-	  (java.security.cert.X509Certificate) certificate;
+        java.security.cert.X509Certificate cert =3D
+          (java.security.cert.X509Certificate) certificate;
=20
-	boolean[]array =3D cert.getKeyUsage();
-	if (array !=3D null && array[0] =3D=3D false)
-	  throw new InvalidKeyException
-	    ("KeyUsage of this Certificate indicates it cannot be used for digita=
l signing");
+        boolean[] array =3D cert.getKeyUsage();
+        if (array !=3D null && array[0] =3D=3D false)
+          throw new InvalidKeyException
+            ("KeyUsage of this Certificate indicates it cannot be used for=
 digital signing");
       }
     this.initVerify(certificate.getPublicKey());
   }
@@ -319,8 +332,8 @@
   {
     if (state =3D=3D SIGN)
       {
-	state =3D UNINITIALIZED;
-	return engineSign();
+        state =3D UNINITIALIZED;
+        return engineSign();
       }
     else
       throw new SignatureException();
@@ -355,8 +368,8 @@
   {
     if (state =3D=3D SIGN)
       {
-	state =3D UNINITIALIZED;
-	return engineSign(outbuf, offset, len);
+        state =3D UNINITIALIZED;
+        return engineSign(outbuf, offset, len);
       }
     else
       throw new SignatureException();
@@ -376,8 +389,8 @@
   {
     if (state =3D=3D VERIFY)
       {
-	state =3D UNINITIALIZED;
-	return engineVerify(signature);
+        state =3D UNINITIALIZED;
+        return engineVerify(signature);
       }
     else
       throw new SignatureException();

--=-/14rktsROOHq8FIxovao--

--=-idxAuwzY9D60KVl6Ojqq
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQA+aluggAuWMgRGsWsRAl9aAJ401mJCr+Qx1idzzQqAWi0vgoWlKwCfZoJB
USiKQZHhAH7PduNIOJ2iQk8=
=Atfz
-----END PGP SIGNATURE-----

--=-idxAuwzY9D60KVl6Ojqq--




From MAILER-DAEMON Sat Mar 08 18:20:29 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18rncC-0001WQ-00
	for mharc-classpath@gnu.org; Sat, 08 Mar 2003 18:20:28 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18rncA-0001SK-00
	for classpath@gnu.org; Sat, 08 Mar 2003 18:20:26 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18rnc9-0001Q2-00
	for classpath@gnu.org; Sat, 08 Mar 2003 18:20:25 -0500
Received: from int-mail.syd.fl.net.au ([202.181.0.28] helo=delenn.fl.net.au)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18rnc5-0001Hg-00
	for classpath@gnu.org; Sat, 08 Mar 2003 18:20:24 -0500
Received: from solomon (a3-p19.syd.fl.net.au [202.181.1.83])
	by delenn.fl.net.au (Postfix) with ESMTP
	id D76EF180A35; Sun,  9 Mar 2003 10:28:28 +1100 (EST)
Content-Type: text/plain;
  charset="utf-8"
From: "Raif S. Naffah" <raif@fl.net.au>
To: Casey Marshall <rsdio@metastatic.org>,
	Classpath <classpath@gnu.org>
Date: Sun, 9 Mar 2003 10:25:43 +1100
User-Agent: KMail/1.4.3
References: <1047157664.2226.6.camel@dexter.attbi.com>
In-Reply-To: <1047157664.2226.6.camel@dexter.attbi.com>
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Message-Id: <200303091025.46245.raif@fl.net.au>
cc: GCC Java <java-patches@gcc.gnu.org>
Subject: Re: [PATCH] java.security miscellany
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
Reply-To: raif@fl.net.au
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sat, 08 Mar 2003 23:20:27 -0000

-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

hello Casey,

On Sunday 09 March 2003 08:07, Casey Marshall wrote:
> Attached are the java.security patches I posted earlier...

some of thoses clash/overlap with the patches i'm in the process of=20
testing (writing Mauve test cases) and committing in Classpath.

can you defer yours until i finish committing mine --which should be by=20
the end of today?


cheers;
rsn
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
Comment: Que du magnifique

iD8DBQE+anv4+e1AKnsTRiERA8xRAJwICkQEsonPjPgef3pjIMpRPHvj/gCgwwHI
gifpMfhkXgHg/HFBaIaCmiw=3D
=3D3lEJ
-----END PGP SIGNATURE-----




From MAILER-DAEMON Sun Mar 09 03:33:29 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18rwFM-0001DB-00
	for mharc-classpath@gnu.org; Sun, 09 Mar 2003 03:33:28 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18rwFJ-0001Bu-00
	for classpath@gnu.org; Sun, 09 Mar 2003 03:33:25 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18rwFG-00015y-00
	for classpath@gnu.org; Sun, 09 Mar 2003 03:33:24 -0500
Received: from web10009.mail.yahoo.com ([216.136.128.120])
	by monty-python.gnu.org with smtp (Exim 4.10.13)
	id 18rwFF-00012N-00
	for classpath@gnu.org; Sun, 09 Mar 2003 03:33:21 -0500
Message-ID: <20030309083320.73866.qmail@web10009.mail.yahoo.com>
Received: from [62.104.211.64] by web10009.mail.yahoo.com via HTTP;
	Sun, 09 Mar 2003 00:33:20 PST
Date: Sun, 9 Mar 2003 00:33:20 -0800 (PST)
From: Dalibor Topic <robilad@yahoo.com>
To: Brian Jones <cbj@gnu.org>
In-Reply-To: <m3el5h4m9m.fsf@lyta.haphazard.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: Linuxhippy <linuxhippy@web.de>
cc: classpath@gnu.org
Subject: Re: Want to help in integrating swing. Really last question.
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sun, 09 Mar 2003 08:33:26 -0000


--- Brian Jones <cbj@gnu.org> wrote:
> Dalibor Topic <robilad@yahoo.com> writes:
> 
> > --- Linuxhippy <linuxhippy@web.de> wrote:
> > 
> > > Btw.: Does anybody know good tutorials about the
> > > swing-internals, 
> > > because its not allowed to look at sun-sources,
> its
> > > for a newbie like me 
> > > quite hard to work only with apidoc.
> > 
> > Unfortunately, I'm not aware of an offer of
> similar
> > quality like the 'Java Class Libraries' by Chen
> et.
> > al. for SWING.
> > 
> > There is Sun's Swing tutorial [1], which provides
> a
> > reasonable overview of how the things are supposed
> to
> > be used.
> > 
> > You can read some interesting articles on SWING on
> the
> > SWING connection [2].
> > 
> > The apparently rather good Swing book by Robinson
> and
> > Vorobiev is avaliable online [3].
> > 
> > hope this helps,
> > dalibor topic
> > 
> > [1]
> >
> http://java.sun.com/docs/books/javatutorial/jfc.html
> > [2]
> http://java.sun.com/products/jfc/tsc/index.html
> > [3] http://manning.spindoczine.com/sbe/
> 
> O'Reilly's Swing book offers a little insight into
> the internals of
> Swing, it does talk about making your own L&F.
> 

Talking about books, I've browsed the 'Pure JFC Swing'
book, and while the examples are quite nice and well
commented, the author decided to kill a few trees in
order to waste a few hundred pages on a compacted
reprint of Sun's SWING API docs. That's why I can't
recommend it. Half of the book is dead paperweight. ;)

cheers,
dalibor topic

__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/



From MAILER-DAEMON Sun Mar 09 08:19:38 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18s0iI-0007Xn-00
	for mharc-classpath@gnu.org; Sun, 09 Mar 2003 08:19:38 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18s0iG-0007Ve-00
	for classpath@gnu.org; Sun, 09 Mar 2003 08:19:36 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18s0iE-0007S7-00
	for classpath@gnu.org; Sun, 09 Mar 2003 08:19:35 -0500
Received: from octopussy.utanet.at ([213.90.36.45])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18s0iE-0007Mo-00
	for classpath@gnu.org; Sun, 09 Mar 2003 08:19:34 -0500
Received: from paris.utanet.at ([213.90.36.7])
	by octopussy.utanet.at with esmtp (Exim 4.10)
	id 18s0iB-0003PV-00
	for classpath@gnu.org; Sun, 09 Mar 2003 14:19:31 +0100
Received: from linzu5-103-59.utaonline.at ([62.218.103.59] helo=web.de)
	by paris.utanet.at with esmtp (Exim 4.10)
	id 18s0iB-0006Oc-00
	for classpath@gnu.org; Sun, 09 Mar 2003 14:19:31 +0100
Message-ID: <3E6B3F62.2030802@web.de>
Date: Sun, 09 Mar 2003 14:19:30 +0100
From: Linuxhippy <linuxhippy@web.de>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; de-DE;
	rv:1.0.2) Gecko/20030208 Netscape/7.02
X-Accept-Language: de-de, de
MIME-Version: 1.0
To: classpath@gnu.org
References: <20030308164605.49773.qmail@web10003.mail.yahoo.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Subject: Re: Want to help in integrating swing. Really last question.
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sun, 09 Mar 2003 13:19:36 -0000

>
>
>[1]
>http://java.sun.com/docs/books/javatutorial/jfc.html
>[2] http://java.sun.com/products/jfc/tsc/index.html
>[3] http://manning.spindoczine.com/sbe/
>
Hmm, al the links seem to be very useful, especally the last!

Thx Clemens




From MAILER-DAEMON Sun Mar 09 18:03:29 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18s9na-0005U5-00
	for mharc-classpath@gnu.org; Sun, 09 Mar 2003 18:01:42 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18s9nL-0004tc-00
	for classpath@gnu.org; Sun, 09 Mar 2003 18:01:27 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18s9nB-0004Kj-00
	for classpath@gnu.org; Sun, 09 Mar 2003 18:01:19 -0500
Received: from mail.peakpeak.com ([207.174.178.17] helo=gash2.peakpeak.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18s9n9-0004CK-00
	for classpath@gnu.org; Sun, 09 Mar 2003 18:01:15 -0500
Received: from fleche.redhat.com (tf0021.peakpeak.com [204.144.239.21])
	by gash2.peakpeak.com (8.9.3/8.9.3) with ESMTP id QAA21513;
	Sun, 9 Mar 2003 16:01:13 -0700
Received: by fleche.redhat.com (Postfix, from userid 1000)
	id 888174F8610; Sun,  9 Mar 2003 15:54:16 -0700 (MST)
To: Classpath Discussion Mailing List <classpath@gnu.org>
From: Tom Tromey <tromey@redhat.com>
X-Attribution: Tom
X-Zippy: There's a SALE on STRETCH SOCKS down at the "7-11"!!
Date: 09 Mar 2003 15:54:16 -0700
Message-ID: <87llzotalj.fsf@fleche.redhat.com>
Lines: 5
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Subject: cvs commit messages
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
Reply-To: tromey@redhat.com
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sun, 09 Mar 2003 23:01:40 -0000

Has anybody seen a cvs commit message from classpath recently?
I updated today, and there were a bunch of changes, but I never
received notification of them in email.

Tom



From MAILER-DAEMON Sun Mar 09 18:12:15 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18s9xb-0003Ml-00
	for mharc-classpath@gnu.org; Sun, 09 Mar 2003 18:12:03 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18s9xR-0002u4-00
	for classpath@gnu.org; Sun, 09 Mar 2003 18:11:53 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18s9x1-0001jf-00
	for classpath@gnu.org; Sun, 09 Mar 2003 18:11:30 -0500
Received: from mail.netbeat.de ([62.208.140.19])
	by monty-python.gnu.org with smtp (Exim 4.10.13)
	id 18s9ww-0001RF-00
	for classpath@gnu.org; Sun, 09 Mar 2003 18:11:22 -0500
Received: (qmail 9641 invoked from network); 9 Mar 2003 23:12:53 -0000
Received: from pd958d557.dip.t-dialin.net (HELO gate.local.zo) (217.88.213.87)
  by mail.netbeat.de with SMTP; 9 Mar 2003 23:12:53 -0000
Received: (qmail 1215 invoked from network); 9 Mar 2003 23:04:26 -0000
Received: from unknown (HELO sektor37.de) (10.0.0.7)
  by gate.local.zo with SMTP; 9 Mar 2003 23:04:26 -0000
Message-ID: <3E6BC87B.90609@sektor37.de>
Date: Mon, 10 Mar 2003 00:04:27 +0100
From: Julian Scheid <julian@sektor37.de>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US;
	rv:1.2) Gecko/20021126
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: tromey@redhat.com
References: <87llzotalj.fsf@fleche.redhat.com>
In-Reply-To: <87llzotalj.fsf@fleche.redhat.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
cc: Classpath Discussion Mailing List <classpath@gnu.org>
Subject: Re: cvs commit messages
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sun, 09 Mar 2003 23:12:02 -0000

Savannah has problems, a few hundred clients of some eDonkey clone are
violently polling the server as it seems. I had severe difficulties
with CVS access today and yesterday, too. See the Savannah front page
for more information.

Julian

Tom Tromey wrote:
> Has anybody seen a cvs commit message from classpath recently?
> I updated today, and there were a bunch of changes, but I never
> received notification of them in email.




From MAILER-DAEMON Sun Mar 09 18:37:49 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18sAMX-0004kb-00
	for mharc-classpath@gnu.org; Sun, 09 Mar 2003 18:37:49 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18sAMU-0004eN-00
	for classpath@gnu.org; Sun, 09 Mar 2003 18:37:46 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18sAMT-0004d2-00
	for classpath@gnu.org; Sun, 09 Mar 2003 18:37:46 -0500
Received: from ms-smtp-03.southeast.rr.com ([24.93.67.84])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18sAMT-0004cw-00
	for classpath@gnu.org; Sun, 09 Mar 2003 18:37:45 -0500
Received: from mail3.nc.rr.com (fe3 [24.93.67.50])h29NaeH4021612;
	Sun, 9 Mar 2003 18:36:41 -0500 (EST)
Received: from lyta.haphazard.org ([66.57.9.48]) by mail3.nc.rr.com  with
	Microsoft SMTPSVC(5.5.1877.757.75);	 Sun, 9 Mar 2003 18:35:39 -0500
Received: by lyta.haphazard.org (Postfix, from userid 500)
	id AC1FABE69E; Sun,  9 Mar 2003 18:37:43 -0500 (EST)
Sender: cbj@haphazard.org
To: tromey@redhat.com
References: <87llzotalj.fsf@fleche.redhat.com>
From: Brian Jones <cbj@gnu.org>
Date: 09 Mar 2003 18:37:43 -0500
In-Reply-To: <87llzotalj.fsf@fleche.redhat.com>
Message-ID: <m3smtw2jso.fsf@lyta.haphazard.org>
Lines: 12
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: Classpath Discussion Mailing List <classpath@gnu.org>
Subject: Re: cvs commit messages
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sun, 09 Mar 2003 23:37:47 -0000

Tom Tromey <tromey@redhat.com> writes:

> Has anybody seen a cvs commit message from classpath recently?
> I updated today, and there were a bunch of changes, but I never
> received notification of them in email.

Yes, I still receive the commit email messages.  Perhaps your old
address is subscribed there as well?

Brian
-- 
Brian Jones <cbj@gnu.org>



From MAILER-DAEMON Sun Mar 09 19:13:27 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18sAuR-0003zL-00
	for mharc-classpath@gnu.org; Sun, 09 Mar 2003 19:12:51 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18sAuF-0003ht-00
	for classpath@gnu.org; Sun, 09 Mar 2003 19:12:39 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18sAuA-0003WL-00
	for classpath@gnu.org; Sun, 09 Mar 2003 19:12:34 -0500
Received: from piglet.dstc.edu.au ([130.102.176.1])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18sAtm-0002iL-00
	for classpath@gnu.org; Sun, 09 Mar 2003 19:12:10 -0500
Received: from dstc.edu.au (soluble.dstc.edu.au [130.102.176.43])
	by piglet.dstc.edu.au (8.12.8/8.12.8) with ESMTP id h2A0B527010965;
	Mon, 10 Mar 2003 10:11:05 +1000 (EST)
Message-Id: <200303100011.h2A0B527010965@piglet.dstc.edu.au>
X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4
To: Chris Gray <chris.gray@acunia.com>
In-Reply-To: Message from Chris Gray <chris.gray@acunia.com> 
	<Pine.LNX.4.44.0303071708090.13206-100000@sophocles.leuven.intern.acunia.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Date: Mon, 10 Mar 2003 10:11:04 +1000
From: Stephen Crawley <crawley@dstc.edu.au>
X-Virus-Scanned: Message: ok
X-Scanned-By: MIMEDefang 2.9 (www dot roaringpenguin dot com slash mimedefang)
cc: crawley@piglet.dstc.edu.au
cc: abies@pg.gda.pl
cc: Stephen Crawley <crawley@dstc.edu.au>
cc: GNU Classpath <classpath@gnu.org>
Subject: Re: More finalize woes 
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Mon, 10 Mar 2003 00:12:51 -0000

> On Fri, 7 Mar 2003, Stephen Crawley wrote:
> > An unnecessary call to java.lang.Object.finalize() won't hurt anyone.
> 
> Be careful: IIRC we once had a bug in Wonka which made _every_ instance
> appear to be finalizable, and the effect on performance was um, noticeable ...

Point taken.  But my comment referred to the impact of adding an
explicit super.finalize() call to a non-trivial finalizer ... in the
context of a proposed change to gcj and/or jikes to add a compilation
warning for missing finalizer chaining calls.

Anyway, I've concluded that the detail we were arguing about is a "line
ball", and that it doesn't really make much difference either way which
way the change works.

-- Steve






From MAILER-DAEMON Tue Mar 11 10:52:37 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18sm2L-0006vU-00
	for mharc-classpath@gnu.org; Tue, 11 Mar 2003 10:51:29 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18sm1d-0006S5-00
	for classpath@gnu.org; Tue, 11 Mar 2003 10:50:45 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18sm0u-0004rI-00
	for classpath@gnu.org; Tue, 11 Mar 2003 10:50:00 -0500
Received: from piglet.dstc.edu.au ([130.102.176.1])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18sm0Q-0004Vh-00
	for classpath@gnu.org; Tue, 11 Mar 2003 10:49:30 -0500
Received: from dstc.edu.au (soluble.dstc.edu.au [130.102.176.43])
	by piglet.dstc.edu.au (8.12.8/8.12.8) with ESMTP id h2BFnMEb015251;
	Wed, 12 Mar 2003 01:49:22 +1000 (EST)
Message-Id: <200303111549.h2BFnMEb015251@piglet.dstc.edu.au>
X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4
To: Mark Wielaard <mark@klomp.org>
In-Reply-To: Message from Mark Wielaard <mark@klomp.org> 
   of "04 Mar 2003 23:56:26 +0100." <1046818586.14237.77.camel@elsschot> 
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Date: Wed, 12 Mar 2003 01:49:22 +1000
From: Stephen Crawley <crawley@dstc.edu.au>
X-Virus-Scanned: Message: ok
X-Scanned-By: MIMEDefang 2.9 (www dot roaringpenguin dot com slash mimedefang)
cc: Jeroen Frijters <jeroen@sumatra.nl>
cc: crawley@piglet.dstc.edu.au
cc: classpath@gnu.org
Subject: Re: Small ZipFile patch 
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Tue, 11 Mar 2003 15:51:27 -0000


mark@klomp.org said:
> kaffe 1.0.7 doesn't throw any exceptions but also doesn't write to the
> file.
>
> Kissme CVS+Classpath CVS correctly throws SecurityException then dumps
> core.
>
> gij from CVS gives the interesting:
>
> Exception in thread "main" java.lang.ExceptionInInitializerError ***
> Got java.lang.NoClassDefFoundError: gnu.gcj.runtime.NameFinder while
> trying to print stack trace. Aborted
>
> Blackdown-1.4.1-beta correctly gives AccessControlException and then:
>
> Unexpected Signal : 11 occurred at PC=0x403A264C Function=(null)+0x403A
> 264C Library=/opt/j2sdk1.4.1/jre/lib/i386/client/libjvm.so 

For the record, the testcase gives a JVM crash with JDK 1.4.0-b92 on Linux.

-- Steve





From MAILER-DAEMON Thu Mar 13 13:58:25 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18tXsz-0006hw-00
	for mharc-classpath@gnu.org; Thu, 13 Mar 2003 13:57:01 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18tXse-0006bc-00
	for classpath@gnu.org; Thu, 13 Mar 2003 13:56:40 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18tXsL-000618-00
	for classpath@gnu.org; Thu, 13 Mar 2003 13:56:23 -0500
Received: from 62-177-154-234.bbeyond.nl ([62.177.154.234]
	helo=LEMBU.sumatrasoftware.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18tXr1-0004Ys-00; Thu, 13 Mar 2003 13:54:59 -0500
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: multipart/mixed;
	boundary="----_=_NextPart_001_01C2E991.DBBADC02"
Date: Thu, 13 Mar 2003 19:53:38 +0100
X-MimeOLE: Produced By Microsoft Exchange V6.5.6803.0
Message-ID: <5C38B761F205B54BA59FF611A65C62480118C7@lembu.sumatrasoftware.com>
X-MS-Has-Attach: yes
X-MS-TNEF-Correlator: 
Thread-Topic: Class loader optimization patch
Thread-Index: AcLjii5WUgtRm5qZQBy0MYdEyTJHgwGBiHtg
From: "Jeroen Frijters" <jeroen@sumatra.nl>
To: "Brian Jones" <cbj@gnu.org>
cc: classpath@gnu.org
Subject: RE: Class loader optimization patch
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Thu, 13 Mar 2003 18:56:59 -0000

This is a multi-part message in MIME format.

------_=_NextPart_001_01C2E991.DBBADC02
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Brian,

Since no one objected, could you please apply this patch? Attached is a
slightly modified version of the original patch. As Mark suggested, I've
left the "throws ClassNotFoundException" on VMClassLoader.loadClass and
made the comment a little clearer.

Regards,
Jeroen=20

>=20
> -----Original Message-----
> From: Brian Jones [mailto:cbj@gnu.org]=20
> Sent: Thursday, March 06, 2003 03:44
> To: Jeroen Frijters
> Cc: classpath@gnu.org
>=20
> "Jeroen Frijters" <jeroen@sumatra.nl> writes:
>=20
> > Hi,
> >=20
> > I made another attempt at reducing the number of=20
> > ClassNotFoundExceptions that are thrown when loading a class, this=20
> > time I believe the patch can be integrated without breaking=20
> anything.=20
> > No API changes and existing code should continue to run=20
> fine. If the=20
> > VM implementation of VMClassLoader.loadClass throws a=20
> > ClassNotFoundException, fine, but with this patch it can=20
> also return=20
> > null, and thus prevent the creation of a (in some cases)=20
> useless exception object.
>=20
> Okay to apply this patch?
>=20
> Brian
> --
> Brian Jones <cbj@gnu.org>
>=20

------_=_NextPart_001_01C2E991.DBBADC02
Content-Type: application/octet-stream;
	name="classloader.patch"
Content-Transfer-Encoding: base64
Content-Description: classloader.patch
Content-Disposition: attachment;
	filename="classloader.patch"

SW5kZXg6IGphdmEvbGFuZy9DbGFzc0xvYWRlci5qYXZhDQo9PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQpSQ1MgZmlsZTog
L2N2c3Jvb3QvY2xhc3NwYXRoL2NsYXNzcGF0aC9qYXZhL2xhbmcvQ2xhc3NMb2FkZXIuamF2YSx2
DQpyZXRyaWV2aW5nIHJldmlzaW9uIDEuMjQNCmRpZmYgLXUgLXIxLjI0IENsYXNzTG9hZGVyLmph
dmENCi0tLSBqYXZhL2xhbmcvQ2xhc3NMb2FkZXIuamF2YQk3IE1hciAyMDAzIDAwOjQzOjM2IC0w
MDAwCTEuMjQNCisrKyBqYXZhL2xhbmcvQ2xhc3NMb2FkZXIuamF2YQkxMyBNYXIgMjAwMyAxODo0
MToxNCAtMDAwMA0KQEAgLTI4OCwyMSArMjg4LDI4IEBADQogICAgICAgaWYgKGMgIT0gbnVsbCkN
CiAgICAgICAgIHJldHVybiBjOw0KIA0KLSAgICAgIC8vIENhbiB0aGUgY2xhc3MgYmVlbiBsb2Fk
ZWQgYnkgYSBwYXJlbnQ/DQorICAgICAgLy8gQ2FuIHRoZSBjbGFzcyBiZSBsb2FkZWQgYnkgYSBw
YXJlbnQ/DQogICAgICAgdHJ5DQorICAgICAgew0KKyAgICAgICAgaWYgKHBhcmVudCA9PSBudWxs
KQ0KICAgICAgICAgew0KLSAgICAgICAgICBpZiAocGFyZW50ID09IG51bGwpDQotICAgICAgICAg
ICAgcmV0dXJuIFZNQ2xhc3NMb2FkZXIubG9hZENsYXNzKG5hbWUsIHJlc29sdmUpOw0KLSAgICAg
ICAgICByZXR1cm4gcGFyZW50LmxvYWRDbGFzcyhuYW1lLCByZXNvbHZlKTsNCisgICAgICAgICAg
YyA9IFZNQ2xhc3NMb2FkZXIubG9hZENsYXNzKG5hbWUsIHJlc29sdmUpOw0KKyAgICAgICAgICBp
ZiAoYyAhPSBudWxsKQ0KKyAgICAgICAgICAgIHJldHVybiBjOw0KICAgICAgICAgfQ0KLSAgICAg
IGNhdGNoIChDbGFzc05vdEZvdW5kRXhjZXB0aW9uIGUpDQorICAgICAgICBlbHNlDQogICAgICAg
ICB7DQotICAgICAgICAgIC8vIFN0aWxsIG5vdCBmb3VuZCwgd2UgaGF2ZSB0byBkbyBpdCBvdXJz
ZWxmLg0KLSAgICAgICAgICBjID0gZmluZENsYXNzKG5hbWUpOw0KLSAgICAgICAgICBpZiAocmVz
b2x2ZSkNCi0gICAgICAgICAgICByZXNvbHZlQ2xhc3MoYyk7DQotICAgICAgICAgIHJldHVybiBj
Ow0KKyAgICAgICAgICByZXR1cm4gcGFyZW50LmxvYWRDbGFzcyhuYW1lLCByZXNvbHZlKTsNCiAg
ICAgICAgIH0NCisgICAgICB9DQorICAgICAgY2F0Y2ggKENsYXNzTm90Rm91bmRFeGNlcHRpb24g
ZSkNCisgICAgICB7DQorICAgICAgfQ0KKyAgICAgIC8vIFN0aWxsIG5vdCBmb3VuZCwgd2UgaGF2
ZSB0byBkbyBpdCBvdXJzZWxmLg0KKyAgICAgIGMgPSBmaW5kQ2xhc3MobmFtZSk7DQorICAgICAg
aWYgKHJlc29sdmUpDQorICAgICAgICByZXNvbHZlQ2xhc3MoYyk7DQorICAgICAgcmV0dXJuIGM7
DQogICAgIH0NCiANCiAgIC8qKg0KSW5kZXg6IHZtL3JlZmVyZW5jZS9qYXZhL2xhbmcvQ2xhc3Mu
amF2YQ0KPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PQ0KUkNTIGZpbGU6IC9jdnNyb290L2NsYXNzcGF0aC9jbGFzc3BhdGgv
dm0vcmVmZXJlbmNlL2phdmEvbGFuZy9DbGFzcy5qYXZhLHYNCnJldHJpZXZpbmcgcmV2aXNpb24g
MS4yMw0KZGlmZiAtdSAtcjEuMjMgQ2xhc3MuamF2YQ0KLS0tIHZtL3JlZmVyZW5jZS9qYXZhL2xh
bmcvQ2xhc3MuamF2YQkyNiBPY3QgMjAwMiAxODo0MTo1OSAtMDAwMAkxLjIzDQorKysgdm0vcmVm
ZXJlbmNlL2phdmEvbGFuZy9DbGFzcy5qYXZhCTEzIE1hciAyMDAzIDE4OjUxOjIzIC0wMDAwDQpA
QCAtMTg3LDcgKzE4NywxMCBAQA0KICAgICAgICAgICAgIGlmIChjbCAhPSBudWxsKQ0KICAgICAg
ICAgICAgICAgc20uY2hlY2tQZXJtaXNzaW9uKG5ldyBSdW50aW1lUGVybWlzc2lvbigiZ2V0Q2xh
c3NMb2FkZXIiKSk7DQogICAgICAgICAgIH0NCi0JcmV0dXJuIFZNQ2xhc3NMb2FkZXIubG9hZENs
YXNzKG5hbWUsIGluaXRpYWxpemUpOw0KKwlDbGFzcyBjID0gVk1DbGFzc0xvYWRlci5sb2FkQ2xh
c3MobmFtZSwgaW5pdGlhbGl6ZSk7DQorICAgICAgICBpZiAoYyAhPSBudWxsKQ0KKyAgICAgICAg
ICByZXR1cm4gYzsNCisgICAgICAgIHRocm93IG5ldyBDbGFzc05vdEZvdW5kRXhjZXB0aW9uKG5h
bWUpOw0KICAgICAgIH0NCiAgICAgcmV0dXJuIGNsYXNzbG9hZGVyLmxvYWRDbGFzcyhuYW1lLCBp
bml0aWFsaXplKTsNCiAgIH0NCkluZGV4OiB2bS9yZWZlcmVuY2UvamF2YS9sYW5nL1ZNQ2xhc3NM
b2FkZXIuamF2YQ0KPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PQ0KUkNTIGZpbGU6IC9jdnNyb290L2NsYXNzcGF0aC9jbGFz
c3BhdGgvdm0vcmVmZXJlbmNlL2phdmEvbGFuZy9WTUNsYXNzTG9hZGVyLmphdmEsdg0KcmV0cmll
dmluZyByZXZpc2lvbiAxLjE0DQpkaWZmIC11IC1yMS4xNCBWTUNsYXNzTG9hZGVyLmphdmENCi0t
LSB2bS9yZWZlcmVuY2UvamF2YS9sYW5nL1ZNQ2xhc3NMb2FkZXIuamF2YQkxOCBEZWMgMjAwMiAx
MDoyODoyOSAtMDAwMAkxLjE0DQorKysgdm0vcmVmZXJlbmNlL2phdmEvbGFuZy9WTUNsYXNzTG9h
ZGVyLmphdmEJMTMgTWFyIDIwMDMgMTg6NTE6MjMgLTAwMDANCkBAIC0xMTcsMTIgKzExNywxNCBA
QA0KICAgICoNCiAgICAqIEBwYXJhbSBuYW1lIHRoZSBjbGFzcyBuYW1lIHRvIGxvYWQNCiAgICAq
IEBwYXJhbSByZXNvbHZlIHdoZXRoZXIgdG8gcmVzb2x2ZSBpdA0KLSAgICogQHJldHVybiB0aGUg
Y2xhc3MsIGxvYWRlZCBieSB0aGUgYm9vdHN0cmFwIGNsYXNzbG9hZGVyDQorICAgKiBAcmV0dXJu
IHRoZSBjbGFzcywgbG9hZGVkIGJ5IHRoZSBib290c3RyYXAgY2xhc3Nsb2FkZXIgb3IgbnVsbA0K
KyAgICogaWYgdGhlIGNsYXNzIHdhc24ndCBmb3VuZC4gUmV0dXJuaW5nIG51bGwgaXMgZXF1aXZh
bGVudCB0byB0aHJvd2luZw0KKyAgICogYSBDbGFzc05vdEZvdW5kRXhjZXB0aW9uIChidXQgYSBw
b3NzaWJsZSBwZXJmb3JtYW5jZSBvcHRpbWl6YXRpb24pLg0KICAgICovDQogICBzdGF0aWMgZmlu
YWwgQ2xhc3MgbG9hZENsYXNzKFN0cmluZyBuYW1lLCBib29sZWFuIHJlc29sdmUpDQogICAgIHRo
cm93cyBDbGFzc05vdEZvdW5kRXhjZXB0aW9uDQogICB7DQotICAgIHRocm93IG5ldyBDbGFzc05v
dEZvdW5kRXhjZXB0aW9uKG5hbWUpOw0KKyAgICByZXR1cm4gbnVsbDsNCiAgIH0NCiANCiAgIC8q
Kg0K

------_=_NextPart_001_01C2E991.DBBADC02--



From MAILER-DAEMON Fri Mar 14 14:41:44 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18tv3j-0003AW-00
	for mharc-classpath@gnu.org; Fri, 14 Mar 2003 14:41:39 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18tv3c-0002un-00
	for classpath@gnu.org; Fri, 14 Mar 2003 14:41:32 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18tv3Z-0002or-00
	for classpath@gnu.org; Fri, 14 Mar 2003 14:41:30 -0500
Received: from node1c5f.a2000.nl ([62.108.28.95] helo=nescio.wildebeest.org)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18tv3X-0002mz-00; Fri, 14 Mar 2003 14:41:28 -0500
Received: from elsschot.wildebeest.org ([192.168.1.26] ident=mark)
	by nescio.wildebeest.org with esmtp (Exim 3.35 #1 (Debian))
	id 18tv2w-0007WJ-00; Fri, 14 Mar 2003 20:40:50 +0100
From: Mark Wielaard <mark@klomp.org>
To: Jeroen Frijters <jeroen@sumatra.nl>
In-Reply-To: <5C38B761F205B54BA59FF611A65C62480118C7@lembu.sumatrasoftware.com>
References: 
	 <5C38B761F205B54BA59FF611A65C62480118C7@lembu.sumatrasoftware.com>
Content-Type: text/plain
Organization: 
Message-Id: <1047670884.4906.369.camel@elsschot>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.2.2 
Date: 14 Mar 2003 20:41:24 +0100
Content-Transfer-Encoding: 7bit
cc: classpath@gnu.org
cc: Brian Jones <cbj@gnu.org>
Subject: RE: Class loader optimization patch
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Fri, 14 Mar 2003 19:41:37 -0000

Hi,

On Thu, 2003-03-13 at 19:53, Jeroen Frijters wrote:
>
> Since no one objected, could you please apply this patch?

Applying patches is always easier if there is a ChangeLog entry included
(and if it changes the VM interface a little blurb for the NEWS file).
Hint. Hint.

Looks good to me and should be transparent to older implementations. I
am looking for another VM to test this with but I noticed that both
Kissme and SableVM don't actually use the VMClassLoader so keeping
backward compatibility isn't that important anyway.

Cheers,

Mark




From MAILER-DAEMON Fri Mar 14 15:06:36 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18tvQe-00061S-00
	for mharc-classpath@gnu.org; Fri, 14 Mar 2003 15:05:20 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18tvP8-0005SO-00
	for classpath@gnu.org; Fri, 14 Mar 2003 15:03:46 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18tvOf-0005Av-00
	for classpath@gnu.org; Fri, 14 Mar 2003 15:03:20 -0500
Received: from node1c5f.a2000.nl ([62.108.28.95] helo=nescio.wildebeest.org)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18tvOe-00055I-00
	for classpath@gnu.org; Fri, 14 Mar 2003 15:03:16 -0500
Received: from elsschot.wildebeest.org ([192.168.1.26] ident=mark)
	by nescio.wildebeest.org with esmtp (Exim 3.35 #1 (Debian))
	id 18tvNw-0007cB-00; Fri, 14 Mar 2003 21:02:32 +0100
From: Mark Wielaard <mark@klomp.org>
To: Jeroen Frijters <jeroen@sumatra.nl>
In-Reply-To: <5C38B761F205B54BA59FF611A65C62480118A8@lembu.sumatrasoftware.com>
References: 
	 <5C38B761F205B54BA59FF611A65C62480118A8@lembu.sumatrasoftware.com>
Content-Type: text/plain
Organization: 
Message-Id: <1047672186.4906.392.camel@elsschot>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.2.2 
Date: 14 Mar 2003 21:03:06 +0100
Content-Transfer-Encoding: 7bit
cc: classpath@gnu.org
cc: "Prof. Etienne M. Gagnon" <etienne.gagnon@uqam.ca>
Subject: RE: Class loader optimization patch
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Fri, 14 Mar 2003 20:05:19 -0000

Hi,

On Tue, 2003-03-04 at 09:57, Jeroen Frijters wrote:
> Archie Cobbs wrote:
> > Here's another slant on this idea: if you don't care about the
> > stack trace, there's no reason an exception object can't be
> > reused. So the native code could just keep around a pre-allocated
> > exception object and throw it over and over again as necessary.
> > Since it's always caught, it will never "escape" into any code
> > that could try to print out its stack trace.
> 
> Just to point out that not all VMs are the same, on ikvm throwing an
> exception will always cause a stack trace to be built, I cannot avoid
> that, because that is just the way the underlying platform (.NET) works.

But as Archie points out in some cases you really are not interested in
getting the stack trace. For example if you come across the following
code:

try
  {
    doSomething();
  }
catch (Throwable t)
  {
    // Ignore exceptions fall back on default.
    doSomethingElse();
  }

At the beginning of the try-catch block you know that any exception
thrown in the block will never get used. So what you can do is set some
Thread local flag that can be checked later when a Throwable is created
that is about to get thrown (but never used for something else). The
flag gets cleared again when you drop out the try-catch block. Then when
you actually have to create and throw an exception and the flag is on
you just skip the whole java exception object creation.

Of course it gets interesting if the code doesn't catch Throwable but
e.g. IOException and if these things get nested but I am sure something
could be worked out for those cases by using a stack that remembers the
most specific exception that will be ignored next and you problably have
to benchmark some programs to see how often this pattern occurs and and
which situations doing all the bookkeeping is just overhead. There must
be papers about such exception elimination techniques.

Cheers,

Mark




From MAILER-DAEMON Fri Mar 14 15:33:16 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18tvrI-0002ko-00
	for mharc-classpath@gnu.org; Fri, 14 Mar 2003 15:32:52 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18tvr7-0002DE-00
	for classpath@gnu.org; Fri, 14 Mar 2003 15:32:41 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18tvr0-0001tO-00
	for classpath@gnu.org; Fri, 14 Mar 2003 15:32:35 -0500
Received: from node1c5f.a2000.nl ([62.108.28.95] helo=nescio.wildebeest.org)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18tvq4-00017o-00
	for classpath@gnu.org; Fri, 14 Mar 2003 15:31:36 -0500
Received: from elsschot.wildebeest.org ([192.168.1.26] ident=mark)
	by nescio.wildebeest.org with esmtp (Exim 3.35 #1 (Debian))
	id 18tvpS-0007eL-00; Fri, 14 Mar 2003 21:30:58 +0100
From: Mark Wielaard <mark@klomp.org>
To: Jeroen Frijters <jeroen@sumatra.nl>
In-Reply-To: <5C38B761F205B54BA59FF611A65C62480118A9@lembu.sumatrasoftware.com>
References: 
	 <5C38B761F205B54BA59FF611A65C62480118A9@lembu.sumatrasoftware.com>
Content-Type: text/plain
Organization: 
Message-Id: <1047673892.4905.411.camel@elsschot>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.2.2 
Date: 14 Mar 2003 21:31:32 +0100
Content-Transfer-Encoding: 7bit
cc: classpath@gnu.org
cc: "Prof. Etienne M. Gagnon" <etienne.gagnon@uqam.ca>
Subject: RE: Class loader optimization patch
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Fri, 14 Mar 2003 20:32:50 -0000

Hi,

On Tue, 2003-03-04 at 10:44, Jeroen Frijters wrote:
> Mark Wielaard wrote:
> > Note that this is a very nice speed tests for the different VMs. It
> > takes minutes before the main Eclipse Window shows up even on a fast
> > machine. Maybe we can have a price for the first VM that 
> > manages to load Eclipse under one minute on some standard PC
> > (say 1Ghz Athlon/Pentium with 512MB).
> 
> 1 minute 12 seconds is the best I can do at the moment. This is with
> Eclipse 2.1 RC1 with no windows open on an 850 MHz Pentium III with
> 512MB. Getting to the point where I can edit Java code takes a couple
> minutes more though.

Impressive. I get the following timings for Eclipse RC2, gij 3.4 (CVS
HEAD, verifier disabled), starting up and using the mouse to select the
exit item as soon as possible (it then takes a couple of seconds to
"Save the workspace"):

Complete fresh start (two splash screens):
real    3m41.889s
user    3m28.310s
sys     0m3.320s

Second startup (one splash screen):
real    2m44.068s
user    2m33.670s
sys     0m2.430s

This is on an Athlon XP 1.4Ghz with 768MB.

The bottleneck seems to be class loading and exception handling.

> For reference, starting eclipse.exe (using Sun's JRE 1.4.1) takes 11
> seconds.

Nah. Proprietary implementations don't count. I assume your timings are
with Mono on Wine. None of that proprietary MS stuff I hope :)

Cheers,

Mark




From MAILER-DAEMON Sat Mar 15 07:49:44 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18uB6Q-00085R-00
	for mharc-classpath@gnu.org; Sat, 15 Mar 2003 07:49:30 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18uB5g-00076l-00
	for classpath@gnu.org; Sat, 15 Mar 2003 07:48:44 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18uB5Y-0006g9-00
	for classpath@gnu.org; Sat, 15 Mar 2003 07:48:40 -0500
Received: from 62-177-154-234.bbeyond.nl ([62.177.154.234]
	helo=LEMBU.sumatrasoftware.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18uB5P-0006Ar-00; Sat, 15 Mar 2003 07:48:27 -0500
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Date: Sat, 15 Mar 2003 13:47:00 +0100
X-MimeOLE: Produced By Microsoft Exchange V6.5.6803.0
Message-ID: <5C38B761F205B54BA59FF611A65C62480118D2@lembu.sumatrasoftware.com>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: Class loader optimization patch
Thread-Index: AcLqYYMJMdqRFGWGQEWFjSvwL+wxxgAjjXFg
From: "Jeroen Frijters" <jeroen@sumatra.nl>
To: "Mark Wielaard" <mark@klomp.org>
cc: classpath@gnu.org
cc: Brian Jones <cbj@gnu.org>
Subject: RE: Class loader optimization patch
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sat, 15 Mar 2003 12:49:28 -0000

Hi,

Sorry about that, here is the ChangeLog entry:

2003-03-15  Jeroen Frijters  <jeroen@sumatra.nl>

	* vm/reference/java/lang/VMClassLoader.java
	(loadClass): Changed documentation to make clear null can
	be returned to signal that the class wasn't found.
	* java/lang/ClassLoader.java
	(loadClass(String,boolean)): Added check for null return
	value from VMClassLoader.loadClass.
	* vm/reference/java/lang/Class.java
	(forName(String,boolean,ClassLoader)): Likewise.=20

I looked at NEWS but I don't think the change needs to be mentioned
there.

Regards,
Jeroen

>=20
> -----Original Message-----
> From: Mark Wielaard [mailto:mark@klomp.org]=20
> Sent: Friday, March 14, 2003 20:41
> To: Jeroen Frijters
> Cc: Brian Jones; classpath@gnu.org
>=20
> Hi,
>=20
> On Thu, 2003-03-13 at 19:53, Jeroen Frijters wrote:
> >
> > Since no one objected, could you please apply this patch?
>=20
> Applying patches is always easier if there is a ChangeLog=20
> entry included (and if it changes the VM interface a little=20
> blurb for the NEWS file).
> Hint. Hint.
>=20
> Looks good to me and should be transparent to older=20
> implementations. I am looking for another VM to test this=20
> with but I noticed that both Kissme and SableVM don't=20
> actually use the VMClassLoader so keeping backward=20
> compatibility isn't that important anyway.
>=20
> Cheers,
>=20
> Mark
>=20
>=20



From MAILER-DAEMON Sat Mar 15 07:50:39 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18uB6V-0008Cl-00
	for mharc-classpath@gnu.org; Sat, 15 Mar 2003 07:49:35 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18uB66-0007LL-00
	for classpath@gnu.org; Sat, 15 Mar 2003 07:49:10 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18uB63-0007Hm-00
	for classpath@gnu.org; Sat, 15 Mar 2003 07:49:08 -0500
Received: from 62-177-154-234.bbeyond.nl ([62.177.154.234]
	helo=LEMBU.sumatrasoftware.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)	id 18uB5O-0006Ar-00
	for classpath@gnu.org; Sat, 15 Mar 2003 07:48:26 -0500
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Date: Sat, 15 Mar 2003 13:47:00 +0100
X-MimeOLE: Produced By Microsoft Exchange V6.5.6803.0
Message-ID: <5C38B761F205B54BA59FF611A65C62480118D1@lembu.sumatrasoftware.com>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: Class loader optimization patch
Thread-Index: AcLqZI20hbme8teBRCCUNd49ndEk0wAinbcQ
From: "Jeroen Frijters" <jeroen@sumatra.nl>
To: "Mark Wielaard" <mark@klomp.org>
cc: classpath@gnu.org
cc: "Prof. Etienne M. Gagnon" <etienne.gagnon@uqam.ca>
Subject: RE: Class loader optimization patch
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sat, 15 Mar 2003 12:49:34 -0000

Hi,

What I was trying to make clear was that I have no control over (some
aspects of) this. I have to use the .NET exception handling facilities
and I'm stuck with its (in)efficiency.

Regards,
Jeroen=20

>=20
> -----Original Message-----
> From: Mark Wielaard [mailto:mark@klomp.org]=20
> Sent: Friday, March 14, 2003 21:03
> To: Jeroen Frijters
> Cc: Archie Cobbs; classpath@gnu.org; Prof. Etienne M. Gagnon
>=20
> Hi,
>=20
> On Tue, 2003-03-04 at 09:57, Jeroen Frijters wrote:
> > Archie Cobbs wrote:
> > > Here's another slant on this idea: if you don't care=20
> about the stack=20
> > > trace, there's no reason an exception object can't be=20
> reused. So the=20
> > > native code could just keep around a pre-allocated=20
> exception object=20
> > > and throw it over and over again as necessary.
> > > Since it's always caught, it will never "escape" into any=20
> code that=20
> > > could try to print out its stack trace.
> >=20
> > Just to point out that not all VMs are the same, on ikvm=20
> throwing an=20
> > exception will always cause a stack trace to be built, I=20
> cannot avoid=20
> > that, because that is just the way the underlying platform=20
> (.NET) works.
>=20
> But as Archie points out in some cases you really are not=20
> interested in getting the stack trace. For example if you=20
> come across the following
> code:
>=20
> try
>   {
>     doSomething();
>   }
> catch (Throwable t)
>   {
>     // Ignore exceptions fall back on default.
>     doSomethingElse();
>   }
>=20
> At the beginning of the try-catch block you know that any=20
> exception thrown in the block will never get used. So what=20
> you can do is set some Thread local flag that can be checked=20
> later when a Throwable is created that is about to get thrown=20
> (but never used for something else). The flag gets cleared=20
> again when you drop out the try-catch block. Then when you=20
> actually have to create and throw an exception and the flag=20
> is on you just skip the whole java exception object creation.
>=20
> Of course it gets interesting if the code doesn't catch=20
> Throwable but e.g. IOException and if these things get nested=20
> but I am sure something could be worked out for those cases=20
> by using a stack that remembers the most specific exception=20
> that will be ignored next and you problably have to benchmark=20
> some programs to see how often this pattern occurs and and=20
> which situations doing all the bookkeeping is just overhead.=20
> There must be papers about such exception elimination techniques.
>=20
> Cheers,
>=20
> Mark
>=20
>=20



From MAILER-DAEMON Sat Mar 15 09:18:02 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18uCU6-00008I-00
	for mharc-classpath@gnu.org; Sat, 15 Mar 2003 09:18:02 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18uCU3-0008VO-00
	for classpath@gnu.org; Sat, 15 Mar 2003 09:17:59 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18uCU2-0008TP-00
	for classpath@gnu.org; Sat, 15 Mar 2003 09:17:58 -0500
Received: from node1c5f.a2000.nl ([62.108.28.95] helo=nescio.wildebeest.org)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18uCU2-0008Si-00; Sat, 15 Mar 2003 09:17:58 -0500
Received: from elsschot.wildebeest.org ([192.168.1.26] ident=mark)
	by nescio.wildebeest.org with esmtp (Exim 3.35 #1 (Debian))
	id 18uCTQ-0001CE-00; Sat, 15 Mar 2003 15:17:20 +0100
From: Mark Wielaard <mark@klomp.org>
To: Jeroen Frijters <jeroen@sumatra.nl>
In-Reply-To: <5C38B761F205B54BA59FF611A65C62480118D2@lembu.sumatrasoftware.com>
References: 
	 <5C38B761F205B54BA59FF611A65C62480118D2@lembu.sumatrasoftware.com>
Content-Type: text/plain
Organization: 
Message-Id: <1047737874.4905.444.camel@elsschot>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.2.2 
Date: 15 Mar 2003 15:17:54 +0100
Content-Transfer-Encoding: 7bit
cc: Brian Jones <cbj@gnu.org>
cc: classpath@gnu.org
Subject: RE: Class loader optimization patch
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sat, 15 Mar 2003 14:18:00 -0000

Hi,

On Sat, 2003-03-15 at 13:47, Jeroen Frijters wrote:
>
> Sorry about that, here is the ChangeLog entry:

Thanks.

> I looked at NEWS but I don't think the change needs to be mentioned
> there.

I think it is important to mention any changes in the VM interfaces. I
will add something like the following:

        New in release 0.06 (not-yet-released)
        * VMClassLoader.loadClass(), the bootstrap classloader called by
        Class.forName() and ClassLoader.loadClass(), may now return null when
        a class is not found instead of throwing a new ClassNotFoundException.
        This is a performance optimization in some cases. This also changes
        the Class.forName() reference code.
        
Will commit soon, but the subversions CVS server is acting up again:

can't create temporary directory /tmp/cvs-serv25164
Read-only file system

Sigh. 

Cheers,

Mark

P.S. I did finally commit your ObjectStream patches.




From MAILER-DAEMON Sat Mar 15 17:33:03 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18uKCq-0004Ll-00
	for mharc-classpath@gnu.org; Sat, 15 Mar 2003 17:32:44 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18uKCO-00039U-00
	for classpath@gnu.org; Sat, 15 Mar 2003 17:32:16 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18uKBd-0002SV-00
	for classpath@gnu.org; Sat, 15 Mar 2003 17:31:30 -0500
Received: from adsl-63-194-81-26.dsl.snfc21.pacbell.net ([63.194.81.26]
	helo=InterJet.dellroad.org)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)	id 18uKAG-0001Bk-00
	for classpath@gnu.org; Sat, 15 Mar 2003 17:30:04 -0500
Received: from arch20m.dellroad.org (arch20m.dellroad.org [10.1.1.20])
	by InterJet.dellroad.org (8.9.1a/8.9.1) with ESMTP id OAA38202
	for <classpath@gnu.org>; Sat, 15 Mar 2003 14:19:07 -0800 (PST)
Received: from arch20m.dellroad.org (localhost [127.0.0.1])
	by arch20m.dellroad.org (8.12.6/8.12.6) with ESMTP id h2FMJ6G2025225
	for <classpath@gnu.org>; Sat, 15 Mar 2003 14:19:06 -0800 (PST)
	(envelope-from archie@arch20m.dellroad.org)
Received: (from archie@localhost)
	by arch20m.dellroad.org (8.12.6/8.12.6/Submit) id h2FMJ6kq025224
	for classpath@gnu.org; Sat, 15 Mar 2003 14:19:06 -0800 (PST)
	(envelope-from archie)
From: Archie Cobbs <archie@dellroad.org>
Message-Id: <200303152219.h2FMJ6kq025224@arch20m.dellroad.org>
To: classpath@gnu.org
Date: Sat, 15 Mar 2003 14:19:06 -0800 (PST)
X-Mailer: ELM [version 2.4ME+ PL99b (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
Subject: extremely tiny patch
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sat, 15 Mar 2003 22:32:41 -0000

FWIW... 'numValue' is a char[] array so 'digit' can never be negative.

-Archie

__________________________________________________________________________
Archie Cobbs     *     Precision I/O      *     http://www.precisionio.com

*** java/lang/Character.java.orig	Sat Mar 15 14:17:37 2003
--- java/lang/Character.java	Sat Mar 15 14:17:49 2003
***************
*** 1971,1977 ****
        {
          // Signedness doesn't matter; 0xffff vs. -1 are both rejected.
          int digit = numValue[attr >> 7];
!         return (digit >= 0 && digit < radix) ? digit : -1;
        }
      return -1;
    }
--- 1971,1977 ----
        {
          // Signedness doesn't matter; 0xffff vs. -1 are both rejected.
          int digit = numValue[attr >> 7];
!         return (digit < radix) ? digit : -1;
        }
      return -1;
    }



From MAILER-DAEMON Sun Mar 16 16:09:30 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18ufND-0003DZ-00
	for mharc-classpath@gnu.org; Sun, 16 Mar 2003 16:08:51 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18ufNA-00039H-00
	for classpath@gnu.org; Sun, 16 Mar 2003 16:08:48 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18ufN3-0002rR-00
	for classpath@gnu.org; Sun, 16 Mar 2003 16:08:41 -0500
Received: from h18n2fls32o891.telia.com ([217.208.69.18]
	helo=localhost.localdomain)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)	id 18ufMT-0001PX-00
	for classpath@gnu.org; Sun, 16 Mar 2003 16:08:05 -0500
Received: from nifhp ([192.168.0.153])
	by localhost.localdomain (8.11.6/8.11.6) with SMTP id h2GLrGW02022
	for <classpath@gnu.org>; Sun, 16 Mar 2003 22:53:16 +0100
From: "Niklas Fondberg" <n.fondberg@telia.com>
To: <classpath@gnu.org>
Date: Sun, 16 Mar 2003 22:07:55 +0100
Message-ID: <DNECILAPGGJCJKEALLAPGEOMCAAA.n.fondberg@telia.com>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Subject: JVM/classpath question
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sun, 16 Mar 2003 21:08:50 -0000


Is there an open source JVM with (or without) classpath that is at least 1.3
complient (minus awt/swing).

I have a problem with size on a server.
The whole installed footprint on disk have to be less than 10MB.

Can I extend j2me (cdc foundation) with classes from classpath and make it a
trimmed down JRE?

I run linux.

/
Niklas Fondberg




>>> Download free spam killer at http://eliminatespam.com




From MAILER-DAEMON Mon Mar 17 07:40:29 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18utrm-0003N7-00
	for mharc-classpath@gnu.org; Mon, 17 Mar 2003 07:37:22 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18utqN-0002H7-00
	for classpath@gnu.org; Mon, 17 Mar 2003 07:35:55 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18utpG-0001lr-00
	for classpath@gnu.org; Mon, 17 Mar 2003 07:34:47 -0500
Received: from ms-smtp-01.southeast.rr.com ([24.93.67.82])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18utoJ-00018r-00
	for classpath@gnu.org; Mon, 17 Mar 2003 07:33:47 -0500
Received: from mail5.nc.rr.com (fe5 [24.93.67.52])h2HCTmgA011652;
	Mon, 17 Mar 2003 07:29:48 -0500 (EST)
Received: from lyta.haphazard.org ([66.57.9.48]) by mail5.nc.rr.com  with
	Microsoft SMTPSVC(5.5.1877.757.75);	 Mon, 17 Mar 2003 07:31:18 -0500
Received: by lyta.haphazard.org (Postfix, from userid 500)
	id 69C1ABE69E; Mon, 17 Mar 2003 07:33:41 -0500 (EST)
Sender: cbj@haphazard.org
To: "Niklas Fondberg" <n.fondberg@telia.com>
References: <DNECILAPGGJCJKEALLAPGEOMCAAA.n.fondberg@telia.com>
From: Brian Jones <cbj@gnu.org>
Date: 17 Mar 2003 07:33:41 -0500
In-Reply-To: <DNECILAPGGJCJKEALLAPGEOMCAAA.n.fondberg@telia.com>
Message-ID: <m3hea2xjdm.fsf@lyta.haphazard.org>
Lines: 20
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: classpath@gnu.org
Subject: Re: JVM/classpath question
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Mon, 17 Mar 2003 12:37:21 -0000

"Niklas Fondberg" <n.fondberg@telia.com> writes:

> Is there an open source JVM with (or without) classpath that is at least 1.3
> complient (minus awt/swing).
> 
> I have a problem with size on a server.
> The whole installed footprint on disk have to be less than 10MB.
> 
> Can I extend j2me (cdc foundation) with classes from classpath and make it a
> trimmed down JRE?
> 
> I run linux.

Yeah your options are to go the J2ME route by removing things from
Classpath or to use gcj and some sort of hack of your own to remove
unnecessary core classes.

Brian
-- 
Brian Jones <cbj@gnu.org>



From MAILER-DAEMON Tue Mar 18 09:32:53 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18vI97-0007NU-00
	for mharc-classpath@gnu.org; Tue, 18 Mar 2003 09:32:53 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18vI95-0007LJ-00
	for classpath@gnu.org; Tue, 18 Mar 2003 09:32:51 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18vI94-0007Kr-00
	for classpath@gnu.org; Tue, 18 Mar 2003 09:32:50 -0500
Received: from [62.221.15.20] (helo=ns1.irishbroadband.ie)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18vI5u-00056L-00; Tue, 18 Mar 2003 09:29:35 -0500
Received: from [192.168.2.54] (unknown [62.221.16.56])
	by ns1.irishbroadband.ie (Postfix) with ESMTP
	id C925A12ED9A; Tue, 18 Mar 2003 14:29:00 +0000 (GMT)
From: John Leuner <jewel@pixie.co.za>
To: Brian Jones <cbj@gnu.org>
In-Reply-To: <m3hea2xjdm.fsf@lyta.haphazard.org>
References: <DNECILAPGGJCJKEALLAPGEOMCAAA.n.fondberg@telia.com>
	 <m3hea2xjdm.fsf@lyta.haphazard.org>
Content-Type: text/plain
Organization: 
Message-Id: <1047997266.814.29.camel@cmalu>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.2.0 
Date: 18 Mar 2003 14:21:06 +0000
Content-Transfer-Encoding: 7bit
cc: classpath@gnu.org
cc: mark@klomp.org
Subject: Re: JVM/classpath question
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Tue, 18 Mar 2003 14:32:52 -0000

I think Niklas was asking whether he could mix classes from a CDC
implementation with Classpath classes.

This might be possible with some classes, but you run the risk of things
breaking when the classpath or CDC classes change in future versions.

But as Brian said, you can just remove pieces of classpath and use a JVM
that works with Classpath.

It is difficult to say whether there is a Classpath/JVM combination that
is "1.3" compliant. It really depends on what your needs are. There are
interpreters like kissme and SableVM, and there is JRVM which is more
suited to a server-side (lots of RAM) setup.

A long time ago Mark Wielaard posted a mail about a clean-room
implementation of J2ME classes. Does anyone know of any work in this
direction, is there anyone interested in creating clean-room CDLC
libraries (perhaps based on Classpath)?

John Leuner


On Mon, 2003-03-17 at 12:33, Brian Jones wrote:
> "Niklas Fondberg" <n.fondberg@telia.com> writes:
> 
> > Is there an open source JVM with (or without) classpath that is at least 1.3
> > complient (minus awt/swing).
> > 
> > I have a problem with size on a server.
> > The whole installed footprint on disk have to be less than 10MB.
> > 
> > Can I extend j2me (cdc foundation) with classes from classpath and make it a
> > trimmed down JRE?
> > 
> > I run linux.
> 
> Yeah your options are to go the J2ME route by removing things from
> Classpath or to use gcj and some sort of hack of your own to remove
> unnecessary core classes.
> 
> Brian
-- 
John Leuner <jewel@pixie.co.za>




From MAILER-DAEMON Wed Mar 19 08:17:09 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18vdRN-0007Rx-00
	for mharc-classpath@gnu.org; Wed, 19 Mar 2003 08:17:09 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18vdRK-0007Pu-00
	for classpath@gnu.org; Wed, 19 Mar 2003 08:17:06 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18vdRI-0007GH-00
	for classpath@gnu.org; Wed, 19 Mar 2003 08:17:05 -0500
Received: from ms-smtp-02.southeast.rr.com ([24.93.67.83])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18vdRH-0007E3-00
	for classpath@gnu.org; Wed, 19 Mar 2003 08:17:03 -0500
Received: from mail3.nc.rr.com (fe3 [24.93.67.50])h2JDFMgS022425;
	Wed, 19 Mar 2003 08:15:23 -0500 (EST)
Received: from lyta.haphazard.org ([66.57.9.48]) by mail3.nc.rr.com  with
	Microsoft SMTPSVC(5.5.1877.757.75);	 Wed, 19 Mar 2003 08:14:49 -0500
Received: by lyta.haphazard.org (Postfix, from userid 500)
	id 5259BBE69E; Wed, 19 Mar 2003 08:17:04 -0500 (EST)
Sender: cbj@haphazard.org
To: Casey Marshall <rsdio@metastatic.org>
References: <1047157664.2226.6.camel@dexter.attbi.com>
From: Brian Jones <cbj@gnu.org>
Date: 19 Mar 2003 08:17:04 -0500
In-Reply-To: <1047157664.2226.6.camel@dexter.attbi.com>
Message-ID: <m3d6knqywf.fsf@lyta.haphazard.org>
Lines: 22
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: GNU Classpath <classpath@gnu.org>
Subject: Re: [PATCH] java.security miscellany
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Wed, 19 Mar 2003 13:17:07 -0000

Casey Marshall <rsdio@metastatic.org> writes:

> Attached are the java.security patches I posted earlier, reformatted
> slightly. My paperwork for GCC and Classpath is through (I haven't
> gotten the photocopies back, but Jessica sent me a message saying they
> have been accepted).
> 
> I am having some difficulties talking with subversions right now;
> hopefully the patches are not corrupt.
> 
> Cheers,
> 
> -- 
> Casey Marshall || rsdio@metastatic.org

Thanks Casey,

Is there a ChangeLog entry?

Brian
-- 
Brian Jones <cbj@gnu.org>



From MAILER-DAEMON Wed Mar 19 20:06:07 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18voVK-0000mC-00
	for mharc-classpath@gnu.org; Wed, 19 Mar 2003 20:05:58 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18voVA-0000TL-00
	for classpath@gnu.org; Wed, 19 Mar 2003 20:05:48 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18voUl-0008Dt-00
	for classpath@gnu.org; Wed, 19 Mar 2003 20:05:24 -0500
Received: from 12-235-115-156.client.attbi.com ([12.235.115.156] helo=blossom)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18voU9-00076O-00; Wed, 19 Mar 2003 20:04:45 -0500
Received: from dexter ([192.168.0.2] helo=metastatic.org)
	by blossom with esmtp (Exim 3.35 #1 (Debian))
	id 18voU7-0003DY-00; Wed, 19 Mar 2003 17:04:43 -0800
Message-ID: <3E7913AA.6090501@metastatic.org>
Date: Wed, 19 Mar 2003 17:04:42 -0800
From: Casey Marshall <rsdio@metastatic.org>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030228
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: Brian Jones <cbj@gnu.org>
References: <1047157664.2226.6.camel@dexter.attbi.com>
	<m3d6knqywf.fsf@lyta.haphazard.org>
In-Reply-To: <m3d6knqywf.fsf@lyta.haphazard.org>
X-Enigmail-Version: 0.71.0.0
X-Enigmail-Supports: pgp-inline, pgp-mime
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
cc: GNU Classpath <classpath@gnu.org>
Subject: Re: [PATCH] java.security miscellany
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Thu, 20 Mar 2003 01:05:55 -0000

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Brian Jones wrote:
| Casey Marshall <rsdio@metastatic.org> writes:
|
|
|>Attached are the java.security patches I posted earlier, reformatted
|>slightly. My paperwork for GCC and Classpath is through (I haven't
|>gotten the photocopies back, but Jessica sent me a message saying they
|>have been accepted).
|>
|>I am having some difficulties talking with subversions right now;
|>hopefully the patches are not corrupt.
|>
|>Cheers,
|>
|>--
|>Casey Marshall || rsdio@metastatic.org
|
| Thanks Casey,
|
| Is there a ChangeLog entry?
|

Some things may conflict with the current state of these files, since
there have been some other changes to the security files recently.

~   * java/security/AlgorithmParameterGenerator.java:
~     modify getInstance methods to use the Engine class; adds
~     JDK1.4 getInstance method; getInstance throws an exception
~     if provider argument is null; minor comment improvements
~     or elaborations; copyright updated to include 2003.
~   * java/security/AlgorithmParameters.java: likewise.
~   * java/security/KeyFactory.java: likewise.
~   * java/security/KeyPairGenerator.java: likewise.
~   * java/security/MessageDigest.java: likewise.
~   * java/security/Signature.java: likewise.
~   * java/security/SecureRandom.java: likewise.
~   * java/security/KeyStore.java: modify getInstance methods to use
~     the Engine class.
~   * java/security/Engine.java: new package-private class with a single
~     package-private class method that implements a general getInstance.

- --
Casey Marshall || rsdio@metastatic.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE+eROqgAuWMgRGsWsRAjL2AKCHAJfL2ASK6x+SJYnKEP2YCy4YhQCfYFpN
K/ppdPRhZweaWyNrjgNqhPM=
=cnp5
-----END PGP SIGNATURE-----




From MAILER-DAEMON Thu Mar 20 16:23:18 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18w7VO-0005hL-00
	for mharc-classpath@gnu.org; Thu, 20 Mar 2003 16:23:18 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18vjhr-0005YQ-00
	for classpath@gnu.org; Wed, 19 Mar 2003 14:58:35 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18vjhE-0004O2-00
	for classpath@gnu.org; Wed, 19 Mar 2003 14:57:58 -0500
Received: from smtp.easynet.ch ([217.8.192.20] helo=smtp2.mail.ch.easynet.net)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18vjeo-0002uk-00
	for classpath@gnu.org; Wed, 19 Mar 2003 14:55:26 -0500
Received: from [192.168.1.33] (199.16.dyn-adsl.customer.ch.easynet.net
	[217.8.199.16])
	by smtp2.mail.ch.easynet.net (Postfix) with ESMTP id 498DC6496E
	for <classpath@gnu.org>; Wed, 19 Mar 2003 20:48:17 +0100 (CET)
From: Sascha Brawer <brawer@dandelis.ch>
To: GNU Classpath <classpath@gnu.org>
Date: Wed, 19 Mar 2003 20:54:57 +0100
Message-Id: <20030319195457.15802@smtp.mail.ch.easynet.net>
X-Mailer: CTM PowerMail 3.1.1 carbon <http://www.ctmdev.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Mailman-Approved-At: Thu, 20 Mar 2003 16:23:16 -0500
Subject: Presentation of Classpath
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Wed, 19 Mar 2003 19:58:36 -0000

Hi all,

In May, I might possibly have an opportunity to speak briefly about GNU
Classpath in front of a number of students, maybe also a few journalists.
(It is quite uncertain, though).

I think such events are a good opportunity to attract more developers to
Classpath. So, does anyone already have suitable material for a
presentation? Having slides ready might also come in handy for FOSDEM and
similar occasions.

Thanks in advance, and best regards,

-- Sascha Brawer, brawer@dandelis.ch





From MAILER-DAEMON Fri Mar 21 11:33:23 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18wPSG-00048p-00
	for mharc-classpath@gnu.org; Fri, 21 Mar 2003 11:33:16 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18wPS5-0003hP-00
	for classpath@gnu.org; Fri, 21 Mar 2003 11:33:05 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18wPRc-0003Gs-00
	for classpath@gnu.org; Fri, 21 Mar 2003 11:32:38 -0500
Received: from ms-smtp-03.southeast.rr.com ([24.93.67.84])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18wPPy-0002RG-00
	for classpath@gnu.org; Fri, 21 Mar 2003 11:30:54 -0500
Received: from mail3.nc.rr.com (fe3 [24.93.67.50])h2LGTgm8027127
	for <classpath@gnu.org>; Fri, 21 Mar 2003 11:29:46 -0500 (EST)
Received: from lyta.haphazard.org ([66.57.9.48]) by mail3.nc.rr.com  with
	Microsoft SMTPSVC(5.5.1877.757.75);	 Fri, 21 Mar 2003 11:28:35 -0500
Received: by lyta.haphazard.org (Postfix, from userid 500)
	id E28E0BE69E; Fri, 21 Mar 2003 11:30:57 -0500 (EST)
Sender: cbj@haphazard.org
To: GNU Classpath <classpath@gnu.org>
From: Brian Jones <cbj@gnu.org>
Date: 21 Mar 2003 11:30:57 -0500
Message-ID: <m3fzpg8ywu.fsf@lyta.haphazard.org>
Lines: 9
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Subject: Announce: JamVM 1.0.0
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Fri, 21 Mar 2003 16:33:13 -0000

Saw that a new JVM, JamVM 1.0 has been released and appears to use GNU
Classpath.  It's tiny!  And Robert, if you're listening, we always
welcome patches.

http://jamvm.sourceforge.net/

Brian
-- 
Brian Jones <cbj@gnu.org>



From MAILER-DAEMON Fri Mar 21 12:14:39 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18wQ6J-0007OR-00
	for mharc-classpath@gnu.org; Fri, 21 Mar 2003 12:14:39 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18wQ6H-0007NV-00
	for classpath@gnu.org; Fri, 21 Mar 2003 12:14:37 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18wQ6F-0007MB-00
	for classpath@gnu.org; Fri, 21 Mar 2003 12:14:36 -0500
Received: from mail.peakpeak.com ([207.174.178.17] helo=gash2.peakpeak.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18wQ3h-0006Ig-00
	for classpath@gnu.org; Fri, 21 Mar 2003 12:11:57 -0500
Received: from fleche.redhat.com (tf0239.peakpeak.com [204.144.239.239])
	by gash2.peakpeak.com (8.9.3/8.9.3) with ESMTP id KAA04460;
	Fri, 21 Mar 2003 10:11:47 -0700
Received: by fleche.redhat.com (Postfix, from userid 1000)
	id ADCF54F828B; Fri, 21 Mar 2003 10:07:31 -0700 (MST)
To: rupp@aicas.com
References: <E18wN8a-0001cO-00@subversions.gnu.org>
From: Tom Tromey <tromey@redhat.com>
X-Attribution: Tom
X-Zippy: I'm changing the CHANNEL..  But all I get is commercials
 for ``RONCO MIRACLE BAMBOO STEAMERS''!
Date: 21 Mar 2003 10:07:31 -0700
In-Reply-To: <E18wN8a-0001cO-00@subversions.gnu.org>
Message-ID: <874r5wr6lo.fsf@fleche.redhat.com>
Lines: 23
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: Classpath Discussion Mailing List <classpath@gnu.org>
Subject: Re: classpath/native/target/Linux target_native.h t...
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
Reply-To: tromey@redhat.com
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Fri, 21 Mar 2003 17:14:37 -0000

>>>>> "Torsten" == Torsten Rupp <rupp@aicas.com> writes:

Torsten> CVSROOT:	/cvsroot/classpath
Torsten> Module name:	classpath
Torsten> Changes by:	Torsten Rupp <rupp@aicas.com>	03/03/21 09:04:47

Torsten> Added files:
Torsten> 	native/target/Linux: target_native.h target_native_file.h 
Torsten> 	                     target_native_math_float.h 
Torsten> 	                     target_native_math_int.h 
Torsten> 	                     target_native_misc.h 
Torsten> 	                     target_native_network.h 

Torsten> Log message:
Torsten> 	Target specific native code. This code is still not used, but please have a look. aicas GmbH will add and activate this code soon as possible (currently we are very busy; please be patient, we will do our best!)


Hi.  All changes have to have a ChangeLog entry.  See the GNU Coding
Standards for information on how to write such an entry.  The
convention is also to use the ChangeLog as the cvs commit message.

Thanks,
Tom



From MAILER-DAEMON Tue Mar 25 23:27:31 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18y2Vf-0001zE-00
	for mharc-classpath@gnu.org; Tue, 25 Mar 2003 23:27:31 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18y2Vc-0001xA-00
	for classpath@gnu.org; Tue, 25 Mar 2003 23:27:28 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18y2VW-0001pE-00
	for classpath@gnu.org; Tue, 25 Mar 2003 23:27:27 -0500
Received: from ms-smtp-03.southeast.rr.com ([24.93.67.84])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18y2VV-0001oo-00
	for classpath@gnu.org; Tue, 25 Mar 2003 23:27:21 -0500
Received: from mail3.nc.rr.com (fe3 [24.93.67.50])h2Q4QAm0014233;
	Tue, 25 Mar 2003 23:26:10 -0500 (EST)
Received: from lyta.haphazard.org ([66.57.9.48]) by mail3.nc.rr.com  with
	Microsoft SMTPSVC(5.5.1877.757.75);	 Tue, 25 Mar 2003 23:24:44 -0500
Received: by lyta.haphazard.org (Postfix, from userid 500)
	id 8D740BE69E; Tue, 25 Mar 2003 23:27:07 -0500 (EST)
Sender: cbj@haphazard.org
To: Casey Marshall <rsdio@metastatic.org>
References: <1047157664.2226.6.camel@dexter.attbi.com>
	<m3d6knqywf.fsf@lyta.haphazard.org> <3E7913AA.6090501@metastatic.org>
From: Brian Jones <cbj@gnu.org>
Date: 25 Mar 2003 23:27:07 -0500
In-Reply-To: <3E7913AA.6090501@metastatic.org>
Message-ID: <m3d6kewy5g.fsf@lyta.haphazard.org>
Lines: 53
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
cc: GNU Classpath <classpath@gnu.org>
Subject: Re: [PATCH] java.security miscellany
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Wed, 26 Mar 2003 04:27:29 -0000

--=-=-=

Casey Marshall <rsdio@metastatic.org> writes:

> Brian Jones wrote:
> | Casey Marshall <rsdio@metastatic.org> writes:
> |
> |
> |>Attached are the java.security patches I posted earlier, reformatted
> |>slightly. My paperwork for GCC and Classpath is through (I haven't
> |>gotten the photocopies back, but Jessica sent me a message saying they
> |>have been accepted).
> |>
> |>I am having some difficulties talking with subversions right now;
> |>hopefully the patches are not corrupt.
> |>
> |>Cheers,
> |>
> |>--
> |>Casey Marshall || rsdio@metastatic.org
> |
> | Thanks Casey,
> |
> | Is there a ChangeLog entry?
> |
> 
> Some things may conflict with the current state of these files, since
> there have been some other changes to the security files recently.
> 
> ~   * java/security/AlgorithmParameterGenerator.java:
> ~     modify getInstance methods to use the Engine class; adds
> ~     JDK1.4 getInstance method; getInstance throws an exception
> ~     if provider argument is null; minor comment improvements
> ~     or elaborations; copyright updated to include 2003.
> ~   * java/security/AlgorithmParameters.java: likewise.
> ~   * java/security/KeyFactory.java: likewise.
> ~   * java/security/KeyPairGenerator.java: likewise.
> ~   * java/security/MessageDigest.java: likewise.
> ~   * java/security/Signature.java: likewise.
> ~   * java/security/SecureRandom.java: likewise.
> ~   * java/security/KeyStore.java: modify getInstance methods to use
> ~     the Engine class.
> ~   * java/security/Engine.java: new package-private class with a single
> ~     package-private class method that implements a general getInstance.

Okay, the attached patch is roughly the rest of your patch applied to
what is already in CVS.  If you're happy with it I'll go ahead and
check it in.

Brian
-- 
Brian Jones <cbj@gnu.org>


--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment; filename=security.patch

Index: java/security/AlgorithmParameterGenerator.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/security/AlgorithmParameterGenerator.java,v
retrieving revision 1.6
diff -u -r1.6 AlgorithmParameterGenerator.java
--- java/security/AlgorithmParameterGenerator.java	9 Mar 2003 07:08:32 -0000	1.6
+++ java/security/AlgorithmParameterGenerator.java	26 Mar 2003 04:24:02 -0000
@@ -1,5 +1,5 @@
 /* AlgorithmParameterGenerator.java --- Algorithm Parameter Generator
-   Copyright (C) 1999, 2003, Free Software Foundation, Inc.
+   Copyright (C) 1999, 2003 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -80,6 +80,10 @@
  */
 public class AlgorithmParameterGenerator
 {
+  /** Service name for algorithm parameter generators. */
+  private static final String ALGORITHM_PARAMETER_GENERATOR =
+    "AlgorithmParameterGenerator";
+
   private AlgorithmParameterGeneratorSpi paramGenSpi;
   private Provider provider;
   private String algorithm;
@@ -132,7 +136,7 @@
     for (int i = 0; i < p.length; i++)
       try
         {
-          getInstance(algorithm, p[i]);
+          return getInstance(algorithm, p[i]);
         }
       catch (NoSuchAlgorithmException ignored) {}
 
@@ -159,6 +163,9 @@
 							String provider)
     throws NoSuchAlgorithmException, NoSuchProviderException
   {
+    if (provider == null || provider.length() == 0)
+      throw new IllegalArgumentException("Illegal provider");
+
     Provider p = Security.getProvider(provider);
     if (p == null)
       throw new NoSuchProviderException();
@@ -186,59 +193,18 @@
     throws NoSuchAlgorithmException
   {
     if (provider == null)
-      throw new IllegalArgumentException();
-
-    // try the name as is
-    String className = provider.getProperty(
-        "AlgorithmParameterGenerator." + algorithm);
-    if (className == null) // try all uppercase
-      {
-        String upper = algorithm.toUpperCase();
-        className = provider.getProperty("AlgorithmParameterGenerator." + upper);
-        if (className == null) // try if it's an alias
-          {
-            String alias = provider.getProperty(
-                "Alg.Alias.AlgorithmParameterGenerator." + algorithm);
-            if (alias == null) // try all-uppercase alias name
-              {
-                alias = provider.getProperty(
-                    "Alg.Alias.AlgorithmParameterGenerator." + upper);
-                if (alias == null) // spit the dummy
-                  throw new NoSuchAlgorithmException(algorithm);
-              }
-            className = provider.getProperty(
-                "AlgorithmParameterGenerator." + alias);
-            if (className == null)
-              throw new NoSuchAlgorithmException(algorithm);
-          }
-      }
-    return getInstance(className, algorithm, provider);
-  }
-
-  private static AlgorithmParameterGenerator getInstance(String classname,
-							 String algorithm,
-							 Provider provider)
-    throws NoSuchAlgorithmException
-  {
+      throw new IllegalArgumentException("Illegal provider");
 
     try
       {
-        return new AlgorithmParameterGenerator(
-            (AlgorithmParameterGeneratorSpi) Class.forName(classname).newInstance(),
-            provider,
-            algorithm);
-      }
-    catch (ClassNotFoundException cnfe)
-      {
-        throw new NoSuchAlgorithmException("Class not found");
-      }
-    catch (InstantiationException ie)
-      {
-        throw new NoSuchAlgorithmException("Class instantiation failed");
-      }
-    catch (IllegalAccessException iae)
+	return new AlgorithmParameterGenerator(
+	  (AlgorithmParameterGeneratorSpi) Engine.getInstance(
+	    ALGORITHM_PARAMETER_GENERATOR, algorithm, provider),
+	  provider, algorithm);
+        }
+    catch (ClassCastException cce)
       {
-        throw new NoSuchAlgorithmException("Illegal Access");
+	throw new NoSuchAlgorithmException(algorithm);
       }
   }
 
Index: java/security/AlgorithmParameters.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/security/AlgorithmParameters.java,v
retrieving revision 1.6
diff -u -r1.6 AlgorithmParameters.java
--- java/security/AlgorithmParameters.java	9 Mar 2003 07:12:01 -0000	1.6
+++ java/security/AlgorithmParameters.java	26 Mar 2003 04:24:03 -0000
@@ -1,5 +1,5 @@
 /* AlgorithmParameters.java --- Algorithm Parameters Implementation Class
-   Copyright (C) 1999, 2003, Free Software Foundation, Inc.
+   Copyright (C) 1999, 2003 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -81,6 +81,9 @@
  */
 public class AlgorithmParameters
 {
+  /** Service name for algorithm parameters. */
+  private static final String ALGORITHM_PARAMETERS = "AlgorithmParameters";
+
   private AlgorithmParametersSpi paramSpi;
   private Provider provider;
   private String algorithm;
@@ -163,6 +166,9 @@
   public static AlgorithmParameters getInstance(String algorithm, String provider)
     throws NoSuchAlgorithmException, NoSuchProviderException
   {
+    if (provider == null || provider.length() == 0)
+      throw new IllegalArgumentException("Illegal provider");
+    
     Provider p = Security.getProvider(provider);
     if (p == null)
       throw new NoSuchProviderException();
@@ -190,55 +196,17 @@
     throws NoSuchAlgorithmException
   {
     if (provider == null)
-      throw new IllegalArgumentException();
-
-    // try the name as is
-    String className = provider.getProperty("AlgorithmParameters." + algorithm);
-    if (className == null) // try all uppercase
-      {
-        String upper = algorithm.toUpperCase();
-        className = provider.getProperty("AlgorithmParameters." + upper);
-        if (className == null) // try if it's an alias
-          {
-            String alias =
-                provider.getProperty("Alg.Alias.AlgorithmParameters." + algorithm);
-            if (alias == null) // try all-uppercase alias name
-              {
-                alias = provider.getProperty("Alg.Alias.AlgorithmParameters." + upper);
-                if (alias == null) // spit the dummy
-                  throw new NoSuchAlgorithmException(algorithm);
-              }
-            className = provider.getProperty("AlgorithmParameters." + alias);
-            if (className == null)
-              throw new NoSuchAlgorithmException(algorithm);
-          }
-      }
-    return getInstance(className, algorithm, provider);
-  }
+      throw new IllegalArgumentException("Illegal provider");
 
-  private static AlgorithmParameters getInstance(String classname,
-                                                 String algorithm,
-						 Provider provider)
-    throws NoSuchAlgorithmException
-  {
     try
       {
-        return new AlgorithmParameters(
-            (AlgorithmParametersSpi) Class.forName(classname).newInstance(),
-            provider,
-            algorithm);
-      }
-    catch (ClassNotFoundException cnfe)
-      {
-        throw new NoSuchAlgorithmException("Class not found");
-      }
-    catch (InstantiationException ie)
-      {
-        throw new NoSuchAlgorithmException("Class instantiation failed");
+	return new AlgorithmParameters((AlgorithmParametersSpi)
+	  Engine.getInstance(ALGORITHM_PARAMETERS, algorithm, provider),
+	  provider, algorithm);
       }
-    catch (IllegalAccessException iae)
+    catch (ClassCastException cce)
       {
-        throw new NoSuchAlgorithmException("Illegal Access");
+	throw new NoSuchAlgorithmException(algorithm);
       }
   }
 
Index: java/security/Engine.java
===================================================================
RCS file: java/security/Engine.java
diff -N java/security/Engine.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ java/security/Engine.java	26 Mar 2003 04:24:03 -0000
@@ -0,0 +1,152 @@
+/* Engine -- generic getInstance method.
+   Copyright (C) 2003  Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+package java.security;
+
+/**
+ * Generic implementation of the getInstance methods in the various
+ * engine classes in java.security.
+ * <p>
+ * These classes ({@link java.security.Signature} for example) can be
+ * thought of as the "chrome, upholstery, and steering wheel", and the SPI
+ * (service provider interface, e.g. {@link java.security.SignatureSpi})
+ * classes can be thought of as the "engine" -- providing the actual
+ * functionality of whatever cryptographic algorithm the instance
+ * represents.
+ *
+ * @see Provider
+ * @author Casey Marshall 
+ */
+final class Engine
+{
+
+  // Constants.
+  // ------------------------------------------------------------------------
+
+  /** Prefix for aliases. */
+  private static final String ALG_ALIAS = "Alg.Alias.";
+
+  /** Maximum number of aliases to try. */
+  private static final int MAX_ALIASES = 5;
+
+  // Constructor.
+  // ------------------------------------------------------------------------
+
+  /** This class cannot be instantiated. */
+  private Engine() { }
+
+  // Class method.
+  // ------------------------------------------------------------------------
+
+  /**
+   * Get the implementation for <i>algorithm</i> for service
+   * <i>service</i> from <i>provider</i>. The service is e.g.
+   * "Signature", and the algorithm "DSA".
+   *
+   * @param service   The service name.
+   * @param algorithm The name of the algorithm to get.
+   * @param provider  The provider to get the implementation from.
+   * @return The engine class for the specified algorithm; the object
+   *         returned is typically a subclass of the SPI class for that
+   *         service, but callers should check that this is so.
+   * @throws NoSuchAlgorithmException If the implementation cannot be
+   *         found or cannot be instantiated.
+   * @throws IllegalArgumentException If any of the three arguments are null.
+   */
+  static Object
+  getInstance(String service, String algorithm, Provider provider)
+  throws NoSuchAlgorithmException
+  {
+    if (service == null || algorithm == null || provider == null)
+      throw new IllegalArgumentException();
+
+    // If there is no property "service.algorithm"
+    if (provider.getProperty(service + "." + algorithm) == null)
+      {
+        // Iterate through aliases, until we find the class name or resolve
+        // too many aliases.
+        String alias = null;
+        int count = 0;
+        while ((alias = provider.getProperty(
+                ALG_ALIAS + service + "." + algorithm)) != null)
+          {
+            if (algorithm.equals(alias))  // Refers to itself!
+              break;
+            algorithm = alias;
+            if (count++ > MAX_ALIASES)
+              throw new NoSuchAlgorithmException("too many aliases");
+          }
+        if (provider.getProperty(service + "." + algorithm) == null)
+          throw new NoSuchAlgorithmException(algorithm);
+      }
+
+    // Find and instantiate the implementation.
+    Class clazz = null;
+    ClassLoader loader = provider.getClass().getClassLoader();
+    String error = algorithm;
+    try
+      {
+        if (loader != null)
+          clazz = loader.loadClass(provider.getProperty(service+"."+algorithm));
+        else
+          clazz = Class.forName(provider.getProperty(service+"."+algorithm));
+        return clazz.newInstance();
+      }
+    catch (ClassNotFoundException cnfe)
+      {
+        error = "class not found: " + algorithm;
+      }
+    catch (IllegalAccessException iae)
+      {
+        error = "illegal access: " + iae.getMessage();
+      }
+    catch (InstantiationException ie)
+      {
+        error = "instantiation exception: " + ie.getMessage();
+      }
+    catch (ExceptionInInitializerError eiie)
+      {
+        error = "exception in initializer: " + eiie.getMessage();
+      }
+    catch (SecurityException se)
+      {
+        error = "security exception: " + se.getMessage();
+      }
+
+    throw new NoSuchAlgorithmException(error);
+  }
+}
Index: java/security/KeyFactory.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/security/KeyFactory.java,v
retrieving revision 1.6
diff -u -r1.6 KeyFactory.java
--- java/security/KeyFactory.java	9 Mar 2003 07:13:19 -0000	1.6
+++ java/security/KeyFactory.java	26 Mar 2003 04:24:03 -0000
@@ -1,5 +1,5 @@
 /* KeyFactory.java --- Key Factory Class
-   Copyright (C) 1999, 2003, Free Software Foundation, Inc.
+   Copyright (C) 1999, 2003 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -83,6 +83,9 @@
  */
 public class KeyFactory
 {
+  /** The service name for key factories. */
+  private static final String KEY_FACTORY = "KeyFactory";
+
   private KeyFactorySpi keyFacSpi;
   private Provider provider;
   private String algorithm;
@@ -125,7 +128,7 @@
     for (int i = 0; i < p.length; i++)
       try
         {
-          getInstance(algorithm, p[i]);
+          return getInstance(algorithm, p[i]);
         }
       catch (NoSuchAlgorithmException ignored) {}
 
@@ -150,6 +153,9 @@
   public static KeyFactory getInstance(String algorithm, String provider)
     throws NoSuchAlgorithmException, NoSuchProviderException
   {
+    if (provider == null || provider.length() == 0)
+      throw new IllegalArgumentException("Illegal provider");
+
     Provider p = Security.getProvider(provider);
     if (p == null)
       throw new NoSuchProviderException();
@@ -178,55 +184,18 @@
     throws NoSuchAlgorithmException
   {
     if (provider == null)
-      throw new IllegalArgumentException();
+      throw new IllegalArgumentException("Illegal provider");
 
-    // try the name as is
-    String className = provider.getProperty("KeyFactory." + algorithm);
-    if (className == null) // try all uppercase
-      {
-        String upper = algorithm.toUpperCase();
-        className = provider.getProperty("KeyFactory." + upper);
-        if (className == null) // try if it's an alias
-          {
-            String alias =
-                provider.getProperty("Alg.Alias.KeyFactory." + algorithm);
-            if (alias == null) // try all-uppercase alias name
-              {
-                alias = provider.getProperty("Alg.Alias.KeyFactory." + upper);
-                if (alias == null) // spit the dummy
-                  throw new NoSuchAlgorithmException(algorithm);
-              }
-            className = provider.getProperty("KeyFactory." + alias);
-            if (className == null)
-              throw new NoSuchAlgorithmException(algorithm);
-          }
-      }
-    return getInstance(className, algorithm, provider);
-  }
-
-  private static KeyFactory getInstance(String classname, String algorithm,
-					Provider provider)
-    throws NoSuchAlgorithmException
-  {
     try
       {
-        return new KeyFactory(
-            (KeyFactorySpi) Class.forName(classname).newInstance(),
-            provider,
-            algorithm);
-      }
-    catch (ClassNotFoundException cnfe)
-      {
-        throw new NoSuchAlgorithmException("Class not found");
+	return new KeyFactory((KeyFactorySpi)
+	  Engine.getInstance(KEY_FACTORY, algorithm, provider),
+          provider, algorithm);
       }
-    catch (InstantiationException ie)
+    catch (ClassCastException cce)
       {
-        throw new NoSuchAlgorithmException("Class instantiation failed");
-      }
-    catch (IllegalAccessException iae)
-      {
-        throw new NoSuchAlgorithmException("Illegal Access");
-      }
+	throw new NoSuchAlgorithmException(algorithm);
+      } 
   }
 
   /**
Index: java/security/KeyPairGenerator.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/security/KeyPairGenerator.java,v
retrieving revision 1.8
diff -u -r1.8 KeyPairGenerator.java
--- java/security/KeyPairGenerator.java	9 Mar 2003 07:14:00 -0000	1.8
+++ java/security/KeyPairGenerator.java	26 Mar 2003 04:24:03 -0000
@@ -106,20 +106,28 @@
  * service providers who wish to supply their own implementations of key pair
  * generators.</p>
  *
- * @author Mark Benvenuto
+ * @see Signature
+ * @see KeyPair
  * @see AlgorithmParameterSpec
+ * @author Mark Benvenuto
+ * @author Casey Marshall
  */
 public abstract class KeyPairGenerator extends KeyPairGeneratorSpi
 {
+  /** The service name for key pair generators. */
+  private static final String KEY_PAIR_GENERATOR = "KeyPairGenerator";
+
   Provider provider;
   private String algorithm;
 
   /**
-   * Creates a <code>KeyPairGenerator</code> object for the specified algorithm.
+   * Creates a <code>KeyPairGenerator</code> object for the specified 
+   * algorithm.
    *
-   * @param algorithm the standard string name of the algorithm. See Appendix A
-   * in the Java Cryptography Architecture API Specification &amp; Reference for
-   * information about standard algorithm names.
+   * @param algorithm the standard string name of the algorithm. 
+   * See Appendix A in the Java Cryptography Architecture API 
+   * Specification &amp; Reference for information about standard 
+   * algorithm names.
    */
   protected KeyPairGenerator(String algorithm)
   {
@@ -171,17 +179,17 @@
   }
 
   /**
-   * Generates a <code>KeyPairGenerator</code> object implementing the specified
-   * algorithm, as supplied from the specified provider, if such an algorithm is
-   * available from the provider.
+   * Generates a <code>KeyPairGenerator</code> object implementing the 
+   * specified algorithm, as supplied from the specified provider, if 
+   * such an algorithm is available from the provider.
    *
-   * @param algorithm the standard string name of the algorithm. See Appendix A
-   * in the Java Cryptography Architecture API Specification &amp; Reference for
-   * information about standard algorithm names.
+   * @param algorithm the standard string name of the algorithm. See 
+   * Appendix A in the Java Cryptography Architecture API Specification 
+   * &amp; Reference for information about standard algorithm names.
    * @param provider the string name of the provider.
    * @return the new <code>KeyPairGenerator</code> object.
-   * @throws NoSuchAlgorithmException if the algorithm is not available from the
-   * provider.
+   * @throws NoSuchAlgorithmException if the algorithm is not available 
+   * from the provider.
    * @throws NoSuchProviderException if the provider is not available in the
    * environment.
    * @throws IllegalArgumentException if the provider name is <code>null</code>
@@ -216,69 +224,26 @@
    * @since 1.4
    * @see Provider
    */
-  public static KeyPairGenerator getInstance(String algorithm, Provider provider)
+  public static KeyPairGenerator getInstance(String algorithm, 
+					     Provider provider)
     throws NoSuchAlgorithmException
   {
     if (provider == null)
-      throw new IllegalArgumentException();
+      throw new IllegalArgumentException("Illegal provider");
 
-    // try the name as is
-    String className = provider.getProperty("KeyPairGenerator." + algorithm);
-    if (className == null) // try all uppercase
-      {
-        String upper = algorithm.toUpperCase();
-        className = provider.getProperty("KeyPairGenerator." + upper);
-        if (className == null) // try if it's an alias
-          {
-            String alias = provider.getProperty(
-                "Alg.Alias.KeyPairGenerator." + algorithm);
-            if (alias == null) // try all-uppercase alias name
-              {
-                alias = provider.getProperty(
-                    "Alg.Alias.KeyPairGenerator." + upper);
-                if (alias == null) // spit the dummy
-                  throw new NoSuchAlgorithmException(algorithm);
-              }
-            className = provider.getProperty("KeyPairGenerator." + alias);
-            if (className == null)
-              throw new NoSuchAlgorithmException(algorithm);
-          }
-      }
-    return getInstance(className, algorithm, provider);
-  }
-
-  private static KeyPairGenerator getInstance(String classname,
-                                              String algorithm,
-					      Provider provider)
-    throws NoSuchAlgorithmException
-  {
-    try
-      {
-        Object o = Class.forName(classname).newInstance();
-        KeyPairGenerator kpg;
-        if (o instanceof KeyPairGeneratorSpi)
-          kpg = new DummyKeyPairGenerator((KeyPairGeneratorSpi) o, algorithm);
-        else
-          {
-            kpg = (KeyPairGenerator) o;
-            kpg.algorithm = algorithm;
-          }
-
-        kpg.provider = provider;
-        return kpg;
-      }
-    catch (ClassNotFoundException cnfe)
-      {
-        throw new NoSuchAlgorithmException("Class not found");
-      }
-    catch (InstantiationException ie)
+    Object o = Engine.getInstance(KEY_PAIR_GENERATOR, algorithm, provider);
+    KeyPairGenerator result = null;
+    if (o instanceof KeyPairGeneratorSpi)
       {
-        throw new NoSuchAlgorithmException("Class instantiation failed");
+	result = new DummyKeyPairGenerator((KeyPairGeneratorSpi) o, algorithm);
       }
-    catch (IllegalAccessException iae)
+    else if (o instanceof KeyPairGenerator)
       {
-        throw new NoSuchAlgorithmException("Illegal Access");
+        result = (KeyPairGenerator) o;
+        result.algorithm = algorithm;
       }
+    result.provider = provider;
+    return result;
   }
 
   /**
Index: java/security/KeyStore.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/security/KeyStore.java,v
retrieving revision 1.5
diff -u -r1.5 KeyStore.java
--- java/security/KeyStore.java	18 Nov 2002 18:04:38 -0000	1.5
+++ java/security/KeyStore.java	26 Mar 2003 04:24:04 -0000
@@ -1,5 +1,5 @@
 /* KeyStore.java --- Key Store Class
-   Copyright (C) 1999, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -44,37 +44,52 @@
 import java.util.Enumeration;
 
 /**
-   Keystore represents an in-memory collection of keys and 
-   certificates. There are two types of entries:
-
-   * Key Entry
-
-   This type of keystore entry store sensitive crytographic key
-   information in a protected format.Typically this is a secret 
-   key or a private key with a certificate chain.
-
-
-   * Trusted Ceritificate Entry
-
-   This type of keystore entry contains a single public key 
-   certificate belonging to annother entity. It is called trusted
-   because the keystore owner trusts that the certificates
-   belongs to the subject (owner) of the certificate.
-
-   The keystore contains an "alias" string for each entry. 
-
-   The structure and persistentence of the key store is not 
-   specified. Any method could be used to protect sensitive 
-   (private or secret) keys. Smart cards or integrated 
-   cryptographic engines could be used or the keystore could 
-   be simply stored in a file. 
+ * Keystore represents an in-memory collection of keys and 
+ * certificates. There are two types of entries:
+ *
+ * <dl>
+ * <dt>Key Entry</dt>
+ *
+ * <dd><p>This type of keystore entry store sensitive crytographic key
+ * information in a protected format.Typically this is a secret 
+ * key or a private key with a certificate chain.</p></dd>
+ *
+ * <dt>Trusted Ceritificate Entry</dt>
+ *
+ * <dd><p>This type of keystore entry contains a single public key 
+ * certificate belonging to annother entity. It is called trusted
+ * because the keystore owner trusts that the certificates
+ * belongs to the subject (owner) of the certificate.</p></dd>
+ * </dl>
+ *
+ * <p>Entries in a key store are referred to by their "alias": a simple
+ * unique string.
+ *
+ * <p>The structure and persistentence of the key store is not 
+ * specified. Any method could be used to protect sensitive 
+ * (private or secret) keys. Smart cards or integrated 
+ * cryptographic engines could be used or the keystore could 
+ * be simply stored in a file.</p>
+ *
+ * @see java.security.cert.Certificate
+ * @see Key
  */
 public class KeyStore
 {
+
+  // Constants and fields.
+  // ------------------------------------------------------------------------
+
+  /** Service name for key stores. */
+  private static final String KEY_STORE = "KeyStore";
+
   private KeyStoreSpi keyStoreSpi;
   private Provider provider;
   private String type;
 
+  // Constructors.
+  // ------------------------------------------------------------------------
+
   /**
      Creates an instance of KeyStore
 
@@ -89,16 +104,18 @@
     this.type = type;
   }
 
-  /** 
-     Gets an instance of the KeyStore class representing
-     the specified keystore. If the type is not 
-     found then, it throws KeyStoreException.
-
-     @param type the type of keystore to choose
-
-     @return a KeyStore repesenting the desired type
+  // Class methods.
+  // ------------------------------------------------------------------------
 
-     @throws KeyStoreException if the type of keystore is not implemented by providers
+  /** 
+   * Gets an instance of the KeyStore class representing
+   * the specified keystore. If the type is not 
+   * found then, it throws KeyStoreException.
+   *
+   * @param type the type of keystore to choose
+   * @return a KeyStore repesenting the desired type
+   * @throws KeyStoreException if the type of keystore is not implemented
+   *         by providers or the implementation cannot be instantiated.
    */
   public static KeyStore getInstance(String type) throws KeyStoreException
   {
@@ -106,95 +123,102 @@
 
     for (int i = 0; i < p.length; i++)
       {
-	String classname = p[i].getProperty("KeyStore." + type);
-	if (classname != null)
-	  return getInstance(classname, type, p[i]);
+        try
+          {
+            return getInstance(type, p[i]);
+          }
+        catch (KeyStoreException ignore)
+          {
+          }
       }
 
     throw new KeyStoreException(type);
   }
 
   /** 
-     Gets an instance of the KeyStore class representing
-     the specified key store from the specified provider. 
-     If the type is not found then, it throws KeyStoreException. 
-     If the provider is not found, then it throws 
-     NoSuchProviderException.
-
-     @param type the type of keystore to choose
-     @param provider the provider name
-
-     @return a KeyStore repesenting the desired type
-
-     @throws KeyStoreException if the type of keystore is not 
-              implemented by the given provider
-     @throws NoSuchProviderException if the provider is not found
-     @throws IllegalArgumentException if the provider string is 
-               null or empty
+   * Gets an instance of the KeyStore class representing
+   * the specified key store from the specified provider. 
+   * If the type is not found then, it throws KeyStoreException. 
+   * If the provider is not found, then it throws 
+   * NoSuchProviderException.
+   *
+   * @param type the type of keystore to choose
+   * @param provider the provider name
+   * @return a KeyStore repesenting the desired type
+   * @throws KeyStoreException if the type of keystore is not 
+   *          implemented by the given provider
+   * @throws NoSuchProviderException if the provider is not found
+   * @throws IllegalArgumentException if the provider string is 
+   *           null or empty
    */
   public static KeyStore getInstance(String type, String provider)
     throws KeyStoreException, NoSuchProviderException
   {
     if (provider == null || provider.length() == 0)
       throw new IllegalArgumentException("Illegal provider");
+
     Provider p = Security.getProvider(provider);
     if (p == null)
       throw new NoSuchProviderException();
 
-    return getInstance(p.getProperty("KeyStore." + type), type, p);
+    return getInstance(type, p);
   }
 
   /** 
-     Gets an instance of the KeyStore class representing
-     the specified key store from the specified provider. 
-     If the type is not found then, it throws KeyStoreException. 
-     If the provider is not found, then it throws 
-     NoSuchProviderException.
-
-     @param type the type of keystore to choose
-     @param provider the keystore provider
-
-     @return a KeyStore repesenting the desired type
-
-     @throws KeyStoreException if the type of keystore is not 
-              implemented by the given provider
-     @throws IllegalArgumentException if the provider object is null
-     @since 1.4
+   * Gets an instance of the KeyStore class representing
+   * the specified key store from the specified provider. 
+   * If the type is not found then, it throws KeyStoreException. 
+   * If the provider is not found, then it throws 
+   * NoSuchProviderException.
+   *
+   * @param type the type of keystore to choose
+   * @param provider the keystore provider
+   * @return a KeyStore repesenting the desired type
+   * @throws KeyStoreException if the type of keystore is not 
+   *          implemented by the given provider
+   * @throws IllegalArgumentException if the provider object is null
+   * @since 1.4
    */
   public static KeyStore getInstance(String type, Provider provider)
     throws KeyStoreException 
   {
     if (provider == null)
       throw new IllegalArgumentException("Illegal provider");
-
-    return getInstance(provider.getProperty("KeyStore." + type),
-		       type, provider);
-  }
-
-  private static KeyStore getInstance(String classname,
-				      String type,
-				      Provider provider)
-    throws KeyStoreException
-  {
     try
       {
-	return new KeyStore((KeyStoreSpi) Class.forName(classname).
-			    newInstance(), provider, type);
-      }
-    catch (ClassNotFoundException cnfe)
-      {
-	throw new KeyStoreException("Class not found");
+        return new KeyStore(
+          (KeyStoreSpi) Engine.getInstance(KEY_STORE, type, provider),
+          provider, type);
       }
-    catch (InstantiationException ie)
+    catch (NoSuchAlgorithmException nsae)
       {
-	throw new KeyStoreException("Class instantiation failed");
+        throw new KeyStoreException(type);
       }
-    catch (IllegalAccessException iae)
+    catch (ClassCastException cce)
       {
-	throw new KeyStoreException("Illegal Access");
+        throw new KeyStoreException(type);
       }
   }
 
+  /**
+   * Returns the default KeyStore type. This method looks up the
+   * type in <JAVA_HOME>/lib/security/java.security with the 
+   * property "keystore.type" or if that fails then "jks" .
+   */
+  public static final String getDefaultType()
+  {
+    // Security reads every property in java.security so it 
+    // will return this property if it exists. 
+    String tmp = Security.getProperty("keystore.type");
+
+    if (tmp == null)
+      tmp = "jks";
+
+    return tmp;
+  }
+
+  // Instance methods.
+  // ------------------------------------------------------------------------
 
   /**
      Gets the provider that the class is from.
@@ -471,21 +495,4 @@
     keyStoreSpi.engineLoad(stream, password);
   }
 
-  /**
-     Returns the default KeyStore type. This method looks up the
-     type in <JAVA_HOME>/lib/security/java.security with the 
-     property "keystore.type" or if that fails then "jks" .
-   */
-  public static final String getDefaultType()
-  {
-    String tmp;
-    //Security reads every property in java.security so it 
-    //will return this property if it exists. 
-    tmp = Security.getProperty("keystore.type");
-
-    if (tmp == null)
-      tmp = "jks";
-
-    return tmp;
-  }
 }
Index: java/security/MessageDigest.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/security/MessageDigest.java,v
retrieving revision 1.8
diff -u -r1.8 MessageDigest.java
--- java/security/MessageDigest.java	9 Mar 2003 07:14:52 -0000	1.8
+++ java/security/MessageDigest.java	26 Mar 2003 04:24:05 -0000
@@ -84,11 +84,15 @@
  * the superclass are intended for cryptographic service providers who wish to
  * supply their own implementations of message digest algorithms.</p>
  *
- * @see DigestInputStream
- * @see DigestOutputStream
+ * @see MessageDigestSpi
+ * @see Provider
+ * @since JDK 1.1
  */
 public abstract class MessageDigest extends MessageDigestSpi
 {
+  /** The service name for message digests. */
+  private static final String MESSAGE_DIGEST = "MessageDigest";
+
   private String algorithm;
   Provider provider;
   private byte[] lastDigest;
@@ -96,9 +100,10 @@
   /**
    * Creates a message digest with the specified algorithm name.
    *
-   * @param algorithm the standard name of the digest algorithm. See Appendix A
-   * in the Java Cryptography Architecture API Specification &amp; Reference for
-   * information about standard algorithm names.
+   * @param algorithm the standard name of the digest algorithm. 
+   * See Appendix A in the Java Cryptography Architecture API 
+   * Specification &amp; Reference for information about standard 
+   * algorithm names.
    */
   protected MessageDigest(String algorithm)
   {
@@ -157,8 +162,10 @@
   public static MessageDigest getInstance(String algorithm, String provider)
     throws NoSuchAlgorithmException, NoSuchProviderException
   {
-    Provider p = Security.getProvider(provider);
+    if (provider == null || provider.length() == 0)
+      throw new IllegalArgumentException("Illegal provider");
 
+    Provider p = Security.getProvider(provider);
     if (p == null)
       throw new NoSuchProviderException(provider);
 
@@ -187,71 +194,26 @@
     throws NoSuchAlgorithmException
   {
     if (provider == null)
-      throw new IllegalArgumentException();
-
-    // try the name as is
-    String className = provider.getProperty("MessageDigest." + algorithm);
-    if (className == null) // try all uppercase
-      {
-        String upper = algorithm.toUpperCase();
-        className = provider.getProperty("MessageDigest." + upper);
-        if (className == null) // try if it's an alias
-          {
-            String alias = provider.getProperty(
-                "Alg.Alias.MessageDigest." +algorithm);
-            if (alias == null) // try all-uppercase alias name
-              {
-                alias = provider.getProperty("Alg.Alias.MessageDigest." +upper);
-                if (alias == null) // spit the dummy
-                  throw new NoSuchAlgorithmException(algorithm);
-              }
-            className = provider.getProperty("MessageDigest." + alias);
-            if (className == null)
-              throw new NoSuchAlgorithmException(algorithm);
-          }
-      }
-    return getInstance(className, algorithm, provider);
-  }
-
-  private static MessageDigest getInstance(String classname,
-					   String algorithm,
-					   Provider provider)
-    throws NoSuchAlgorithmException
-  {
-    if (classname == null)
-      throw new NoSuchAlgorithmException(algorithm);
+      throw new IllegalArgumentException("Illegal provider");
 
     MessageDigest result = null;
-    try
-      {
-        Object obj = Class.forName(classname).newInstance();
-        if (obj instanceof MessageDigest)
-          {
-            result = (MessageDigest) obj;
-            result.algorithm = algorithm;
-          }
-        else if (obj instanceof MessageDigestSpi)
-          result = new DummyMessageDigest((MessageDigestSpi) obj, algorithm);
-        else
-          throw new ClassCastException("Class "+classname+" from Provider "
-              +provider.getName()
-              +" does not extend java.security.MessageDigestSpi");
-        result.provider = provider;
-        return result;
-      }
-    catch (ClassNotFoundException cnfe)
+    Object o = Engine.getInstance(MESSAGE_DIGEST, algorithm, provider);
+     
+    if (o instanceof MessageDigestSpi)
       {
-        throw new NoSuchAlgorithmException(algorithm + ": Class not found.");
+	result = new DummyMessageDigest((MessageDigestSpi) o, algorithm);
       }
-    catch (InstantiationException ie)
+    else if (o instanceof MessageDigest)
       {
-        throw new NoSuchAlgorithmException(
-            algorithm + ": Class instantiation failed.");
+	result = (MessageDigest) o;
+	result.algorithm = algorithm;
       }
-    catch (IllegalAccessException iae)
+    else
       {
-        throw new NoSuchAlgorithmException(algorithm + ": Illegal Access");
+        throw new NoSuchAlgorithmException(algorithm);
       }
+    result.provider = provider;
+    return result;
   }
 
   /**
@@ -312,10 +274,10 @@
    * Completes the hash computation by performing final operations such as
    * padding. The digest is reset after this call is made.
    *
-   * @param buf output buffer for the computed digest.
-   * @param offset offset into the output buffer to begin storing the digest.
-   * @param len number of bytes within buf allotted for the digest.
-   * @return the number of bytes placed into buf.
+   * @param buf An output buffer for the computed digest.
+   * @param offset The offset into the output buffer to begin storing the digest.
+   * @param len The number of bytes within buf allotted for the digest.
+   * @return The number of bytes placed into buf.
    * @throws DigestException if an error occurs.
    */
   public int digest(byte[] buf, int offset, int len) throws DigestException
Index: java/security/SecureRandom.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/security/SecureRandom.java,v
retrieving revision 1.9
diff -u -r1.9 SecureRandom.java
--- java/security/SecureRandom.java	13 Feb 2003 17:00:50 -0000	1.9
+++ java/security/SecureRandom.java	26 Mar 2003 04:24:05 -0000
@@ -42,14 +42,24 @@
 import java.util.Enumeration;
 
 /**
-   SecureRandom is the class interface for using SecureRandom
-   providers. It provides an interface to the SecureRandomSpi
-   engine so that programmers can generate pseudo-random numbers.
-
-   @author Mark Benvenuto <ivymccough@worldnet.att.net>
+ * An interface to a cryptographically secure pseudo-random number
+ * generator (PRNG). Random (or at least unguessable) numbers are used
+ * in all areas of security and cryptography, from the generation of
+ * keys and initialization vectors to the generation of random padding
+ * bytes.
+ *
+ * @author Mark Benvenuto <ivymccough@worldnet.att.net>
+ * @author Casey Marshall
  */
 public class SecureRandom extends Random
 {
+
+  // Constants and fields.
+  // ------------------------------------------------------------------------
+
+  /** Service name for PRNGs. */
+  private static final String SECURE_RANDOM = "SecureRandom";
+
   static final long serialVersionUID = 4940670005562187L;
 
   //Serialized Field
@@ -60,6 +70,9 @@
   SecureRandomSpi secureRandomSpi = null;
   byte[] state = null;
 
+  // Constructors.
+  // ------------------------------------------------------------------------
+
   /**
      Default constructor for SecureRandom. It constructs a 
      new SecureRandom by instantating the first SecureRandom 
@@ -69,7 +82,7 @@
      on the first call to getnextBytes it will force a seed.
 
      It is maintained for backwards compatibility and programs
-     should use getInstance.
+     should use {@link #getInstance(java.lang.String)}.
    */
   public SecureRandom()
   {
@@ -88,20 +101,20 @@
           {
             key = (String) e.nextElement();
             if (key.startsWith("SECURERANDOM."))
-	      {
-		if ((classname = p[i].getProperty(key)) != null)
-		  {
-		    try
-		      {
-			secureRandomSpi = (SecureRandomSpi) Class.
-			  forName(classname).newInstance();
-			provider = p[i];
-			return;
-		      }
-		    catch (Throwable ignore) { }
-		  }
-	      }
-	  }
+              {
+                if ((classname = p[i].getProperty(key)) != null)
+                  {
+                    try
+                      {
+                        secureRandomSpi = (SecureRandomSpi) Class.
+                          forName(classname).newInstance();
+                        provider = p[i];
+                        return;
+                      }
+                    catch (Throwable ignore) { }
+                  }
+              }
+          }
       }
 
     // Nothing found. Fall back to SHA1PRNG
@@ -141,15 +154,17 @@
     this.provider = provider;
   }
 
-  /**
-     Returns an instance of a SecureRandom. It creates the class
-     for the specified algorithm if it exists from a provider.
-
-     @param algorithm A SecureRandom algorithm to use
+  // Class methods.
+  // ------------------------------------------------------------------------
 
-     @return Returns a new SecureRandom implmenting the chosen algorithm
-
-     @throws NoSuchAlgorithmException if the algorithm cannot be found
+  /**
+   * Returns an instance of a SecureRandom. It creates the class from
+   * the first provider that implements it.
+   *
+   * @param algorithm The algorithm name.
+   * @return A new SecureRandom implmenting the given algorithm.
+   * @throws NoSuchAlgorithmException If no installed provider implements
+   *         the given algorithm.
    */
   public static SecureRandom getInstance(String algorithm) throws
     NoSuchAlgorithmException
@@ -157,11 +172,13 @@
     Provider p[] = Security.getProviders();
     for (int i = 0; i < p.length; i++)
       {
-	try
-	  {
-	    return getInstance(algorithm, p[i]);
-	  }
-	catch (NoSuchAlgorithmException ignored) { }
+        try
+          {
+            return getInstance(algorithm, p[i]);
+          }
+        catch (NoSuchAlgorithmException ignored)
+          {
+          }
       }
 
     // None found.
@@ -169,21 +186,26 @@
   }
 
   /**
-     Returns an instance of a SecureRandom. It creates the class
-     for the specified algorithm from the specified provider.
-
-     @param algorithm A SecureRandom algorithm to use
-     @param provider A security provider to use
-
-     @return Returns a new SecureRandom implmenting the chosen algorithm
-
-     @throws NoSuchAlgorithmException if the algorithm cannot be found
-     @throws NoSuchProviderException if the provider cannot be found
+   * Returns an instance of a SecureRandom. It creates the class
+   * for the specified algorithm from the named provider.
+   *
+   * @param algorithm The algorithm name.
+   * @param provider  The provider name.
+   * @return A new SecureRandom implmenting the chosen algorithm.
+   * @throws NoSuchAlgorithmException If the named provider does not implement
+   *         the algorithm, or if the implementation cannot be
+   *         instantiated.
+   * @throws NoSuchProviderException If no provider named
+   *         <code>provider</code> is currently installed.
+   * @throws IllegalArgumentException If <code>provider</code> is null
+   *         or is empty.
    */
-  public static SecureRandom getInstance(String algorithm,
-					 String provider) throws
-    NoSuchAlgorithmException, NoSuchProviderException
+  public static SecureRandom getInstance(String algorithm, String provider)
+  throws NoSuchAlgorithmException, NoSuchProviderException
   {
+    if (provider == null || provider.length() == 0)
+      throw new IllegalArgumentException("Illegal provider");
+
     Provider p = Security.getProvider(provider);
     if (p == null)
       throw new NoSuchProviderException();
@@ -192,88 +214,35 @@
   }
 
   /**
-     Returns an instance of a SecureRandom. It creates the class for
-     the specified algorithm from the given provider.
-
-     @param algorithm The SecureRandom algorithm to create.
-     @param provider  The provider to get the instance from.
-
-     @throws NoSuchAlgorithmException If the algorithm cannot be found, or
-             if the class cannot be instantiated.
-   */
-  public static SecureRandom getInstance(String algorithm,
-                                         Provider provider) throws
-    NoSuchAlgorithmException
-  {
-    return getInstance(algorithm, provider, true);
-  }
-
-  /**
-     Creates the instance of SecureRandom, recursing to resolve aliases.
-
-     @param algorithm The SecureRandom algorithm to create.
-     @param provider  The provider to get the implementation from.
-     @param recurse   Whether or not to recurse to resolve aliases.
-
-     @throws NoSuchAlgorithmException If the algorithm cannot be found,
-             if there are too many aliases, or if the class cannot be
-             instantiated.
-   */
-  private static SecureRandom getInstance(String algorithm,
-                                          Provider provider,
-                                          boolean recurse)
-    throws NoSuchAlgorithmException
-  {
-    String msg = algorithm;
-    for (Enumeration e = provider.propertyNames(); e.hasMoreElements(); )
+   * Returns an instance of a SecureRandom. It creates the class for
+   * the specified algorithm from the given provider.
+   *
+   * @param algorithm The SecureRandom algorithm to create.
+   * @param provider  The provider to get the instance from.
+   * @throws NoSuchAlgorithmException If the algorithm cannot be found, or
+   *         if the class cannot be instantiated.
+   * @throws IllegalArgumentException If <code>provider</code> is null.
+   */
+  public static SecureRandom getInstance(String algorithm, Provider provider)
+  throws NoSuchAlgorithmException
+  {
+    if (provider == null)
+      throw new IllegalArgumentException("Illegal provider");
+    try
       {
-        // We could replace the boolean with an integer, incrementing it
-        // every
-        String key = (String) e.nextElement();
-        if (key.startsWith("SECURERANDOM.")
-            && key.substring(13).equalsIgnoreCase(algorithm))
-	  {
-	    try
-	      {
-		Class c = Class.forName(provider.getProperty(key));
-		return new SecureRandom((SecureRandomSpi) c.newInstance(),
-					provider);
-	      }
-	    catch (Throwable ignored) { }
-	  }
-	else if (key.startsWith("ALG.ALIAS.SECURERANDOM.")
-		 && key.substring(23).equalsIgnoreCase(algorithm) && recurse)
-	  {
-	    try
-	      {
-		// First see if this alias refers to a class in this
-		// provider.
-		return getInstance(provider.getProperty(key), provider, false);
-	      }
-	    catch (NoSuchAlgorithmException nsae)
-	      {
-		Provider[] provs = Security.getProviders();
-		for (int i = 0; i < provs.length; i++)
-		  {
-		    if (provs[i] == provider)
-		      continue;
-		    // Now try other providers for the implementation
-		    try
-		      {
-			return getInstance(provider.getProperty(key),
-					   provs[i], false);
-		      }
-		    catch (NoSuchAlgorithmException nsae2)
-		      {
-			msg = nsae2.getMessage();
-		      }
-		  }
-	      }
-	  }
+        return new SecureRandom((SecureRandomSpi)
+          Engine.getInstance(SECURE_RANDOM, algorithm, provider),
+          provider);
+      }
+    catch (ClassCastException cce)
+      {
+        throw new NoSuchAlgorithmException(algorithm);
       }
-    throw new NoSuchAlgorithmException(algorithm);
   }
 
+  // Instance methods.
+  // ------------------------------------------------------------------------
+
   /**
      Returns the provider being used by the current SecureRandom class.
 
@@ -318,8 +287,8 @@
 		       (byte) (0xff & (seed >> 16)),
 		       (byte) (0xff & (seed >> 8)),
 		       (byte) (0xff & seed)
-	};
-	secureRandomSpi.engineSetSeed(tmp);
+        };
+        secureRandomSpi.engineSetSeed(tmp);
       }
   }
 
Index: java/security/Signature.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/security/Signature.java,v
retrieving revision 1.10
diff -u -r1.10 Signature.java
--- java/security/Signature.java	12 Mar 2003 17:33:06 -0000	1.10
+++ java/security/Signature.java	26 Mar 2003 04:24:05 -0000
@@ -1,5 +1,5 @@
 /* Signature.java --- Signature Class
-   Copyright (C) 1999, 2002, 2003, Free Software Foundation, Inc.
+   Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -107,12 +107,18 @@
  */
 public abstract class Signature extends SignatureSpi
 {
+  /** Service name for signatures. */
+  private static final String SIGNATURE = "Signature";
+
   /**
    * Possible <code>state</code> value, signifying that this signature object
    * has not yet been initialized.
    */
   protected static final int UNINITIALIZED = 0;
 
+  // Constructor.
+  // ------------------------------------------------------------------------
+
   /**
    * Possible <code>state</code> value, signifying that this signature object
    * has been initialized for signing.
@@ -196,6 +202,9 @@
   public static Signature getInstance(String algorithm, String provider)
     throws NoSuchAlgorithmException, NoSuchProviderException
   {
+    if (provider == null || provider.length() == 0)
+      throw new IllegalArgumentException("Illegal provider");
+    
     Provider p = Security.getProvider(provider);
     if (p == null)
       throw new NoSuchProviderException(provider);
@@ -225,62 +234,26 @@
     throws NoSuchAlgorithmException
   {
     if (provider == null)
-      throw new IllegalArgumentException();
-
-    // try the name as is
-    String className = provider.getProperty("Signature." + algorithm);
-    if (className == null) // try all uppercase
-      {
-        String upper = algorithm.toUpperCase();
-        className = provider.getProperty("Signature." + upper);
-        if (className == null) // try if it's an alias
-          {
-            String alias = provider.getProperty("Alg.Alias.Signature." + algorithm);
-            if (alias == null)
-              {
-                alias = provider.getProperty("Alg.Alias.Signature." + upper);
-                if (alias == null) // spit the dummy
-                  throw new NoSuchAlgorithmException(algorithm);
-              }
-            className = provider.getProperty("Signature." + alias);
-            if (className == null)
-              throw new NoSuchAlgorithmException(algorithm);
-          }
-      }
-    return getInstance(className, algorithm, provider);
-  }
+      throw new IllegalArgumentException("Illegal provider");
 
-  private static Signature getInstance(String classname, String algorithm,
-                                       Provider provider)
-    throws NoSuchAlgorithmException
-  {
-    try
-      {
-        Object o = Class.forName(classname).newInstance();
-        Signature sig;
-        if (o instanceof SignatureSpi)
-          sig = new DummySignature((SignatureSpi) o, algorithm);
-        else
-          {
-            sig = (Signature) o;
-            sig.algorithm = algorithm;
-          }
+    Signature result = null;
+    Object o = Engine.getInstance(SIGNATURE, algorithm, provider);
 
-        sig.provider = provider;
-        return sig;
-      }
-    catch (ClassNotFoundException cnfe)
+    if (o instanceof SignatureSpi)
       {
-        throw new NoSuchAlgorithmException("Class not found");
+	result = new DummySignature((SignatureSpi) o, algorithm);
       }
-    catch (InstantiationException ie)
+    else if (o instanceof Signature)
       {
-        throw new NoSuchAlgorithmException("Class instantiation failed");
+	result = (Signature) o;
+	result.algorithm = algorithm;
       }
-    catch (IllegalAccessException iae)
+    else
       {
-        throw new NoSuchAlgorithmException("Illegal Access");
+	throw new NoSuchAlgorithmException(algorithm);
       }
+    result.provider = provider;
+    return result;
   }
 
   /**

--=-=-=--



From MAILER-DAEMON Wed Mar 26 06:34:05 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18y9AA-0005hC-00
	for mharc-classpath@gnu.org; Wed, 26 Mar 2003 06:33:46 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18y9A1-0005QU-00
	for classpath@gnu.org; Wed, 26 Mar 2003 06:33:37 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18y99w-0005Eg-00
	for classpath@gnu.org; Wed, 26 Mar 2003 06:33:33 -0500
Received: from 12-235-115-156.client.attbi.com ([12.235.115.156] helo=blossom)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18y987-0003Kb-00; Wed, 26 Mar 2003 06:31:39 -0500
Received: from dexter ([192.168.0.2] helo=metastatic.org)
	by blossom with esmtp (Exim 3.35 #1 (Debian))
	id 18y97v-0003lT-00; Wed, 26 Mar 2003 03:31:27 -0800
Message-ID: <3E818F8D.9090102@metastatic.org>
Date: Wed, 26 Mar 2003 03:31:25 -0800
From: Casey Marshall <rsdio@metastatic.org>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030228
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: Brian Jones <cbj@gnu.org>
References: <1047157664.2226.6.camel@dexter.attbi.com>
	<m3d6knqywf.fsf@lyta.haphazard.org> <3E7913AA.6090501@metastatic.org>
	<m3d6kewy5g.fsf@lyta.haphazard.org>
In-Reply-To: <m3d6kewy5g.fsf@lyta.haphazard.org>
X-Enigmail-Version: 0.71.0.0
X-Enigmail-Supports: pgp-inline, pgp-mime
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
cc: GNU Classpath <classpath@gnu.org>
Subject: Re: [PATCH] java.security miscellany
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Wed, 26 Mar 2003 11:33:44 -0000

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Brian Jones wrote:

| Okay, the attached patch is roughly the rest of your patch applied to
| what is already in CVS.  If you're happy with it I'll go ahead and
| check it in.
|

Looks ok.

- --
Casey Marshall || rsdio@metastatic.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE+gY+NgAuWMgRGsWsRAku3AJwONCFj3HOsvGW830WclfhoiE/BwwCfWTlr
l2eg0zI5Wch7RitSMDnJUwI=
=YYvR
-----END PGP SIGNATURE-----




From MAILER-DAEMON Wed Mar 26 07:23:02 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18y9vq-00023W-00
	for mharc-classpath@gnu.org; Wed, 26 Mar 2003 07:23:02 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18y9vo-00022t-00
	for classpath@gnu.org; Wed, 26 Mar 2003 07:23:00 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18y9vm-000222-00
	for classpath@gnu.org; Wed, 26 Mar 2003 07:22:59 -0500
Received: from bay2-f71.bay2.hotmail.com ([65.54.247.71] helo=hotmail.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18y9uJ-0001lg-00
	for classpath@gnu.org; Wed, 26 Mar 2003 07:21:27 -0500
Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC;
	 Wed, 26 Mar 2003 04:21:14 -0800
Received: from 192.89.52.142 by by2fd.bay2.hotmail.msn.com with HTTP;
	Wed, 26 Mar 2003 12:21:14 GMT
X-Originating-IP: [192.89.52.142]
X-Originating-Email: [smarong@hotmail.com]
From: "Saikou Marong" <smarong@hotmail.com>
To: classpath@gnu.org
Bcc: 
Date: Wed, 26 Mar 2003 12:21:14 +0000
Mime-Version: 1.0
Content-Type: text/html
Message-ID: <BAY2-F71Cndg5oQJgAG000032d3@hotmail.com>
X-OriginalArrivalTime: 26 Mar 2003 12:21:14.0954 (UTC)
	FILETIME=[3201AAA0:01C2F392]
Subject: Re: Classpath Digest, Vol 4, Issue 45
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Wed, 26 Mar 2003 12:23:00 -0000

<html><div style='background-color:'><DIV>
<P><BR><BR></P></DIV>
<DIV></DIV>
<DIV></DIV>&gt;From: classpath-request@gnu.org 
<DIV></DIV>&gt;Reply-To: classpath@gnu.org 
<DIV></DIV>&gt;To: classpath@gnu.org 
<DIV></DIV>&gt;Subject: Classpath Digest, Vol 4, Issue 45 
<DIV></DIV>&gt;Date: Wed, 26 Mar 2003 06:56:46 -0500 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;Send Classpath mailing list submissions to 
<DIV></DIV>&gt; classpath@gnu.org 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;To subscribe or unsubscribe via the World Wide Web, visit 
<DIV></DIV>&gt; http://mail.gnu.org/mailman/listinfo/classpath 
<DIV></DIV>&gt;or, via email, send a message with subject or body 'help' to 
<DIV></DIV>&gt; classpath-request@gnu.org 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;You can reach the person managing the list at 
<DIV></DIV>&gt; classpath-owner@gnu.org 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;When replying, please edit your Subject line so it is more specific 
<DIV></DIV>&gt;than "Re: Contents of Classpath digest..." 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;Today's Topics: 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 1. Re: [PATCH] java.security miscellany (Casey Marshall) 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;---------------------------------------------------------------------- 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;Date: Wed, 26 Mar 2003 03:31:25 -0800 
<DIV></DIV>&gt;From: Casey Marshall <RSDIO@METASTATIC.ORG>
<DIV></DIV>&gt;To: Brian Jones <CBJ@GNU.ORG>
<DIV></DIV>&gt;Cc: GNU Classpath <CLASSPATH@GNU.ORG>
<DIV></DIV>&gt;Subject: Re: [PATCH] java.security miscellany 
<DIV></DIV>&gt;Message-ID: &lt;3E818F8D.9090102@metastatic.org&gt; 
<DIV></DIV>&gt;In-Reply-To: <M3D6KEWY5G.FSF@LYTA.HAPHAZARD.ORG>
<DIV></DIV>&gt;References: &lt;1047157664.2226.6.camel@dexter.attbi.com&gt; 
<DIV></DIV>&gt; <M3D6KNQYWF.FSF@LYTA.HAPHAZARD.ORG>&lt;3E7913AA.6090501@metastatic.org&gt; 
<DIV></DIV>&gt; <M3D6KEWY5G.FSF@LYTA.HAPHAZARD.ORG>
<DIV></DIV>&gt;Content-Type: text/plain; charset=us-ascii; format=flowed 
<DIV></DIV>&gt;MIME-Version: 1.0 
<DIV></DIV>&gt;Content-Transfer-Encoding: 7bit 
<DIV></DIV>&gt;Precedence: list 
<DIV></DIV>&gt;Message: 1 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;-----BEGIN PGP SIGNED MESSAGE----- 
<DIV></DIV>&gt;Hash: SHA1 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;Brian Jones wrote: 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;| Okay, the attached patch is roughly the rest of your patch applied to 
<DIV></DIV>&gt;| what is already in CVS. If you're happy with it I'll go ahead and 
<DIV></DIV>&gt;| check it in. 
<DIV></DIV>&gt;| 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;Looks ok. 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;- -- 
<DIV></DIV>&gt;Casey Marshall || rsdio@metastatic.org 
<DIV></DIV>&gt;-----BEGIN PGP SIGNATURE----- 
<DIV></DIV>&gt;Version: GnuPG v1.2.1 (GNU/Linux) 
<DIV></DIV>&gt;Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;iD8DBQE+gY+NgAuWMgRGsWsRAku3AJwONCFj3HOsvGW830WclfhoiE/BwwCfWTlr 
<DIV></DIV>&gt;l2eg0zI5Wch7RitSMDnJUwI= 
<DIV></DIV>&gt;=YYvR 
<DIV></DIV>&gt;-----END PGP SIGNATURE----- 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;------------------------------ 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;_______________________________________________ 
<DIV></DIV>&gt;Classpath mailing list 
<DIV></DIV>&gt;Classpath@gnu.org 
<DIV></DIV>&gt;http://mail.gnu.org/mailman/listinfo/classpath 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;End of Classpath Digest, Vol 4, Issue 45 
<DIV></DIV>&gt;**************************************** 
<DIV></DIV></div><br clear=all><hr>Add photos to your messages with  <a href="http://g.msn.com/8HMEEN/2749">MSN 8. </a> Get 2 months FREE*.</html>



From MAILER-DAEMON Wed Mar 26 22:36:24 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18yOBd-0005iV-00
	for mharc-classpath@gnu.org; Wed, 26 Mar 2003 22:36:17 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18yO8S-0002xa-00
	for classpath@gnu.org; Wed, 26 Mar 2003 22:33:00 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18yO8F-0002ju-00
	for classpath@gnu.org; Wed, 26 Mar 2003 22:32:48 -0500
Received: from ms-smtp-03.southeast.rr.com ([24.93.67.84])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18yO7V-0002Gu-00
	for classpath@gnu.org; Wed, 26 Mar 2003 22:32:01 -0500
Received: from mail4.nc.rr.com (fe4 [24.93.67.51])h2R3Uom2018789;
	Wed, 26 Mar 2003 22:30:50 -0500 (EST)
Received: from lyta.haphazard.org ([66.57.9.48]) by mail4.nc.rr.com  with
	Microsoft SMTPSVC(5.5.1877.757.75);	 Wed, 26 Mar 2003 22:33:36 -0500
Received: by lyta.haphazard.org (Postfix, from userid 500)
	id E4FDBBE69E; Wed, 26 Mar 2003 22:32:12 -0500 (EST)
Sender: cbj@haphazard.org
To: Casey Marshall <rsdio@metastatic.org>
References: <1047157664.2226.6.camel@dexter.attbi.com>
	<m3d6knqywf.fsf@lyta.haphazard.org> <3E7913AA.6090501@metastatic.org>
	<m3d6kewy5g.fsf@lyta.haphazard.org> <3E818F8D.9090102@metastatic.org>
From: Brian Jones <cbj@gnu.org>
Date: 26 Mar 2003 22:32:12 -0500
In-Reply-To: <3E818F8D.9090102@metastatic.org>
Message-ID: <m3d6kdmqmb.fsf@lyta.haphazard.org>
Lines: 16
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: GNU Classpath <classpath@gnu.org>
Subject: Re: [PATCH] java.security miscellany
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Thu, 27 Mar 2003 03:36:15 -0000

Casey Marshall <rsdio@metastatic.org> writes:

> Brian Jones wrote:
> 
> | Okay, the attached patch is roughly the rest of your patch applied to
> | what is already in CVS.  If you're happy with it I'll go ahead and
> | check it in.
> |
> 
> Looks ok.

Committed, thanks.

Brian
-- 
Brian Jones <cbj@gnu.org>



From MAILER-DAEMON Thu Mar 27 01:13:54 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18yQeA-0006BC-00
	for mharc-classpath@gnu.org; Thu, 27 Mar 2003 01:13:54 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18yQe8-0006B0-00
	for classpath@gnu.org; Thu, 27 Mar 2003 01:13:52 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18yQdc-0003xr-00
	for classpath@gnu.org; Thu, 27 Mar 2003 01:13:51 -0500
Received: from bay2-f39.bay2.hotmail.com ([65.54.247.39] helo=hotmail.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18yQda-0003rM-00
	for classpath@gnu.org; Thu, 27 Mar 2003 01:13:18 -0500
Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC;
	 Wed, 26 Mar 2003 22:13:17 -0800
Received: from 192.89.52.142 by by2fd.bay2.hotmail.msn.com with HTTP;
	Thu, 27 Mar 2003 06:13:17 GMT
X-Originating-IP: [192.89.52.142]
X-Originating-Email: [smarong@hotmail.com]
From: "Saikou Marong" <smarong@hotmail.com>
To: classpath@gnu.org
Bcc: 
Date: Thu, 27 Mar 2003 06:13:17 +0000
Mime-Version: 1.0
Content-Type: text/html
Message-ID: <BAY2-F393Mpw6yL2m9l00010d83@hotmail.com>
X-OriginalArrivalTime: 27 Mar 2003 06:13:17.0912 (UTC)
	FILETIME=[F57A2580:01C2F427]
Subject: Re: Classpath Digest, Vol 4, Issue 46
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Thu, 27 Mar 2003 06:13:53 -0000

<html><div style='background-color:'><DIV>
<P><BR><BR></P></DIV>
<DIV></DIV>
<DIV></DIV>&gt;From: classpath-request@gnu.org 
<DIV></DIV>&gt;Reply-To: classpath@gnu.org 
<DIV></DIV>&gt;To: classpath@gnu.org 
<DIV></DIV>&gt;Subject: Classpath Digest, Vol 4, Issue 46 
<DIV></DIV>&gt;Date: Wed, 26 Mar 2003 12:01:41 -0500 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;Send Classpath mailing list submissions to 
<DIV></DIV>&gt; classpath@gnu.org 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;To subscribe or unsubscribe via the World Wide Web, visit 
<DIV></DIV>&gt; http://mail.gnu.org/mailman/listinfo/classpath 
<DIV></DIV>&gt;or, via email, send a message with subject or body 'help' to 
<DIV></DIV>&gt; classpath-request@gnu.org 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;You can reach the person managing the list at 
<DIV></DIV>&gt; classpath-owner@gnu.org 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;When replying, please edit your Subject line so it is more specific 
<DIV></DIV>&gt;than "Re: Contents of Classpath digest..." 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;Today's Topics: 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 1. Re: Classpath Digest, Vol 4, Issue 45 (Saikou Marong) 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;---------------------------------------------------------------------- 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;Date: Wed, 26 Mar 2003 12:21:14 +0000 
<DIV></DIV>&gt;From: "Saikou Marong" <SMARONG@HOTMAIL.COM>
<DIV></DIV>&gt;To: classpath@gnu.org 
<DIV></DIV>&gt;Subject: Re: Classpath Digest, Vol 4, Issue 45 
<DIV></DIV>&gt;Message-ID: <BAY2-F71CNDG5OQJGAG000032D3@HOTMAIL.COM>
<DIV></DIV>&gt;Content-Type: text/html 
<DIV></DIV>&gt;MIME-Version: 1.0 
<DIV></DIV>&gt;Precedence: list 
<DIV></DIV>&gt;Message: 1 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;
<DIV>
<DIV></DIV>&gt;
<P><BR><BR></P></DIV>
<DIV></DIV>&gt;
<DIV></DIV>
<DIV></DIV>&gt;
<DIV></DIV>&gt;From: classpath-request@gnu.org 
<DIV></DIV>&gt;
<DIV></DIV>&gt;Reply-To: classpath@gnu.org 
<DIV></DIV>&gt;
<DIV></DIV>&gt;To: classpath@gnu.org 
<DIV></DIV>&gt;
<DIV></DIV>&gt;Subject: Classpath Digest, Vol 4, Issue 45 
<DIV></DIV>&gt;
<DIV></DIV>&gt;Date: Wed, 26 Mar 2003 06:56:46 -0500 
<DIV></DIV>&gt;
<DIV></DIV>&gt; 
<DIV></DIV>&gt;
<DIV></DIV>&gt;Send Classpath mailing list submissions to 
<DIV></DIV>&gt;
<DIV></DIV>&gt; classpath@gnu.org 
<DIV></DIV>&gt;
<DIV></DIV>&gt; 
<DIV></DIV>&gt;
<DIV></DIV>&gt;To subscribe or unsubscribe via the World Wide Web, visit 
<DIV></DIV>&gt;
<DIV></DIV>&gt; http://mail.gnu.org/mailman/listinfo/classpath 
<DIV></DIV>&gt;
<DIV></DIV>&gt;or, via email, send a message with subject or body 'help' to 
<DIV></DIV>&gt;
<DIV></DIV>&gt; classpath-request@gnu.org 
<DIV></DIV>&gt;
<DIV></DIV>&gt; 
<DIV></DIV>&gt;
<DIV></DIV>&gt;You can reach the person managing the list at 
<DIV></DIV>&gt;
<DIV></DIV>&gt; classpath-owner@gnu.org 
<DIV></DIV>&gt;
<DIV></DIV>&gt; 
<DIV></DIV>&gt;
<DIV></DIV>&gt;When replying, please edit your Subject line so it is more specific 
<DIV></DIV>&gt;
<DIV></DIV>&gt;than "Re: Contents of Classpath digest..." 
<DIV></DIV>&gt;
<DIV></DIV>&gt; 
<DIV></DIV>&gt;
<DIV></DIV>&gt; 
<DIV></DIV>&gt;
<DIV></DIV>&gt;Today's Topics: 
<DIV></DIV>&gt;
<DIV></DIV>&gt; 
<DIV></DIV>&gt;
<DIV></DIV>&gt; 1. Re: [PATCH] java.security miscellany (Casey Marshall) 
<DIV></DIV>&gt;
<DIV></DIV>&gt; 
<DIV></DIV>&gt;
<DIV></DIV>&gt; 
<DIV></DIV>&gt;
<DIV></DIV>&gt;---------------------------------------------------------------------- 
<DIV></DIV>&gt;
<DIV></DIV>&gt; 
<DIV></DIV>&gt;
<DIV></DIV>&gt;Date: Wed, 26 Mar 2003 03:31:25 -0800 
<DIV></DIV>&gt;
<DIV></DIV>&gt;From: Casey Marshall <RSDIO@METASTATIC.ORG>
<DIV></DIV>&gt;
<DIV></DIV>&gt;To: Brian Jones <CBJ@GNU.ORG>
<DIV></DIV>&gt;
<DIV></DIV>&gt;Cc: GNU Classpath <CLASSPATH@GNU.ORG>
<DIV></DIV>&gt;
<DIV></DIV>&gt;Subject: Re: [PATCH] java.security miscellany 
<DIV></DIV>&gt;
<DIV></DIV>&gt;Message-ID: &lt;3E818F8D.9090102@metastatic.org&gt; 
<DIV></DIV>&gt;
<DIV></DIV>&gt;In-Reply-To: <M3D6KEWY5G.FSF@LYTA.HAPHAZARD.ORG>
<DIV></DIV>&gt;
<DIV></DIV>&gt;References: &lt;1047157664.2226.6.camel@dexter.attbi.com&gt; 
<DIV></DIV>&gt;
<DIV></DIV>&gt; <M3D6KNQYWF.FSF@LYTA.HAPHAZARD.ORG>&lt;3E7913AA.6090501@metastatic.org&gt; 
<DIV></DIV>&gt;
<DIV></DIV>&gt; <M3D6KEWY5G.FSF@LYTA.HAPHAZARD.ORG>
<DIV></DIV>&gt;
<DIV></DIV>&gt;Content-Type: text/plain; charset=us-ascii; format=flowed 
<DIV></DIV>&gt;
<DIV></DIV>&gt;MIME-Version: 1.0 
<DIV></DIV>&gt;
<DIV></DIV>&gt;Content-Transfer-Encoding: 7bit 
<DIV></DIV>&gt;
<DIV></DIV>&gt;Precedence: list 
<DIV></DIV>&gt;
<DIV></DIV>&gt;Message: 1 
<DIV></DIV>&gt;
<DIV></DIV>&gt; 
<DIV></DIV>&gt;
<DIV></DIV>&gt;-----BEGIN PGP SIGNED MESSAGE----- 
<DIV></DIV>&gt;
<DIV></DIV>&gt;Hash: SHA1 
<DIV></DIV>&gt;
<DIV></DIV>&gt; 
<DIV></DIV>&gt;
<DIV></DIV>&gt;Brian Jones wrote: 
<DIV></DIV>&gt;
<DIV></DIV>&gt; 
<DIV></DIV>&gt;
<DIV></DIV>&gt;| Okay, the attached patch is roughly the rest of your patch applied to 
<DIV></DIV>&gt;
<DIV></DIV>&gt;| what is already in CVS. If you're happy with it I'll go ahead and 
<DIV></DIV>&gt;
<DIV></DIV>&gt;| check it in. 
<DIV></DIV>&gt;
<DIV></DIV>&gt;| 
<DIV></DIV>&gt;
<DIV></DIV>&gt; 
<DIV></DIV>&gt;
<DIV></DIV>&gt;Looks ok. 
<DIV></DIV>&gt;
<DIV></DIV>&gt; 
<DIV></DIV>&gt;
<DIV></DIV>&gt;- -- 
<DIV></DIV>&gt;
<DIV></DIV>&gt;Casey Marshall || rsdio@metastatic.org 
<DIV></DIV>&gt;
<DIV></DIV>&gt;-----BEGIN PGP SIGNATURE----- 
<DIV></DIV>&gt;
<DIV></DIV>&gt;Version: GnuPG v1.2.1 (GNU/Linux) 
<DIV></DIV>&gt;
<DIV></DIV>&gt;Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org 
<DIV></DIV>&gt;
<DIV></DIV>&gt; 
<DIV></DIV>&gt;
<DIV></DIV>&gt;iD8DBQE+gY+NgAuWMgRGsWsRAku3AJwONCFj3HOsvGW830WclfhoiE/BwwCfWTlr 
<DIV></DIV>&gt;
<DIV></DIV>&gt;l2eg0zI5Wch7RitSMDnJUwI= 
<DIV></DIV>&gt;
<DIV></DIV>&gt;=YYvR 
<DIV></DIV>&gt;
<DIV></DIV>&gt;-----END PGP SIGNATURE----- 
<DIV></DIV>&gt;
<DIV></DIV>&gt; 
<DIV></DIV>&gt;
<DIV></DIV>&gt; 
<DIV></DIV>&gt;
<DIV></DIV>&gt; 
<DIV></DIV>&gt;
<DIV></DIV>&gt;------------------------------ 
<DIV></DIV>&gt;
<DIV></DIV>&gt; 
<DIV></DIV>&gt;
<DIV></DIV>&gt;_______________________________________________ 
<DIV></DIV>&gt;
<DIV></DIV>&gt;Classpath mailing list 
<DIV></DIV>&gt;
<DIV></DIV>&gt;Classpath@gnu.org 
<DIV></DIV>&gt;
<DIV></DIV>&gt;http://mail.gnu.org/mailman/listinfo/classpath 
<DIV></DIV>&gt;
<DIV></DIV>&gt; 
<DIV></DIV>&gt;
<DIV></DIV>&gt; 
<DIV></DIV>&gt;
<DIV></DIV>&gt;End of Classpath Digest, Vol 4, Issue 45 
<DIV></DIV>&gt;
<DIV></DIV>&gt;**************************************** 
<DIV></DIV>&gt;
<DIV></DIV>
<DIV></DIV><BR clear=all>
<HR>
Add photos to your messages with <A href="http://g.msn.com/8HMEEN/2749">MSN 8. </A>Get 2 months FREE*. 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;------------------------------ 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;_______________________________________________ 
<DIV></DIV>&gt;Classpath mailing list 
<DIV></DIV>&gt;Classpath@gnu.org 
<DIV></DIV>&gt;http://mail.gnu.org/mailman/listinfo/classpath 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;End of Classpath Digest, Vol 4, Issue 46 
<DIV></DIV>&gt;**************************************** 
<DIV></DIV></div><br clear=all><hr>Help STOP SPAM with <a href="http://g.msn.com/8HMREN/2731">the new MSN 8 </a> and get 2 months FREE*</html>



From MAILER-DAEMON Thu Mar 27 19:21:28 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18yhaM-0001MY-00
	for mharc-classpath@gnu.org; Thu, 27 Mar 2003 19:19:06 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18yhZN-0008Ru-00
	for classpath@gnu.org; Thu, 27 Mar 2003 19:18:05 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18yhYb-0007PK-00
	for classpath@gnu.org; Thu, 27 Mar 2003 19:17:21 -0500
Received: from ms-smtp-01.southeast.rr.com ([24.93.67.82])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18yhYZ-0007FM-00
	for classpath@gnu.org; Thu, 27 Mar 2003 19:17:15 -0500
Received: from mail5.nc.rr.com (fe5 [24.93.67.52])h2S0D7gC006481
	for <classpath@gnu.org>; Thu, 27 Mar 2003 19:13:08 -0500 (EST)
Received: from lyta.haphazard.org ([66.57.9.48]) by mail5.nc.rr.com  with
	Microsoft SMTPSVC(5.5.1877.757.75);	 Thu, 27 Mar 2003 19:14:41 -0500
Received: by lyta.haphazard.org (Postfix, from userid 500)
	id 02B60BE69E; Thu, 27 Mar 2003 19:17:35 -0500 (EST)
Sender: cbj@haphazard.org
To: GNU Classpath <classpath@gnu.org>
References: <E18yO7c-0004wi-00@subversions.gnu.org>
From: Brian Jones <cbj@gnu.org>
Date: 27 Mar 2003 19:17:35 -0500
In-Reply-To: <E18yO7c-0004wi-00@subversions.gnu.org>
Message-ID: <m3znngl4yo.fsf@lyta.haphazard.org>
Lines: 90
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Subject: Re: classpath ./ChangeLog ./THANKYOU ./configure.in...
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Fri, 28 Mar 2003 00:19:04 -0000

There are still some getInstance problems with some of the things I
recently checked in though a check through my Mauve results appears to
indicate nothing terribly new here.  I'll try to take a look at these
this weekend and maybe catch up on a few more of the patches posted to
the list.

Brian

Brian Jones <cbj@gnu.org> writes:

> CVSROOT:	/cvsroot/classpath
> Module name:	classpath
> Changes by:	Brian Jones <cbj@gnu.org>	03/03/26 22:32:08
> 
> Modified files:
> 	.              : ChangeLog THANKYOU configure.in 
> 	java/security  : AlgorithmParameterGenerator.java 
> 	                 AlgorithmParameters.java KeyFactory.java 
> 	                 KeyPairGenerator.java KeyStore.java 
> 	                 MessageDigest.java SecureRandom.java 
> 	                 Signature.java 
> Added files:
> 	java/security  : Engine.java 
> 
> Log message:
> 	2003-03-26  C. Brian Jones  <cbj@gnu.org>
> 	
> 	* configure.in: VERSION changed to 0.05+cvs
> 	* THANKYOU: added Casey Marshall
> 	
> 	2003-03-26  Casey Marshall  <rsdio@metastatic.org>
> 	
> 	* java/security/AlgorithmParameterGenerator.java
> 	(getInstance (String)): add missing return statement
> 	(getInstance (String,String)): check for improper provider argument
> 	(getInstance (String,Provider)): reuse common Engine code
> 	(getInstance (String,String,Provider)): removed
> 	* java/security/AlgorithmParameters.java
> 	(getInstance (String,String)): check for improper provider argument
> 	(getInstance (String,Provider)): reuse common Engine code
> 	(getInstance (String,String,Provider)): removed
> 	* java/security/Engine.java: new file
> 	* java/security/KeyFactory.java
> 	(getInstance (String)): add missing return statement
> 	(getInstance (String,String)): check for improper provider argument
> 	(getInstance (String,Provider)): reuse common Engine code
> 	(getInstance (String,String,Provider)): removed
> 	* java/security/KeyPairGenerator.java
> 	(getInstance (String,Provider)): reuse common Engine code
> 	(getInstance (String,String,Provider)): removed
> 	* java/security/KeyStore.java
> 	(getInstance (String)): use getInstance(String,Provider) instead
> 	(getInstance (String,String)): use getInstance(String,Provider) instead
> 	(getInstance (String,Provider): reuse common Engine code
> 	* java/security/MessageDigest.java
> 	(getInstance (String,String)): check for improper provider argument
> 	(getInstance (String,Provider)): reuse common Engine code
> 	* java/security/SecureRandom.java
> 	(getInstance (String): formatting
> 	(getInstance (String,String)): check for improper provider argument
> 	(getInstance (String,Provider)): reuse common Engine code
> 	* java/security/Signature.java
> 	(getInstance (String,String)): check for improper provider argument
> 	(getInstance (String,Provider)): reuse common Engine code
> 	(getInstance (String,String,Provider)): removed
> 
> CVSWeb URLs:
> http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.973&tr2=1.974&r1=text&r2=text
> http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/THANKYOU.diff?tr1=1.32&tr2=1.33&r1=text&r2=text
> http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/configure.in.diff?tr1=1.117&tr2=1.118&r1=text&r2=text
> http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/security/Engine.java?rev=1.1
> http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/security/AlgorithmParameterGenerator.java.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
> http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/security/AlgorithmParameters.java.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
> http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/security/KeyFactory.java.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
> http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/security/KeyPairGenerator.java.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
> http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/security/KeyStore.java.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
> http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/security/MessageDigest.java.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
> http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/security/SecureRandom.java.diff?tr1=1.9&tr2=1.10&r1=text&r2=text
> http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/security/Signature.java.diff?tr1=1.10&tr2=1.11&r1=text&r2=text
> 
> 
> 
> _______________________________________________
> Commit-classpath mailing list
> Commit-classpath@gnu.org
> http://mail.gnu.org/mailman/listinfo/commit-classpath
> 

-- 
Brian Jones <cbj@gnu.org>



From MAILER-DAEMON Fri Mar 28 20:39:06 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18z5JJ-0007nw-00
	for mharc-classpath@gnu.org; Fri, 28 Mar 2003 20:39:05 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18z5JF-0007gC-00
	for classpath@gnu.org; Fri, 28 Mar 2003 20:39:01 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18z5JD-0007bC-00
	for classpath@gnu.org; Fri, 28 Mar 2003 20:39:00 -0500
Received: from mail.peakpeak.com ([207.174.178.17] helo=gash2.peakpeak.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18z5IK-0006nP-00; Fri, 28 Mar 2003 20:38:04 -0500
Received: from fleche.redhat.com (tf0239.peakpeak.com [204.144.239.239])
	by gash2.peakpeak.com (8.9.3/8.9.3) with ESMTP id SAA20217;
	Fri, 28 Mar 2003 18:38:03 -0700
Received: by fleche.redhat.com (Postfix, from userid 1000)
	id 755EF4F867B; Fri, 28 Mar 2003 18:33:43 -0700 (MST)
To: Brian Jones <cbj@gnu.org>
References: <E18yO7c-0004wi-00@subversions.gnu.org>
	<m3znngl4yo.fsf@lyta.haphazard.org>
From: Tom Tromey <tromey@redhat.com>
X-Attribution: Tom
X-Zippy: ..  I have a VISION!  It's a RANCID double-FISHWICH on an ENRICHED
	BUN!!
Date: 28 Mar 2003 18:33:43 -0700
In-Reply-To: <m3znngl4yo.fsf@lyta.haphazard.org>
Message-ID: <8765q37y88.fsf@fleche.redhat.com>
Lines: 13
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: GNU Classpath <classpath@gnu.org>
Subject: Re: classpath ./ChangeLog ./THANKYOU ./configure.in...
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
Reply-To: tromey@redhat.com
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sat, 29 Mar 2003 01:39:03 -0000

>>>>> "Brian" == Brian Jones <cbj@gnu.org> writes:

Brian> There are still some getInstance problems with some of the
Brian> things I recently checked in though a check through my Mauve
Brian> results appears to indicate nothing terribly new here.

Are these getInstance problems revealed by Mauve?
Or did you find them some other way?
I'd like to put all this java.security stuff into libgcj, but I'd
also prefer to wait if there is a regression that will be ironed out
soon...

Tom



From MAILER-DAEMON Sat Mar 29 02:30:35 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18zAkx-00036R-00
	for mharc-classpath@gnu.org; Sat, 29 Mar 2003 02:27:59 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18zAkb-0002oG-00
	for classpath@gnu.org; Sat, 29 Mar 2003 02:27:37 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18zAkX-0002jH-00
	for classpath@gnu.org; Sat, 29 Mar 2003 02:27:33 -0500
Received: from ms-smtp-02.southeast.rr.com ([24.93.67.83])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18zAkD-0002aH-00
	for classpath@gnu.org; Sat, 29 Mar 2003 02:27:13 -0500
Received: from mail5.nc.rr.com (fe5 [24.93.67.52])h2T7PPgQ009675;
	Sat, 29 Mar 2003 02:25:25 -0500 (EST)
Received: from lyta.haphazard.org ([66.57.9.48]) by mail5.nc.rr.com  with
	Microsoft SMTPSVC(5.5.1877.757.75);	 Sat, 29 Mar 2003 02:24:38 -0500
Received: by lyta.haphazard.org (Postfix, from userid 500)
	id 073CFBE69E; Sat, 29 Mar 2003 02:27:36 -0500 (EST)
Sender: cbj@haphazard.org
To: tromey@redhat.com
References: <E18yO7c-0004wi-00@subversions.gnu.org>
	<m3znngl4yo.fsf@lyta.haphazard.org> <8765q37y88.fsf@fleche.redhat.com>
From: Brian Jones <cbj@gnu.org>
Date: 29 Mar 2003 02:27:36 -0500
In-Reply-To: <8765q37y88.fsf@fleche.redhat.com>
Message-ID: <m3of3uljiv.fsf@lyta.haphazard.org>
Lines: 22
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: GNU Classpath <classpath@gnu.org>
Subject: Re: classpath ./ChangeLog ./THANKYOU ./configure.in...
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sat, 29 Mar 2003 07:27:46 -0000

Tom Tromey <tromey@redhat.com> writes:

> >>>>> "Brian" == Brian Jones <cbj@gnu.org> writes:
> 
> Brian> There are still some getInstance problems with some of the
> Brian> things I recently checked in though a check through my Mauve
> Brian> results appears to indicate nothing terribly new here.
> 
> Are these getInstance problems revealed by Mauve?
> Or did you find them some other way?
> I'd like to put all this java.security stuff into libgcj, but I'd
> also prefer to wait if there is a regression that will be ironed out
> soon...

I looked at the Mauve results before and after and essentially the
same getInstance problems and I don't know much about it other than
that.  It could just be because I don't have gnu-crypto configured
with the mauve testing.  Need to investigate.

Brian
-- 
Brian Jones <cbj@gnu.org>



From MAILER-DAEMON Sat Mar 29 07:26:42 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18zFPf-0001rV-00
	for mharc-classpath@gnu.org; Sat, 29 Mar 2003 07:26:19 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18zFPO-0001W7-00
	for classpath@gnu.org; Sat, 29 Mar 2003 07:26:02 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18zFOi-0001OW-00
	for classpath@gnu.org; Sat, 29 Mar 2003 07:25:21 -0500
Received: from int-mail.syd.fl.net.au ([202.181.0.28] helo=delenn.fl.net.au)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18zFNI-0008G3-00; Sat, 29 Mar 2003 07:23:52 -0500
Received: from solomon (a3-p59.syd.fl.net.au [202.181.1.123])
	by delenn.fl.net.au (Postfix) with ESMTP
	id 9B858180F6C; Sat, 29 Mar 2003 23:29:43 +1100 (EST)
Content-Type: text/plain;
  charset="iso-8859-1"
From: "Raif S. Naffah" <raif@fl.net.au>
To: Brian Jones <cbj@gnu.org>, tromey@redhat.com
Date: Sat, 29 Mar 2003 23:23:24 +1100
User-Agent: KMail/1.4.3
References: <E18yO7c-0004wi-00@subversions.gnu.org>
	<8765q37y88.fsf@fleche.redhat.com> <m3of3uljiv.fsf@lyta.haphazard.org>
In-Reply-To: <m3of3uljiv.fsf@lyta.haphazard.org>
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Message-Id: <200303292324.04334.raif@fl.net.au>
cc: GNU Classpath <classpath@gnu.org>
Subject: Re: classpath ./ChangeLog ./THANKYOU ./configure.in...
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
Reply-To: raif@fl.net.au
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sat, 29 Mar 2003 12:26:17 -0000

-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

On Saturday 29 March 2003 18:27, Brian Jones wrote:
> Tom Tromey <tromey@redhat.com> writes:
> > >>>>> "Brian" =3D=3D Brian Jones <cbj@gnu.org> writes:
> >
> > Brian> There are still some getInstance problems with some of the
> > Brian> things I recently checked in though a check through my Mauve
> > Brian> results appears to indicate nothing terribly new here.
> >
> > Are these getInstance problems revealed by Mauve?
> > Or did you find them some other way?
> > I'd like to put all this java.security stuff into libgcj, but I'd
> > also prefer to wait if there is a regression that will be ironed
> > out soon...
>
> I looked at the Mauve results before and after and essentially the
> same getInstance problems and I don't know much about it other than
> that.  It could just be because I don't have gnu-crypto configured
> with the mauve testing.  Need to investigate.

the Mauve tests for the getInstance() methods (at least those i added=20
recently) do not rely/depend on GNU Crypto.  all the testcases, install=20
their own, temporary, providers.

to test the patch i submitted earlier, i used my local copy of gcc, to=20
which i applied the same patch.  all the security related Mauve tests=20
passed.


cheers;
rsn
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
Comment: Que du magnifique

iD8DBQE+hZBE+e1AKnsTRiERA4D8AKDMx3nwhNHKZcw9v8VHaTtLFky7KgCgifot
weqI0s9rNYgv/3fwpYsgzdk=3D
=3DJVat
-----END PGP SIGNATURE-----




From MAILER-DAEMON Sat Mar 29 10:19:32 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18zI79-0001dO-00
	for mharc-classpath@gnu.org; Sat, 29 Mar 2003 10:19:23 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18zI6w-00014c-00
	for classpath@gnu.org; Sat, 29 Mar 2003 10:19:10 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18zI6J-0000Cw-00
	for classpath@gnu.org; Sat, 29 Mar 2003 10:18:31 -0500
Received: from ms-smtp-01.southeast.rr.com ([24.93.67.82])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18zI5q-0008IT-00
	for classpath@gnu.org; Sat, 29 Mar 2003 10:18:03 -0500
Received: from mail3.nc.rr.com (fe3 [24.93.67.50])h2TFDqgA015451;
	Sat, 29 Mar 2003 10:13:53 -0500 (EST)
Received: from lyta.haphazard.org ([66.57.9.48]) by mail3.nc.rr.com  with
	Microsoft SMTPSVC(5.5.1877.757.75);	 Sat, 29 Mar 2003 10:15:38 -0500
Received: by lyta.haphazard.org (Postfix, from userid 500)
	id 6C5DBBE69E; Sat, 29 Mar 2003 10:18:25 -0500 (EST)
Sender: cbj@haphazard.org
To: raif@fl.net.au
References: <E18yO7c-0004wi-00@subversions.gnu.org>
	<8765q37y88.fsf@fleche.redhat.com> <m3of3uljiv.fsf@lyta.haphazard.org>
	<200303292324.04334.raif@fl.net.au>
From: Brian Jones <cbj@gnu.org>
Date: 29 Mar 2003 10:18:25 -0500
In-Reply-To: <200303292324.04334.raif@fl.net.au>
Message-ID: <m3he9mkxq6.fsf@lyta.haphazard.org>
Lines: 34
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: GNU Classpath <classpath@gnu.org>
cc: tromey@redhat.com
Subject: Re: classpath ./ChangeLog ./THANKYOU ./configure.in...
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sat, 29 Mar 2003 15:19:22 -0000

"Raif S. Naffah" <raif@fl.net.au> writes:

> On Saturday 29 March 2003 18:27, Brian Jones wrote:
> > Tom Tromey <tromey@redhat.com> writes:
> > > >>>>> "Brian" == Brian Jones <cbj@gnu.org> writes:
> > >
> > > Brian> There are still some getInstance problems with some of the
> > > Brian> things I recently checked in though a check through my Mauve
> > > Brian> results appears to indicate nothing terribly new here.
> > >
> > > Are these getInstance problems revealed by Mauve?
> > > Or did you find them some other way?
> > > I'd like to put all this java.security stuff into libgcj, but I'd
> > > also prefer to wait if there is a regression that will be ironed
> > > out soon...
> >
> > I looked at the Mauve results before and after and essentially the
> > same getInstance problems and I don't know much about it other than
> > that.  It could just be because I don't have gnu-crypto configured
> > with the mauve testing.  Need to investigate.
> 
> the Mauve tests for the getInstance() methods (at least those i added 
> recently) do not rely/depend on GNU Crypto.  all the testcases, install 
> their own, temporary, providers.
> 
> to test the patch i submitted earlier, i used my local copy of gcc, to 
> which i applied the same patch.  all the security related Mauve tests 
> passed.

It's broken under Kissme/Classpath.

Brian
-- 
Brian Jones <cbj@gnu.org>



From MAILER-DAEMON Sat Mar 29 17:59:35 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18zPEx-000052-00
	for mharc-classpath@gnu.org; Sat, 29 Mar 2003 17:55:55 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18zPEk-0008Nf-00
	for classpath@gnu.org; Sat, 29 Mar 2003 17:55:42 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18zPDp-0007IJ-00
	for classpath@gnu.org; Sat, 29 Mar 2003 17:54:50 -0500
Received: from 12-235-115-156.client.attbi.com ([12.235.115.156])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18zPDF-0004bV-00; Sat, 29 Mar 2003 17:54:10 -0500
Received: from dexter ([192.168.0.2] helo=metastatic.org)
	by 12-235-115-156.client.attbi.com with esmtp (Exim 3.35 #1 (Debian))
	id 18zOnE-0007W7-00; Sat, 29 Mar 2003 14:27:16 -0800
Message-ID: <3E861DBF.5010402@metastatic.org>
Date: Sat, 29 Mar 2003 14:27:11 -0800
From: Casey Marshall <rsdio@metastatic.org>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030228
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: Brian Jones <cbj@gnu.org>
References: <E18yO7c-0004wi-00@subversions.gnu.org>
	<8765q37y88.fsf@fleche.redhat.com> <m3of3uljiv.fsf@lyta.haphazard.org>
	<200303292324.04334.raif@fl.net.au> <m3he9mkxq6.fsf@lyta.haphazard.org>
In-Reply-To: <m3he9mkxq6.fsf@lyta.haphazard.org>
X-Enigmail-Version: 0.71.0.0
X-Enigmail-Supports: pgp-inline, pgp-mime
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
cc: GNU Classpath <classpath@gnu.org>
cc: raif@fl.net.au
cc: tromey@redhat.com
Subject: Re: classpath ./ChangeLog ./THANKYOU ./configure.in...
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sat, 29 Mar 2003 22:55:53 -0000

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Brian Jones wrote:
| "Raif S. Naffah" <raif@fl.net.au> writes:
|
|
|>On Saturday 29 March 2003 18:27, Brian Jones wrote:
|>
|>>Tom Tromey <tromey@redhat.com> writes:
|>>
|>>>>>>>>"Brian" == Brian Jones <cbj@gnu.org> writes:
|>>>
|>>>Brian> There are still some getInstance problems with some of the
|>>>Brian> things I recently checked in though a check through my Mauve
|>>>Brian> results appears to indicate nothing terribly new here.
|>>>
|>>>Are these getInstance problems revealed by Mauve?
|>>>Or did you find them some other way?
|>>>I'd like to put all this java.security stuff into libgcj, but I'd
|>>>also prefer to wait if there is a regression that will be ironed
|>>>out soon...
|>>
|>>I looked at the Mauve results before and after and essentially the
|>>same getInstance problems and I don't know much about it other than
|>>that.  It could just be because I don't have gnu-crypto configured
|>>with the mauve testing.  Need to investigate.
|>
|>the Mauve tests for the getInstance() methods (at least those i added
|>recently) do not rely/depend on GNU Crypto.  all the testcases, install
|>their own, temporary, providers.
|>
|>to test the patch i submitted earlier, i used my local copy of gcc, to
|>which i applied the same patch.  all the security related Mauve tests
|>passed.
|
| It's broken under Kissme/Classpath.
|

Just to throw my hat into the ring...

Most of the security tests succeed for me with SableVM, except for a few
cases where the tests themselves cannot locate the constructor for inner
classes.

- --
Casey Marshall || rsdio@metastatic.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE+hh2/gAuWMgRGsWsRAlPmAKCNmqGEDKg/GkXYROub9lvCiUm/AQCeJimJ
66R3xR+eDWBdbnF86tKplVk=
=Cpjh
-----END PGP SIGNATURE-----




From MAILER-DAEMON Sat Mar 29 18:03:30 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18zPLR-0005PX-00
	for mharc-classpath@gnu.org; Sat, 29 Mar 2003 18:02:37 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18zPLC-0004v4-00
	for classpath@gnu.org; Sat, 29 Mar 2003 18:02:22 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18zPJS-0002Gy-00
	for classpath@gnu.org; Sat, 29 Mar 2003 18:01:05 -0500
Received: from int-mail.syd.fl.net.au ([202.181.0.28] helo=delenn.fl.net.au)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18zPHJ-0000qQ-00; Sat, 29 Mar 2003 17:58:21 -0500
Received: from solomon (a3-p59.syd.fl.net.au [202.181.1.123])
	by delenn.fl.net.au (Postfix) with ESMTP
	id 497A2180FCC; Sun, 30 Mar 2003 09:00:23 +1000 (EST)
Content-Type: text/plain;
  charset="iso-8859-1"
From: "Raif S. Naffah" <raif@fl.net.au>
To: Brian Jones <cbj@gnu.org>
Date: Sun, 30 Mar 2003 09:54:39 +1100
User-Agent: KMail/1.4.3
References: <E18yO7c-0004wi-00@subversions.gnu.org>
	<200303292324.04334.raif@fl.net.au> <m3he9mkxq6.fsf@lyta.haphazard.org>
In-Reply-To: <m3he9mkxq6.fsf@lyta.haphazard.org>
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Message-Id: <200303300854.47639.raif@fl.net.au>
cc: GNU Classpath <classpath@gnu.org>
Subject: Re: classpath ./ChangeLog ./THANKYOU ./configure.in...
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
Reply-To: raif@fl.net.au
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sat, 29 Mar 2003 23:02:35 -0000

-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

On Sunday 30 March 2003 02:18, Brian Jones wrote:
> "Raif S. Naffah" <raif@fl.net.au> writes:
> > On Saturday 29 March 2003 18:27, Brian Jones wrote:
> > > Tom Tromey <tromey@redhat.com> writes:
> > > > >>>>> "Brian" =3D=3D Brian Jones <cbj@gnu.org> writes:
> > > >
> > > > Brian> There are still some getInstance problems with some of
> > > > the Brian> things I recently checked in though a check through
> > > > my Mauve Brian> results appears to indicate nothing terribly
> > > > new here.
> > > >
> > > > Are these getInstance problems revealed by Mauve?
> > > > Or did you find them some other way?
> > > > I'd like to put all this java.security stuff into libgcj, but
> > > > I'd also prefer to wait if there is a regression that will be
> > > > ironed out soon...
> > >
> > > I looked at the Mauve results before and after and essentially
> > > the same getInstance problems and I don't know much about it
> > > other than that.  It could just be because I don't have
> > > gnu-crypto configured with the mauve testing.  Need to
> > > investigate.
> >
> > the Mauve tests for the getInstance() methods (at least those i
> > added recently) do not rely/depend on GNU Crypto.  all the
> > testcases, install their own, temporary, providers.
> >
> > to test the patch i submitted earlier, i used my local copy of gcc,
> > to which i applied the same patch.  all the security related Mauve
> > tests passed.
>
> It's broken under Kissme/Classpath.

i was unable to test with Kissme because the latter is broken (at least=20
in my env).  the only reliable way of testing i found was to do as=20
suggested above --i.e. apply the same patch to the gcc/libjava tree--=20
and then run the gcc make check with:

$ MAUVEDIR=3Dpath/to/your/mauve/dir make check RUNTESTFLAGS=3D"mauve.exp"

of course this may not be appropriate for Classpath (and non-GCJ)=20
specific patches.


cheers;
rsn
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
Comment: Que du magnifique

iD8DBQE+hiQv+e1AKnsTRiERA1yqAJ9l/v8HuzsXIqgsRa6UX1FpBZwI6ACgprWx
XooGZAOpo1PK1usovwxOp+o=3D
=3DwgwH
-----END PGP SIGNATURE-----




From MAILER-DAEMON Sat Mar 29 19:35:14 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18zQmx-0008Uo-00
	for mharc-classpath@gnu.org; Sat, 29 Mar 2003 19:35:07 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18zQmj-00084N-00
	for classpath@gnu.org; Sat, 29 Mar 2003 19:34:53 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18zQmQ-00070d-00
	for classpath@gnu.org; Sat, 29 Mar 2003 19:34:37 -0500
Received: from ms-smtp-03.southeast.rr.com ([24.93.67.84])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18zQmO-0006kS-00
	for classpath@gnu.org; Sat, 29 Mar 2003 19:34:32 -0500
Received: from mail4.nc.rr.com (fe4 [24.93.67.51])h2TNp8m0016191;
	Sat, 29 Mar 2003 18:51:11 -0500 (EST)
Received: from lyta.haphazard.org ([66.57.9.48]) by mail4.nc.rr.com  with
	Microsoft SMTPSVC(5.5.1877.757.75);	 Sat, 29 Mar 2003 18:54:00 -0500
Received: by lyta.haphazard.org (Postfix, from userid 500)
	id 7B409BE69E; Sat, 29 Mar 2003 18:52:46 -0500 (EST)
Sender: cbj@haphazard.org
To: Casey Marshall <rsdio@metastatic.org>
References: <E18yO7c-0004wi-00@subversions.gnu.org>
	<8765q37y88.fsf@fleche.redhat.com> <m3of3uljiv.fsf@lyta.haphazard.org>
	<200303292324.04334.raif@fl.net.au>
	<m3he9mkxq6.fsf@lyta.haphazard.org> <3E861DBF.5010402@metastatic.org>
From: Brian Jones <cbj@gnu.org>
Date: 29 Mar 2003 18:52:46 -0500
In-Reply-To: <3E861DBF.5010402@metastatic.org>
Message-ID: <m3n0jdhgs1.fsf@lyta.haphazard.org>
Lines: 13
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: GNU Classpath <classpath@gnu.org>
cc: raif@fl.net.au
cc: tromey@redhat.com
Subject: Re: classpath ./ChangeLog ./THANKYOU ./configure.in...
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sun, 30 Mar 2003 00:35:05 -0000

Casey Marshall <rsdio@metastatic.org> writes:

> Just to throw my hat into the ring...
> 
> Most of the security tests succeed for me with SableVM, except for a few
> cases where the tests themselves cannot locate the constructor for inner
> classes.

Cool, does SableVM support Classpath CVS now?

Brian
-- 
Brian Jones <cbj@gnu.org>



From MAILER-DAEMON Sat Mar 29 19:42:14 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18zQsk-0001r8-00
	for mharc-classpath@gnu.org; Sat, 29 Mar 2003 19:41:06 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18zQsi-0001m1-00
	for classpath@gnu.org; Sat, 29 Mar 2003 19:41:04 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18zQsa-0001dO-00
	for classpath@gnu.org; Sat, 29 Mar 2003 19:40:57 -0500
Received: from 12-235-115-156.client.attbi.com ([12.235.115.156])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18zQsB-0001Vy-00; Sat, 29 Mar 2003 19:40:31 -0500
Received: from dexter ([192.168.0.2] helo=metastatic.org)
	by 12-235-115-156.client.attbi.com with esmtp (Exim 3.35 #1 (Debian))
	id 18zQs4-0007e9-00; Sat, 29 Mar 2003 16:40:24 -0800
Message-ID: <3E863CF7.6060101@metastatic.org>
Date: Sat, 29 Mar 2003 16:40:23 -0800
From: Casey Marshall <rsdio@metastatic.org>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030228
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: Brian Jones <cbj@gnu.org>
References: <E18yO7c-0004wi-00@subversions.gnu.org>
	<8765q37y88.fsf@fleche.redhat.com> <m3of3uljiv.fsf@lyta.haphazard.org>
	<200303292324.04334.raif@fl.net.au>	<m3he9mkxq6.fsf@lyta.haphazard.org>
	<3E861DBF.5010402@metastatic.org> <m3n0jdhgs1.fsf@lyta.haphazard.org>
In-Reply-To: <m3n0jdhgs1.fsf@lyta.haphazard.org>
X-Enigmail-Version: 0.71.0.0
X-Enigmail-Supports: pgp-inline, pgp-mime
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
cc: GNU Classpath <classpath@gnu.org>
cc: raif@fl.net.au
cc: tromey@redhat.com
Subject: Re: classpath ./ChangeLog ./THANKYOU ./configure.in...
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sun, 30 Mar 2003 00:41:05 -0000

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Brian Jones wrote:
| Casey Marshall <rsdio@metastatic.org> writes:
|
|
|>Just to throw my hat into the ring...
|>
|>Most of the security tests succeed for me with SableVM, except for a few
|>cases where the tests themselves cannot locate the constructor for inner
|>classes.
|
| Cool, does SableVM support Classpath CVS now?
|

Yes and no. I can get it to work with a few updates from Classpath CVS
copied over to the SableVM class library, but haven't (yet) tried it
with the full monty.

Maybe trying to get it to work would be a good thing, since it is the
only VM I can get working with Mauve right now.

- --
Casey Marshall || rsdio@metastatic.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE+hjz3gAuWMgRGsWsRAmCfAKCMzzeNhM5YPohxGfYiq0ADgCapjwCfbQvg
xODCvBvxnGg1nOPm/93p9Sk=
=2kKW
-----END PGP SIGNATURE-----




From MAILER-DAEMON Sun Mar 30 15:14:12 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18zjBu-0003yv-00
	for mharc-classpath@gnu.org; Sun, 30 Mar 2003 15:14:06 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18zjBU-0003Jb-00
	for classpath@gnu.org; Sun, 30 Mar 2003 15:13:40 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18zjBM-000315-00
	for classpath@gnu.org; Sun, 30 Mar 2003 15:13:33 -0500
Received: from e1.ny.us.ibm.com ([32.97.182.101])
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.10.13)
	id 18zjAz-0002Va-00
	for classpath@gnu.org; Sun, 30 Mar 2003 15:13:09 -0500
Received: from northrelay02.pok.ibm.com (northrelay02.pok.ibm.com
	[9.56.224.150])
	by e1.ny.us.ibm.com (8.12.9/8.12.2) with ESMTP id h2UKD7dv098382
	for <classpath@gnu.org>; Sun, 30 Mar 2003 15:13:07 -0500
Received: from d01ml243.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216])
	h2UKD5sA073304
	for <classpath@gnu.org>; Sun, 30 Mar 2003 15:13:06 -0500
In-Reply-To: <E18zbVD-0003za-03@monty-python.gnu.org>
To: classpath@gnu.org
MIME-Version: 1.0
X-Mailer: Lotus Notes Release 6.0 September 26, 2002
From: David P Grove <groved@us.ibm.com>
Message-ID: <OFE87E86C0.9E497253-ON85256CF9.006D7592-85256CF9.006EF7B9@us.ibm.com>
Date: Sun, 30 Mar 2003 15:13:04 -0500
X-MIMETrack: Serialize by Router on D01ML243/01/M/IBM(Release 6.0.1
	[IBM]|March 28, 2003) at 03/30/2003 15:13:05,
	Serialize complete at 03/30/2003 15:13:05
Content-Type: multipart/alternative;
	boundary="=_alternative 006EF5CE85256CF9_="
Subject: Re: classpath ./ChangeLog ./THANKYOU ./configure.in...
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sun, 30 Mar 2003 20:14:03 -0000

This is a multipart message in MIME format.
--=_alternative 006EF5CE85256CF9_=
Content-Type: text/plain; charset="US-ASCII"

All of the java.security tests are passing on Jikes RVM with the cvs head 
of classpath & mauve.  We run mauve tests every night as part of our 
automated regression testing (results are posted to the 
jikesrvm-regression mailing list if anyone is interested).  We also run 
the Jikes RVM and classpath cvs head combination against a number of other 
tests every night as well. 

For the last couple weeks we've been regularly failing _201_compress and 
_209_db from SPECjvm98 and a home-grown utf8 test with the classpath cvs 
head/Jikes RVM combination.  Jikes RVM cvs head with classpath 0.05 passes 
these tests.  The thing the tests seem to have in common is that they are 
all reading large input files.  We haven't had a chance to look into this 
in too much detail, but I suspect there may be lingering problems due to 
the recent changes in FileDescriptors. 

--dave
--=_alternative 006EF5CE85256CF9_=
Content-Type: text/html; charset="US-ASCII"


<br><font size=2 face="sans-serif">All of the java.security tests are passing
on Jikes RVM with the cvs head of classpath &amp; mauve. &nbsp;We run mauve
tests every night as part of our automated regression testing (results
are posted to the jikesrvm-regression mailing list if anyone is interested).
&nbsp;We also run the Jikes RVM and classpath cvs head combination against
a number of other tests every night as well. </font>
<br>
<br><font size=2 face="sans-serif">For the last couple weeks we've been
regularly failing _201_compress and _209_db from SPECjvm98 and a home-grown
utf8 test with the classpath cvs &nbsp;head/Jikes RVM combination. &nbsp;Jikes
RVM cvs head with classpath 0.05 passes these tests. &nbsp;The thing the
tests seem to have in common is that they are all reading large input files.
&nbsp;We haven't had a chance to look into this in too much detail, but
I suspect there may be lingering problems due to the recent changes in
FileDescriptors. </font>
<br>
<br><font size=2 face="sans-serif">--dave</font>
--=_alternative 006EF5CE85256CF9_=--



From MAILER-DAEMON Sun Mar 30 15:39:26 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18zja7-0002sM-00
	for mharc-classpath@gnu.org; Sun, 30 Mar 2003 15:39:07 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18zjZv-00028Q-00
	for classpath@gnu.org; Sun, 30 Mar 2003 15:38:55 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18zjZo-0001ei-00
	for classpath@gnu.org; Sun, 30 Mar 2003 15:38:50 -0500
Received: from int-mail.syd.fl.net.au ([202.181.0.28] helo=delenn.fl.net.au)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18zjZn-0001PD-00
	for classpath@gnu.org; Sun, 30 Mar 2003 15:38:47 -0500
Received: from solomon (a3-p05.syd.fl.net.au [202.181.1.69])
	by delenn.fl.net.au (Postfix) with ESMTP
	id E8DEF18020D; Mon, 31 Mar 2003 06:44:41 +1000 (EST)
Content-Type: text/plain;
  charset="iso-8859-1"
From: "Raif S. Naffah" <raif@fl.net.au>
To: David P Grove <groved@us.ibm.com>, classpath@gnu.org
Date: Mon, 31 Mar 2003 07:38:47 +1100
User-Agent: KMail/1.4.3
References: <OFE87E86C0.9E497253-ON85256CF9.006D7592-85256CF9.006EF7B9@us.ibm.com>
In-Reply-To: <OFE87E86C0.9E497253-ON85256CF9.006D7592-85256CF9.006EF7B9@us.ibm.com>
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Message-Id: <200303310638.51115.raif@fl.net.au>
Subject: Re: classpath ./ChangeLog ./THANKYOU ./configure.in...
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
Reply-To: raif@fl.net.au
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sun, 30 Mar 2003 20:39:04 -0000

-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

hello David,

On Monday 31 March 2003 06:13, David P Grove wrote:
> All of the java.security tests are passing on Jikes RVM with the cvs
> head of classpath & mauve...

can you post the build/test script, or point me to its location.  i=20
tried building and running rvm but i consistently get an apparent hang=20
when invoking a freshly built binary.


cheers;
rsn
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
Comment: Que du magnifique

iD8DBQE+h1XY+e1AKnsTRiERA/W4AJ9ZVIOF1FJwtOt4jt/Z1dCqk1rECgCgrM2Q
m+Gq1VQTd0aAhnhOOc7n5/A=3D
=3D/gYd
-----END PGP SIGNATURE-----




From MAILER-DAEMON Sun Mar 30 17:03:05 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18zktD-0006xI-00
	for mharc-classpath@gnu.org; Sun, 30 Mar 2003 17:02:55 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18zkt2-0006Y7-00
	for classpath@gnu.org; Sun, 30 Mar 2003 17:02:44 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18zksq-0005u9-00
	for classpath@gnu.org; Sun, 30 Mar 2003 17:02:33 -0500
Received: from int-mail.syd.fl.net.au ([202.181.0.28] helo=delenn.fl.net.au)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18zkso-0005jE-00
	for classpath@gnu.org; Sun, 30 Mar 2003 17:02:30 -0500
Received: from solomon (a3-p05.syd.fl.net.au [202.181.1.69])
	by delenn.fl.net.au (Postfix) with ESMTP id 2076017FEFC
	for <classpath@gnu.org>; Mon, 31 Mar 2003 08:08:28 +1000 (EST)
Content-Type: text/plain;
  charset="us-ascii"
From: "Raif S. Naffah" <raif@fl.net.au>
To: GNU Classpath <classpath@gnu.org>
Date: Mon, 31 Mar 2003 09:02:36 +1100
User-Agent: KMail/1.4.3
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Message-Id: <200303310802.38159.raif@fl.net.au>
Subject: running GNU Classpath with Jikes RVM
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
Reply-To: raif@fl.net.au
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sun, 30 Mar 2003 22:02:53 -0000

-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

hello there,

i finally got the above combo to work.  here is what i did with the
usual caveat YMMV.  the main difference with Julian's step-by step
posted some time earlier on the list has to do with configuration
values in step #3 below:


1. checkout the CVS head of GNU Classpath, Mauve and Jikes RVM.  i
shall assume the following:

   GNU Classpath is in $CLASSPATH_SRC/classpath
   Jikes RVM is in $RVM_ROOT/rvm


2. cd $RVM_ROOT/rvm/config

3. edit the file i686-pc-linux.eb as follows (my machine/env is an
athlon-xp single processor, running RH-8.0 with experimental GCC in
/usr/local/gcc):

=2E..
#########
# PART I: Preprocessor directives that hold for every config on this targ=
et
#########
# target architecutre is IA32
export RVM_FOR_IA32=3D1
export RVM_FOR_32_ADDR=3D1

# target OS is Linux
export RVM_FOR_LINUX=3D1

# pthread library will work on our machines so default this to 0.
# NOTE: the key requirement is that you have a 2.4 kernel and
#       that glibc is compiled to use the GS segment register
#       to access pthread-local storage.  See discussion in rvm-researche=
rs=20
#       archive and the userguide FAQ.
#export RVM_FOR_SINGLE_VIRTUAL_PROCESSOR=3D0
export RVM_FOR_SINGLE_VIRTUAL_PROCESSOR=3D1
=2E..

the rest of the file should reflect your environment.


4. create a .rvmrc somewhere where it's visible from your std $PATH.  i
put it in $HOME.  it must contain the followings:

# .rvmrc

export RVM_ROOT=3D/data/workspace/cvs/rvmroot
export RVM_HOST_CONFIG=3D/data/workspace/cvs/rvmroot/rvm/config/i686-pc-l=
inux.eb
export RVM_TARGET_CONFIG=3D/data/workspace/cvs/rvmroot/rvm/config/i686-pc=
-linux.eb
export RVM_BUILD=3D/data/workspace/cvs/build-rvm
export PATH=3D/data/workspace/cvs/rvmroot/rvm/bin:$PATH


5. source the above.

6. run the JikesRVM config script like so:

jconfigure -D RVM_WITH_GNU_CLASSPATH=3D1 BaseBaseSemiSpace


7. cd to $RVM_BUILD

8. run the build script like so:

=2E/jbuild

optionally feeding it -trace


9. configure and run Mauve the usual way.


i do get an out-of-memory error and a stack trace, but that's much
better than a hang.


cheers;
rsn
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
Comment: Que du magnifique

iD8DBQE+h2l8+e1AKnsTRiERA1gIAKCU4GsqR/r57boQjaLSLSdL8aV9DACg0Y8U
wWJGbrAu5IC1pCEUq5LL0xI=3D
=3DnUss
-----END PGP SIGNATURE-----




From MAILER-DAEMON Sun Mar 30 17:19:20 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18zl8B-0000RU-00
	for mharc-classpath@gnu.org; Sun, 30 Mar 2003 17:18:23 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18zl88-0000OV-00
	for classpath@gnu.org; Sun, 30 Mar 2003 17:18:20 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18zl86-0000O4-00
	for classpath@gnu.org; Sun, 30 Mar 2003 17:18:19 -0500
Received: from int-mail.syd.fl.net.au ([202.181.0.28] helo=delenn.fl.net.au)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18zl5s-0008CF-00
	for classpath@gnu.org; Sun, 30 Mar 2003 17:16:01 -0500
Received: from solomon (a3-p05.syd.fl.net.au [202.181.1.69])
	by delenn.fl.net.au (Postfix) with ESMTP id D4C491803A3
	for <classpath@gnu.org>; Mon, 31 Mar 2003 08:21:58 +1000 (EST)
Content-Type: text/plain;
  charset="iso-8859-1"
From: "Raif S. Naffah" <raif@fl.net.au>
To: GNU Classpath <classpath@gnu.org>
Date: Mon, 31 Mar 2003 09:16:00 +1100
User-Agent: KMail/1.4.3
References: <200303310802.38159.raif@fl.net.au>
In-Reply-To: <200303310802.38159.raif@fl.net.au>
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Message-Id: <200303310816.04052.raif@fl.net.au>
Subject: Re: running GNU Classpath with Jikes RVM
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
Reply-To: raif@fl.net.au
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sun, 30 Mar 2003 22:18:21 -0000

-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

On Monday 31 March 2003 08:02, Raif S. Naffah wrote:
> ...
> i finally got the above combo to work...

if you set a mauve-security input file for Mauve to only exercise the=20
java.security packages, rvm completes normally with:

0 of 163 tests failed


cheers;
rsn
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
Comment: Que du magnifique

iD8DBQE+h2yh+e1AKnsTRiERA7kiAKDXBTqnTiqUrCrW7ZFfymzT65GCmgCfZrVC
PzjS496NQ1buKfkoE70urzc=3D
=3DEx8y
-----END PGP SIGNATURE-----




From MAILER-DAEMON Sun Mar 30 20:41:09 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18zoGX-0006w7-00
	for mharc-classpath@gnu.org; Sun, 30 Mar 2003 20:39:13 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18zoGE-0006Ph-00
	for classpath@gnu.org; Sun, 30 Mar 2003 20:38:54 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18zoGB-0006LZ-00
	for classpath@gnu.org; Sun, 30 Mar 2003 20:38:52 -0500
Received: from ms-smtp-03.southeast.rr.com ([24.93.67.84])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18zoFu-0005kI-00
	for classpath@gnu.org; Sun, 30 Mar 2003 20:38:34 -0500
Received: from mail3.nc.rr.com (fe3 [24.93.67.50])h2V1bIm0027719;
	Sun, 30 Mar 2003 20:37:18 -0500 (EST)
Received: from lyta.haphazard.org ([66.57.9.48]) by mail3.nc.rr.com  with
	Microsoft SMTPSVC(5.5.1877.757.75);	 Sun, 30 Mar 2003 20:36:06 -0500
Received: by lyta.haphazard.org (Postfix, from userid 500)
	id 12F89BE69E; Sun, 30 Mar 2003 20:38:58 -0500 (EST)
Sender: cbj@haphazard.org
To: raif@fl.net.au
References: <200303310802.38159.raif@fl.net.au>
	<200303310816.04052.raif@fl.net.au>
From: Brian Jones <cbj@gnu.org>
Date: 30 Mar 2003 20:38:57 -0500
In-Reply-To: <200303310816.04052.raif@fl.net.au>
Message-ID: <m3he9kgvri.fsf@lyta.haphazard.org>
Lines: 15
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: GNU Classpath <classpath@gnu.org>
Subject: Re: running GNU Classpath with Jikes RVM
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Mon, 31 Mar 2003 01:39:09 -0000

"Raif S. Naffah" <raif@fl.net.au> writes:

> On Monday 31 March 2003 08:02, Raif S. Naffah wrote:
> > ...
> > i finally got the above combo to work...
> 
> if you set a mauve-security input file for Mauve to only exercise the 
> java.security packages, rvm completes normally with:
> 
> 0 of 163 tests failed

Thanks,
Brian
-- 
Brian Jones <cbj@gnu.org>



From MAILER-DAEMON Mon Mar 31 07:37:31 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 18zyVl-0001IU-00
	for mharc-classpath@gnu.org; Mon, 31 Mar 2003 07:35:37 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 18zySQ-00065o-00
	for classpath@gnu.org; Mon, 31 Mar 2003 07:32:10 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 18zySK-0005zQ-00
	for classpath@gnu.org; Mon, 31 Mar 2003 07:32:06 -0500
Received: from bay2-dav67.bay2.hotmail.com ([65.54.246.202] helo=hotmail.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 18zyRP-0005Yv-00
	for classpath@gnu.org; Mon, 31 Mar 2003 07:31:07 -0500
Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC;
	 Mon, 31 Mar 2003 04:31:06 -0800
Received: from 192.89.52.142 by bay2-dav67.bay2.hotmail.com with DAV;
	Mon, 31 Mar 2003 12:31:05 +0000
X-Originating-IP: [192.89.52.142]
X-Originating-Email: [smarong@hotmail.com]
From: "saikou Marong" <smarong@hotmail.com>
To: <classpath@gnu.org>
Date: Mon, 31 Mar 2003 15:30:47 +0300
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_0005_01C2F79A.8094B9D0"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Message-ID: <BAY2-DAV67l243bjDt90004ec47@hotmail.com>
X-OriginalArrivalTime: 31 Mar 2003 12:31:06.0238 (UTC)
	FILETIME=[668131E0:01C2F781]
Subject: classpath
X-BeenThere: classpath@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Discussion of the implemenation of the core Java class libraries
 <classpath.gnu.org>
List-Help: <mailto:classpath-request@gnu.org?subject=help>
List-Post: <mailto:classpath@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/classpath>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/classpath>,
	<mailto:classpath-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Mon, 31 Mar 2003 12:35:35 -0000

This is a multi-part message in MIME format.

------=_NextPart_000_0005_01C2F79A.8094B9D0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi!
Can someone out there give me step by step explanation of classpath and =
how to set classpath to make it ready for SDK.
Your help will be heighly appreciated.

------=_NextPart_000_0005_01C2F79A.8094B9D0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2712.300" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Can someone out there give me step by =
step=20
explanation of classpath and how to set classpath to make it ready for=20
SDK.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Your help will be heighly=20
appreciated.</FONT></DIV></BODY></HTML>

------=_NextPart_000_0005_01C2F79A.8094B9D0--



