Re: [cp-patches] FYI: javax.tools stuff

2008-01-09 Thread Michael Koch
On Wed, Jan 09, 2008 at 11:13:00PM +0100, Roman Kennke wrote:
> I'm beginning the implementation of javax.tools with two interfaces.
> 
> 2006-01-09  Roman Kennke  <[EMAIL PROTECTED]>
> 
>   * javax/tools/Diagnostic.java,
>   * javax/tools/DiagnosticListener.java:
>   New interfaces.

Hmmm, that doesnt fit the patch below somehow ;-)


Cheers,
Michael

> /Roman
> 
> -- 
> http://kennke.org/blog/

> Index: gnu/java/awt/peer/x/XWindowPeer.java
> ===
> RCS file: /cvsroot/classpath/classpath/gnu/java/awt/peer/x/XWindowPeer.java,v
> retrieving revision 1.5
> diff -u -1 -0 -r1.5 XWindowPeer.java
> --- gnu/java/awt/peer/x/XWindowPeer.java  20 Sep 2007 14:01:09 -  
> 1.5
> +++ gnu/java/awt/peer/x/XWindowPeer.java  9 Jan 2008 22:05:08 -
> @@ -54,20 +54,21 @@
>  import java.awt.Rectangle;
>  import java.awt.event.PaintEvent;
>  import java.awt.event.WindowEvent;
>  import java.awt.image.VolatileImage;
>  
>  import gnu.x11.Atom;
>  import gnu.x11.Window;
>  import gnu.x11.event.Event;
>  
>  import gnu.java.awt.font.OpenTypeFontPeer;
> +import gnu.java.awt.peer.ClasspathFontPeer;
>  import gnu.java.awt.peer.swing.SwingWindowPeer;
>  
>  public class XWindowPeer
>  extends SwingWindowPeer
>  {
>  
>private static int standardSelect = Event.BUTTON_PRESS_MASK
>| Event.BUTTON_RELEASE_MASK
>| Event.POINTER_MOTION_MASK
>//| Event.RESIZE_REDIRECT_MASK
> @@ -283,22 +284,21 @@
>  return (Insets) insets.clone();
>}
>  
>/**
> * Returns the font metrics for the specified font.
> *
> * @return the font metrics for the specified font
> */
>public FontMetrics getFontMetrics(Font font)
>{
> -// FIXME: Fix this for X fonts.
> -OpenTypeFontPeer fontPeer = (OpenTypeFontPeer) font.getPeer();
> +ClasspathFontPeer fontPeer = (ClasspathFontPeer) font.getPeer();
>  return fontPeer.getFontMetrics(font);
>}
>  
>/**
> * Unregisters the window in the event pump when it is closed.
> */
>protected void finalize()
>{
>  XGraphicsDevice dev = XToolkit.getDefaultDevice();
>  dev.getEventPump().unregisterWindow(xwindow);




[cp-patches] Fix alsa support with GCC 4.2

2007-09-08 Thread Michael Koch
Hello list,


I just committed the attached patch. It removes the @ERROR_CFLAGS@
variable from AM_CFLAGS in native/jni/midi-alsa/Makefile.am. In general
it would be possible to suppress the warning with -Wno-address. But this
option was introduced with GCC 4.2 and earlier versions fail because
they dont know that option.


Cheers,
Michael


2007-09-08  Michael Koch  <[EMAIL PROTECTED]>

* native/jni/midi-alsa/Makefile.am (AM_CFLAGS):
Removed @ERROR_CFLAGS@ to not fail build with GCC 4.2.
Index: native/jni/midi-alsa/Makefile.am
===
RCS file: /sources/classpath/classpath/native/jni/midi-alsa/Makefile.am,v
retrieving revision 1.5
diff -a -u -r1.5 Makefile.am
--- native/jni/midi-alsa/Makefile.am	5 Apr 2007 12:05:48 -	1.5
+++ native/jni/midi-alsa/Makefile.am	8 Sep 2007 07:00:28 -
@@ -8,5 +8,5 @@
 libgjsmalsa_la_LDFLAGS = $(AM_LDFLAGS) -avoid-version
 
 AM_LDFLAGS = @CLASSPATH_MODULE@
-AM_CPPFLAGS = @CLASSPATH_INCLUDES@ `pkg-config  --cflags-only-I alsa`
-AM_CFLAGS = @WARNING_CFLAGS@ @STRICT_WARNING_CFLAGS@ @ERROR_CFLAGS@ `pkg-config --cflags-only-other alsa`
+AM_CPPFLAGS = @CLASSPATH_INCLUDES@ `pkg-config --cflags-only-I alsa`
+AM_CFLAGS = @WARNING_CFLAGS@ @STRICT_WARNING_CFLAGS@ `pkg-config --cflags-only-other alsa`


Re: [cp-patches] Guidelines for annotations?

2007-03-09 Thread Michael Koch
On Fri, Mar 09, 2007 at 12:05:42PM -0800, Keith Seitz wrote:
> Tom Tromey wrote:
> >>>>>>"Mario" == Mario Torre <[EMAIL PROTECTED]> writes:
> >
> >>>@Override
> >>>public void foo(); 
> >
> >Me too.  Three votes... maybe the motion passes?  :)
> 
> So that's several votes for this style already. One last question: what 
> about comments/javadoc?
> 
> 1) Before
> @Override
> /**
>  * foo
>  */
> 
> 2) After
> /**
>  * foo
>  */
> @Override
> 
> I presume most people would prefer #1?

+1 for 2.


Michael
-- 
 .''`.  | Michael Koch <[EMAIL PROTECTED]>
: :' :  | Free Java Developer <http://www.classpath.org>
`. `'   |
  `-| 1024D/BAC5 4B28 D436 95E6 F2E0 BD11 5923 A008 2763 483B



Re: [cp-patches] Guidelines for annotations?

2007-03-09 Thread Michael Koch
On Fri, Mar 09, 2007 at 08:25:37PM +0100, Mario Torre wrote:
> Il giorno ven, 09/03/2007 alle 10.35 -0800, Keith Seitz ha scritto:
> 
> > @Override
> > public void foo(); 
> 
> I suggest this one. It seems more clear to me.

+1


Cheers,
Michael
-- 
 .''`.  | Michael Koch <[EMAIL PROTECTED]>
: :' :  | Free Java Developer <http://www.classpath.org>
`. `'   |
  `-| 1024D/BAC5 4B28 D436 95E6 F2E0 BD11 5923 A008 2763 483B



Re: [cp-patches] FYI: JTable fixlet:Mail Message possibly broken?

2006-07-25 Thread Michael Koch
On Tue, Jul 25, 2006 at 08:42:58AM +0200, Audrius Meskauskas wrote:
> The Thunderbird cannot open the attached patch which should be even not 
> compressed. I can easily open all other patches, including the patch on 
> LightweightDispatcher form Roman today. I would suggest to resend for 
> the peace of mind.

Its a 0-byte diff. This just means "no changes". :-)


Michael
-- 
http://www.worldforge.org/



Re: [cp-patches] java.net.URL.getContent(Class[]) implementation

2006-07-20 Thread Michael Koch
On Wed, Jul 19, 2006 at 07:53:08PM -0400, Thomas Minor wrote:
> Hello,
> 
> The following (probably previously overlooked) patch implements
> java.net.URL.getContent(Class[]) correctly, as specified by the
> API.
> 
> Thomas
> 
> 
> 
> Index: URL.java
> ===
> RCS file: /sources/classpath/classpath/java/net/URL.java,v
> retrieving revision 1.54
> diff -u -r1.54 URL.java
> --- URL.java20 Jun 2006 21:31:37 -  1.54
> +++ URL.java19 Jul 2006 23:48:02 -
> @@ -545,8 +545,7 @@
>*/
>   public Object getContent(Class[] classes) throws IOException
>   {
> -// FIXME: implement this
> -return getContent();
> +return openConnection.getContent(classes);

Do you mean this?

return openConnection().getContent(classes);


Cheers,
Michael
-- 
http://www.worldforge.org/



Re: [cp-patches] java.io.Window method deprecation

2006-07-17 Thread Michael Koch
On Mon, Jul 17, 2006 at 08:07:21AM -0600, Tom Tromey wrote:
> >>>>> "Michael" == Michael Koch <[EMAIL PROTECTED]> writes:
> 
> Michael> You should add "1.5" when a method gets deprecated int Java 1.5.
> 
> You mean something like '@specnote this method was deprecated in 1.5"?
> Or perhaps in the @deprecated?

Something like:

@deprecated 1.5 Some reason.


Michael
-- 
http://www.worldforge.org/



Re: [cp-patches] java.io.Window method deprecation

2006-07-16 Thread Michael Koch
On Sun, Jul 16, 2006 at 08:50:33PM -0400, Thomas Minor wrote:
> Hi,
> 
> This simple patch deprecates Window.show() and Window.hide()
> methods as specified in the Java 1.5 javadocs. Also, I added
> some small documentation to the hide() method.

You should add "1.5" when a method gets deprecated int Java 1.5.

And the the newline between the hide() method and its javadoc might
confuse gjdoc. This should be removed.

Otherwise this patch is great.


Cheers,
Michael
-- 
http://www.worldforge.org/



Re: [cp-patches] FYI: X peers

2006-07-01 Thread Michael Koch
On Sat, Jul 01, 2006 at 08:22:46PM +1000, Raif S. Naffah wrote:
> hello Michael,
> 
> On Saturday 01 July 2006 20:05, Michael Koch wrote:
> > On Sat, Jul 01, 2006 at 10:33:10AM +0200, Roman Kennke wrote:
> > > Am Samstag, den 01.07.2006, 09:24 +1000 schrieb Raif S. Naffah:
> > > > On Friday 30 June 2006 01:27, Roman Kennke wrote:
> > > > > I checked in the Escher-based X peers and added some configury
> > > > > for enabling it. To build the X peers you need the most recent
> > > > > Escher library, to be found here:
> > > > >
> > > > > http://kennke.org/~roman/escher-0.3.0.jar
> > > > >
> > > > > Configure with: --with-escher=/path/to/escher-0.3.0.jar
> > > > > --enable-local-sockets
> > > >
> > > > would it make sense to create a new folder, say "external-jars"
> > > > and include the latest escher (and other java-only external
> > > > dependencies) jar(s) there.  --with-escher can use that
> > > > jar/location by default, otherwise the full path to a
> > > > distro's/user's location of that jar can be fed to configure.
> > >
> > > This makes sense. I am all for it.
> > >
> > > Mark proposed to put jars that are (optionally) needed for
> > > classpath on http://builder.classpath.org/ somewhere. What do
> > > others think?
> >
> > Don't put jars without sources into classpath releases. Otherwise
> > Distros will need to alter the upstream tarball and remove this. And
> > altering removes the feature that people can easily check if the
> > upstream sources used by a distro is really what upstream released.
> 
> would including the jar of the sources --e.g. escher-0.3.0.jar and 
> escher-0.3.0-src.jar-- address that concern.

Not for Debian as this makes it impossible to patch security issues
easily.


Cheers,
Michael
-- 
http://www.worldforge.org/



Re: [cp-patches] FYI: X peers

2006-07-01 Thread Michael Koch
On Sat, Jul 01, 2006 at 10:33:10AM +0200, Roman Kennke wrote:
> Hi Raif,
> 
> Am Samstag, den 01.07.2006, 09:24 +1000 schrieb Raif S. Naffah:
> > hello Roman,
> > 
> > On Friday 30 June 2006 01:27, Roman Kennke wrote:
> > > I checked in the Escher-based X peers and added some configury for
> > > enabling it. To build the X peers you need the most recent Escher
> > > library, to be found here:
> > >
> > > http://kennke.org/~roman/escher-0.3.0.jar
> > >
> > > Configure with: --with-escher=/path/to/escher-0.3.0.jar
> > > --enable-local-sockets
> > 
> > would it make sense to create a new folder, say "external-jars" and 
> > include the latest escher (and other java-only external dependencies) 
> > jar(s) there.  --with-escher can use that jar/location by default, 
> > otherwise the full path to a distro's/user's location of that jar can 
> > be fed to configure.
> 
> This makes sense. I am all for it.
> 
> Mark proposed to put jars that are (optionally) needed for classpath on
> http://builder.classpath.org/ somewhere. What do others think?

Don't put jars without sources into classpath releases. Otherwise
Distros will need to alter the upstream tarball and remove this. And
altering removes the feature that people can easily check if the
upstream sources used by a distro is really what upstream released.


Michael
-- 
http://www.worldforge.org/



Re: [cp-patches] X/Escher peers

2006-06-30 Thread Michael Koch
On Thu, Jun 29, 2006 at 11:28:52PM +0100, Andrew John Hughes wrote:
> I second that.  Putting it in external/ would be best, at least until
> the distributions pick up on it and start including it in a uniform way.

I second that too. But please do it in a way where distros can decide
the use the one in external/ or the system installed escher.


Michael
-- 
http://www.worldforge.org/



Re: [cp-patches] RFC: GConf preference api backend

2006-06-20 Thread Michael Koch
On Tue, Jun 20, 2006 at 08:29:04PM +0200, Mario Torre wrote:
> Using a root of "/apps/java" makes it clear we are storing java things
> there, if Sun implements a GConf based backend (or if someone likes my
> standalone plugin :) they likely will use this name (apps is standard
> for application in GConf, java is actually the name of the application,
> all java application are registered as java, isn't it?).
> 
> Other than that, I have no objections against it, so changing this name
> is ok for me.

We normally avoid the term "java" as its a registered trademark. We
normally prefer the term "classpath" in our community.

There are other opinions like "Java is an island" (MJ Ray on
debian-legal ML).


Cheers,
Michael
-- 
http://www.worldforge.org/



Re: [cp-patches] RFC: GConf preference api backend

2006-06-18 Thread Michael Koch
On Sun, Jun 18, 2006 at 11:15:26AM +0200, Mark Wielaard wrote:
> Hi Michael,
> 
> On Sat, 2006-06-17 at 18:07 +0200, Michael Koch wrote:
> > As Mario has no CVS access yet I commited this for him.
> 
> If you commit something for someone else you MUST make sure that it
> compiles cleanly, even with --enable-Werror and --enable-regen-headers
> The following fixes the build:

Sigh. As Tom approved it and Mario told me its fine I just commited it.
Another excercise for me not to just do this. Isn't --enable-Werror the
default anyway?


Cheers,
Michael
-- 
http://www.worldforge.org/



Re: [cp-patches] RFC: GConf preference api backend

2006-06-17 Thread Michael Koch
On Fri, Jun 16, 2006 at 01:56:13PM -0400, Thomas Fitzsimmons wrote:
> Thanks for this contribution!  (FWIW, I wouldn't object if you wanted to 
> make this the default backend now).  Please commit,

As Mario has no CVS access yet I commited this for him.


Cheers,
Michael
-- 
http://www.worldforge.org/



Re: [cp-patches] RFC: AnnotationInvocationHandler

2006-06-08 Thread Michael Koch
On Thu, Jun 08, 2006 at 11:05:53AM +0200, Jeroen Frijters wrote:
> Hi,
> 
> As promised here is my cleaned up version of
> AnnotationInvocationHandler. I intend to check this into the trunk.

Thanks.

Please use a Unix file encoding when checking it in (line endings).


Cheers
Michael
-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/



Re: [cp-patches] [generics] Patch: RFC: import jsr166

2006-06-08 Thread Michael Koch
On Thu, Jun 08, 2006 at 10:34:57AM +0200, Jeroen Frijters wrote:
> Also, I've cleaned up my version of AnnotationInvocationHandler and will
> post it shortly.

That would be great, then I can post my jamvm patch to use this too.


Cheers,
Michael
-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/



Re: [cp-patches] FYI: rename libjawtgnu.so to libjawt.so

2006-05-26 Thread Michael Koch
On Fri, May 26, 2006 at 01:50:10PM -0400, Thomas Fitzsimmons wrote:
> Hi,
> 
> applications that use the AWT Native Interface refer to "libjawt.so". 
> For binary compatibility with other AWT Native Interface implementations 
> our .so must be named the same.
> 
> Note to packagers: libjawt.so should be installed in VM-specific 
> directory rather than directly in /usr/lib.  Proprietary VMs put their 
> libjawt.so implementations in VM-specific directories but search 
> /usr/lib first.  If GNU Classpath's libjawt.so is installed in /usr/lib 
> it will create problems for people using a proprietary VM to run AWT 
> Native Interface apps.

This should also be mentioned in the NEWS file.


Cheers,
Michael
-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/



Re: [cp-patches] FYI: Socket timeout impl and fix

2006-05-13 Thread Michael Koch
On Sat, May 13, 2006 at 05:11:16PM +0200, Sven de Marothy wrote:
> On Sat, 2006-05-13 at 16:58 +0200, Michael Koch wrote:
> 
> > AFAIK Linux is the only one. If we want to stay portable we need to use
> > select() and wait for the time of the timeout. In libgcj its already
> > handled this way. Thats the safest.
> 
> Actually, I don't think we need to stay portable though. 
> The JDK docs say: "Some non-standard implmentation of this method may
> ignore the specified timeout."
> 
> So.. Presumably, Solaris supports it too. But we don't need to though.
> 
> Anyway, this is still better than before when it didn't work at all :)

Well, it will still be broken an most if not all non-Linux Unices. Even
on older (2.4 or older) Linuxes it will be broken.


Michael
-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/



Re: [cp-patches] FYI: Socket timeout impl and fix

2006-05-13 Thread Michael Koch
On Sat, May 13, 2006 at 04:54:02PM +0200, Sven de Marothy wrote:
> On Sat, 2006-05-13 at 13:54 +0200, Robert Schuster wrote:
> > Hi,
> > could you test whether Socket.setSoTimeout() really sets the send and 
> > receive
> > timeout?
> > 
> 
> I did, and it seems to work fine for me (A difference in 3 minutes and
> 1 second timeout when you're setting it to 1 second is quite
> noticable). 
> 
> Note that from what I read though, not all socket implementations
> necessarily support this stuff.

AFAIK Linux is the only one. If we want to stay portable we need to use
select() and wait for the time of the timeout. In libgcj its already
handled this way. Thats the safest.


Michael
-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/



Re: [cp-patches] RFC: defaultLocale changes

2006-04-11 Thread Michael Koch
On Tue, Apr 11, 2006 at 05:40:17PM +0200, Christian Thalinger wrote:
> On Wed, Mar 22, 2006 at 11:23:50AM +0100, Christian Thalinger wrote:
> > On Tue, 2006-03-14 at 16:56 +0100, Michael Koch wrote:
> > > Together with a mauve testcase that proves this I'm fine with it. :-)
> > > (as I told you on IRC)
> > 
> > Ok, I'm unable to write a mauve testcase for that.  The problem is:
> > 
> > $ cat test.java
> > import java.util.*;
> > 
> > public class test {
> > public static void main(String[] argv) {
> > System.out.println(Locale.getDefault());
> > }
> > }
> > 
> > [EMAIL PROTECTED]:~/src/cacao$ env | grep LANG
> > [EMAIL PROTECTED]:~/src/cacao$ cacao test
> > en
> > [EMAIL PROTECTED]:~/src/cacao$ java1.4 test
> > en_US
> > [EMAIL PROTECTED]:~/src/cacao$ cacao -Duser.country=YY test
> > en
> > [EMAIL PROTECTED]:~/src/cacao$ java1.4 -Duser.country=YY test
> > en_YY
> > 
> > That makes some problems in mauve tests.
> 
> Hey!
> 
> I really don't want to forget that bugfix...  Can we get that in?

Please do.


Cheers,
Michael
-- 
http://www.worldforge.org/



Re: [cp-patches] Re: RFC: gdkpixbuf looking vs main gdk lock

2006-03-26 Thread Michael Koch
On Mon, Mar 20, 2006 at 01:28:30PM -0500, Thomas Fitzsimmons wrote:
> On Mon, 2006-03-20 at 19:20 +0100, Mark Wielaard wrote:
> > Hi Rob,
> > 
> > On Mon, 2006-03-20 at 15:37 +, Robert Lougher wrote:
> > > On 3/20/06, Mark Wielaard <[EMAIL PROTECTED]> wrote:
> > > > Done. If you have a scroll mouse please try out WW2D with Cacao (I
> > > > didn't get it working with jamvm yet, which seems to crash after loading
> > > > jawt).
> > >
> > > What version of JamVM are you using (i.e. is it CVS or a released
> > > version)?  Can you give details as to how to reproduce?
> > 
> > Sorry for the vague "bug report". It is with the last release of jamvm
> > 1.4.2. To be really honest I cannot remember how to recreate the
> > libjawt.so from the one in /usr/local/classpath/lib/classpath
> > The jogl library is very specific in how it wants this named and loaded.
> > If you have that (Christian/Tom?) then you can replicate the issue with
> > the instructions (just replace cacao with jamvm) of
> > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=348504
> 
> We use this invocation in java-gcj-compat:
> 
> echo | gcc -shared -O2 -fPIC -o libjawt.so -Wl,-soname,libjawt.so -xc -
> -lgcjawt
> 
> to create a binary-compatible replacement for Sun's libjawt.so.  (Note
> that libgcj's version of libjawtgnu.so is called libgcjawt.so.  I would
> like to change this and have all free runtime environments standardize
> on the name libjawtgnu.so).

Why do we use another name then libjawt.so anyway? The lib is put into
$prefix/lib/classpath anyway and will never collide with SUNs. And we
dont need do such a hack as Tom mentioned for java-gcj-compat (which is
not really needed either, IMO). When classpath uses a different name
every runtime depending on it need do some hack to rename it to
libjawt.so again as real world apps do "System.loadLibrary("jawt");".


Cheers,
Michael
-- 
http://www.worldforge.org/



Re: [cp-patches] Generating jarsigner script

2006-03-26 Thread Michael Koch
On Sun, Mar 26, 2006 at 04:08:30PM +1100, Raif S. Naffah wrote:

> +# -* bash *-
> +
> +java gnu.classpath.tools.jarsigner.Main $@

You should add a a shebang line to this file:

#!/bin/sh

The questions is if we should hardcode "java" or better check for a java
executable in configure.ac and use $(JAVA) in the script.


> Index: configure.ac
> ===
> RCS file: /cvsroot/classpath/classpath/configure.ac,v
> retrieving revision 1.139
> diff -u -r1.139 configure.ac
> --- configure.ac  10 Mar 2006 01:36:10 -  1.139
> +++ configure.ac  26 Mar 2006 04:59:44 -
> @@ -248,6 +248,8 @@
>  AC_PROG_CC
>  AC_PROG_CPP
> 
> +AC_PATH_PROGS(BASH, bash sh)

I think we can depend on the fact that a posix compatible shell is
installed on the system when configure can be run. And there is no need
to depend on bash. We need no bashisms.

BTW: Its good that you start this discussion now as I soon want to
import my policytool replacement. ;-)


Cheers,
Michael
-- 
http://www.worldforge.org/



[cp-patches] [Patch] added support for CLDR 1.3 currency formats

2006-03-25 Thread Michael Koch
Hello list,


I commited the attached patch to cp-tools to add support for currency
formats in CLDR 1.3 that dont mention the format for negative currency
values explicitely.


Cheers,
Michael


2006-03-25  Michael Koch  <[EMAIL PROTECTED]>

* src/gnu/localegen/PropertiesGenerator.java:
Implemented handling of currencyFormats that don't explicitely contain
format for negative values.

Index: src/gnu/localegen/PropertiesGenerator.java
===
RCS file: 
/sources/classpath/cp-tools/src/gnu/localegen/PropertiesGenerator.java,v
retrieving revision 1.3
diff -u -r1.3 PropertiesGenerator.java
--- src/gnu/localegen/PropertiesGenerator.java  21 May 2005 21:26:43 -  
1.3
+++ src/gnu/localegen/PropertiesGenerator.java  25 Mar 2006 23:05:57 -
@@ -1,5 +1,5 @@
 /*
- * gnu.localegen.PropertiesGenerator Copyright (C) 2005
+ * gnu.localegen.PropertiesGenerator Copyright (C) 2006
  * Free Software Foundation, Inc.
  *
  * This file is part of GNU Classpath.
@@ -437,6 +437,22 @@
 this.locale = locale;
   }
 
+  public void addCurrencyFormatContent(Hashtable tree)
+  {
+DataElement data_elt =
+  (DataElement) 
tree.get("ldml.numbers.currencyFormats.currencyFormatLength.currencyFormat.pattern");
+
+if (data_elt == null)
+  return;
+
+String data = data_elt.data;
+
+if (data.indexOf(";") == -1)
+  data += ";-" + data;
+
+localeContents.add(new StringContent("currencyFormat", data));
+  }
+
   public void addStringContent(Hashtable tree, String ref, String name)
   {
 DataElement data_elt = (DataElement) tree.get(ref);
@@ -652,10 +668,7 @@
  flattree,
  
"ldml.numbers.percentFormats.percentFormatLength.percentFormat.pattern",
  "percentFormat");
-addStringContent(
- flattree,
- 
"ldml.numbers.currencyFormats.currencyFormatLength.currencyFormat.pattern",
- "currencyFormat");
+addCurrencyFormatContent(flattree);
 addStringContent(flattree, "ldml.dates.localizedPatternChars",
  "localPatternChars");
 computeCurrencies(flattree);


[cp-patches] [Patch] randome locale data udpates

2006-03-25 Thread Michael Koch
Hello,


I forgot to commit some randome fixes to our locale data earlier.


Cheers,
Michael


2006-03-25  Michael Koch  <[EMAIL PROTECTED]>

* resource/gnu/java/locale/LocaleInformation_fa.properties,
resource/gnu/java/locale/LocaleInformation_kn.properties,
resource/gnu/java/locale/LocaleInformation_kn_IN.properties,
resource/gnu/java/locale/LocaleInformation_ko.properties,
resource/gnu/java/locale/LocaleInformation_sl.properties,
resource/gnu/java/locale/LocaleInformation_so.properties,
resource/gnu/java/locale/LocaleInformation_so_DJ.properties,
resource/gnu/java/locale/LocaleInformation_so_ET.properties,
resource/gnu/java/locale/LocaleInformation_so_SO.properties,
resource/gnu/java/locale/LocaleInformation_sr.properties:
Random fixes I forgot to commit before.

Index: resource/gnu/java/locale/LocaleInformation_fa.properties
===
RCS file: 
/sources/classpath/classpath/resource/gnu/java/locale/LocaleInformation_fa.properties,v
retrieving revision 1.5
diff -u -r1.5 LocaleInformation_fa.properties
--- resource/gnu/java/locale/LocaleInformation_fa.properties25 Mar 2006 
20:06:20 -  1.5
+++ resource/gnu/java/locale/LocaleInformation_fa.properties25 Mar 2006 
20:12:08 -
@@ -12,7 +12,6 @@
 decimalSeparator=\u066b
 groupingSeparator=\u066c
 percentFormat='\u202a'%#,##0'\u202c'
-currenciesDisplayName.AFA=\u0627\u0641\u063a\u0627\u0646\u06cc
 currencyFormat=#,##0.00 \u00a4;'\u202a'-#,##0.00'\u202c' \u00a4
 currenciesDisplayName.CHF=\u0641\u0631\u0627\u0646\u06a9 
\u0633\u0648\u0626\u06cc\u0633
 currenciesDisplayName.AUD=\u062f\u0644\u0627\u0631 
\u0627\u0633\u062a\u0631\u0627\u0644\u06cc\u0627
Index: resource/gnu/java/locale/LocaleInformation_kn.properties
===
RCS file: 
/sources/classpath/classpath/resource/gnu/java/locale/LocaleInformation_kn.properties,v
retrieving revision 1.1
diff -u -r1.1 LocaleInformation_kn.properties
--- resource/gnu/java/locale/LocaleInformation_kn.properties19 May 2005 
06:44:27 -  1.1
+++ resource/gnu/java/locale/LocaleInformation_kn.properties25 Mar 2006 
20:12:08 -
@@ -5,7 +5,7 @@
 #
 # This file was automatically generated by gnu.localegen from CLDR.
 
-currenciesSymbol.INR=\u0930\u0941
+currenciesSymbol.INR=\u0cb0\u0cc2
 
shortMonths=\u0c9c\u0ca8\u0cb5\u0cb0\u0cc0®\u0cab\u0cc6\u0cac\u0ccd\u0cb0\u0cb5\u0cb0\u0cc0®\u0cae\u0cbe\u0cb0\u0ccd\u0c9a\u0ccd®\u0c8e\u0caa\u0ccd\u0cb0\u0cbf\u0cb2\u0ccd®\u0cae\u0cc6®\u0c9c\u0cc2\u0ca8\u0ccd®\u0c9c\u0cc1\u0cb2\u0cc8®\u0c86\u0c97\u0cb8\u0ccd\u0c9f\u0ccd®\u0cb8\u0caa\u0ccd\u0c9f\u0cc6\u0c82\u0cac\u0cb0\u0ccd®\u0c85\u0c95\u0ccd\u0c9f\u0ccb\u0cac\u0cb0\u0ccd®\u0ca8\u0cb5\u0cc6\u0c82\u0cac\u0cb0\u0ccd®\u0ca1\u0cbf\u0cb8\u0cc6\u0c82\u0cac\u0cb0\u0ccd®®
 
months=\u0c9c\u0ca8\u0cb5\u0cb0\u0cc0®\u0cab\u0cc6\u0cac\u0ccd\u0cb0\u0cb5\u0cb0\u0cc0®\u0cae\u0cbe\u0cb0\u0ccd\u0c9a\u0ccd®\u0c8e\u0caa\u0ccd\u0cb0\u0cbf\u0cb2\u0ccd®\u0cae\u0cc6®\u0c9c\u0cc2\u0ca8\u0ccd®\u0c9c\u0cc1\u0cb2\u0cc8®\u0c86\u0c97\u0cb8\u0ccd\u0c9f\u0ccd®\u0cb8\u0caa\u0ccd\u0c9f\u0cc6\u0c82\u0cac\u0cb0\u0ccd®\u0c85\u0c95\u0ccd\u0c9f\u0ccb\u0cac\u0cb0\u0ccd®\u0ca8\u0cb5\u0cc6\u0c82\u0cac\u0cb0\u0ccd®\u0ca1\u0cbf\u0cb8\u0cc6\u0c82\u0cac\u0cb0\u0ccd®®
 
shortWeekdays=®\u0cb0.®\u0cb8\u0ccb.®\u0cae\u0c82.®\u0cac\u0cc1.®\u0c97\u0cc1.®\u0cb6\u0cc1.®\u0cb6\u0ca8\u0cbf.®
Index: resource/gnu/java/locale/LocaleInformation_kn_IN.properties
===
RCS file: 
/sources/classpath/classpath/resource/gnu/java/locale/LocaleInformation_kn_IN.properties,v
retrieving revision 1.2
diff -u -r1.2 LocaleInformation_kn_IN.properties
--- resource/gnu/java/locale/LocaleInformation_kn_IN.properties 25 Mar 2006 
20:06:20 -  1.2
+++ resource/gnu/java/locale/LocaleInformation_kn_IN.properties 25 Mar 2006 
20:12:08 -
@@ -5,7 +5,7 @@
 #
 # This file was automatically generated by gnu.localegen from CLDR.
 
-percentFormat=##,##,##0%
+percentFormat=#,##,##0%
 currencyFormat=\u00a4 #,##,##0.00;-\u00a4 #,##,##0.00
 firstDayOfWeek=mon
 shortDateFormat=d-M-yy
Index: resource/gnu/java/locale/LocaleInformation_ko.properties
===
RCS file: 
/sources/classpath/classpath/resource/gnu/java/locale/LocaleInformation_ko.properties,v
retrieving revision 1.3
diff -u -r1.3 LocaleInformation_ko.properties
--- resource/gnu/java/locale/LocaleInformation_ko.properties18 Mar 2006 
08:29:08 -  1.3
+++ resource/gnu/java/locale/LocaleInformation_ko.properties25 Mar 2006 
20:12:08 -
@@ -239,14 +239,14 @@
 currenciesSymbol.MRO=UM
 currenciesSymbol.KRW=\uffe6
 currenciesSymbol.IEP=IR\u00a3
+currenciesSymbol.ITL=ITL
+currenciesSymbol.USD=US$
 
shortMonths=1\uc6d4®2\uc6d4®3\uc6d4®4\uc6d4®5\uc6d4®6\uc6d

[cp-patches] [Patch] currency formats in locale data

2006-03-25 Thread Michael Koch
Hi list,


I updated our locale data to have the fixed currency formats from
CLDR 1.3.


Cheers,
Michael


2006-03-25  Michael Koch  <[EMAIL PROTECTED]>

* resource/gnu/java/locale/LocaleInformation_ar_JO.properties,
resource/gnu/java/locale/LocaleInformation_ar_QA.properties,
resource/gnu/java/locale/LocaleInformation_ar_SA.properties,
resource/gnu/java/locale/LocaleInformation_ar_SY.properties,
resource/gnu/java/locale/LocaleInformation_ar_TN.properties,
resource/gnu/java/locale/LocaleInformation_ar_YE.properties,
resource/gnu/java/locale/LocaleInformation_as_IN.properties,
resource/gnu/java/locale/LocaleInformation_be_BY.properties,
resource/gnu/java/locale/LocaleInformation_bn_IN.properties,
resource/gnu/java/locale/LocaleInformation_en.properties,
resource/gnu/java/locale/LocaleInformation_en_IN.properties,
resource/gnu/java/locale/LocaleInformation_en_PK.properties,
resource/gnu/java/locale/LocaleInformation_en_US_POSIX.properties,
resource/gnu/java/locale/LocaleInformation_es_PY.properties,
resource/gnu/java/locale/LocaleInformation_fa.properties,
resource/gnu/java/locale/LocaleInformation_fa_AF.properties,
resource/gnu/java/locale/LocaleInformation_fa_IR.properties,
resource/gnu/java/locale/LocaleInformation_gu_IN.properties,
resource/gnu/java/locale/LocaleInformation_hi_IN.properties,
resource/gnu/java/locale/LocaleInformation_ja_JP.properties,
resource/gnu/java/locale/LocaleInformation_kn_IN.properties,
resource/gnu/java/locale/LocaleInformation_mr_IN.properties,
resource/gnu/java/locale/LocaleInformation_or_IN.properties,
resource/gnu/java/locale/LocaleInformation_pa.properties,
resource/gnu/java/locale/LocaleInformation_pa_IN.properties,
resource/gnu/java/locale/LocaleInformation_ps_AF.properties,
resource/gnu/java/locale/LocaleInformation_ru_RU.properties,
resource/gnu/java/locale/LocaleInformation_sa.properties,
resource/gnu/java/locale/LocaleInformation_sa_IN.properties,
resource/gnu/java/locale/LocaleInformation_ta_IN.properties,
resource/gnu/java/locale/LocaleInformation_te_IN.properties:
Updated currency formats.

Index: resource/gnu/java/locale/LocaleInformation_ar_JO.properties
===
RCS file: 
/sources/classpath/classpath/resource/gnu/java/locale/LocaleInformation_ar_JO.properties,v
retrieving revision 1.1
diff -u -r1.1 LocaleInformation_ar_JO.properties
--- resource/gnu/java/locale/LocaleInformation_ar_JO.properties 19 May 2005 
06:44:27 -  1.1
+++ resource/gnu/java/locale/LocaleInformation_ar_JO.properties 25 Mar 2006 
20:04:58 -
@@ -5,7 +5,6 @@
 #
 # This file was automatically generated by gnu.localegen from CLDR.
 
-currencyFormat=\u00a4 #,##0.000;\u00a4 #,##0.000-
 shortMonths=\u0643\u0627\u0646\u0648\u0646 
\u0627\u0644\u062b\u0627\u0646\u064a®\u0634\u0628\u0627\u0637®\u0622\u0630\u0627\u0631®\u0646\u064a\u0633\u0627\u0646®\u0623\u064a\u0627\u0631®\u062d\u0632\u064a\u0631\u0627\u0646®\u062a\u0645\u0648\u0632®\u0622\u0628®\u0623\u064a\u0644\u0648\u0644®\u062a\u0634\u0631\u064a\u0646
 \u0627\u0644\u0623\u0648\u0644®\u062a\u0634\u0631\u064a\u0646 
\u0627\u0644\u062b\u0627\u0646\u064a®\u0643\u0627\u0646\u0648\u0646 
\u0627\u0644\u0623\u0648\u0644®®
 months=\u0643\u0627\u0646\u0648\u0646 
\u0627\u0644\u062b\u0627\u0646\u064a®\u0634\u0628\u0627\u0637®\u0622\u0630\u0627\u0631®\u0646\u064a\u0633\u0627\u0646®\u0623\u064a\u0627\u0631®\u062d\u0632\u064a\u0631\u0627\u0646®\u062a\u0645\u0648\u0632®\u0622\u0628®\u0623\u064a\u0644\u0648\u0644®\u062a\u0634\u0631\u064a\u0646
 \u0627\u0644\u0623\u0648\u0644®\u062a\u0634\u0631\u064a\u0646 
\u0627\u0644\u062b\u0627\u0646\u064a®\u0643\u0627\u0646\u0648\u0646 
\u0627\u0644\u0623\u0648\u0644®®
 
shortWeekdays=®\u0627\u0644\u0623\u062d\u062f®\u0627\u0644\u0627\u062b\u0646\u064a\u0646®\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621®\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621®\u0627\u0644\u062e\u0645\u064a\u0633®\u0627\u0644\u062c\u0645\u0639\u0629®\u0627\u0644\u0633\u0628\u062a®
Index: resource/gnu/java/locale/LocaleInformation_ar_QA.properties
===
RCS file: 
/sources/classpath/classpath/resource/gnu/java/locale/LocaleInformation_ar_QA.properties,v
retrieving revision 1.1
diff -u -r1.1 LocaleInformation_ar_QA.properties
--- resource/gnu/java/locale/LocaleInformation_ar_QA.properties 19 May 2005 
06:44:27 -  1.1
+++ resource/gnu/java/locale/LocaleInformation_ar_QA.properties 25 Mar 2006 
20:04:58 -
@@ -5,5 +5,5 @@
 #
 # This file was automatically generated by gnu.localegen from CLDR.
 
-currencyFormat=\u00a4###0.00;-\u00a4###0.00
+currencyFormat=\u00a4#0.00;-\u00a4#0.00
 
shortWeekdays=®\u0627\u0644\u0623\u062d\u062f®\u0627\u0644\u0627\u062b

[cp-patches] [Patch] removed locales for cldr 1.3 compatibility

2006-03-25 Thread Michael Koch
Hi list,


I commited the attached patch to remove the locales that gor removed in
CLDR 1.3.


Michael


2006-03-25  Michael Koch  <[EMAIL PROTECTED]>

* resource/gnu/java/locale/LocaleInformation_ar_IN.properties,
resource/gnu/java/locale/LocaleInformation_ar_IQ.properties,
resource/gnu/java/locale/LocaleInformation_ar_KW.properties,
resource/gnu/java/locale/LocaleInformation_ar_LY.properties,
resource/gnu/java/locale/LocaleInformation_mn_MN.properties,
resource/gnu/java/locale/LocaleInformation_uz_AF.properties:
Removed locales.

Index: resource/gnu/java/locale/LocaleInformation_ar_IN.properties
===
RCS file: resource/gnu/java/locale/LocaleInformation_ar_IN.properties
diff -N resource/gnu/java/locale/LocaleInformation_ar_IN.properties
--- resource/gnu/java/locale/LocaleInformation_ar_IN.properties 19 May 2005 
06:44:27 -  1.1
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,16 +0,0 @@
-# LocaleInformation_ar_IN.properties --
-# Copyright (C) 1991-2005 Unicode, Inc.
-# All rights reserved. Distributed under the Terms of Use
-# in http://www.unicode.org/copyright.html.
-#
-# This file was automatically generated by gnu.localegen from CLDR.
-
-percentFormat=##,##,##0%
-currencyFormat=\u00a4 ##,##,##0.00;-\u00a4 ##,##,##0.00
-firstDayOfWeek=mon
-shortDateFormat=d-M-yy
-mediumDateFormat=dd-MM-
-longDateFormat=d  
-fullDateFormat= d  
-longTimeFormat=h:mm:ss a z
-fullTimeFormat=h:mm:ss a z
Index: resource/gnu/java/locale/LocaleInformation_ar_IQ.properties
===
RCS file: resource/gnu/java/locale/LocaleInformation_ar_IQ.properties
diff -N resource/gnu/java/locale/LocaleInformation_ar_IQ.properties
--- resource/gnu/java/locale/LocaleInformation_ar_IQ.properties 19 May 2005 
06:44:27 -  1.1
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,8 +0,0 @@
-# LocaleInformation_ar_IQ.properties --
-# Copyright (C) 1991-2005 Unicode, Inc.
-# All rights reserved. Distributed under the Terms of Use
-# in http://www.unicode.org/copyright.html.
-#
-# This file was automatically generated by gnu.localegen from CLDR.
-
-currencyFormat=\u00a4 #,##0.000;\u00a4 #,##0.000-
Index: resource/gnu/java/locale/LocaleInformation_ar_KW.properties
===
RCS file: resource/gnu/java/locale/LocaleInformation_ar_KW.properties
diff -N resource/gnu/java/locale/LocaleInformation_ar_KW.properties
--- resource/gnu/java/locale/LocaleInformation_ar_KW.properties 19 May 2005 
06:44:27 -  1.1
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,8 +0,0 @@
-# LocaleInformation_ar_KW.properties --
-# Copyright (C) 1991-2005 Unicode, Inc.
-# All rights reserved. Distributed under the Terms of Use
-# in http://www.unicode.org/copyright.html.
-#
-# This file was automatically generated by gnu.localegen from CLDR.
-
-currencyFormat=\u00a4 #,##0.000;\u00a4 #,##0.000-
Index: resource/gnu/java/locale/LocaleInformation_ar_LY.properties
===
RCS file: resource/gnu/java/locale/LocaleInformation_ar_LY.properties
diff -N resource/gnu/java/locale/LocaleInformation_ar_LY.properties
--- resource/gnu/java/locale/LocaleInformation_ar_LY.properties 19 May 2005 
06:44:27 -  1.1
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,8 +0,0 @@
-# LocaleInformation_ar_LY.properties --
-# Copyright (C) 1991-2005 Unicode, Inc.
-# All rights reserved. Distributed under the Terms of Use
-# in http://www.unicode.org/copyright.html.
-#
-# This file was automatically generated by gnu.localegen from CLDR.
-
-currencyFormat=\u00a4 #,##0.000;\u00a4 #,##0.000-
Index: resource/gnu/java/locale/LocaleInformation_mn_MN.properties
===
RCS file: resource/gnu/java/locale/LocaleInformation_mn_MN.properties
diff -N resource/gnu/java/locale/LocaleInformation_mn_MN.properties
--- resource/gnu/java/locale/LocaleInformation_mn_MN.properties 19 May 2005 
06:44:28 -  1.1
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,9 +0,0 @@
-# LocaleInformation_mn_MN.properties --
-# Copyright (C) 1991-2005 Unicode, Inc.
-# All rights reserved. Distributed under the Terms of Use
-# in http://www.unicode.org/copyright.html.
-#
-# This file was automatically generated by gnu.localegen from CLDR.
-
-currenciesDisplayName.MNT=MNT
-currenciesSymbol.MNT=\u20ae
Index: resource/gnu/java/locale/LocaleInformation_uz_AF.properties
===
RCS file: resource/gnu/java/locale/LocaleInformation_uz_AF.properties
diff -N resource/gnu/java/locale/LocaleInformation_uz_AF.properties
--- resource/gnu/java/locale/LocaleInformation_uz_AF.properties 21 May 2005 
21:22:31 -  1.2
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,3

[cp-patches] [Patch] added news entry about cldr 1.3 update

2006-03-25 Thread Michael Koch
Hello list,


I added a news entry to our NEWS file that we now support CLDR 1.3.


Cheers,
Michael


2006-03-25  Michael Koch  <[EMAIL PROTECTED]>

* NEWS: Added item for CLDR 1.3 update.

Index: NEWS
===
RCS file: /sources/classpath/classpath/NEWS,v
retrieving revision 1.127
diff -u -r1.127 NEWS
--- NEWS24 Mar 2006 11:42:44 -  1.127
+++ NEWS25 Mar 2006 20:28:11 -
@@ -15,6 +15,7 @@
   and turned on as default Metal theme. X11-style Copy and Paste behavior in
   text components with the middle mouse button. Support cursor changes on
   various components when resizing.
+* Updated locale data information to CLDR 1.3.
 
 Runtime interface changes:
 


Re: [cp-patches] Re: [commit-cp] classpath ./ChangeLog gnu/java/lang/ClassHelper... [generics-branch]

2006-03-25 Thread Michael Koch
On Sat, Mar 25, 2006 at 04:41:02PM +, Andrew John Hughes wrote:
> On Sat, 2006-03-25 at 10:41 +0100, Mark Wielaard wrote:
> > Hi Andrew,
> > 
> > Nice to see you update the generics branch. But can you post to the
> > patches list when you do so others are kept in the loop? I am curious
> > why just this batch of patches.

Please go ahead with sending patch summarizes as you did in the past.
That is verbose and noisy enough. ;-)


Cheers,
Michael
-- 
http://www.worldforge.org/



Re: [cp-patches] [Patch] locale data update - part 2

2006-03-25 Thread Michael Koch
On Mon, Mar 20, 2006 at 03:33:42PM +0100, Mark Wielaard wrote:
> Hi Michael,
> 
> On Sun, 2006-03-19 at 22:40 +, Michael Koch wrote:
> > I just commited another update for the locale data update to CLDR 1.3.
> > The only things still missing is the update of the currency formats and
> > the new locales.
> 
> Could you take a quick look at the following regressions (and one
> improvement!) pointed out by builder.classpath.org?
> 
> On Mon, 2006-03-20 at 11:07 +, [EMAIL PROTECTED] wrote: 
> > Baseline from: Mon Mar 20 00:20:23 UTC 2006
> > 
> > Regressions:
> > FAIL: gnu.testlet.java.lang.Thread.sleep: Interrupted sleep (number 2)
> > FAIL: gnu.testlet.locales.LocaleTest: numberformats locale: fi_FI (number 1)
> > FAIL: gnu.testlet.locales.LocaleTest: numberformats locale: fi_FI (number 
> > 10)
> > FAIL: gnu.testlet.locales.LocaleTest: numberformats locale: fi_FI (number 
> > 11)
> > FAIL: gnu.testlet.locales.LocaleTest: numberformats locale: fi_FI (number 
> > 12)
> > FAIL: gnu.testlet.locales.LocaleTest: numberformats locale: fi_FI (number 
> > 15)
> > FAIL: gnu.testlet.locales.LocaleTest: numberformats locale: fi_FI (number 
> > 16)
> > FAIL: gnu.testlet.locales.LocaleTest: numberformats locale: fi_FI (number 
> > 17)
> > FAIL: gnu.testlet.locales.LocaleTest: numberformats locale: fi_FI (number 2)
> > FAIL: gnu.testlet.locales.LocaleTest: numberformats locale: fi_FI (number 
> > 20)
> > FAIL: gnu.testlet.locales.LocaleTest: numberformats locale: fi_FI (number 
> > 21)
> > FAIL: gnu.testlet.locales.LocaleTest: numberformats locale: fi_FI (number 
> > 22)
> > FAIL: gnu.testlet.locales.LocaleTest: numberformats locale: fi_FI (number 
> > 23)
> > FAIL: gnu.testlet.locales.LocaleTest: numberformats locale: fi_FI (number 
> > 24)
> > FAIL: gnu.testlet.locales.LocaleTest: numberformats locale: fi_FI (number 
> > 25)
> > FAIL: gnu.testlet.locales.LocaleTest: numberformats locale: fi_FI (number 5)
> > FAIL: gnu.testlet.locales.LocaleTest: numberformats locale: fi_FI (number 6)
> > FAIL: gnu.testlet.locales.LocaleTest: numberformats locale: fi_FI (number 7)
> > 
> > Improvements:
> > PASS: gnu.testlet.java.text.SimpleDateFormat.regress: CDT (number 1)
> 
> The sleep one seems spurious and not important. It certainly isn't
> caused by the locale update.

I commited a fixed test to mauve. The problem is that this testcase
checks that classpath returns the "correct" data are returned.
Unfortunately the old "correct" data were incorrect with.


Cheers,
Michael
-- 
http://www.worldforge.org/



[cp-patches] [Patch] locale data update - part 2

2006-03-19 Thread Michael Koch
Hello,


I just commited another update for the locale data update to CLDR 1.3.
The only things still missing is the update of the currency formats and
the new locales.


Cheers,
Michael


2006-03-19  Michael Koch  <[EMAIL PROTECTED]>

* resource/gnu/java/locale/LocaleInformation_aa_ET.properties,
resource/gnu/java/locale/LocaleInformation_am.properties,
resource/gnu/java/locale/LocaleInformation_am_ET.properties,
resource/gnu/java/locale/LocaleInformation_as_IN.properties,
resource/gnu/java/locale/LocaleInformation_az_Cyrl.properties,
resource/gnu/java/locale/LocaleInformation_bg.properties,
resource/gnu/java/locale/LocaleInformation_bn_IN.properties,
resource/gnu/java/locale/LocaleInformation_ca.properties,
resource/gnu/java/locale/LocaleInformation_cs.properties,
resource/gnu/java/locale/LocaleInformation_cy.properties,
resource/gnu/java/locale/LocaleInformation_da.properties,
resource/gnu/java/locale/LocaleInformation_de.properties,
resource/gnu/java/locale/LocaleInformation_dv.properties,
resource/gnu/java/locale/LocaleInformation_el.properties,
resource/gnu/java/locale/LocaleInformation_en.properties,
resource/gnu/java/locale/LocaleInformation_en_GB.properties,
resource/gnu/java/locale/LocaleInformation_en_IN.properties,
resource/gnu/java/locale/LocaleInformation_en_PK.properties,
resource/gnu/java/locale/LocaleInformation_en_SG.properties,
resource/gnu/java/locale/LocaleInformation_en_US_POSIX.properties,
resource/gnu/java/locale/LocaleInformation_es.properties,
resource/gnu/java/locale/LocaleInformation_es_AR.properties,
resource/gnu/java/locale/LocaleInformation_es_BO.properties,
resource/gnu/java/locale/LocaleInformation_es_CL.properties,
resource/gnu/java/locale/LocaleInformation_es_CO.properties,
resource/gnu/java/locale/LocaleInformation_es_CR.properties,
resource/gnu/java/locale/LocaleInformation_es_DO.properties,
resource/gnu/java/locale/LocaleInformation_es_EC.properties,
resource/gnu/java/locale/LocaleInformation_es_ES.properties,
resource/gnu/java/locale/LocaleInformation_es_GT.properties,
resource/gnu/java/locale/LocaleInformation_es_HN.properties,
resource/gnu/java/locale/LocaleInformation_es_MX.properties,
resource/gnu/java/locale/LocaleInformation_es_NI.properties,
resource/gnu/java/locale/LocaleInformation_es_PA.properties,
resource/gnu/java/locale/LocaleInformation_es_PE.properties,
resource/gnu/java/locale/LocaleInformation_es_PR.properties,
resource/gnu/java/locale/LocaleInformation_es_PY.properties,
resource/gnu/java/locale/LocaleInformation_es_SV.properties,
resource/gnu/java/locale/LocaleInformation_es_US.properties,
resource/gnu/java/locale/LocaleInformation_es_UY.properties,
resource/gnu/java/locale/LocaleInformation_es_VE.properties,
resource/gnu/java/locale/LocaleInformation_fa.properties,
resource/gnu/java/locale/LocaleInformation_fa_AF.properties,
resource/gnu/java/locale/LocaleInformation_fa_IR.properties,
resource/gnu/java/locale/LocaleInformation_fi.properties,
resource/gnu/java/locale/LocaleInformation_fr.properties,
resource/gnu/java/locale/LocaleInformation_fr_CA.properties,
resource/gnu/java/locale/LocaleInformation_ga.properties,
resource/gnu/java/locale/LocaleInformation_gu_IN.properties,
resource/gnu/java/locale/LocaleInformation_hi_IN.properties,
resource/gnu/java/locale/LocaleInformation_hr.properties,
resource/gnu/java/locale/LocaleInformation_hu.properties,
resource/gnu/java/locale/LocaleInformation_id.properties,
resource/gnu/java/locale/LocaleInformation_is.properties,
resource/gnu/java/locale/LocaleInformation_it.properties,
resource/gnu/java/locale/LocaleInformation_ja.properties,
resource/gnu/java/locale/LocaleInformation_kk.properties,
resource/gnu/java/locale/LocaleInformation_kl.properties,
resource/gnu/java/locale/LocaleInformation_km.properties,
resource/gnu/java/locale/LocaleInformation_ky.properties,
resource/gnu/java/locale/LocaleInformation_lo.properties,
resource/gnu/java/locale/LocaleInformation_lo_LA.properties,
resource/gnu/java/locale/LocaleInformation_lt.properties,
resource/gnu/java/locale/LocaleInformation_lt_LT.properties,
resource/gnu/java/locale/LocaleInformation_lv.properties,
resource/gnu/java/locale/LocaleInformation_mk.properties,
resource/gnu/java/locale/LocaleInformation_mn.properties,
resource/gnu/java/locale/LocaleInformation_mr.properties,
resource/gnu/java/locale/LocaleInformation_mr_IN.properties,
resource/gnu/java/locale/LocaleInformation_ms.properties,
re

[cp-patches] [Patch] locale data update - part 1

2006-03-18 Thread Michael Koch
Hello list,


I just commited the first part of the next locale data update
to CLDR 1.3. This patch updates localized strings for territories,
languages, variants, currency symbols and currency names.

More updates to come.

I dont attached the commited patch because it is too big
(it is 1.8 MB unzipped). You cna find the fill patch here:

http://www.kaffe.org/~mkoch/locale.diff.gz2


Cheers,
Michael


2006-03-18  Michael Koch  <[EMAIL PROTECTED]>

* resource/gnu/java/locale/LocaleInformation_aa.properties,
resource/gnu/java/locale/LocaleInformation_af.properties,
resource/gnu/java/locale/LocaleInformation_am.properties,
resource/gnu/java/locale/LocaleInformation_ar.properties,
resource/gnu/java/locale/LocaleInformation_az_Cyrl.properties,
resource/gnu/java/locale/LocaleInformation_be.properties,
resource/gnu/java/locale/LocaleInformation_bg.properties,
resource/gnu/java/locale/LocaleInformation_bn.properties,
resource/gnu/java/locale/LocaleInformation_ca.properties,
resource/gnu/java/locale/LocaleInformation_cs.properties,
resource/gnu/java/locale/LocaleInformation_cy.properties,
resource/gnu/java/locale/LocaleInformation_da.properties,
resource/gnu/java/locale/LocaleInformation_de.properties,
resource/gnu/java/locale/LocaleInformation_de_CH.properties,
resource/gnu/java/locale/LocaleInformation_dz.properties,
resource/gnu/java/locale/LocaleInformation_en.properties,
resource/gnu/java/locale/LocaleInformation_eo.properties,
resource/gnu/java/locale/LocaleInformation_es.properties,
resource/gnu/java/locale/LocaleInformation_et.properties,
resource/gnu/java/locale/LocaleInformation_eu.properties,
resource/gnu/java/locale/LocaleInformation_fa.properties,
resource/gnu/java/locale/LocaleInformation_fa_AF.properties,
resource/gnu/java/locale/LocaleInformation_fi.properties,
resource/gnu/java/locale/LocaleInformation_fo.properties,
resource/gnu/java/locale/LocaleInformation_fr.properties,
resource/gnu/java/locale/LocaleInformation_ga.properties,
resource/gnu/java/locale/LocaleInformation_gl.properties,
resource/gnu/java/locale/LocaleInformation_gu.properties,
resource/gnu/java/locale/LocaleInformation_he.properties,
resource/gnu/java/locale/LocaleInformation_hi.properties,
resource/gnu/java/locale/LocaleInformation_hr.properties,
resource/gnu/java/locale/LocaleInformation_hu.properties,
resource/gnu/java/locale/LocaleInformation_hy.properties,
resource/gnu/java/locale/LocaleInformation_id.properties,
resource/gnu/java/locale/LocaleInformation_is.properties,
resource/gnu/java/locale/LocaleInformation_it.properties,
resource/gnu/java/locale/LocaleInformation_ja.properties,
resource/gnu/java/locale/LocaleInformation_ka.properties,
resource/gnu/java/locale/LocaleInformation_km.properties,
resource/gnu/java/locale/LocaleInformation_ko.properties,
resource/gnu/java/locale/LocaleInformation_lo.properties,
resource/gnu/java/locale/LocaleInformation_lt.properties,
resource/gnu/java/locale/LocaleInformation_lv.properties,
resource/gnu/java/locale/LocaleInformation_mk.properties,
resource/gnu/java/locale/LocaleInformation_mr.properties,
resource/gnu/java/locale/LocaleInformation_ms.properties,
resource/gnu/java/locale/LocaleInformation_mt.properties,
resource/gnu/java/locale/LocaleInformation_nb.properties,
resource/gnu/java/locale/LocaleInformation_nl.properties,
resource/gnu/java/locale/LocaleInformation_nn.properties,
resource/gnu/java/locale/LocaleInformation_om.properties,
resource/gnu/java/locale/LocaleInformation_pl.properties,
resource/gnu/java/locale/LocaleInformation_ps.properties,
resource/gnu/java/locale/LocaleInformation_pt.properties,
resource/gnu/java/locale/LocaleInformation_pt_PT.properties,
resource/gnu/java/locale/LocaleInformation_ro.properties,
resource/gnu/java/locale/LocaleInformation_ru.properties,
resource/gnu/java/locale/LocaleInformation_sk.properties,
resource/gnu/java/locale/LocaleInformation_sl.properties,
resource/gnu/java/locale/LocaleInformation_so.properties,
resource/gnu/java/locale/LocaleInformation_sq.properties,
resource/gnu/java/locale/LocaleInformation_sr.properties,
resource/gnu/java/locale/LocaleInformation_sr_Latn.properties,
resource/gnu/java/locale/LocaleInformation_sv.properties,
resource/gnu/java/locale/LocaleInformation_sw.properties,
resource/gnu/java/locale/LocaleInformation_ta.properties,
resource/gnu/java/locale/LocaleInformation_te.properties,
resource/gnu/java/locale/LocaleInformation_th.properties,
resource/gnu/java/

Re: [cp-patches] RFC: defaultLocale changes

2006-03-14 Thread Michael Koch
On Tue, Mar 14, 2006 at 01:12:06PM +0100, Christian Thalinger wrote:
> On Fri, Mar 10, 2006 at 03:38:02PM +0100, Christian Thalinger wrote:
> > Hi!
> > 
> > We had a problem with a mauve testlet which turned out to be related to
> > the default locale.  CACAO sets the user.country property instead of
> > the user.region per default.  Some websearch
> > (http://www.kaffe.org/pipermail/kaffe/2004-April/097806.html) and some
> > testing with sun's 1.5 showed that sun sets the default locale to en_US
> > when no LANG env is found and uses user.country, but prioritize
> > user.region is defined on the commandline.  This patch changes our
> > behaviour.
> > 
> > Ok to commit?
> 
> So, am I ignored as always? :-)

Together with a mauve testcase that proves this I'm fine with it. :-)
(as I told you on IRC)


Michael
-- 
http://www.worldforge.org/



Re: [cp-patches] RFC:Collation rules for Lithuanian locale

2006-03-09 Thread Michael Koch
On Thu, Mar 09, 2006 at 08:10:32PM +0100, Audrius Meskauskas wrote:
> Index: resource/gnu/java/locale/LocaleInformation_lt.properties
> ===
> RCS file: 
> /sources/classpath/classpath/resource/gnu/java/locale/LocaleInformation_lt.properties,v
> retrieving revision 1.1
> diff -u -r1.1 LocaleInformation_lt.properties
> --- resource/gnu/java/locale/LocaleInformation_lt.properties  19 May 2005 
> 06:44:28 -  1.1
> +++ resource/gnu/java/locale/LocaleInformation_lt.properties  9 Mar 2006 
> 19:01:08 -
> @@ -21,6 +21,7 @@
>  mediumDateFormat=.MM.dd
>  longDateFormat= 'm.'  d 'd.'
>  fullDateFormat= 'm.'  d 'd.',
> +collation_rules=<0<1<2<3<4<5<6<7<8<9 ,\u010c  ,\u012eterritories.TL=Ryt\u0173 Timoras
>  territories.TK=Tokelau
>  territories.TJ=Tad\u017eikija

Note that these files are autogenerated and this fix might be
accidentally removed on next update. Its better to submit your fixes
upstream at www.unicode.org.


Cheers,
Michael
-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/



[cp-patches] [Patch] java.net.Proxy

2006-03-08 Thread Michael Koch
Hello list,


I commited the attached patch to fix some methods and a class variable
to be final.


Cheers,
Michael


2006-03-08  Michael Koch  <[EMAIL PROTECTED]>

* java/net/Proxy.java (NO_PROXY): Made final.
(equals): Likewise.
(hashCode): Likewise.

Index: java/net/Proxy.java
===
RCS file: /sources/classpath/classpath/java/net/Attic/Proxy.java,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 Proxy.java
--- java/net/Proxy.java 7 Mar 2006 13:12:33 -   1.1.2.1
+++ java/net/Proxy.java 8 Mar 2006 12:01:18 -
@@ -51,7 +51,7 @@
*/
   public enum Type { DIRECT, HTTP, SOCKS };
 
-  public static Proxy NO_PROXY = new Proxy(Type.DIRECT, null);
+  public static final Proxy NO_PROXY = new Proxy(Type.DIRECT, null);
 
   private Type type;
   private SocketAddress address;
@@ -96,7 +96,7 @@
* @return true if both objects or equals,
* false otherwise.
*/
-  public boolean equals(Object obj)
+  public final boolean equals(Object obj)
   {
 if (! (obj instanceof Proxy))
   return false;
@@ -112,7 +112,7 @@
*
* @return the hashcode
*/
-  public int hashCode()
+  public final int hashCode()
   {
 return type.hashCode() ^ address.hashCode();
   }


[cp-patches] [Patch] InetSocketAddress.createUnresolved()

2006-03-08 Thread Michael Koch
Hello list,


I commited the attached patch to introduce a new method from 1.5. I
backed it up by a new mauve testcase which I will commit soon.


Cheers,
Michael


2006-03-08  Michael Koch  <[EMAIL PROTECTED]>

* java/net/InetSocketAddress.java
(InetSocketAddress(String,int,resolve)): New private contructor.
(InetSocketAddress(String,int)): Use new private constructor.
(createUnresolved): New method.

Index: java/net/InetSocketAddress.java
===
RCS file: /sources/classpath/classpath/java/net/InetSocketAddress.java,v
retrieving revision 1.12
diff -u -r1.12 InetSocketAddress.java
--- java/net/InetSocketAddress.java 14 Sep 2005 17:06:27 -  1.12
+++ java/net/InetSocketAddress.java 8 Mar 2006 08:05:48 -
@@ -1,5 +1,5 @@
 /* InetSocketAddress.java --
-   Copyright (C) 2002 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2006  Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -107,10 +107,26 @@
* @param hostname The hostname for the socket address
* @param port The port for the socket address
*
-   * @exception IllegalArgumentException If the port number is illegal
+   * @exception IllegalArgumentException If the port number is illegal or
+   * the hostname argument is null
*/
   public InetSocketAddress(String hostname, int port)
-throws IllegalArgumentException
+  {
+this(hostname, port, true);
+  }
+
+  /**
+   * Constructs an InetSocketAddress instance.
+   *
+   * @param hostname The hostname for the socket address
+   * @param port The port for the socket address
+   * @param resolve true if the address has to be resolved,
+   * false otherwise
+   *
+   * @exception IllegalArgumentException If the port number is illegal or
+   * the hostname argument is null
+   */
+  private InetSocketAddress(String hostname, int port, boolean resolve)
   {
 if (hostname == null)
   throw new IllegalArgumentException("Null host name value");
@@ -120,15 +136,36 @@
 
 this.port = port;
 this.hostname = hostname;
+this.addr = null;
 
-try
-  {
-   this.addr = InetAddress.getByName(hostname);
-  }
-catch (Exception e) // UnknownHostException, SecurityException
-  {
-   this.addr = null;
-  }
+if (resolve)
+{
+  try
+{
+  this.addr = InetAddress.getByName(hostname);
+}
+  catch (Exception e) // UnknownHostException, SecurityException
+{
+  // Do nothing here. this.addr is already set to null.
+}
+}
+
+  }
+
+  /**
+   * Creates an unresolved InetSocketAddress object.
+   *
+   * @param hostname The hostname for the socket address
+   * @param port The port for the socket address
+   *
+   * @exception IllegalArgumentException If the port number is illegal or
+   * the hostname argument is null
+   *
+   * @since 1.5
+   */
+  public static InetSocketAddress createUnresolved(String hostname, int port)
+  {
+return new InetSocketAddress(hostname, port, false);
   }
 
   /**


[cp-patches] [Patch] java.net.Proxy and friends

2006-03-07 Thread Michael Koch
Hello all,


I implemented some proxy stuff from Java 1.5. It needs enums and
generics.


Cheers,
Michael


2006-03-07  Michael Koch  <[EMAIL PROTECTED]>

* gnu/java/net/DefaultProxySelector.java,
java/net/Proxy.java, java/net/ProxySelector.java:
New files.

Index: gnu/java/net/DefaultProxySelector.java
===
RCS file: gnu/java/net/DefaultProxySelector.java
diff -N gnu/java/net/DefaultProxySelector.java
--- /dev/null   1 Jan 1970 00:00:00 -
+++ gnu/java/net/DefaultProxySelector.java  7 Mar 2006 13:03:07 -
@@ -0,0 +1,80 @@
+/* DefaultProxySelector.java --
+   Copyright (C) 2006  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., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 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 gnu.java.net;
+
+import java.io.IOException;
+import java.net.Proxy;
+import java.net.ProxySelector;
+import java.net.SocketAddress;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
+
+public final class DefaultProxySelector
+  extends ProxySelector
+{
+  private static final List proxies = new ArrayList();
+  
+  static
+  {
+// The default proxy selector supports only direct connections.
+proxies.add(Proxy.NO_PROXY);
+  }
+  
+  public DefaultProxySelector()
+  {
+// Do nothing by default.
+  }
+
+  public void connectFailed(URI uri, SocketAddress sa, IOException ioe)
+  {
+if (uri == null || sa == null || ioe == null)
+  throw new IllegalArgumentException();
+
+// Do nothing by default.
+  }
+  
+  public List select(URI uri)
+  {
+if (uri == null)
+  throw new IllegalArgumentException();
+
+return proxies;
+  }
+}
Index: java/net/Proxy.java
===
RCS file: java/net/Proxy.java
diff -N java/net/Proxy.java
--- /dev/null   1 Jan 1970 00:00:00 -
+++ java/net/Proxy.java 7 Mar 2006 13:03:07 -
@@ -0,0 +1,129 @@
+/* Proxy.java -- Represends a proxy for a network connection
+   Copyright (C) 2006  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., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 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, fo

[cp-patches] [Patch] Removed empty file

2006-02-21 Thread Michael Koch
Hello list,


I removed the attached file as its empty, no java class inside. And it
confuses GCJ when using current classpath CVS as snapshot when building
gcj 4.1 or gcj trunk.


Cheers,
Michael


2006-02-21  Michael Koch  <[EMAIL PROTECTED]>

* gnu/javax/net/ssl/provider/PRNG.java: Removed.

Index: gnu/javax/net/ssl/provider/PRNG.java
===
RCS file: gnu/javax/net/ssl/provider/PRNG.java
diff -N gnu/javax/net/ssl/provider/PRNG.java
--- gnu/javax/net/ssl/provider/PRNG.java26 Jan 2006 02:25:11 -  
1.1
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,41 +0,0 @@
-/* PRNG.java -- 
-   Copyright (C) 2006  Free Software Foundation, Inc.
-
-This file is a 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 of the License, 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; if not, write to the Free Software
-Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
-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 gnu.javax.net.ssl.provider;
-
-import java.security.SecureRandom;
\ No newline at end of file


[cp-patches] [Patch] Ignore tools.zip

2006-02-16 Thread Michael Koch
Hello list,


I just commited the attached to ignore the generated tools.zip by CVS.


Cheers,
Michael


2006-02-17  Michael Koch  <[EMAIL PROTECTED]>

* tools/.cvsignore: Ignore tools.zip.

Index: tools/.cvsignore
===
RCS file: /sources/classpath/classpath/tools/.cvsignore,v
retrieving revision 1.2
diff -u -r1.2 .cvsignore
--- tools/.cvsignore13 Feb 2006 17:48:34 -  1.2
+++ tools/.cvsignore17 Feb 2006 06:59:02 -
@@ -1,2 +1,3 @@
 Makefile.in
 Makefile
+tools.zip


Re: [cp-patches] FYI: JComponent fixes: New regressions.

2006-02-16 Thread Michael Koch
On Thu, Feb 16, 2006 at 01:49:47PM +0100, Audrius Meskauskas wrote:
> Now the bottom "close" button disappears in the Swing Demo after any 
> attempt to expand a tree node or resize the table column.
> 
> Listen, it may sound nasty, but PLEASE USE SWING ACTIVITY BOARD AND 
> MAUVE TESTS TO CHECK THE EFFECTS of the "performance fixes", 
> "optimizations" and "removing unnecessary code".  I understand that it 
> may be some subtle regressions, but that is happening looks more that 
> you just do not care, leaving your code to for others to debug.
> 
> Work in the team do put some restrictions.

Come on. Cool down.

Roman is taking a lot of care. He does a great job. As the other Swing
hackers do too. Sometimes things break. That is what happens in
development. When you cant fix it imidiately report it to Roman or the one
who broke and not randomly revert patches.


Cheers,
Michael
-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/



[cp-patches] [Patch]

2006-02-14 Thread Michael Koch
Hello list,


With the help of Thomas Fitzsimmons I prepared the attached patch that
fixes the drawing in embedded windows. With gcjwebplugin I saw a shifted
droplet when visiting http://www.classpath.org/. The attached patch
fixes this.

Ok to commit?


Cheers,
Michael


2006-02-15  Michael Koch  <[EMAIL PROTECTED]>

* native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer.c
(Java_gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer_create):
Make sure the embedded window gets no decorations.
* native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c
(window_get_frame_extents): Return early of the window has no
decorations.
Index: native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer.c
===
RCS file: 
/sources/classpath/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer.c,v
retrieving revision 1.7
diff -u -r1.7 gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer.c
--- native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer.c   11 Jul 
2005 23:27:43 -  1.7
+++ native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer.c   14 Feb 
2006 22:03:42 -
@@ -1,6 +1,6 @@
 /* gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer.c -- Native
implementation of GtkEmbeddedWindowPeer
-   Copyright (C) 2003 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2006  Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -53,6 +53,8 @@
 
   window = gtk_plug_new ((GdkNativeWindow) socket_id);
 
+  gtk_window_set_decorated (window, FALSE);
+
   fixed = gtk_fixed_new ();
   gtk_container_add (GTK_CONTAINER (window), fixed);
 
Index: native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c
===
RCS file: 
/sources/classpath/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c,v
retrieving revision 1.62
diff -u -r1.62 gnu_java_awt_peer_gtk_GtkWindowPeer.c
--- native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c   15 Nov 2005 
22:50:53 -  1.62
+++ native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c   14 Feb 2006 
22:03:42 -
@@ -1,5 +1,6 @@
 /* gtkwindowpeer.c -- Native implementation of GtkWindowPeer
-   Copyright (C) 1998, 1999, 2002, 2004, 2005 Free Software Foundation, Inc.
+   Copyright (C) 1998, 1999, 2002, 2004, 2005, 2006
+   Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -1437,21 +1438,21 @@
 
   /* Guess frame extents in case _NET_FRAME_EXTENTS is not
  supported. */
-  if (gtk_window_get_decorated (GTK_WINDOW (window)))
-{
-  *top = 23;
-  *left = 6;
-  *bottom = 6;
-  *right = 6;
-}
-  else
+  if (!gtk_window_get_decorated (GTK_WINDOW (window)))
 {
   *top = 0;
   *left = 0;
   *bottom = 0;
   *right = 0;
+
+  return;
 }
 
+  *top = 23;
+  *left = 6;
+  *bottom = 6;
+  *right = 6;
+
   /* Request that the window manager set window's
  _NET_FRAME_EXTENTS property. */
   request_frame_extents (window);


Re: [cp-patches] RFC: Stupid spec constants revisited

2006-02-10 Thread Michael Koch
On Fri, Feb 10, 2006 at 02:50:32PM -0500, Stuart Ballard wrote:
> RTFP ;)

hmmm, you are right. I would prefer the disbaled to make at least the
definition of these evil constants look good.


Cheers,
Michael
-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/



Re: [cp-patches] RFC: Stupid spec constants revisited

2006-02-10 Thread Michael Koch
On Fri, Feb 10, 2006 at 05:33:37PM +, David Gilbert wrote:
> FWIW, I'm in favour of committing this patch...

Note that you need to disable CVS keyword substitiution. Otherwise value
of the RCSID will change on every commit of this file. Just in case you
are not aware of this.


Cheers,
Michael
-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/



Re: [cp-patches] FYI: ObjectView implemented

2006-01-26 Thread Michael Koch
On Thu, Jan 26, 2006 at 12:35:27PM +, Roman Kennke wrote:
> I implemented another fairly trivial class in javax.swing.text.html.
> 
> 2006-01-26  Roman Kennke  <[EMAIL PROTECTED]>
> 
> * javax/swing/text/html/ObjectView.java: New file.

Your attached patch.diff was empty ... Please be more careful when
sending patches to this list. Sorry for being a pedantic.


Cheers,
Michael
-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/

___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://developer.classpath.org/mailman/listinfo/classpath-patches


[cp-patches] RFC: new release of gjdoc

2005-12-18 Thread Michael Koch
Hello Marl, hello list,


It has been a long time since the last gjdoc release. Many bugs were
fixed since then. Among other things some bugs got fixed that make it
possible to generate the whole javadocs for eclipse.

To make it possible to build eclipse in debian (and Fedora and other
distributions too) with this new shiny gjdoc we should do a release and
update gjdoc in the distributions.

Therefore I prepared the attached patch. Please apply and release.


Cheers,
Michael
-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/
Index: ChangeLog
===
RCS file: /cvsroot/classpath/gjdoc/ChangeLog,v
retrieving revision 1.241
diff -u -r1.241 ChangeLog
--- ChangeLog   30 Nov 2005 21:23:46 -  1.241
+++ ChangeLog   18 Dec 2005 15:04:20 -
@@ -1,3 +1,7 @@
+2005-11-30  Michael Koch  <[EMAIL PROTECTED]>
+
+   * configure.ac (AC_INIT): Set version to 0.7.7.
+
 2005-11-30  Stephan Michels  <[EMAIL PROTECTED]>
 
PR gjdoc/24722:
Index: configure.ac
===
RCS file: /cvsroot/classpath/gjdoc/configure.ac,v
retrieving revision 1.25
diff -u -r1.25 configure.ac
--- configure.ac20 Oct 2005 18:22:47 -  1.25
+++ configure.ac18 Dec 2005 15:04:20 -
@@ -20,7 +20,7 @@
 dnl Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
 dnl 02111-1307 USA.
 
-AC_INIT(gjdoc, 0.7.6-cvs, [EMAIL PROTECTED])
+AC_INIT(gjdoc, 0.7.7, [EMAIL PROTECTED])
 
 AC_PREREQ(2.59)
 
___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


Re: [cp-patches] FYI: Added some real functionality to SystemFlavorMap

2005-11-28 Thread Michael Koch
On Tue, Nov 29, 2005 at 12:33:29AM +0100, Jan R?hrich wrote:
> I started to exchange some of SystemFlavorMaps implementation to a
> version with real functionality. Btw. I implemented the methods that
> were missing to JDK1.4 interface conformance.

...

> +  /**
> +   * This map maps native Strings to lists of 
> +   * DataFlavors
> +   */
> +  private Map nativeToFlavorMap = new HashMap();

It is better to use: private HashMap nativeToFlavorMap = new HashMap();
As in most cases invocations on interface are slower then on direct
classes.

> +  /**
> +   * This map maps DataFlavors to lists of native 
> +   * Strings
> +   */
> +  private Map flavorToNativeMap = new HashMap();

Same here.

>/**
> * Private constructor.
> @@ -183,6 +196,161 @@
>public List getNativesForFlavor (DataFlavor flav)
>{
>  throw new Error ("Not implemented");
> +  }
> +  
> +  /**
> +   * Adds a mapping from a single String native to a single
> +   * DataFlavor. Unlike getFlavorsForNative, the
> +   * mapping will only be established in one direction, and the native will
> +   * not be encoded. To establish a two-way mapping, call
> +   * addUnencodedNativeForFlavor as well. The new mapping will
> +   * be of lower priority than any existing mapping.
> +   * This method has no effect if a mapping from the specified
> +   * String native to the specified or equal
> +   * DataFlavor already exists.
> +   *
> +   * @param nativeStr the String native key for the mapping
> +   * @param flavor the DataFlavor value for the mapping
> +   * @throws NullPointerException if nat or flav is null
> +   *
> +   * @see #addUnencodedNativeForFlavor
> +   * @since 1.4
> +   */
> +  public synchronized void addFlavorForUnencodedNative(String nativeStr, 
> +   DataFlavor flavor)
> +  {
> +if((nativeStr == null) || (flavor == null))

Please add a space after 'if'.

> +  throw new NullPointerException();
> +List flavors = (List) nativeToFlavorMap.get(nativeStr);
> +if(flavors == null) 
> +  {
> +flavors = new ArrayList();
> +nativeToFlavorMap.put(nativeStr, flavors);
> +  }
> +else
> +  {
> +if(!flavors.contains(flavor))

According to our current style you should write:

if (! flavors.contains(flavor))

> +  flavors.add(flavor);
> +  }
> +  }
> +  
> +  /**
> +   * Adds a mapping from the specified DataFlavor (and all
> +   * DataFlavors equal to the specified DataFlavor)
> +   * to the specified String native.
> +   * Unlike getNativesForFlavor, the mapping will only be
> +   * established in one direction, and the native will not be encoded. To
> +   * establish a two-way mapping, call
> +   * addFlavorForUnencodedNative as well. The new mapping will 
> +   * be of lower priority than any existing mapping.
> +   * This method has no effect if a mapping from the specified or equal
> +   * DataFlavor to the specified String native
> +   * already exists.
> +   *
> +   * @param flavor the DataFlavor key for the mapping
> +   * @param nativeStr the String native value for the mapping
> +   * @throws NullPointerException if flav or nat is null
> +   *
> +   * @see #addFlavorForUnencodedNative
> +   * @since 1.4
> +   */
> +  public synchronized void addUnencodedNativeForFlavor(DataFlavor flavor,
> +   String nativeStr) 
> +  {
> +if((nativeStr == null) || (flavor == null))
> +  throw new NullPointerException();
> +List natives = (List) flavorToNativeMap.get(flavor);
> +if(natives == null) 
> +  {
> +natives = new ArrayList();
> +flavorToNativeMap.put(flavor, natives);
> +  }
> +else
> +  {
> +if(!natives.contains(nativeStr))
> +  natives.add(nativeStr);
> +  }
> +  }
> +  
> +  /**
> +   * Discards the current mappings for the specified DataFlavor
> +   * and all DataFlavors equal to the specified
> +   * DataFlavor, and creates new mappings to the 
> +   * specified String natives.
> +   * Unlike getNativesForFlavor, the mappings will only be
> +   * established in one direction, and the natives will not be encoded. To
> +   * establish two-way mappings, call setFlavorsForNative
> +   * as well. The first native in the array will represent the highest
> +   * priority mapping. Subsequent natives will represent mappings of
> +   * decreasing priority.
> +   * 
> +   * If the array contains several elements that reference equal
> +   * String natives, this method will establish new mappings
> +   * for the first of those elements and ignore the rest of them.
> +   *  
> +   * It is recommended that client code not reset mappings established by the
> +   * data transfer subsystem. This method should only be used for
> +   * application-level mappings.
> +   *
> +   * @param flavor the DataFlavor key for the mappings
> +   * @param natives the String native values for the mappings
> +   * @throws NullPo

Re: [cp-patches] FYI: New ProgressBar demo

2005-11-14 Thread Michael Koch
Hi Roman,


Your patch looks really strange. :-)

> Checking in examples/gnu/classpath/examples/swing/Demo.java;
> /cvsroot/classpath/classpath/examples/gnu/classpath/examples/swing/Demo.java,v
>   <--  Demo.java
> new revision: 1.29; previous revision: 1.28
> done
> RCS file: 
> /cvsroot/classpath/classpath/examples/gnu/classpath/examples/swing/ProgressBarDemo.java,v
> done
> Checking in examples/gnu/classpath/examples/swing/ProgressBarDemo.java;
> /cvsroot/classpath/classpath/examples/gnu/classpath/examples/swing/ProgressBarDemo.java,v
>   <--  ProgressBarDemo.java
> initial revision: 1.1
> done
> Checking in ChangeLog;
> /cvsroot/classpath/classpath/ChangeLog,v  <--  ChangeLog
> new revision: 1.5570; previous revision: 1.5569
> done


Cheers,
Michael
-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/


___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


Re: [cp-patches] Patch: RFC: javax.sound.sampled

2005-11-13 Thread Michael Koch
On Sat, Nov 12, 2005 at 05:51:55PM -0700, Tom Tromey wrote:
> I'm not checking this in yet.  I haven't really done much testing of
> it, and I wanted some feedback first as well.
> 
> This implements javax.sound.sampled and javax.sound.sampled.spi.

I would say: Please commit. Bugs can be fixed later. Its too bad that we
cant just use tritonus ...


Cheers,
Michael
-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/


___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


Re: [cp-patches] Patch: FYI: typo fix

2005-10-25 Thread Michael Koch
On Mon, Oct 24, 2005 at 06:18:44PM -0600, Tom Tromey wrote:
> I'm checking this in.
> This fixes a small javadoc typo I happened to see.
> 
> Tom
> 
> 2005-10-24  Tom Tromey  <[EMAIL PROTECTED]>
> 
>   * java/io/ObjectOutputStream.java (useProtocolVersion): Fixed typo
>   in javadoc.
> 
> Index: java/io/ObjectOutputStream.java
> ===
> RCS file: /cvsroot/classpath/classpath/java/io/ObjectOutputStream.java,v
> retrieving revision 1.60
> diff -u -r1.60 ObjectOutputStream.java
> --- java/io/ObjectOutputStream.java   2 Oct 2005 23:41:22 -   1.60
> +++ java/io/ObjectOutputStream.java   25 Oct 2005 00:22:12 -
> @@ -548,7 +548,7 @@
> * version) is provided to change the default protocol
> * version.
> *
> -   * For an explination of the differences beween the two protocols
> +   * For an explanation of the differences beween the two protocols

There is still a typo: beween => between.


Cheers,
Michael
-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/


___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


Re: [cp-patches] javax.swing.undo cleanup

2005-10-19 Thread Michael Koch
On Wed, Oct 19, 2005 at 08:46:16PM +0200, Roman Kennke wrote:
> Hi Micheal,
> 
> > > -public class CannotRedoException
> > > -  extends RuntimeException
> > > +public class CannotRedoException extends RuntimeException
> > >  {
> > 
> > The old version is according to our formatting rules. The new version is
> > not.
> 
> Well, last time I asked about that on IRC I was told (by tromey AFAIR)
> that the new version is correct.

Don't ask on IRC, read the documentation. ;-)

>From the hacking guide (hacking.texinfo):

Wrap always before extends, implements, throws, and labels.
 
> > >/**
> > > * Constructs a new instance of a CannotRedoException.
> > > */
> > >public CannotRedoException()
> > >{
> > > +super();
> > >}
> > 
> > You know that this is implicit and not needed. We try to avoid implicit 
> > stuff.
> 
> Yeah, I had the choice between calling super() and adding a comment.
> Calling super() seemed more natural to me. If it's agreed that super();
> should be avoided, then I'll replace it with a comment instead.

I would prefer a comment here.


Cheers,
Michael
-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/


___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


Re: [cp-patches] javax.swing.undo cleanup

2005-10-19 Thread Michael Koch
On Wed, Oct 19, 2005 at 03:07:22PM +, Roman Kennke wrote:
> This adds super() calls to 2 previously empty constructors.
> 
> 2005-10-19  Roman Kennke  <[EMAIL PROTECTED]>
> 
> * javax/swing/undo/CannotRedoException.java
> * javax/swing/undo/CannotUndoException.java
> Put super() call in empty constructors.
> 
> /Roman

> Index: javax/swing/undo/CannotRedoException.java
> ===
> RCS file: 
> /cvsroot/classpath/classpath/javax/swing/undo/CannotRedoException.java,v
> retrieving revision 1.3
> diff -u -r1.3 CannotRedoException.java
> --- javax/swing/undo/CannotRedoException.java 2 Jul 2005 20:32:52 -   
> 1.3
> +++ javax/swing/undo/CannotRedoException.java 19 Oct 2005 15:04:53 -
> @@ -44,13 +44,13 @@
>   * @author Andrew Selkirk ([EMAIL PROTECTED])
>   * @author Sascha Brawer ([EMAIL PROTECTED])
>   */
> -public class CannotRedoException
> -  extends RuntimeException
> +public class CannotRedoException extends RuntimeException
>  {

The old version is according to our formatting rules. The new version is
not.

>/**
> * Constructs a new instance of a CannotRedoException.
> */
>public CannotRedoException()
>{
> +super();
>}

You know that this is implicit and not needed. We try to avoid implicit stuff.

>  }
> Index: javax/swing/undo/CannotUndoException.java
> ===
> RCS file: 
> /cvsroot/classpath/classpath/javax/swing/undo/CannotUndoException.java,v
> retrieving revision 1.3
> diff -u -r1.3 CannotUndoException.java
> --- javax/swing/undo/CannotUndoException.java 2 Jul 2005 20:32:52 -   
> 1.3
> +++ javax/swing/undo/CannotUndoException.java 19 Oct 2005 15:04:53 -
> @@ -53,5 +53,6 @@
> */
>public CannotUndoException()
>{
> +super();
>}
>  }

Same here.


Cheers,
Michael
-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/


___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


[cp-patches] [Patch]

2005-10-13 Thread Michael Koch
Hi list,


I just commited the obvious patch to add two .cvsignore files to the new
native midi stuff.


Cheers,
Michael


2005-10-14  Michael Koch  <[EMAIL PROTECTED]>

* native/jni/midi-alsa/.cvsignore,
native/jni/midi-dssi/.cvsignore: New files

Index: native/jni/midi-alsa/.cvsignore
===
RCS file: native/jni/midi-alsa/.cvsignore
diff -N native/jni/midi-alsa/.cvsignore
--- /dev/null   1 Jan 1970 00:00:00 -
+++ native/jni/midi-alsa/.cvsignore 14 Oct 2005 05:32:22 -
@@ -0,0 +1,7 @@
+*.o
+*.a
+*.lo
+*.la
+.libs
+.depsMakefile
+Makefile.in
Index: native/jni/midi-dssi/.cvsignore
===
RCS file: native/jni/midi-dssi/.cvsignore
diff -N native/jni/midi-dssi/.cvsignore
--- /dev/null   1 Jan 1970 00:00:00 -
+++ native/jni/midi-dssi/.cvsignore 14 Oct 2005 05:32:22 -
@@ -0,0 +1,7 @@
+*.o
+*.a
+*.lo
+*.la
+.libs
+.depsMakefile
+Makefile.in
___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


Re: [cp-patches] FYI: javax.swing.filechooser.FileSystemView

2005-10-11 Thread Michael Koch
On Tue, Oct 11, 2005 at 10:31:22AM +, David Gilbert wrote:
> I committed this patch, there is no need for a new FileSystemView to be 
> created for each call to getFileSystemView():
> 
> 2005-10-11  David Gilbert  <[EMAIL PROTECTED]>
> 
>   * javax/swing/filechooser/FileSystemView.java
>   (defaultFileSystemView): new private field,
>   (getFileSystemView): initialise (if necessary) and return
>   defaultFileSystemView.
> 
> I have a Mauve test that I'll commit in a moment...

Please include the actual patches you commit here too.


Cheers,
Michael aka "The Nitpicker"
-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/


___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


Re: [cp-patches] RFC: TreeSelectionEvent

2005-06-05 Thread Michael Koch
On Sun, Jun 05, 2005 at 12:02:04AM -0700, Ka-Hing Cheung wrote:
> 2nd patch with real code changes.
> 
> 20050605  Ka-Hing Cheung <[EMAIL PROTECTED]>
> 
> * javax/swing/event/TreeSelectionEvent:
>   (getPaths): Return a cloned copy.
>   (isAddedPath): Implemented.
>   (cloneWithSource): Likewise.

Commited.


Michael
-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/


___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


Re: [cp-patches] RFC: TreeSelectionEvent

2005-06-05 Thread Michael Koch
On Sat, Jun 04, 2005 at 11:58:55PM -0700, Ka-Hing Cheung wrote:
> Braces goes to the next line...
> 
> 20050604  Ka-Hing Cheung <[EMAIL PROTECTED]>
> 
> * javax/swing/event/TreeSelectionEvent: Reformat

Commited.


Michael
-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/


___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


Re: [cp-patches] RFC: TreeSelectionEvent

2005-06-05 Thread Michael Koch
On Sat, Jun 04, 2005 at 04:38:05PM -0700, Ka-Hing Cheung wrote:
> Included in the email body is generated with diff -uNwb so it's easier to see
> what's changed, the real diff is attached.
> 
> 20050604  Ka-Hing Cheung <[EMAIL PROTECTED]>
> 
> * javax/swing/event/TreeSelectionEvent: javadoc update, reformat
>   (getPaths): Return a cloned copy.
>   (isAddedPath): Implemented.
>   (cloneWithSource): Likewise.

Please provide code changes and reformatting as separate patches.
This makes it easier later to follow the changes when trying to fix bugs.


Michael
-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/


___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


Re: [cp-patches] RFC: TreePath.toString

2005-06-05 Thread Michael Koch
On Sat, Jun 04, 2005 at 04:19:25PM -0700, Ka-Hing Cheung wrote:
> This makes TreePath.toString behave like Sun's
> 
> 2005-06-04  Ka-Hing Cheung  <[EMAIL PROTECTED]>
> * javax/swing/tree/TreePath.java: Implements toString().

Commited. Thanks for your contribution.


Michael
-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/


___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


[cp-patches] [Patch] Fix build for autobuilder

2005-06-04 Thread Michael Koch
Hi list,


I fixed the declarations of two methods in GtkImage native code
to comply with
http://www.gnu.org/prep/standards/html_node/Formatting.html#Formatting.
The JNI checking script depends on this format.


Michael


2005-06-04  Michael Koch  <[EMAIL PROTECTED]>

* native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkImage.c
(Java_gnu_java_awt_peer_gtk_GtkImage_loadPixbuf):
Fixed method declaration format.
(Java_gnu_java_awt_peer_gtk_GtkImage_drawPixelsScaled):
Likewise.

Index: native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkImage.c
===
RCS file: 
/cvsroot/classpath/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkImage.c,v
retrieving revision 1.1
diff -u -r1.1 gnu_java_awt_peer_gtk_GtkImage.c
--- native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkImage.c2 Jun 2005 
13:18:10 -   1.1
+++ native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkImage.c4 Jun 2005 
07:53:01 -
@@ -61,8 +61,9 @@
 /**
  * Loads a pixmap from a file.
  */
-JNIEXPORT jboolean JNICALL Java_gnu_java_awt_peer_gtk_GtkImage_loadPixbuf
-(JNIEnv *env, jobject obj, jstring name)
+JNIEXPORT jboolean JNICALL
+Java_gnu_java_awt_peer_gtk_GtkImage_loadPixbuf
+  (JNIEnv *env, jobject obj, jstring name)
 {
   const char *filename;
   int width, height;
@@ -266,10 +267,11 @@
  * Draws the pixbuf at x, y, scaled to width and height and 
  * optionally composited with a given background color.
  */
-JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkImage_drawPixelsScaled 
-(JNIEnv *env, jobject obj, jobject gc_obj,
- jint bg_red, jint bg_green, jint bg_blue, 
- jint x, jint y, jint width, jint height, jboolean composite)
+JNIEXPORT void JNICALL
+Java_gnu_java_awt_peer_gtk_GtkImage_drawPixelsScaled 
+  (JNIEnv *env, jobject obj, jobject gc_obj,
+   jint bg_red, jint bg_green, jint bg_blue, 
+   jint x, jint y, jint width, jint height, jboolean composite)
 {
   GdkPixbuf* dst;
   struct graphics *g;
___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


[cp-patches] Re: FYI: removed old native declarations.

2005-06-03 Thread Michael Koch
On Fri, Jun 03, 2005 at 01:42:23PM +0200, Sven de Marothy wrote:
> On Fri, 2005-06-03 at 06:01 +0200, Michael Koch wrote:
> 
> > Looks like this patch broke the JNI method check. Have you tried to build
> > a clean tree with this patch before commiting?
> 
> Yes, I did. I didn't have a problem..?
> 
> > Please rename the methods.
> 
> Are you sure the problem isn't that I forgot to remove the declarations
> in GdkGraphics.java for the methods deleted from gdkgraphics.c?
> 
> I just commited this:
> 
> 2005-06-03  Sven de Marothy  <[EMAIL PROTECTED]>
> 
>   * gnu/java/awt/peer/gtk/GdkGraphics.java:
>   Removed declarations for the previously removed native methods.

You are right. The bug is still there as the jni header files in CVS are not
updated yet. 



Michael
-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/


___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


Re: [cp-patches] RFC: GtkImage patch.

2005-06-02 Thread Michael Koch
On Thu, Jun 02, 2005 at 12:23:32PM +0200, Sven de Marothy wrote:
> On Wed, 2005-06-01 at 18:30 -0400, Thomas Fitzsimmons wrote:
> > >   /**
> > >* This is an old method, no idea if it's correct.
> > >*/
> > >   private int[] convertPixels (byte[] pixels)
> > 
> > Can this comment be removed?
> 
> Only if you can confirm the method is correct. I'm still not sure it is.
> It's just what the old code did.
> 
> > > /* functions used by other gtk peer native routines */
> > > GdkPixbuf *gnu_java_awt_peer_gtk_GtkImage_getPixbuf(JNIEnv *env, jobject 
> > > obj);
> > > GdkPixmap *gnu_java_awt_peer_gtk_GtkImage_getPixmap(JNIEnv *env, jobject 
> > > obj);
> > > jboolean gnu_java_awt_peer_gtk_GtkImage_isOffScreen(JNIEnv *env, jobject 
> > > obj);
> > 
> > Typically we declare functions used by multiple peers in gtkpeer.h.  Is
> > it necessary to use these long JNI-style names?
> 
> Ah. Well, these are only used in 2 places, but I can move them, sure.
> As for the long style names, it's not necessary of course, I just wanted
> to follow the convention. Maybe it should be shortened to just
> GtkImage_* instead. (Including the class name seems like a good idea to
> me, since it indicates what kind of class obj is intended to be, and
> where the function is located.)

Looks like this patch broke the JNI method check. Have you tried to build
a clean tree with this patch before commiting?

Please rename the methods.


Michael
-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/


___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


Re: [cp-patches] FYI: Implementing Little Endian and Big Endian encodings.

2005-05-31 Thread Michael Koch
On Tue, May 31, 2005 at 01:45:03PM +0200, Meskauskas Audrius wrote:
> >java.nio gives handling of little-, big- and mixed-endianess for free.
> >Perhaps you wanna look into using this. This will probably increase 
> >performance
> >of the CORBA code too.
> 
> The direct use of the .nio package would make CORBA dependent from the
> 1.4 implementation. The 1.2, 1.3 API specifications have CORBA and have no 
> nio.
> Bounding to nio means that we do not plan to release these versions, going
> directly to 1.4. Mark writes in plans "drop the unfinished parts before 
> release" -
>
> but how to drop if these parts are in use somewhere?

java.nio is an integral part of GNU classpath and cannot be removed.
E.g. its used to do charset conversion and file I/O.



Michael
-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/


___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


Re: [cp-patches] FYI: Implementing Little Endian and Big Endian encodings.

2005-05-31 Thread Michael Koch
On Tue, May 31, 2005 at 08:38:38AM +0200, Meskauskas Audrius wrote:
> Following the OMG specification, CORBA must support
> both Big and Little Endian encodings (I did not find any notes about
> this in Java API - proably silence is the sign of agreement). The
> CORBA messages contain the flags, indicating, which encoding
> is currently used.
> 
> Great thanks to Warren Levy, Aaron M. Renn and Tom Tromey,
> authors of our DataInput/Output streams. Reusing the
> code from there saved me a lot of work.
> 
> I have got to pack the patch as it is larger than the limit of the list.
> 
> 2005-05-31  Audrius Meskauskas  <[EMAIL PROTECTED]>
> 
> * gnu/CORBA/CDR/BigEndianInputStream.java,
>  gnu/CORBA/CDR/BigEndianOutputStream.java,
>  gnu/CORBA/CDR/LittleEndianInputStream.java,
>  gnu/CORBA/CDR/LittleEndianOutputStream.java,
>  gnu/CORBA/CDR/abstractDataInputStream.java,
>  gnu/CORBA/CDR/abstractDataOutputStream.java: New streams.
> * gnu/CORBA/IOR.java: Implemented parsing of the Little Endian
> encoded IOR references. * gnu/CORBA/Functional_ORB.java, 
> gnu/CORBA/binaryReply.java,
> gnu/CORBA/gnuRequest.java,
> gnu/CORBA/CDR/cdrInput.java,
> gnu/CORBA/CDR/cdrOutput.java,
> gnu/CORBA/CDR/encapsulatedOutput.java,
> gnu/CORBA/GIOP/MessageHeader.java: Implemented support for
> both Big and Little Endian.

java.nio gives handling of little-, big- and mixed-endianess for free.
Perhaps you wanna look into using this. This will probably increase performance
of the CORBA code too.


Michael
-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/


___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


Re: [cp-patches] Patch: FYI: Fix PR libgcj/20273

2005-05-29 Thread Michael Koch
On Sun, May 29, 2005 at 07:54:34PM -0600, Tom Tromey wrote:
> I'm checking this in on the 4.0 branch, the trunk, and Classspath.
> Note that the trunk compiler miscompiles LinkedHashMap at the
> moment.  This results in crashes.  I'll file this soon.
> 
> I put the test case from the PR into Mauve.
> The patch is from Michael Koch.  I don't know why, but it has just
> been sitting in bugzilla for a while...

Well, because I wasnt sure this fully solved the issue.


Michael
-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/


___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


Re: [cp-patches] FYI: Bumped up serialVersionUIDs in javax.swing

2005-05-28 Thread Michael Koch
On Sat, May 28, 2005 at 12:09:00AM +0100, Andrew John Hughes wrote:
> On Fri, 2005-05-27 at 23:14 +0200, Roman Kennke wrote:
> > Hi,
> > 
> > I updated all serialVersionUIDs in the javax.swing package to be
> > compatible with JDK1.4. I intentionally left out some cases where I
> > would probably break build with GCJ3 (accessible stuff). Have me made
> > any progress on this issue?
> > 
> > 2005-05-27  Roman Kennke  <[EMAIL PROTECTED]>
> > 
> > * javax/swing/AbstractButton.java:
> > Bumped up serialVersionUID(s) to JDK1.4 compatibility.
> > * javax/swing/ImageIcon.java: Likewise.
> > * javax/swing/JFileChooser.java: Likewise.
> > * javax/swing/JInternalFrame.java: Likewise.
> > * javax/swing/JMenu.java: Likewise.
> > * javax/swing/JRadioButton.java: Likewise.
> > * javax/swing/JScrollPane.java: Likewise.
> > * javax/swing/JSpinner.java: Likewise.
> > * javax/swing/JTabbedPane.java: Likewise.
> > * javax/swing/ImageIcons.java: Likewise.
> > * javax/swing/JToggleButton.java: Likewise.
> > * javax/swing/JToolTip.java: Likewise.
> > * javax/swing/JViewPort.java: Likewise.
> > * javax/swing/LayoutFocusTraversalPolicy.java: Likewise.
> > * javax/swing/SpinnerDateModel.java: Likewise.
> > * javax/swing/TransferHandler.java: Likewise.

We had decided in the past to ignore this stuff in Swing.

> From what I recall, we decided to drop pre-GCJ 4 support,
> which presumably means the accessibility stuff can now
> go through.

Afaik there was no decision yet. We still support GCJ 3.3 and up.

> However, I haven't seen any movement on this, and I don't recall a patch
> to the configure process going through.  Can anyone provide
> more definite info on the status of this?

Without some decision on what to depend now? Mark still wants to support
GCJ 3.4 for next release which is kind of pointless in my eyes.


Michael
-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/


___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


[cp-patches] Re: [commit-cp] classpath daily snapshot 20050527 FAILED

2005-05-27 Thread Michael Koch
On Fri, May 27, 2005 at 09:26:24AM +0200, Mark Wielaard wrote:
> Hi Michael,
> 
> On Fri, 2005-05-27 at 05:43 +0200, Michael Koch wrote:
> > checking for XTestQueryExtension in -lXtst... yes
> > checking for pkg-config... /usr/local/bin/pkg-config
> > checking for gtk+-2.0 >= 2.6 gthread-2.0 >= 2.2 libart-2.0 
> > gdk-pixbuf-2.0... Requested 'gtk+-2.0 >= 2.6' but version of GTK+ is 2.4.4
> > 
> > configure: error: Library requirements (gtk+-2.0 >= 2.6 gthread-2.0 >= 2.2 
> > libart-2.0 gdk-pixbuf-2.0) not met; consider adjusting the PKG_CONFIG_PATH 
> > environment variable if your libraries are in a nonstandard prefix so 
> > pkg-config can find them.
> 
> Is it possible to install newer gtk+ libraries on the autobuilder?

I mailed Patrick in private and disabled GTK peer for now.

If we can't fix this soon I will have to move the autobuilder to somewhere else.

Michael
-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/


___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


Re: [cp-patches] [patch] fix GTK scrollbar peer

2005-05-25 Thread Michael Koch
On Tue, May 24, 2005 at 09:18:38PM -0400, Thomas Fitzsimmons wrote:
> Hi,
> 
> This patch fixes a long-standing bug in the GTK scrollbar peer.  The
> proper fix required some GTK work:
> 
> http://bugzilla.gnome.org/show_bug.cgi?id=133263
> 
> The patch there landed in GTK 2.6.  The attached patch, which I
> committed to GNU Classpath HEAD, changes the configure check to require
> GTK 2.6 and takes advantage of the new "change-value" signal.  This
> fixes two aspects of scrolling:
> 
> - adjustment types are now supported properly (UNIT_INCREMENT/DECREMENT,
> BLOCK_INCREMENT/DECREMENT and TRACK type adjustments).
> 
> - setting a scrollbar's value works, without causing a callback loop
> (callback loops cause strange behaviour, where e.g. two scrollbars
> linked together will start oscillating crazily forever as soon as one is
> adjusted)
> 
> Tom
> 
> 2005-05-24  Thomas Fitzsimmons  <[EMAIL PROTECTED]>
> 
>   * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollBarPeer.c
>   (connectSignals): Connect to new change-value signal.
>   (post_change_event): Remove signal handler.
>   (slider_moved_cb): New signal handler.
>   * configure.ac: Require gtk+-2.0 >= 2.6.

Please announce such updates on classpath@gnu.org before commiting so people
can update their GTK. Another thing you missed was updating the NEWS and INSTALL
files to tell the people what minimum requirements we have now.


Michael
-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/


___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


[cp-patches] [Patch] removed used method in gtk peer

2005-05-25 Thread Michael Koch
Hi list,


I commited the attached patch to remove a new method in the gtk peer
which was never used and broke the build.


Michael


2005-05-25  Michael Koch  <[EMAIL PROTECTED]>

* native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollBarPeer.c
(connetJObject): Removed.

Index: native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollBarPeer.c
===
RCS file: 
/cvsroot/classpath/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollBarPeer.c,v
retrieving revision 1.13
diff -u -r1.13 gnu_java_awt_peer_gtk_GtkScrollBarPeer.c
--- native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollBarPeer.c25 May 
2005 01:11:17 -  1.13
+++ native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollBarPeer.c25 May 
2005 08:22:47 -
@@ -83,21 +83,6 @@
 }
 
 JNIEXPORT void JNICALL
-Java_gnu_java_awt_peer_gtk_GtkScrollbarPeer_connectJObject
-  (JNIEnv *env, jobject obj)
-{
-  void *ptr;
-
-  ptr = NSA_GET_PTR (env, obj);
-
-  gdk_threads_enter ();
-
-  connect_awt_hook (env, obj, 1, GTK_WIDGET (ptr)->window);
-
-  gdk_threads_leave ();
-}
-
-JNIEXPORT void JNICALL
 Java_gnu_java_awt_peer_gtk_GtkScrollbarPeer_connectSignals
   (JNIEnv *env, jobject obj)
 {
___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


Re: [cp-patches] FYI: CORBA delegate bug fix.

2005-05-24 Thread Michael Koch
On Tue, May 24, 2005 at 11:58:04PM +0200, Meskauskas Audrius wrote:
> 2005-05-24  Audrius Meskauskas  <[EMAIL PROTECTED]>
> 

Nice ChangeLog entry. ;-)


Michael
-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/


___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


[cp-patches] [Patch] java.util.Locale.getISOStrings

2005-05-24 Thread Michael Koch
Hi list,


I just commited the attached patch to fox an issue with
java.util.Locale.getISOStrings(String) to handle the new
locale properties files correctly. This fixes bug #13172.


Michael


2005-05-25  Michael Koch  <[EMAIL PROTECTED]>

* java/util/Locale.java (getISOStrings):
Re-implemented for locale properties files.

Index: java/util/Locale.java
===
RCS file: /cvsroot/classpath/classpath/java/util/Locale.java,v
retrieving revision 1.28
diff -u -r1.28 Locale.java
--- java/util/Locale.java   19 May 2005 06:45:04 -  1.28
+++ java/util/Locale.java   25 May 2005 05:32:45 -
@@ -453,33 +453,35 @@
*/
   private static String[] getISOStrings(String tableName)
   {
-List tempList;
-ResourceBundle bundle;
-Enumeration keys;
 int count = 0;
-String[] strings;
-
-tempList = new ArrayList();
-bundle = ResourceBundle.getBundle("gnu.java.locale.LocaleInformation");
-keys = ((Hashtable) bundle.getObject(tableName)).keys();
-while (keys.hasMoreElements())
-  {
-   String nextString;
-
-   nextString = (String) keys.nextElement();
-   if (nextString.length() == 2 &&
-   Character.isLetter(nextString.charAt(0)) &&
-   Character.isLetter(nextString.charAt(1)))
+ResourceBundle bundle =
+  ResourceBundle.getBundle("gnu.java.locale.LocaleInformation");
+Enumeration e = bundle.getKeys();
+ArrayList tempList = new ArrayList();
+
+while (e.hasMoreElements())
+  {
+   String key = (String) e.nextElement();
+   
+   if (key.startsWith(tableName + "."))
  {
-   tempList.add(nextString);
-   ++count;
+   String str = key.substring(tableName.length() + 1);
+
+   if (str.length() == 2
+   && Character.isLetter(str.charAt(0))
+   && Character.isLetter(str.charAt(1)))
+ {
+   tempList.add(str);
+   ++count;
+ }
  }
   }
-strings = new String[count];
+
+String[] strings = new String[count];
+
 for (int a = 0; a < count; ++a)
-  {
-   strings[a] = (String) tempList.get(a);
-  }
+  strings[a] = (String) tempList.get(a);
+
 return strings;
   }
 
___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


Re: [cp-patches] [Patch] jikes warnings

2005-05-24 Thread Michael Koch
On Mon, May 23, 2005 at 11:07:17PM +0200, Mark Wielaard wrote:
> Hi,
> 
> On Mon, 2005-05-23 at 13:30 +0200, Michael Koch wrote:
> > > 2005-05-23  Mark Wielaard  <[EMAIL PROTECTED]>
> > > 
> > > * lib/Makefile.am (FOUND_JIKES): Add +Pno-switchcheck.
> > > 
> > I would prefer when the compilers we use would support annotations so we can
> > disable special warnings in the code that trigger them. As we have no such 
> > compiler
> > yet please go for it.
> 
> OK. I have checked this in.
> 
> > BTW: I have a patch her locally which adds a configure option to disable 
> > all jikes
> > warnings. Would such a patch be useful in classpath itself?
> 
> I am note sure. Most other warnings are actualy real. After disabling
> the switch fall-through warnings and cleaning up the remaining (easy)
> warnings there shouldn't be so many left that they are annoying.

I dont meant to actually enable it by default. I just want to be able to
easily see the real errors in bwtween the tons or warnings.


Michael
-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/


___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


Re: [cp-patches] FYI: Added getWindowAncestor in javax.swing.SwingUtilities

2005-05-23 Thread Michael Koch
On Mon, May 23, 2005 at 01:12:26PM +0200, Roman Kennke wrote:
> 2005-05-23  Roman Kennke  <[EMAIL PROTECTED]>
> 
> * javax/swing/JFileChooser.java:
> Fixed the values of several public constant fields.
> 
> /Roman
> 

> Index: javax/swing/SwingUtilities.java
> ===
> RCS file: /cvsroot/classpath/classpath/javax/swing/SwingUtilities.java,v
> retrieving revision 1.26
> diff -u -r1.26 SwingUtilities.java
> --- javax/swing/SwingUtilities.java   20 May 2005 12:10:21 -  1.26
> +++ javax/swing/SwingUtilities.java   23 May 2005 11:10:32 -
> @@ -352,6 +352,25 @@
>}
>  
>/**
> +   * Returns the first ancestor of comp that is a [EMAIL 
> PROTECTED] Window}
> +   * or null if comp is not contained in a
> +   * [EMAIL PROTECTED] Window}.
> +   *
> +   * This is equivalent to calling
> +   * getAncestorOfClass(Window, comp) or
> +   * windowForComponent(comp).
> +   *
> +   * @param comp the component for which we are searching the ancestor Window
> +   *
> +   * @return the first ancestor Window of comp or
> +   * null if comp is not contained in a Window
> +   */
> +  public Window getWindowAncestor(Component comp)
> +  {
> +return (Window) getAncestorOfClass(Window.class, comp);
> +  }
> +
> +  /**
> * Equivalent to calling getAncestorOfClass(Window, comp).
> *
> * @param comp The component to search for an ancestor window 

Somehow the ChangeLog entry and the patch does not fit together. ;-)


Michael
-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/


___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


Re: [cp-patches] [Patch] jikes warnings

2005-05-23 Thread Michael Koch
On Mon, May 23, 2005 at 10:54:52AM +0200, Mark Wielaard wrote:
> Hi,
> 
> On Thu, 2005-05-19 at 07:59 +0200, Michael Koch wrote:
> > In my big locale patch I accidentally commited a part to shut up jikes'
> > warnings. I revert this with this patch.
> 
> Should we just bite the bullet and turn of switch fall-through checking
> when compiling with jikes? It seems to generate a very large number of
> false positives.
> 
> 2005-05-23  Mark Wielaard  <[EMAIL PROTECTED]>
> 
> * lib/Makefile.am (FOUND_JIKES): Add +Pno-switchcheck.
> 
> The remaining warnings seem to be things we actually want to fix.

I would prefer when the compilers we use would support annotations so we can
disable special warnings in the code that trigger them. As we have no such 
compiler
yet please go for it.

BTW: I have a patch her locally which adds a configure option to disable all 
jikes
warnings. Would such a patch be useful in classpath itself?



Michael
-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/


___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


Re: [cp-patches] RFC: notice cairo in INSTALL file

2005-05-20 Thread Michael Koch
On Fri, May 20, 2005 at 02:11:13AM +0200, Robert Schuster wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Hi.
> 
> While searching for info how to enable cairo support our INSTALL was not
>  helpful. This patch fixes that.
> 
> 2005-05-20  Robert Schuster  <[EMAIL PROTECTED]>
> 
> * INSTALL: Mention cairo dependency and how to enable it.
> 
> Is the description ok?

...

> + For building the gtk+ AWT peers with preliminary cairo support
> + add --enable-gtk-cairo as an argument to configure and set the
> + system property gnu.java.awt.peer.gtk.Graphics to Graphics2D
> + at runtime. For this to work you need
> +
> + - Cairo 0.3 from http://cairographics.org/

The correct version is "0.3.0". Please make clear that no newer version of Cairo
is supported.


Michael
-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/


___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


[cp-patches] [Patch] Fixing locale list generator

2005-05-19 Thread Michael Koch
Hi list,


I commited the attached patch to fix the generation of
the locale list. Thanks to Robert Schuster for reporting this.


CU,
Michael


2005-05-20  Michael Koch  <[EMAIL PROTECTED]>

* scripts/generate-locale-list.sh:
Use the new locale properties files.

Index: scripts/generate-locale-list.sh
===
RCS file: /cvsroot/classpath/classpath/scripts/generate-locale-list.sh,v
retrieving revision 1.2
diff -u -r1.2 generate-locale-list.sh
--- scripts/generate-locale-list.sh 19 May 2005 06:45:04 -  1.2
+++ scripts/generate-locale-list.sh 20 May 2005 05:35:48 -
@@ -52,7 +52,7 @@
 echo "  public static String[] localeNames ="
 echo "{"
 
-( cd $CLASSPATH_SRCDIR/resource/gnu/java/locale ; ls LocaleInformation_*.java 
) | xargs -n 1 echo | sed -e 's/LocaleInformation_\(.*\)\.java/\1/' |
+( cd $CLASSPATH_SRCDIR/resource/gnu/java/locale ; ls 
LocaleInformation_*.properties ) | xargs -n 1 echo | sed -e 
's/LocaleInformation_\(.*\)\.properties/\1/' |
 while read locale ; do echo "  \"$locale\"," ; done
 
 echo "};"
___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


Re: [cp-patches] Re: Patch: FYI: fix http Headers oddity

2005-05-19 Thread Michael Koch
On Thu, May 19, 2005 at 10:30:40AM -0400, Bryce McKinlay wrote:
> Chris Burdess wrote:
> 
> >Bryce McKinlay wrote:
> > 
> >>Does anyone know why we use the custom "LineInputStream" class instead of, 
> >>say, BufferedReader here? At one point BufferedReader.readLine() was buggy 
> >>and could "read too 
> >>much" and block before returning a line, but I believe we have fixed that. 
> >>Code re-use would help to avoid bugs like this ;-)
> >>   
> >Erm, because LineInputStream is an InputStream dealing with bytes, and
> >BufferedReader is a Reader dealing with chars.
> > 
> 
> Why is this distinction important? We are converting the result to chars 
> (well, a String) anyway.

LineInputStream reads one byte and transforms it into an ascii character.
BufferedReader reads a char (2 bytes) as character.


Michael
-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/


___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


Re: [cp-patches] FYI: Added serialVersionUID field

2005-05-19 Thread Michael Koch
On Wed, May 18, 2005 at 05:02:47PM -0600, Luis Sanabria wrote:
> 2005-05-15  Luis Sanabria  [EMAIL PROTECTED]
> 
>   * java/text/DateFormat.java: Added field serialVersionUID to 
> DateFormat.java

Together with your other patch this doesnt count as trivial anymore.
We need your copyright assignment before commiting your stuff.
Sorry about this.

Please don't put 'FYI' into the subject of the patch mail when you DONT commit.


Thanks,
Michael
-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/


___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


Re: [cp-patches] FYI: fixed isShowing in java.awt.Window

2005-05-19 Thread Michael Koch
On Wed, May 18, 2005 at 03:03:19PM +0200, Roman Kennke wrote:
> Bogdan Grigurescu discovered a bug in Classpath, which prevented AWT Windows 
> from painting 
> lightweight components. Attached is a simple testcase that demostrates this.
> 
> The problem was that the Window was not considered as showing, because its 
> parent Frame is not 
> showing. I committed the attached patch that fixes this.

Can you please add the testcase to mauve?


Thanks,
Michael
-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/


___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


[cp-patches] [Patch] jikes warnings

2005-05-19 Thread Michael Koch
Hi list,


In my big locale patch I accidentally commited a part to shut up jikes'
warnings. I revert this with this patch.


Michael


2005-05-19  Michael Koch  <[EMAIL PROTECTED]>

* lib/Makefile.am: Remove accidentally commited -nowarn option for
jikes.

Index: lib/Makefile.am
===
RCS file: /cvsroot/classpath/classpath/lib/Makefile.am,v
retrieving revision 1.81
diff -u -r1.81 Makefile.am
--- lib/Makefile.am 19 May 2005 06:45:04 -  1.81
+++ lib/Makefile.am 19 May 2005 06:50:15 -
@@ -18,7 +18,7 @@
 && $(GCJ) -Wno-deprecated --bootclasspath '' --classpath $(compile_classpath) 
-C -d . @classes.standardx
 else
 if FOUND_JIKES
-JAVAC = $(JIKES) -nowarn +Pno-shadow +F -bootclasspath '' -extdirs '' 
-sourcepath '' --classpath $(compile_classpath) -d . @classes
+JAVAC = $(JIKES) +Pno-shadow +F -bootclasspath '' -extdirs '' -sourcepath '' 
--classpath $(compile_classpath) -d . @classes
 else
 if FOUND_KJC
 JAVAC = $(KJC) -classpath .:$(USER_CLASSLIB) -d . @classes
___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


Re: [cp-patches] FYI: Added loadClass(URL, String) method to RMIClassLoader.java

2005-05-19 Thread Michael Koch
On Wed, May 18, 2005 at 08:37:58AM -0600, Luis Sanabria wrote:
> Sorry, I sent this message to the incorrect list!
> 
> 2005-05-15  Luis Sanabria  [EMAIL PROTECTED]
> 
> * java/rmi/server/RMIClassLoader.java: Added method loadClass (URL,
> String) which   calls the method loadClass (String, String).
> 
> p.s.: I have not done any copyright paperwork yet. Will the following
> statement work?
> 
> "I put this code into the public domain"

No, this statement is not enough. There is a reason we want/need signed papers.


Michael
-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/


___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


Re: [cp-patches] FYI: added methods to javax.swing.SwingUtilities

2005-05-19 Thread Michael Koch
On Wed, May 18, 2005 at 10:29:42AM +0200, Roman Kennke wrote:
> I added 2 methods to javax.swing.SwingUtilities:
> 
> 2005-05-18  Roman Kennke  <[EMAIL PROTECTED]>
> 
> * javax/swing/SwingUtilities
> (getUIInputMap): Added method.
> (getUIActionMap): Added method.
> 
> 
> /Roman
> 

> Index: javax/swing/SwingUtilities.java
> ===
> RCS file: /cvsroot/classpath/classpath/javax/swing/SwingUtilities.java,v
> retrieving revision 1.23
> diff -u -r1.23 SwingUtilities.java
> --- javax/swing/SwingUtilities.java   12 Feb 2005 14:26:02 -  1.23
> +++ javax/swing/SwingUtilities.java   18 May 2005 08:27:47 -
> @@ -1319,4 +1319,33 @@
> && b.x >= a.x && b.x + b.width <= a.x + a.width && b.y >= a.y
> && b.y + b.height <= a.y + a.height;
>}
> +
> +  /**
> +   * Returns the InputMap that is provided by the ComponentUI of
> +   * component for the specified condition.
> +   *
> +   * @param component the component for which the InputMap is returned
> +   * @param cond the condition that specifies which of the three input
> +   * maps should be returned, may be
> +   * [EMAIL PROTECTED] JComponent#WHEN_IN_FOCUSED_WINDOW},
> +   * [EMAIL PROTECTED] JComponent#WHEN_FOCUSED} or
> +   * [EMAIL PROTECTED] JComponent#WHEN_ANCESTOR_OF_FOCUSED_COMPONENT
> +   *
> +   * @return
> +   */
> +  public static InputMap getUIInputMap(JComponent component, int cond)
> +  {
> +return component.getInputMap(cond);
> +  }
> +
> +  /**
> +   * Returns the ActionMap that is provided by the ComponentUI of
> +   * component.
> +   *
> +   * @param component the component for which the ActionMap is returned
> +   */
> +  public static InputMap getUIActionMap(JComponent component)
> +  {
> +return component.getInputMap();
> +  }
>  }

After reading a bit in the javadocs and several places on the net this is wrong.
Each component is considered to have its own ActionMap and InputMap with the
according map of the ComponentUI as parent. AFAIK the correct code would to
check if a ComponentUI is associated with the compenent and then return the 
parent
of the ActionMap/InputMap.


Michael
-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/


___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


[cp-patches] [Patch] locale stuff - functional changes

2005-05-19 Thread Michael Koch
I list,


I commited the locale changes now as following.


Michael


2005-05-19  Michael Koch  <[EMAIL PROTECTED]>

* java/text/DateFormatSymbols.java
(getStringArray): New method.
(getZoneStrings): Likewise.
(DateFormatSymbols): Load symbols from properties files.
* java/util/Locale.java
(getDisplayLanguage): Handle new way to load language names.
(getDisplayCountry): Handle new way to load territory names.
(getDisplayVariant): Handle new way to load variant names.
* lib/Makefile.am, lib/gen-classlist.sh.in:
No need to special case classes from gnu.java.locale anymore.
* scripts/generate-locale-list.sh:
Generate list from the new properties files.
* LICENSE: Added license of locale data properties files.

Index: java/text/DateFormatSymbols.java
===
RCS file: /cvsroot/classpath/classpath/java/text/DateFormatSymbols.java,v
retrieving revision 1.15
diff -u -r1.15 DateFormatSymbols.java
--- java/text/DateFormatSymbols.java16 Feb 2005 11:18:38 -  1.15
+++ java/text/DateFormatSymbols.java19 May 2005 06:43:20 -
@@ -41,6 +41,7 @@
 import java.util.Locale;
 import java.util.MissingResourceException;
 import java.util.ResourceBundle;
+import java.util.StringTokenizer;
 
 /**
  * This class acts as container for locale specific date/time formatting
@@ -78,13 +79,62 @@
   transient String[] dateFormats;
   transient String[] timeFormats;
 
-  private String[] formatsForKey(ResourceBundle res, String key) 
+  private static String[] getStringArray(ResourceBundle res, String name)
+  { 
+int index = 0;
+String data = res.getString(name);
+StringTokenizer st = new StringTokenizer(data, "\u00ae");
+String[] array = new String[st.countTokens()];
+
+while (st.hasMoreTokens())
+  {
+array[index] = st.nextToken();
+   index++;
+  }
+
+return array;
+  }
+
+  private String[][] getZoneStrings(ResourceBundle res)
   {
-String[] values = new String [formatPrefixes.length];
-for (int i = 0; i < formatPrefixes.length; i++)
+try
+  {
+int index = 0;
+String data = res.getString("zoneStrings");
+StringTokenizer st = new StringTokenizer(data, "\u00ae\u00ae");
+String[][] array = new String[st.countTokens()][];
+
+while (st.hasMoreTokens())
+  {
+   int index2 = 0;
+   String token = st.nextToken();
+   StringTokenizer st2 = new StringTokenizer(token, "\u00ae");
+array[index] = new String[st2.countTokens()];
+
+   while (st2.hasMoreTokens())
+ {
+array[index][index2] = st2.nextToken();
+index2++;
+ }
+
+   index++;
+  }
+
+return array;
+  }
+catch (MissingResourceException e)
   {
-values[i] = res.getString(formatPrefixes[i]+key);
+   return new String[0][];
   }
+  }
+  
+  private String[] formatsForKey(ResourceBundle res, String key) 
+  {
+String[] values = new String[formatPrefixes.length];
+
+for (int i = 0; i < formatPrefixes.length; i++)
+  values[i] = res.getString(formatPrefixes[i] + key);
+  
 return values;
   }
 
@@ -101,15 +151,14 @@
   = ResourceBundle.getBundle("gnu.java.locale.LocaleInformation", locale,
 ClassLoader.getSystemClassLoader());
 
-ampms = res.getStringArray ("ampms");
-eras = res.getStringArray ("eras");
-localPatternChars = res.getString ("localPatternChars");
-months = res.getStringArray ("months");
-shortMonths = res.getStringArray ("shortMonths");
-shortWeekdays = res.getStringArray ("shortWeekdays");
-weekdays = res.getStringArray ("weekdays");
-zoneStrings = (String[][]) res.getObject ("zoneStrings");
-
+ampms = getStringArray(res, "ampms");
+eras = getStringArray(res, "eras");
+localPatternChars = res.getString("localPatternChars");
+months = getStringArray(res, "months");
+shortMonths = getStringArray(res, "shortMonths");
+shortWeekdays = getStringArray(res, "shortWeekdays");
+weekdays = getStringArray(res, "weekdays");
+zoneStrings = getZoneStrings(res);
 dateFormats = formatsForKey(res, "DateFormat");
 timeFormats = formatsForKey(res, "TimeFormat");
   }
Index: java/util/Locale.java
===
RCS file: /cvsroot/classpath/classpath/java/util/Locale.java,v
retrieving revision 1.27
diff -u -r1.27 Locale.java
--- java/util/Locale.java   16 Feb 2005 20:54:25 -  1.27
+++ java/util/Locale.java   19 May 2005 06:43:20 

Re: PING: Re: RFC: [cp-patches] META-INF support

2005-05-18 Thread Michael Koch
On Mon, May 16, 2005 at 01:19:47PM +0100, Andrew John Hughes wrote:
> On Sun, 2005-04-17 at 15:34 +0100, Andrew John Hughes wrote:
> > On Mon, 2005-04-11 at 17:35 +0100, Andrew John Hughes wrote:
> > > On Mon, 2005-04-11 at 07:40 +0200, Michael Koch wrote:
> > > > On Mon, Apr 11, 2005 at 03:59:00AM +0100, Andrew John Hughes wrote:
> > > > 
> > > > > As to a jar version, we considered this recently on the list.  One
> > > > > reason we call it glibj.zip is because it can't be used as a normal 
> > > > > jar,
> > > > > and using a different file extension (which still fits the content,
> > > > > because jars, AFAIK, are just zips with defined metadata) helps
> > > > > differentiate it.  I can foresee someone posting a GCJ bug when they 
> > > > > try
> > > > > to use -findirect-dispatch on it...
> > > > 
> > > > Would not work as java.lang.Object and some other VM important classes
> > > > are too different (currently).
> > > > 
> > > 
> > > Exactly; if we allow a jar name, I can see someone filing a PR for that
> > > problem.
> > > 
> > > > > Index: examples/Makefile.am
> > > > > ===
> > > > > RCS file: /cvsroot/classpath/classpath/examples/Makefile.am,v
> > > > > retrieving revision 1.3
> > > > > diff -u -3 -p -u -r1.3 Makefile.am
> > > > > --- examples/Makefile.am  7 Feb 2005 02:32:37 -   1.3
> > > > > +++ examples/Makefile.am  11 Apr 2005 02:49:55 -
> > > > > @@ -11,7 +11,7 @@ if FOUND_GCJX
> > > > >  JCOMPILER = $(GCJX) -bootclasspath '' -sourcepath '' -classpath 
> > > > > $(top_builddir)/lib:.
> > > > >  else
> > > > >  if FOUND_ECJ
> > > > > -JCOMPILER = $(ECJ) --bootclasspath '$(top_builddir)/lib' --classpath 
> > > > > .
> > > > > +JCOMPILER = $(ECJ) -bootclasspath '$(top_builddir)/lib' -classpath .
> > > > >  else
> > > > >  error dunno how to setup the JCOMPILER and compile
> > > > >  endif
> > > > 
> > > > In a separate patch this would be obvious and already in I guess. ;-)
> > > > 
> > > 
> > > Yes, this is my bad; I did this a while ago and forgot to commit it (I
> > > only spotted this when testing the generics branch).  At least it's the
> > > same sort of file... ;)
> > > 
> > > > > Index: lib/Makefile.am
> > > > > ===
> > > > > RCS file: /cvsroot/classpath/classpath/lib/Makefile.am,v
> > > > > retrieving revision 1.79
> > > > > diff -u -3 -p -u -r1.79 Makefile.am
> > > > > --- lib/Makefile.am   7 Feb 2005 02:32:37 -   1.79
> > > > > +++ lib/Makefile.am   11 Apr 2005 02:50:04 -
> > > > > @@ -53,6 +53,7 @@ install-data-local: genclasses compile-c
> > > > >   cp -R java $(DESTDIR)$(pkgdatadir)
> > > > >   cp -R javax $(DESTDIR)$(pkgdatadir)
> > > > >   cp -R org $(DESTDIR)$(pkgdatadir)
> > > > > + cp -R META-INF $(DESTDIR)$(pkgdatadir)
> > > > >  
> > > > >  # FIXME - should mimic doc/api/Makefile.am instead...
> > > > >  uninstall-local:
> > > > > @@ -60,13 +61,14 @@ uninstall-local:
> > > > >   rm -rf $(DESTDIR)$(pkgdatadir)/java
> > > > >   rm -rf $(DESTDIR)$(pkgdatadir)/javax
> > > > >   rm -rf $(DESTDIR)$(pkgdatadir)/org
> > > > > + rm -rf $(DESTDIR)$(pkgdatadir)/META-INF
> > > > >  
> > > > >  endif # INSTALL_CLASS_FILES
> > > > >  
> > > > >  .PHONY: genclasses
> > > > >  
> > > > >  glibj.zip: classes compile-classes resources
> > > > > - if test "$(ZIP)" != ""; then $(ZIP) -r -D glibj.zip gnu java 
> > > > > javax org > /dev/null; fi
> > > > > + if test "$(ZIP)" != ""; then $(ZIP) -r -D glibj.zip gnu java 
> > > > > javax org META-INF > /dev/null; fi
> > > > >  
> > > > >  resources:
> > > > >   if ! [ -e gnu ]; then mkdir gnu; fi
> > > > > @@ -78,6 +80,8 @@ resources:
> > > > >  

Re: [cp-patches] FYI: The first working CORBA prototype

2005-05-16 Thread Michael Koch
On Sun, May 15, 2005 at 03:17:24AM +0200, Meskauskas Audrius wrote:
> 2005-05-15  Audrius Meskauskas, Lithuania  <[EMAIL PROTECTED]>
> 
> I have just committed the following IIOP (CORBA) implementation:

You broke Classpath compilation by introducing code using JUnit.
Please fix this.


Michael
-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/


___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


Re: [cp-patches] RFC: javax/swing/JTree.java (getExpandedDescendants): implemented

2005-05-13 Thread Michael Koch
On Thu, May 12, 2005 at 02:40:52PM +0200, Jan Röhrich wrote:
> 2005-05-12  Jan Roehrich  <[EMAIL PROTECTED]>
> 
>   * javax/swing/JTree.java
>   (getExpandedDescendants): implemented
> 
> 
> -
> 
> This is my first contribution to classpath. I would like to contribute
> to the javax.swing package, especially JTree an Plaf. Would be nice I
> somebody can add me as project member on savannah. My savannah user name
> is "roehrijn".

Do you have already assigned a copyright assignment with FSF for GNU
classpath? If not please contact Mark Wielaard about this, He can also
setup CVS access for you. Unfortunately this legal stuff can take some
time ...


Michael
-- 
http://www.worldforge.org/


___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


Re: [cp-patches] Patch: RFC: add --with-vm-classes

2005-05-05 Thread Michael Koch
On Thu, May 05, 2005 at 11:14:33AM -0600, Tom Tromey wrote:

I haven't tested the patch yet. I just have a little comment...
> 
> I also made compile-classes and friends no longer conditional on
> INSTALL_CLASS_FILES; the idea being that libgcj wants to configure
> Classpath with '--with-glibj=none' -- but still wants the class files
> to be built.  It wasn't clear to me if not building the classes here
> was intentional; if so I can easily add a new mode for --with-glibj.

... This functionalitz is needed when packaging GNU classpath, e.g. for Debian.
This way glibj.zip needs only to be built on one arch and all other archs build
only the native parts. This was needed to make GNU classpath build e.g. on arm
which has not enough memory for gcj and jikes runs into an endless loop.
Plus building binary-indep parts again and again on 12 architetures is a waste
of CPU.


Michael
-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/


___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


[cp-patches] [Patch][RFC] Moving locale data to properties files

2005-05-04 Thread Michael Koch
Hi list,


I moved all locale data into properties file now.
These files are generated by an experimental version fo gnu.localegen
part of cp-tools. The functional changes to our sources are attached.
The locale data changes is uploaded here:
http://www.kaffe.org/~mkoch/locales-data.diff.bz2
(the file is 530 kb in bzip2 format, 5.5 MB unpacked)

Please comment on the changes.


Michael


2005-05-04  Michael Koch  <[EMAIL PROTECTED]>

* java/text/DateFormatSymbols.java
(getStringArray): New method.
(getZoneStrings): Likewise.
(DateFormatSymbols): Load symbols from properties files.
* java/util/Locale.java
(getDisplayLanguage): Handle new way to load language names.
(getDisplayCountry): Handle new way to load territory names.
(getDisplayVariant): Handle new way to load variant names.
* lib/Makefile.am, lib/gen-classlist.sh.in:
No need to special case classes from gnu.java.locale anymore.
* scripts/generate-locale-list.sh:
Generate list from the new properties files.

Index: java/text/DateFormatSymbols.java
===
RCS file: /cvsroot/classpath/classpath/java/text/DateFormatSymbols.java,v
retrieving revision 1.15
diff -u -r1.15 DateFormatSymbols.java
--- java/text/DateFormatSymbols.java16 Feb 2005 11:18:38 -  1.15
+++ java/text/DateFormatSymbols.java4 May 2005 07:14:56 -
@@ -41,6 +41,7 @@
 import java.util.Locale;
 import java.util.MissingResourceException;
 import java.util.ResourceBundle;
+import java.util.StringTokenizer;
 
 /**
  * This class acts as container for locale specific date/time formatting
@@ -78,13 +79,62 @@
   transient String[] dateFormats;
   transient String[] timeFormats;
 
-  private String[] formatsForKey(ResourceBundle res, String key) 
+  private static String[] getStringArray(ResourceBundle res, String name)
+  { 
+int index = 0;
+String data = res.getString(name);
+StringTokenizer st = new StringTokenizer(data, "\u00ae");
+String[] array = new String[st.countTokens()];
+
+while (st.hasMoreTokens())
+  {
+array[index] = st.nextToken();
+   index++;
+  }
+
+return array;
+  }
+
+  private String[][] getZoneStrings(ResourceBundle res)
   {
-String[] values = new String [formatPrefixes.length];
-for (int i = 0; i < formatPrefixes.length; i++)
+try
+  {
+int index = 0;
+String data = res.getString("zoneStrings");
+StringTokenizer st = new StringTokenizer(data, "\u00ae\u00ae");
+String[][] array = new String[st.countTokens()][];
+
+while (st.hasMoreTokens())
+  {
+   int index2 = 0;
+   String token = st.nextToken();
+   StringTokenizer st2 = new StringTokenizer(token, "\u00ae");
+array[index] = new String[st2.countTokens()];
+
+   while (st2.hasMoreTokens())
+ {
+array[index][index2] = st2.nextToken();
+index2++;
+ }
+
+   index++;
+  }
+
+return array;
+  }
+catch (MissingResourceException e)
   {
-values[i] = res.getString(formatPrefixes[i]+key);
+   return new String[0][];
   }
+  }
+  
+  private String[] formatsForKey(ResourceBundle res, String key) 
+  {
+String[] values = new String[formatPrefixes.length];
+
+for (int i = 0; i < formatPrefixes.length; i++)
+  values[i] = res.getString(formatPrefixes[i] + key);
+  
 return values;
   }
 
@@ -101,15 +151,14 @@
   = ResourceBundle.getBundle("gnu.java.locale.LocaleInformation", locale,
 ClassLoader.getSystemClassLoader());
 
-ampms = res.getStringArray ("ampms");
-eras = res.getStringArray ("eras");
-localPatternChars = res.getString ("localPatternChars");
-months = res.getStringArray ("months");
-shortMonths = res.getStringArray ("shortMonths");
-shortWeekdays = res.getStringArray ("shortWeekdays");
-weekdays = res.getStringArray ("weekdays");
-zoneStrings = (String[][]) res.getObject ("zoneStrings");
-
+ampms = getStringArray(res, "ampms");
+eras = getStringArray(res, "eras");
+localPatternChars = res.getString("localPatternChars");
+months = getStringArray(res, "months");
+shortMonths = getStringArray(res, "shortMonths");
+shortWeekdays = getStringArray(res, "shortWeekdays");
+weekdays = getStringArray(res, "weekdays");
+zoneStrings = getZoneStrings(res);
 dateFormats = formatsForKey(res, "DateFormat");
 timeFormats = formatsForKey(res, "TimeFormat");
   }
Index: java/util/Locale.java
=

Re: [cp-patches] Patch: FYI: update eclipse infrastructure

2005-05-03 Thread Michael Koch
On Mon, May 02, 2005 at 09:37:11AM +0200, Robert Schuster wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Hi Tom,
> I am right that this needs at least Eclipse 3.0?

Afaik this needs 3.1M?. 3.0 doesnt work for me.


Michael
-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/


___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


Re: [cp-patches] RFC: hacking guide - unrealistic code paths

2005-05-02 Thread Michael Koch
On Mon, May 02, 2005 at 09:35:48AM +0200, Robert Schuster wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Hi.
> 
> > I would prefer our own Error/Excpetion with preset text message. Otherwise
> > we will get a different message string all over depending on who wrote the
> > code.
> I think that is a good idea. Do we have such a class already? If not
> should it be a subclass of InternalError?

a subclass of InternalError might be a good start.


Michael
-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/


___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


[cp-patches] [Patch] java.text.DecimalFormat

2005-05-02 Thread Michael Koch
Hi list,


I just commited the attached patch to fix bug #12877.
It fixes an issue with java.text.DecimalFormat.hashCode().


Michael


2005-05-02  David Gilbert  <[EMAIL PROTECTED]>

* java/text/DecimalFormat.java
(hashCode): Reimplemented and added API docs.

Index: java/text/DecimalFormat.java
===
RCS file: /cvsroot/classpath/classpath/java/text/DecimalFormat.java,v
retrieving revision 1.21
diff -u -r1.21 DecimalFormat.java
--- java/text/DecimalFormat.java27 Mar 2005 00:09:07 -  1.21
+++ java/text/DecimalFormat.java2 May 2005 17:21:34 -
@@ -1,5 +1,5 @@
 /* DecimalFormat.java -- Formats and parses numbers
-   Copyright (C) 1999, 2000, 2001, 2003, 2004  Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005  Free Software Foundation, 
Inc.
 
 This file is part of GNU Classpath.
 
@@ -819,12 +819,14 @@
 return positiveSuffix;
   }
 
-  public int hashCode ()
+  /**
+   * Returns a hash code for this object.
+   *
+   * @return A hash code.
+   */
+  public int hashCode()
   {
-int hash = (negativeSuffix.hashCode() ^ negativePrefix.hashCode()
-   ^positivePrefix.hashCode() ^ positiveSuffix.hashCode());
-// FIXME.
-return hash;
+return toPattern().hashCode();
   }
 
   public boolean isDecimalSeparatorAlwaysShown ()
___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


[cp-patches] [Patch] Don't include CVS files in release tarball

2005-05-02 Thread Michael Koch
Hi list,


I just commited the attached patch to fix bug #12934.
We have to delete cvs files for resource directories when copying them
into the release tarball.


Michael


2005-05-02  Michael Koch  <[EMAIL PROTECTED]>

* lib/Makefile.am: Delete CVS directories and .cvsignore files
for resources we copy into the release tarball.

Index: lib/Makefile.am
===
RCS file: /cvsroot/classpath/classpath/lib/Makefile.am,v
retrieving revision 1.79
diff -u -r1.79 Makefile.am
--- lib/Makefile.am 7 Feb 2005 02:32:37 -   1.79
+++ lib/Makefile.am 2 May 2005 17:15:11 -
@@ -127,8 +127,8 @@
mkdir -p $(distdir)
cp -dfR $(top_srcdir)/gnu $(top_srcdir)/java $(top_srcdir)/javax 
$(top_srcdir)/org $(top_srcdir)/vm $(top_srcdir)/resource $(top_distdir)
 # Delete not wanted files.
-   $(FIND) $(top_distdir)/gnu $(top_distdir)/java $(top_distdir)/javax 
$(top_distdir)/org $(top_distdir)/vm -name CVS -print | xargs rm -fr
-   $(FIND) $(top_distdir)/gnu $(top_distdir)/java $(top_distdir)/javax 
$(top_distdir)/org $(top_distdir)/vm -name .cvsignore -print | xargs rm -f
+   $(FIND) $(top_distdir)/gnu $(top_distdir)/java $(top_distdir)/javax 
$(top_distdir)/org $(top_distdir)/vm $(top_distdir)/resource -name CVS -print | 
xargs rm -fr
+   $(FIND) $(top_distdir)/gnu $(top_distdir)/java $(top_distdir)/javax 
$(top_distdir)/org $(top_distdir)/vm $(top_distdir)/resource -name .cvsignore 
-print | xargs rm -f
$(FIND) $(top_distdir)/gnu $(top_distdir)/java $(top_distdir)/javax 
$(top_distdir)/org $(top_distdir)/vm -name class-dependencies.conf -print | 
xargs rm -f
rm -f $(top_distdir)/gnu/classpath/Configuration.java
rm -f $(top_distdir)/java/util/LocaleData.java
___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


Re: [cp-patches] RFC: hacking guide - unrealistic code paths

2005-05-01 Thread Michael Koch
On Sat, Apr 30, 2005 at 03:03:26AM +0200, Robert Schuster wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Hi,
> after a discussion on IRC about the latest issue on unrealistic code
> paths we decided to make it a requirement to mark them with exceptions.
> 
> This update to hacking.texinfo describes that.
> 
> > 2005-04-30  Robert Schuster  <[EMAIL PROTECTED]>
> > 
> > * doc/hacking.texinfo: Added section about dealing with
> > unrealistic code paths.
> 
> Is that OK for everyone?
> 
> cu
> Robert
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.1 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iD8DBQFCctleG9cfwmwwEtoRAv05AJ9eGEGw9zj52UBvlSBxrhVQEY25mQCgkkuM
> x2PEyC7utEqv2eTGKq1YO/4=
> =TmKd
> -END PGP SIGNATURE-

> Index: doc/hacking.texinfo
> ===
> RCS file: /cvsroot/classpath/classpath/doc/hacking.texinfo,v
> retrieving revision 1.34
> diff -u -r1.34 hacking.texinfo
> --- doc/hacking.texinfo   27 Mar 2005 15:38:38 -  1.34
> +++ doc/hacking.texinfo   30 Apr 2005 00:51:57 -
> @@ -11,7 +11,7 @@
>  This file contains important information you will need to know if you
>  are going to hack on the GNU Classpath project code.
>  
> -Copyright (C) 1998,1999,2000,2001,2002,2003,2004 Free Software Foundation, 
> Inc.
> +Copyright (C) 1998,1999,2000,2001,2002,2003,2004,2005 Free Software 
> Foundation, Inc.
>  
>  @ifnotplaintext
>  @dircategory GNU Libraries
> @@ -28,6 +28,7 @@
>  @author John Keiser
>  @author C. Brian Jones
>  @author Mark J. Wielaard
> [EMAIL PROTECTED] Robert Schuster
>  
>  @page
>  @vskip 0pt plus 1filll
> @@ -480,9 +481,10 @@
>  
>  @menu
>  * Source Code Style Guide:: 
> +* Dealing with unrealistic code paths::
>  @end menu
>  
> [EMAIL PROTECTED] Source Code Style Guide,  , Programming Standards, 
> Programming Standards
> [EMAIL PROTECTED] Source Code Style Guide, Dealing with unrealistic code 
> paths, Programming Standards, Programming Standards
>  @comment node-name, next, previous, up
>  @section Java source coding style
>  
> @@ -711,6 +713,51 @@
>  implementation.
>  @end itemize
>  
> [EMAIL PROTECTED] Dealing with unrealistic code paths, , Source Code Style 
> Guide, Programming Standards
> [EMAIL PROTECTED] node-name, next, previous, up
> [EMAIL PROTECTED] Unrealistic code paths
> +
> +As the paper at @uref{http://www.psgd.org/paul/docs/canthappen.html} suggests
> +one should avoid thinking that there is something like an unrealistic
> +code path. This section presents how we decided to deal with that.
> +
> +We consider something an unrealistic code path when it does something like 
> this
> +(from javax.swing.JTextArea):
> +
> [EMAIL PROTECTED]
> +try
> [EMAIL PROTECTED]
> + getDocument().insertString(getText().length(), toAppend, null);
> [EMAIL PROTECTED]
> +catch (BadLocationException exception)
> [EMAIL PROTECTED]
> + // This cannot happen as we check offset above.
> [EMAIL PROTECTED]
> [EMAIL PROTECTED] example
> +
> +Following the Java semantics the BadLocationException will never be thrown 
> but
> +what if the runtime's JIT compiler emitted wrong code in that situation?
> +Do not forget that a lot of software is needed to get a piece of Java 
> bytecode
> +to run and all that software may have bugs. Therefore code it like this:
> +
> [EMAIL PROTECTED]
> +try
> [EMAIL PROTECTED]
> + getDocument().insertString(getText().length(), toAppend, null);
> [EMAIL PROTECTED]
> +catch (BadLocationException exception)
> [EMAIL PROTECTED]
> + /* This shouldn't happen in theory -- but, if it does...  */
> + throw new InternalError("Unexpected exception occurred.", exception);

I would prefer our own Error/Excpetion with preset text message. Otherwise
we will get a different message string all over depending on who wrote the
code.


Michael
-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/


___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


[cp-patches] [Patch] java.nio.charset.Charset.defaultCharset()

2005-04-28 Thread Michael Koch
Hi list,


I commited the attached patch to reformat the defaultCharset() method of
java.nio.charset.Charset.


Michael


2005-04-29  Michael Koch  <[EMAIL PROTECTED]>

* java/nio/charset/Charset.java
(defaultCharset): Reformatted.

Index: java/nio/charset/Charset.java
===
RCS file: /cvsroot/classpath/classpath/java/nio/charset/Charset.java,v
retrieving revision 1.19
diff -u -r1.19 Charset.java
--- java/nio/charset/Charset.java   28 Apr 2005 05:39:21 -  1.19
+++ java/nio/charset/Charset.java   29 Apr 2005 06:47:34 -
@@ -1,5 +1,5 @@
 /* Charset.java -- 
-   Copyright (C) 2002, 2004  Free Software Foundation, Inc.
+   Copyright (C) 2002, 2004, 2005  Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -126,22 +126,39 @@
   public static Charset defaultCharset()
   {
 String encoding;
+
 try 
   {
encoding = System.getProperty("file.encoding");
-  } catch(SecurityException e) {
+  }
+catch(SecurityException e)
+  {
+   // Use fallback.
encoding = "ISO-8859-1";
-  } catch(IllegalArgumentException e) {
+  }
+catch(IllegalArgumentException e)
+  {
+   // Use fallback.
encoding = "ISO-8859-1";
   }
 
 try
   {
return forName(encoding);
-  } catch(UnsupportedCharsetException e) {
-  } catch(IllegalCharsetNameException e) {
-  } catch(IllegalArgumentException e) {
   }
+catch(UnsupportedCharsetException e)
+  {
+   // Ignore.
+  }
+catch(IllegalCharsetNameException e)
+  {
+   // Ignore.
+  }
+catch(IllegalArgumentException e)
+  {
+   // Ignore.
+  }
+
 throw new IllegalStateException("Can't get default charset!");
   }
 
___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


[cp-patches] [Patch] gnu.java.net.protocol.http.HTTPConnection

2005-04-28 Thread Michael Koch
Hi list,


I commited the attached obvious patch to remove user agent handling in
gnu.java.net.protocol.http.HTTPConnection. This is done in a better way
in gnu.classpath.SystemProperties and friends.


Michael


2005-04-29  Michael Koch  <[EMAIL PROTECTED]>

* gnu/java/net/protocol/http/HTTPConnection.java:
(userAgent): Initialize from system properties.
(initUserAgent): Removed.

Index: gnu/java/net/protocol/http/HTTPConnection.java
===
RCS file: /cvs/gcc/gcc/libjava/gnu/java/net/protocol/http/HTTPConnection.java,v
retrieving revision 1.3
diff -u -r1.3 HTTPConnection.java
--- gnu/java/net/protocol/http/HTTPConnection.java  18 Apr 2005 18:40:23 
-  1.3
+++ gnu/java/net/protocol/http/HTTPConnection.java  29 Apr 2005 06:25:45 
-
@@ -1,5 +1,5 @@
 /* HTTPConnection.java --
-   Copyright (C) 2004 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2005  Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -39,6 +39,7 @@
 package gnu.java.net.protocol.http;
 
 import gnu.classpath.Configuration;
+import gnu.classpath.SystemProperties;
 import gnu.java.net.EmptyX509TrustManager;
 import gnu.java.net.protocol.http.event.ConnectionEvent;
 import gnu.java.net.protocol.http.event.ConnectionListener;
@@ -83,27 +84,7 @@
*/
   public static final int HTTPS_PORT = 443;
 
-  private static final String userAgent = initUserAgent();
-
-  private static String initUserAgent()
-  {
-try
-  {
-StringBuffer buf = new StringBuffer("libgcj");
-buf.append(" (");
-buf.append(System.getProperty("os.name"));
-buf.append("; ");
-buf.append(System.getProperty("os.arch"));
-buf.append("; ");
-buf.append(System.getProperty("user.language"));
-buf.append(")");
-return buf.toString();
-  }
-catch (SecurityException e)
-  {
-return "inetlib/1.1";
-  }
-  }
+  private static final String userAgent = 
SystemProperties.getProperty("http.agent");
 
   /**
* The host name of the server to connect to.
___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


[cp-patches] [Patch] java.lang.ClassLoader

2005-04-28 Thread Michael Koch
Hi list,


I just commited the attached patch to merge java.lang.ClassLoader more
with GCC Head.


Michael


2005-04-29  Michael Koch  <[EMAIL PROTECTED]>

* java/lang/ClassLoader.java:
Fixed formatting.

Index: java/lang/ClassLoader.java
===
RCS file: /cvsroot/classpath/classpath/java/lang/ClassLoader.java,v
retrieving revision 1.48
diff -u -r1.48 ClassLoader.java
--- java/lang/ClassLoader.java  28 Mar 2005 23:47:36 -  1.48
+++ java/lang/ClassLoader.java  29 Apr 2005 05:38:17 -
@@ -471,8 +471,9 @@
   domain = StaticData.defaultProtectionDomain;
 if (! initialized)
   throw new SecurityException("attempt to define class from uninitialized 
class loader");
+
 Class retval = VMClassLoader.defineClass(this, name, data,
- offset, len, domain);
+offset, len, domain);
 loadedClasses.put(retval.getName(), retval);
 return retval;
   }
___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


[cp-patches] [Patch] java.net.InetAddress

2005-04-28 Thread Michael Koch
Hi list,


I just commited the attached patch to fix a javadoc in
java.net.InetAddress.


Michael


2005-04-29  Michael Koch  <[EMAIL PROTECTED]>

* java/net/InetAddress.java
(aton): Fixed javadoc.

Index: java/net/InetAddress.java
===
RCS file: /cvsroot/classpath/classpath/java/net/InetAddress.java,v
retrieving revision 1.40
diff -u -r1.40 InetAddress.java
--- java/net/InetAddress.java   26 Apr 2005 07:44:07 -  1.40
+++ java/net/InetAddress.java   29 Apr 2005 05:36:10 -
@@ -560,8 +560,10 @@
   }
 
   /**
-   * If host is a valid numeric IP address, return the numeric address.
+   * If hostname is a valid numeric IP address, return the numeric address.
* Otherwise, return null.
+   *
+   * @param hostname the name of the host
*/
   private static byte[] aton(String hostname)
   {
___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


Re: [cp-patches] [Patch] javax.swing.JTextArea: Suggesting to revert.

2005-04-28 Thread Michael Koch
On Thu, Apr 28, 2005 at 01:40:13PM -0500, Archie Cobbs wrote:
> Meskauskas Audrius wrote:
> >>-// This cannot happen as we check offset above.
> >>-throw new Error("Please report a bug", e);
> >>+ // This cannot happen as we check offset above.
> >In this world, it is very difficult to say that something really cannot never
> >happen. The history of Titanic (that cannot sink) or, more recently,
> >the Columbia shuttle (no need to inspect the reliable themal isolation),
> >indicates that errors do happen, regardless if we are sure
> >on something or not.
> 
> What about assert? Can we use assert in Classpath code yet?

No, we cant yet.


Michael.
-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/


___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


Re: [cp-patches] [Patch] javax.swing.JTextArea: Suggesting to revert.

2005-04-28 Thread Michael Koch
On Thu, Apr 28, 2005 at 07:44:05PM +0200, Meskauskas Audrius wrote:
> >-// This cannot happen as we check offset above.
> >-throw new Error("Please report a bug", e);
> >+ // This cannot happen as we check offset above.
> 
> In this world, it is very difficult to say that something really cannot never
> happen. The history of Titanic (that cannot sink) or, more recently,
> the Columbia shuttle (no need to inspect the reliable themal isolation),
> indicates that errors do happen, regardless if we are sure
> on something or not.
> 
> As we known, one of the first Ariane rockets exploded just because
> the computer software has thrown an exception from where it should
> never be thrown. The Mars rover had software problems in the past.
> These programs were surely written by professionals.
> 
> I think, it is especially difficult to be sure about something in the project
> like Classpath, where any part of the code may be modified in the
> future by another programmer. Even if the code surely does not throw
> any exceptions now, the things may change after a couple of years.
> 
> Throwing an error makes a potential bug clearly visible. First time it
> happens it will be noticed and, thanks to the open source, will be corrected.
> 
> The empty catch statement hides the fact that exception has been
> thrown. The user may never find that is going wrong, but his/her application
> the will not work as expected. The user can just conclude that
> Classpath is unstable, preferring some alternative library. The worst,
> we may not receive any bug report.
> 
> By the way, I think it is especially nasty to return null after catching
> that "will never be thrown". In that case the null pointer exception
> can be thrown in the users code, probably much later and very far
> from the point, where our method has been called.
> 
> I think, it might be better to revert this patch.

While I generally agree I disagree in this case.


Michael
-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/


___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


[cp-patches] [Patch] javax.swing.JTextArea

2005-04-27 Thread Michael Koch
Hi list,


I commited the attached patch to merge javax.swing.JTextArea with libgcj
HEAD.


Michael


2005-04-28  Michael Koch  <[EMAIL PROTECTED]>

* javax/swing/JTextArea.java
(replaceRange): Removed error throwing.

Index: javax/swing/JTextArea.java
===
RCS file: /cvsroot/classpath/classpath/javax/swing/JTextArea.java,v
retrieving revision 1.9
diff -u -r1.9 JTextArea.java
--- javax/swing/JTextArea.java  26 Feb 2005 20:34:27 -  1.9
+++ javax/swing/JTextArea.java  28 Apr 2005 05:45:29 -
@@ -474,8 +474,7 @@
   }
 catch (BadLocationException e)
   {
-// This cannot happen as we check offset above.
-throw new Error("Please report a bug", e);
+   // This cannot happen as we check offset above.
   }
   }
 }
___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


[cp-patches] [Patch] java.security merges

2005-04-27 Thread Michael Koch
Hi list,

I just commited the attached patches to merge them from libgxj to GNU
classpath.


Michael


2005-04-28  Michael Koch  <[EMAIL PROTECTED]>

* java/security/AccessControlContext.java:
Reformatted.

2005-04-28  Andreas Tobler  <[EMAIL PROTECTED]>

* java/security/Security.java (Security): Silence the warning about no
providers found in the no debug case.

Index: java/security/AccessControlContext.java
===
RCS file: /cvsroot/classpath/classpath/java/security/AccessControlContext.java,v
retrieving revision 1.9
diff -u -r1.9 AccessControlContext.java
--- java/security/AccessControlContext.java 4 Jul 2004 18:32:32 -   
1.9
+++ java/security/AccessControlContext.java 28 Apr 2005 05:42:18 -
@@ -65,7 +65,7 @@
*
* @param context The ProtectionDomains to use
*/
-  public AccessControlContext(ProtectionDomain[]context)
+  public AccessControlContext(ProtectionDomain[] context)
   {
 HashSet domains = new HashSet (context.length);
 for (int i = 0; i < context.length; i++)
Index: java/security/Security.java
===
RCS file: /cvsroot/classpath/classpath/java/security/Security.java,v
retrieving revision 1.34
diff -u -r1.34 Security.java
--- java/security/Security.java 6 Dec 2004 20:43:13 -   1.34
+++ java/security/Security.java 28 Apr 2005 05:42:18 -
@@ -40,6 +40,8 @@
 
 import gnu.classpath.SystemProperties;
 
+import gnu.classpath.Configuration;
+
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.URL;
@@ -79,20 +81,27 @@
   if (!loadProviders (base, "classpath")
  && !loaded
  && providers.size() == 0)
-{
- // No providers found and both security files failed to load properly.
- System.err.println
-   ("WARNING: could not properly read security provider files:");
- System.err.println
-   (" " + base + "/security/" + vendor + ".security");
- System.err.println
-   (" " + base + "/security/" + "classpath" + ".security");
- System.err.println
-   (" Falling back to standard GNU security provider");
- providers.addElement (new gnu.java.security.provider.Gnu());
-}
-  }
-
+ {
+ if (Configuration.DEBUG)
+ {
+ /* No providers found and both security files failed to
+  * load properly. Give a warning in case of DEBUG is
+  * enabled. Could be done with java.util.logging later.
+  */
+ System.err.println
+ ("WARNING: could not properly read security provider 
files:");
+ System.err.println
+ (" " + base + "/security/" + vendor
+  + ".security");
+ System.err.println
+ (" " + base + "/security/" + "classpath"
+  + ".security");
+ System.err.println
+ (" Falling back to standard GNU security 
provider");
+ }
+ providers.addElement (new gnu.java.security.provider.Gnu());
+ }
+}
   // This class can't be instantiated.
   private Security()
   {
___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


[cp-patches] [Patch] java.nio.charset.Charset

2005-04-27 Thread Michael Koch
Hi list,


I just commited the attached patch to merge java.nio.charset.Charset a
bit more with libgcj. The renaming works around a limitation in CNI
which doesn't allow static fields and and static methods with the same
name in one class.


Michael


2005-04-28  Michael Koch  <[EMAIL PROTECTED]>

* java/nio/charset/Charset.java
(providers2): Renamed from 'providers'.

Index: java/nio/charset/Charset.java
===
RCS file: /cvsroot/classpath/classpath/java/nio/charset/Charset.java,v
retrieving revision 1.18
diff -u -r1.18 Charset.java
--- java/nio/charset/Charset.java   19 Apr 2005 22:40:22 -  1.18
+++ java/nio/charset/Charset.java   28 Apr 2005 05:39:01 -
@@ -185,7 +185,7 @@
   {
 checkName (charsetName);
 Charset cs = null;
-CharsetProvider[] providers = providers();
+CharsetProvider[] providers = providers2();
 for (int i = 0; i < providers.length; i++)
   {
 cs = providers[i].charsetForName(charsetName);
@@ -199,7 +199,7 @@
   {
 TreeMap charsets = new TreeMap(String.CASE_INSENSITIVE_ORDER);
 
-CharsetProvider[] providers = providers();
+CharsetProvider[] providers = providers2();
 for (int j = 0; j < providers.length; j++)
   {
 for (Iterator i = providers[j].charsets(); i.hasNext(); )
@@ -222,7 +222,7 @@
* java.nio.charset.spi.CharsetProvider in the resource directory
* META-INF/services.
*/
-  private static CharsetProvider[] providers()
+  private static CharsetProvider[] providers2()
   {
 if (providers == null)
   {
___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


[cp-patches] Re: [commit-cp] classpath daily snapshot 20050426 FAILED

2005-04-26 Thread Michael Koch
On Tue, Apr 26, 2005 at 11:31:41AM +0200, Mark Wielaard wrote:

> What version of autoconf do you have installed?
> Mine aclocal.m4 says it was generated with 1.9.5.
> And it does AC_DEFUN AC_LIB_PREPARE_PREFIX, AC_LIB_RPATH,
> AC_LIB_LINKFLAGS_BODY and AC_LIB_APPENDTOVAR.

The autobuilder uses 1.9.1. Shall I update it or do you want to make
it work with this version? If not we should update our README and all
docs mentioning automake versions.


Greetings,

Michael
-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/


___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


  1   2   3   >