Re: [PATCH] Honour CPNIO_DSYNC flag if set.

2016-09-30 Thread Andrew Hughes
- Original Message -
> Hello.
> 
> Any plans to process these bug reports? Some of these were first
> reported in Jan 2015 (and a solution was already proposed)
> 

Yes, I haven't forgotten, but as I say, I'm very busy with OpenJDK
and IcedTea as well.

> Guillermo
> 
> 2016-04-14 21:33 GMT+02:00 Andrew Hughes <gnu.and...@redhat.com>:
> >
> >
> > - Original Message -----
> >> 2016-04-14 12:45 GMT+02:00 Andrew Hughes <gnu.and...@redhat.com>:
> >>
> >> >
> >> > - Original Message -
> >> > > Hello ? Anybody here ?
> >> > >
> >> >
> >> > Yes, but very busy right now.
> >> >
> >>
> >> I have created entries in the bug tracker for this bug and also for the
> >> CPNIO_DSYNC problem and autoconf macros issue in 0.99, as all of them are
> >> still outstanding. At least this way, the next time I need to ask about
> >> the
> >> status of these I will not need to search emails that are months or years
> >> old.
> >>
> >> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70658
> >> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70659
> >> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70660
> >>
> >> Guillermo
> >>
> >
> > Yeah, I saw them. I'll try and take a look when things are quieter.
> >
> > Thanks for the work,
> > --
> > Andrew :)
> >
> > Senior Free Java Software Engineer
> > Red Hat, Inc. (http://www.redhat.com)
> >
> > PGP Key: ed25519/35964222 (hkp://keys.gnupg.net)
> > Fingerprint = 5132 579D D154 0ED2 3E04  C5A0 CFDA 0F9B 3596 4222
> >
> >
> 
> 
> 
> --
> Guillermo Rodriguez Garcia
> guille.rodrig...@gmail.com
> 

-- 
Andrew :)

Senior Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: ed25519/0xCFDA0F9B35964222 (hkp://keys.gnupg.net)
Fingerprint = 5132 579D D154 0ED2 3E04  C5A0 CFDA 0F9B 3596 4222





Re: [PATCH] Honour CPNIO_DSYNC flag if set.

2016-04-14 Thread Andrew Hughes


- Original Message -
> 2016-04-14 12:45 GMT+02:00 Andrew Hughes <gnu.and...@redhat.com>:
> 
> >
> > - Original Message -
> > > Hello ? Anybody here ?
> > >
> >
> > Yes, but very busy right now.
> >
> 
> I have created entries in the bug tracker for this bug and also for the
> CPNIO_DSYNC problem and autoconf macros issue in 0.99, as all of them are
> still outstanding. At least this way, the next time I need to ask about the
> status of these I will not need to search emails that are months or years
> old.
> 
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70658
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70659
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70660
> 
> Guillermo
> 

Yeah, I saw them. I'll try and take a look when things are quieter.

Thanks for the work,
-- 
Andrew :)

Senior Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: ed25519/35964222 (hkp://keys.gnupg.net)
Fingerprint = 5132 579D D154 0ED2 3E04  C5A0 CFDA 0F9B 3596 4222





Re: [PATCH] Honour CPNIO_DSYNC flag if set.

2016-04-14 Thread Andrew Hughes


- Original Message -
> Hello ? Anybody here ?
> 

Yes, but very busy right now.

-- 
Andrew :)

Senior Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: ed25519/35964222 (hkp://keys.gnupg.net)
Fingerprint = 5132 579D D154 0ED2 3E04  C5A0 CFDA 0F9B 3596 4222





Re: [PATCH] Honour CPNIO_DSYNC flag if set.

2015-07-28 Thread Andrew Hughes
- Original Message -
 Hello,
 
 Don't want to bug you, but have you had the chance to look into this?
 

Hi Guillermo,

Sorry, I've been busy with the OpenJDK security updates.
I'll try and look into both this week.

Thanks for your patience.

 Guillermo
 
 2015-01-29 18:16 GMT+01:00 Andrew Hughes gnu.and...@redhat.com:
 
 
  - Original Message -
  Hello. Any feedback?
 
 
  2015-01-20 14:10 GMT+01:00 grodriguez guille.rodrig...@gmail.com:
 
   The CPNIO_DSYNC flag was being ignored (only CPNIO_SYNC was honoured).
   This was breaking at least RandomFileAccess when open in rwd mode
   (rws would work as expected).
  
   ---
native/jni/java-nio/gnu_java_nio_VMChannel.c |3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
  
   diff --git a/native/jni/java-nio/gnu_java_nio_VMChannel.c
   b/native/jni/java-nio/gnu_java_nio_VMChannel.c
   index 7899f0b..6a1cf48 100644
   --- a/native/jni/java-nio/gnu_java_nio_VMChannel.c
   +++ b/native/jni/java-nio/gnu_java_nio_VMChannel.c
   @@ -1705,7 +1705,8 @@ Java_gnu_java_nio_VMChannel_open (JNIEnv *env,
   | ((mode  CPNIO_APPEND) ? O_APPEND :
  ((nmode == O_WRONLY) ? O_TRUNC : 0))
   | ((mode  CPNIO_EXCL) ? O_EXCL : 0)
   -   | ((mode  CPNIO_SYNC) ? O_SYNC : 0));
   +   | ((mode  CPNIO_SYNC) ? O_SYNC : 0)
   +   | ((mode  CPNIO_DSYNC) ? O_DSYNC : 0));
  
  npath = JCL_jstring_to_cstring (env, path);
  
   --
   1.7.0.4
  
  
 
 
  --
  Guillermo Rodriguez Garcia
  guille.rodrig...@gmail.com
 
 
  Thanks. I'll apply the patch as soon as I can.
  --
  Andrew :)
 
  Free Java Software Engineer
  Red Hat, Inc. (http://www.redhat.com)
 
  PGP Key: ed25519/35964222 (hkp://keys.gnupg.net)
  Fingerprint = 5132 579D D154 0ED2 3E04  C5A0 CFDA 0F9B 3596 4222
 
  PGP Key: rsa4096/248BDC07 (hkp://keys.gnupg.net)
  Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07
 
 
 
 
 --
 Guillermo Rodriguez Garcia
 guille.rodrig...@gmail.com
 
 

-- 
Andrew :)

Senior Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: ed25519/35964222 (hkp://keys.gnupg.net)
Fingerprint = 5132 579D D154 0ED2 3E04  C5A0 CFDA 0F9B 3596 4222

PGP Key: rsa4096/248BDC07 (hkp://keys.gnupg.net)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: SKIP: TLS bug in gnu/javax/net/ssl/provider

2015-07-09 Thread Andrew Hughes
- Original Message -
 Hi,
 
 Any progress on this? I’d like to report the plan in our research paper.
 

I'll look into this again as soon as I'm finished with the current OpenJDK
security update i.e. in a couple of weeks at most. I plan for an updated
release which fixes this and other recent SSL issues.

I still haven't been able to access the test server you mentioned to me.
I'll try and come up with some other means to test the fix.

 Best,
 Karthik
 
 On 06 Mar 2015, at 14:40, Andrew Hughes gnu.and...@redhat.com wrote:
 
  - Original Message -
  Hi,
  
  We’ve been testing TLS implementations for state machine violations and
  found
  a number of unexpected behaviours.
  See: http://www.smacktls.com
  I am writing to report a bug in classpath’s TLS implementation at
  gnu/javax/net/ssl/provider
  
  Both the client and server in classpath’s TLS library allow the peer to
  skip
  the ChangeCipherSpec message, hence disabling encryption.
  That is, they will accept a Finished message in the handshake even if they
  have not received a ChangeCipherSpec message.
  The easy fix is to require CCS before finished, *and* to ensure that no
  messages are received between CCS and Finished.
  
  The bug allows the peer to downgrade any TLS connection to plaintext.
  This is worrying in itself, but also opens up more serious attacks.
  For example, see the attacks on Java in
  http://http://www.smacktls.com/smack.pdf
  
  I’d be happy to discuss this bug in more details with whoever’s working on
  that bit of the code.
  We have tests and demos and would be happy to help test patches.
  
  Best,
  Karthik
  
  
  
  ___
  Bug-classpath mailing list
  bug-classp...@gnu.org
  https://lists.gnu.org/mailman/listinfo/bug-classpath
  
  
  Funnily enough, I was just reading the site this morning and realising
  that we'd patched this in OpenJDK in January.
  
  I'll take a look at fixing this in the GNU Classpath code and would
  be interested in any tests/demos you have to help. Is the web server
  mentioned on smacktls.com still operational?
  
  Thanks,
  --
  Andrew :)
  
  Free Java Software Engineer
  Red Hat, Inc. (http://www.redhat.com)
  
  PGP Key: ed25519/35964222 (hkp://keys.gnupg.net)
  Fingerprint = 5132 579D D154 0ED2 3E04  C5A0 CFDA 0F9B 3596 4222
  
  PGP Key: rsa4096/248BDC07 (hkp://keys.gnupg.net)
  Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07
 
 

-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: ed25519/35964222 (hkp://keys.gnupg.net)
Fingerprint = 5132 579D D154 0ED2 3E04  C5A0 CFDA 0F9B 3596 4222

PGP Key: rsa4096/248BDC07 (hkp://keys.gnupg.net)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: [GridBagLayout] Orientation- Baseline-relative GridBagConstraints.anchor not implemented?

2015-04-16 Thread Andrew Hughes
- Original Message -
 Hi!
 
 I have just checked out git://git.savannah.gnu.org/classpath.git and see that
 java/awt/GridBagLayout.java has no code related to orientation-relative and
 baseline-relative values for GridBagConstraints.anchor.
 
 Are those values unimplemented as of now?
 
 If yes, anyone working on it right now?
 
 Thank you.
 
 --
 Best regards,
 Eus
 
 

No-one's working on this at present. Any patches would be welcome :)
-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: ed25519/35964222 (hkp://keys.gnupg.net)
Fingerprint = 5132 579D D154 0ED2 3E04  C5A0 CFDA 0F9B 3596 4222

PGP Key: rsa4096/248BDC07 (hkp://keys.gnupg.net)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: [GridBagLayout] Orientation- Baseline-relative GridBagConstraints.anchor not implemented?

2015-04-16 Thread Andrew Hughes
- Original Message -
 Hi Andrew!
 
 17.04.2015, 00:05, Andrew Hughes gnu.and...@redhat.com:
  - Original Message -
   Hi!
 
   I have just checked out git://git.savannah.gnu.org/classpath.git and see
   that
   java/awt/GridBagLayout.java has no code related to orientation-relative
   and
   baseline-relative values for GridBagConstraints.anchor.
 
   Are those values unimplemented as of now?
 
   If yes, anyone working on it right now?
 
   Thank you.
 
   --
   Best regards,
   Eus
 
  No-one's working on this at present. Any patches would be welcome :)
 
 Thank you for the information.
 
 Is copyright assignment needed?
 
 Perhaps a pointer to the procedure to develop a patchset and contribute it?
 

Yes, as a GNU project, code is assigned to the Free Software Foundation:

https://www.gnu.org/licenses/why-assign.html
https://www.fsf.org/licensing/assigning.html/?searchterm=copyright%20assignment

We have a developer's guide here:

https://www.gnu.org/software/classpath/docs/cp-hacking.html

though some of it may have become a little dated. Please feel free to ask
if you have any questions.
 
  --
  Andrew :)
 
  Free Java Software Engineer
  Red Hat, Inc. (http://www.redhat.com)
 
  PGP Key: ed25519/35964222 (hkp://keys.gnupg.net)
  Fingerprint = 5132 579D D154 0ED2 3E04  C5A0 CFDA 0F9B 3596 4222
 
  PGP Key: rsa4096/248BDC07 (hkp://keys.gnupg.net)
  Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07
 
 --
 Best regards,
 Eus
 

-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: ed25519/35964222 (hkp://keys.gnupg.net)
Fingerprint = 5132 579D D154 0ED2 3E04  C5A0 CFDA 0F9B 3596 4222

PGP Key: rsa4096/248BDC07 (hkp://keys.gnupg.net)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: [GridBagLayout] Orientation- Baseline-relative GridBagConstraints.anchor not implemented?

2015-04-16 Thread Andrew Hughes
- Original Message -
 BTW, Andrew, when I am reading the requirements for contributing to GNU
 Classpath, I remember that Sun has released Java under the GPL:
 https://www.fsf.org/news/fsf-welcomes-gpl-java.html
 
 So, do we still need to implement the orientation-  baseline-anchor
 behaviors from scratch instead of simply taking Sun's GPLed code?
 
 BTW, I haven't looked into Sun's code. So, I can still do the clean room
 implementation.
 

Sun (now Oracle)'s code is available as part of the OpenJDK project.
The intention with GNU Classpath is still to provide a clean-room implementation
rather than import wholesale chunks of their code.

However, if you just want quick access to a 1.7 version of GridBag, a quicker
solution may be to just use the OpenJDK package on your distro.

For what it's worth:

http://fuseyism.com/japi/icedtea7-classpath.html#err_missing_java_awt

lists the current state of GNU Classpath compared with the 1.7 API.

 Thanks.
 
 --
 Best regards,
 Eus
 
 

-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: ed25519/35964222 (hkp://keys.gnupg.net)
Fingerprint = 5132 579D D154 0ED2 3E04  C5A0 CFDA 0F9B 3596 4222

PGP Key: rsa4096/248BDC07 (hkp://keys.gnupg.net)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: SKIP: TLS bug in gnu/javax/net/ssl/provider

2015-03-06 Thread Andrew Hughes
- Original Message -
 Hi,
 
 We’ve been testing TLS implementations for state machine violations and found
 a number of unexpected behaviours.
 See: http://www.smacktls.com
 I am writing to report a bug in classpath’s TLS implementation at
 gnu/javax/net/ssl/provider
 
 Both the client and server in classpath’s TLS library allow the peer to skip
 the ChangeCipherSpec message, hence disabling encryption.
 That is, they will accept a Finished message in the handshake even if they
 have not received a ChangeCipherSpec message.
 The easy fix is to require CCS before finished, *and* to ensure that no
 messages are received between CCS and Finished.
 
 The bug allows the peer to downgrade any TLS connection to plaintext.
 This is worrying in itself, but also opens up more serious attacks.
 For example, see the attacks on Java in
 http://http://www.smacktls.com/smack.pdf
 
 I’d be happy to discuss this bug in more details with whoever’s working on
 that bit of the code.
 We have tests and demos and would be happy to help test patches.
 
 Best,
 Karthik
 
 
 
 ___
 Bug-classpath mailing list
 bug-classp...@gnu.org
 https://lists.gnu.org/mailman/listinfo/bug-classpath
 

Funnily enough, I was just reading the site this morning and realising
that we'd patched this in OpenJDK in January.

I'll take a look at fixing this in the GNU Classpath code and would
be interested in any tests/demos you have to help. Is the web server
mentioned on smacktls.com still operational?

Thanks,
-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: ed25519/35964222 (hkp://keys.gnupg.net)
Fingerprint = 5132 579D D154 0ED2 3E04  C5A0 CFDA 0F9B 3596 4222

PGP Key: rsa4096/248BDC07 (hkp://keys.gnupg.net)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: Remove obsolete Solaris 9 support

2014-04-22 Thread Andrew Hughes


- Original Message -
 On Sat, 2014-04-19 at 09:03 +0100, Andrew Haley wrote:
  On 04/16/2014 12:16 PM, Rainer Orth wrote:
   * I'm removing the sys/loadavg.h check from classpath.  Again, I'm
 uncertain if this is desirable.  In the past, classpath changes were
 merged upstream by one of the libjava maintainers.
  
  We should not diverge from GNU Classpath unless there is a strong reason
  to do so.
 
 I think the configure check is mostly harmless, but wouldn't be opposed
 removing it. It really seems to have been added explicitly for Solaris
 9, which is probably really dead by now. Andrew Hughes, you added it
 back in 2008. Are you still using/building on any Solaris 9 setups?
 

I vaguely remember adding it. I was building on the university's Solaris 9
machines at the time. They've long since replaced them with GNU/Linux machines
and I've been at Red Hat for over five years, so those days are long gone :)

I have some Freetype fixes to push to Classpath as well, so I'll fix this too
and look at merging to gcj in the not-too-distant future. I think it's long
overdue. Ideally, the change should be left out of this patch, so as to avoid
conflicts.

 Cheers,
 
 Mark
 
 

Thanks,
-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: I was told to report here...

2014-02-10 Thread Andrew Hughes


- Original Message -
 c4os-pc:~ Admin$ cd Downloads
 c4os-pc:Downloads Admin$ cd Setups
 c4os-pc:Setups Admin$ cd Classpath-0.98
 c4os-pc:Classpath-0.98 Admin$ sh ./configure
 checking build system type... i386-apple-darwin11.4.2
 checking host system type... i386-apple-darwin11.4.2
 checking target system type... i386-apple-darwin11.4.2
 checking for a BSD-compatible install... /usr/bin/install -c
 checking whether build environment is sane... yes
 checking for a thread-safe mkdir -p... ./install-sh -c -d
 checking for gawk... no
 checking for mawk... no
 checking for nawk... no
 checking for awk... awk
 checking whether make sets $(MAKE)... yes
 checking how to create a ustar tar archive... gnutar
 checking for style of include used by make... GNU
 checking for gcc... gcc
 checking for C compiler default output file name... a.out
 checking whether the C compiler works... yes
 checking whether we are cross compiling... no
 checking for suffix of executables...
 checking for suffix of object files... o
 checking whether we are using the GNU C compiler... yes
 checking whether gcc accepts -g... yes
 checking for gcc option to accept ISO C89... none needed
 checking dependency style of gcc... gcc3
 checking how to run the C preprocessor... gcc -E
 checking for grep that handles long lines and -e... /usr/bin/grep
 checking for egrep... /usr/bin/grep -E
 checking for ANSI C header files... yes
 checking for sys/types.h... yes
 checking for sys/stat.h... yes
 checking for stdlib.h... yes
 checking for string.h... yes
 checking for memory.h... yes
 checking for strings.h... yes
 checking for inttypes.h... yes
 checking for stdint.h... yes
 checking for unistd.h... yes
 checking alsa/asoundlib.h usability... no
 checking alsa/asoundlib.h presence... no
 checking for alsa/asoundlib.h... no
 checking dssi.h usability... no
 checking dssi.h presence... no
 checking for dssi.h... no
 checking whether to regenerate the headers... no
 checking whether to regenerate the GJDoc parser... yes
 checking whether ln -s works... yes
 checking for a BSD-compatible install... /usr/bin/install -c
 checking for g++... g++
 checking whether we are using the GNU C++ compiler... yes
 checking whether g++ accepts -g... yes
 checking dependency style of g++... gcc3
 checking for a sed that does not truncate output... /usr/bin/sed
 checking for ld used by gcc...
 /usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld
 checking if the linker
 (/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld) is GNU ld... no
 checking for /usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld
 option to reload object files... -r
 checking for BSD-compatible nm... /usr/bin/nm
 checking how to recognize dependent libraries... pass_all
 checking dlfcn.h usability... yes
 checking dlfcn.h presence... yes
 checking for dlfcn.h... yes
 checking how to run the C++ preprocessor... g++ -E
 checking for g77... no
 checking for xlf... no
 checking for f77... no
 checking for frt... no
 checking for pgf77... no
 checking for cf77... no
 checking for fort77... no
 checking for fl32... no
 checking for af77... no
 checking for xlf90... no
 checking for f90... no
 checking for pgf90... no
 checking for pghpf... no
 checking for epcf90... no
 checking for gfortran... no
 checking for g95... no
 checking for xlf95... no
 checking for f95... no
 checking for fort... no
 checking for ifort... no
 checking for ifc... no
 checking for efc... no
 checking for pgf95... no
 checking for lf95... no
 checking for ftn... no
 checking whether we are using the GNU Fortran 77 compiler... no
 checking whether  accepts -g... no
 checking the maximum length of command line arguments... 196608
 checking command to parse /usr/bin/nm output from gcc object... ok
 checking for objdir... .libs
 checking for ar... ar
 checking for ranlib... ranlib
 checking for strip... strip
 checking for dsymutil... dsymutil
 checking for nmedit... nmedit
 checking for -single_module linker flag... yes
 checking for -exported_symbols_list linker flag... yes
 checking for correct ltmain.sh version... yes
 checking if gcc supports -fno-rtti -fno-exceptions... no
 checking for gcc option to produce PIC... -fno-common
 checking if gcc PIC flag -fno-common works... yes
 checking if gcc static flag -static works... no
 checking if gcc supports -c -o file.o... yes
 checking whether the gcc linker
 (/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld) supports
 shared libraries... yes
 checking dynamic linker characteristics... darwin11.4.2 dyld
 checking how to hardcode library paths into programs... immediate
 checking whether stripping libraries is possible... yes
 checking if libtool supports shared libraries... yes
 checking whether to build shared libraries... yes
 checking whether to build static libraries... no
 configure: creating libtool
 appending configuration tag CXX to libtool
 checking for ld used by g++...
 

Re: [cp-patches] [GNU ClassPath] porting the GTK+3 AWT support

2013-06-06 Thread Andrew Hughes
   added AM_CFLAGS Macro
 Line 62:  -DGTK_DISABLE_SINGLE_INCLUDES
 * native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoGraphics2D.c
   Changed includes
   Line 42:  #include gdk/gdktypes.h to #include gdk/gdk.h
 Line 43:  #include gdk/gdkprivate.h to #include
 gdk/gdkx.h
 * native/jni/gtk-peer/gnu_java_awt_peer_gtk_ComponentGraphics.c
 Changed includes
 Line 41: #include gdk/gdktypes.h to #include
 gdk/gdk.h
 Line 44: #include gdk/gdkprivate.h to #include
 gdk/gdkx.h
 *
 native/jni/gtk-peer/gnu_java_awt_peer_gtk_ComponentGraphicsCopy.c
   Changed includes
   Line 41: #include gdk/gdktypes.h to #include gdk/gdk.h
 Line 44: #include gdk/gdkprivate.h to #include
 gdk/gdkx.h
 * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c
 Changed includes
   Line 43: #include gtk/gtkprivate.h to #include gtk/gtk.h
 * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkVolatileImage.c
 Changed includes
 Line 42: #include gdk/gdktypes.h to #include
 gdk/gdk.h
 Line 45: #include gdk/gdkprivate.h to #include
 gdk/gdkx.h

 
 
 From: Andrew Hughes [gnu.and...@redhat.com]
 Sent: Friday, May 31, 2013 4:22 AM
 To: Farshad Muhammad
 Cc: classpath-patches@gnu.org
 Subject: Re: [cp-patches] [GNU ClassPath] porting the GTK+3 AWT support
 
 - Original Message -
  Hey guys,
  My name is Farshad Muhammad and i've recently been accepted to GSoC 2013.
 
  I will be working to port GTK+3 AWT support for the gtk-peer in the
  classpath
  following a migration guide provided here:
  https://developer.gnome.org/gtk3/3.5/gtk-migrating-2-to-3.html
 
  The porting process requires the classpath first to be prepared under GTK +
  2.24 and built under certain CFLAG macros. I have successfully resolved one
  of the macros which require there to be no single includes in the gtk-peer
  of the classpath.
 
  The classpath now builds successfully using the command :
 
  make CFLAGS+=-DGTK_DISABLE_SINGLE_INCLUDES
 
  Here is a list of changes I had to make to achieve this:
 
  LOG FOR SINGLE INCLUDE CHANGES:
 
  gtk_CairoGraphics2D.c
 
  Line 42:  #include gdk/gdktypes.h to #include gdk/gdk.h
  Line 43:  #include gdk/gdkprivate.h to #include gdk/gdkx.h
 
 
  gtk_ComponentGraphics.c
 
  Line 41: #include gdk/gdktypes.h to #include gdk/gdk.h
  Line 44: #include gdk/gdkprivate.h to #include gdk/gdkx.h
 
  gtk_ComponentGraphicsCopy.c
 
  Line 41: #include gdk/gdktypes.h to #include gdk/gdk.h
  Line 44: #include gdk/gdkprivate.h to #include gdk/gdkx.h
 
  gtk_ComponentPeer.c
 
  Line 43: #include gtk/gtkprivate.h to #include gtk/gtk.h
 
  gtk_VolatileImage.c
 
  Line 42: #include gdk/gdktypes.h to #include gdk/gdk.h
  Line 45: #include gdk/gdkprivate.h to #include gdk/gdkx.h
 
  I would like to commit these changes as a classpath patch.
 
 
 
 
 Hi Farshad,
 
 First of all, welcome to the project and I hope you enjoy working
 with us for Google's Summer of Code.
 
 For your patch, you should attach the output of 'git diff' to your
 mail.  You also need to make the CFLAGS change permanent in the
 Makefile.am.
 
 Each change also needs a ChangeLog entry.  You can look in the file
 ChangeLog for examples and add yours there.  Include the entry in the
 mail but not as part of the attached patch (though it should be part
 of the final commit), as this makes it easier for others to apply and
 test your patch.
 
 Thanks and congratulations on your first contribution!
 --
 Andrew :)
 
 Free Java Software Engineer
 Red Hat, Inc. (http://www.redhat.com)
 
 PGP Key: 248BDC07 (https://keys.indymedia.org/)
 Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07
 
 
 
 
 

-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: [cp-patches] [GNU ClassPath] porting the GTK+3 AWT support

2013-05-31 Thread Andrew Hughes
- Original Message -
 Hey guys,
 My name is Farshad Muhammad and i've recently been accepted to GSoC 2013.
 
 I will be working to port GTK+3 AWT support for the gtk-peer in the classpath
 following a migration guide provided here:
 https://developer.gnome.org/gtk3/3.5/gtk-migrating-2-to-3.html
 
 The porting process requires the classpath first to be prepared under GTK +
 2.24 and built under certain CFLAG macros. I have successfully resolved one
 of the macros which require there to be no single includes in the gtk-peer
 of the classpath.
 
 The classpath now builds successfully using the command :
 
 make CFLAGS+=-DGTK_DISABLE_SINGLE_INCLUDES
 
 Here is a list of changes I had to make to achieve this:
 
 LOG FOR SINGLE INCLUDE CHANGES:
 
 gtk_CairoGraphics2D.c
 
 Line 42:  #include gdk/gdktypes.h to #include gdk/gdk.h
 Line 43:  #include gdk/gdkprivate.h to #include gdk/gdkx.h
 
 
 gtk_ComponentGraphics.c
 
 Line 41: #include gdk/gdktypes.h to #include gdk/gdk.h
 Line 44: #include gdk/gdkprivate.h to #include gdk/gdkx.h
 
 gtk_ComponentGraphicsCopy.c
 
 Line 41: #include gdk/gdktypes.h to #include gdk/gdk.h
 Line 44: #include gdk/gdkprivate.h to #include gdk/gdkx.h
 
 gtk_ComponentPeer.c
 
 Line 43: #include gtk/gtkprivate.h to #include gtk/gtk.h
 
 gtk_VolatileImage.c
 
 Line 42: #include gdk/gdktypes.h to #include gdk/gdk.h
 Line 45: #include gdk/gdkprivate.h to #include gdk/gdkx.h
 
 I would like to commit these changes as a classpath patch.
 
 
 

Hi Farshad,

First of all, welcome to the project and I hope you enjoy working
with us for Google's Summer of Code.

For your patch, you should attach the output of 'git diff' to your
mail.  You also need to make the CFLAGS change permanent in the
Makefile.am.

Each change also needs a ChangeLog entry.  You can look in the file
ChangeLog for examples and add yours there.  Include the entry in the
mail but not as part of the attached patch (though it should be part
of the final commit), as this makes it easier for others to apply and
test your patch.

Thanks and congratulations on your first contribution!
-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: GNU Classpath Summer of Code 2013

2013-05-28 Thread Andrew Hughes


- Original Message -
 Am 28.05.2013 17:51, schrieb Mario Torre:
  On Tue, 2013-05-28 at 16:00 +0200, Elisa D'Eugenio wrote:
  Hello! I'm Elisa and I'm taking part to Google Summer of Code 2013
  with GNU Classpath project. I proposed one of the projects, the new
  Gtk3 Look and Feel for OpenJDK, and it was accepted.
  I'm looking forward to start this project. It's a big opportunity for
  test my knowledge and work this summer in my job field. I would like
  to keep project discussion on swing-dev cause the code is managed by
  this group. I hope to have a little bit of help if I ever need.
  Thanks
  
  Hi Elisa,
  
  Welcome!
  
  For the record, together with the GNU Classpath and IcedTea communities
  we decided to do this experiment, and allocated one resource to help
  students to be introduced to OpenJDK development. The project is still
  part of the GNU Classpath umbrella and will be followed by GNU Classpath
  people. If the experiment will succeed, we may try to turn next year
  into a proper organisation fully dedicated to OpenJDK.
  
  I will be mentoring Elisa, and the code will be probably hosted on the
  icedtea server once ready for use (although for the time being we will
  develop the code on an external repository until everything is set
  correctly).
  
  Once again, welcome Elisa!
 
 Welcome!
 
 Just to clarify, this is not to update Classpath to Gtk3 as well?
 

No, that will be the work of my student, Farshad Muhammad.

I don't know why this was posted to the GNU Classpath list as its only relation 
to
the project is that it had to enter GSoC under the GNU Project, as OpenJDK once 
again
failed to enter itself as an organisation.

   Matthias
 
 

-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: Questions about proposal format

2013-04-26 Thread Andrew Hughes


- Original Message -
 Hey guys,
 In the official google application for GsoC form, there is a short
 description section before the content section. I am confused as to what we
 are supposed to put into this section. Do we just put our own written
 summary about the project here? Or do we copy the description from the ideas
 page into this section and write our own summaries in the contents section?
 Any help would be great!
 Farshad
 

I think it's preferable to use your own words, especially if you don't intend
to take on the project exactly as written.

Further advice is available at: 
https://www.gnu.org/software/soc-projects/guidelines.html
-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: [patch] update ecj to ecj-3.8.2/4.2.2

2013-04-15 Thread Andrew Hughes
- Original Message -
 The ecj.jar provided on ftp://gcc.gnu.org/pub/java wasn't updated anymore
 since
 2008, having no support for java7.  It looks like this ecj is already used
 within the Fedora disto, however only locally patched (at least I couldn't
 find
 any mail sent to java-patches).
 
 Find attached the changes required to build a new ecj.jar from the R3_8_2 git
 tag.  The built files can be found at
 http://people.debian.org/~doko/tmp/eclipse-gcj/. The resulting gcj -C looks
 fine, building libjava with the new ecj.jar doesn't show any regressions, and
 the testsuite doesn't show any regressions.  However the filenames for some
 generated class and header files have changed for inner classes:
 
 $ svn status|grep UIDefaults|sort -k1
 !   classpath/lib/javax/swing/UIDefaults$1.class
 !   classpath/lib/javax/swing/UIDefaults$2.class
 !   classpath/lib/javax/swing/UIDefaults$3.class
 !   classpath/lib/javax/swing/UIDefaults$4.class
 ?   classpath/lib/javax/swing/UIDefaults$ProxyLazyValue$1.class
 ?   classpath/lib/javax/swing/UIDefaults$ProxyLazyValue$2.class
 ?   classpath/lib/javax/swing/UIDefaults$ProxyLazyValue$3.class
 ?   classpath/lib/javax/swing/UIDefaults$ProxyLazyValue$4.class
 !   javax/swing/UIDefaults$1.h
 !   javax/swing/UIDefaults$2.h
 !   javax/swing/UIDefaults$3.h
 !   javax/swing/UIDefaults$4.h
 ?   javax/swing/UIDefaults$ProxyLazyValue$1.h
 ?   javax/swing/UIDefaults$ProxyLazyValue$2.h
 ?   javax/swing/UIDefaults$ProxyLazyValue$3.h
 ?   javax/swing/UIDefaults$ProxyLazyValue$4.h
 M   classpath/lib/javax/swing/plaf/basic/SharedUIDefaults.class
 M   classpath/lib/javax/swing/UIDefaults.class
 M   classpath/lib/javax/swing/UIDefaults$ProxyLazyValue.class
 M
 classpath/lib/javax/swing/UIManager$MultiplexUIDefaults$MultiplexEnumeration.class
 
 See the attached svn-status.gz file for a complete diff (replace ! with D, ?
 with A).
 
  - I'd like to ask Tom (or somebody else) to look at the patches
for the rhug/java repository.
 
  - Ask to rebuild the .class and .h files using this new ecj.jar on the
  trunk,
after the ecj.jar is uploaded.
 
 There are issues building OpenJDK and IcedTea with this new compiler.  Please
 see the IcedTea ML for a follow-up posting.
 
   Matthias
 

Is this ecj buildable with gcj?  My experience of 3.8 is that it isn't buildable
without the javax.lang.model code that is now in GNU Classpath, but hasn't yet 
been
merged to gcj (it's not yet ready for that).
-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: [patch] update ecj to ecj-3.8.2/4.2.2

2013-04-15 Thread Andrew Hughes
- Original Message -
 Am 15.04.2013 15:28, schrieb Andrew Hughes:
  - Original Message -
  The ecj.jar provided on ftp://gcc.gnu.org/pub/java wasn't updated anymore
  since
  2008, having no support for java7.  It looks like this ecj is already used
  within the Fedora disto, however only locally patched (at least I couldn't
  find
  any mail sent to java-patches).
 
  Find attached the changes required to build a new ecj.jar from the R3_8_2
  git
  tag.  The built files can be found at
  http://people.debian.org/~doko/tmp/eclipse-gcj/. The resulting gcj -C
  looks
  fine, building libjava with the new ecj.jar doesn't show any regressions,
  and
  the testsuite doesn't show any regressions.  However the filenames for
  some
  generated class and header files have changed for inner classes:
 
  $ svn status|grep UIDefaults|sort -k1
  !   classpath/lib/javax/swing/UIDefaults$1.class
  !   classpath/lib/javax/swing/UIDefaults$2.class
  !   classpath/lib/javax/swing/UIDefaults$3.class
  !   classpath/lib/javax/swing/UIDefaults$4.class
  ?   classpath/lib/javax/swing/UIDefaults$ProxyLazyValue$1.class
  ?   classpath/lib/javax/swing/UIDefaults$ProxyLazyValue$2.class
  ?   classpath/lib/javax/swing/UIDefaults$ProxyLazyValue$3.class
  ?   classpath/lib/javax/swing/UIDefaults$ProxyLazyValue$4.class
  !   javax/swing/UIDefaults$1.h
  !   javax/swing/UIDefaults$2.h
  !   javax/swing/UIDefaults$3.h
  !   javax/swing/UIDefaults$4.h
  ?   javax/swing/UIDefaults$ProxyLazyValue$1.h
  ?   javax/swing/UIDefaults$ProxyLazyValue$2.h
  ?   javax/swing/UIDefaults$ProxyLazyValue$3.h
  ?   javax/swing/UIDefaults$ProxyLazyValue$4.h
  M   classpath/lib/javax/swing/plaf/basic/SharedUIDefaults.class
  M   classpath/lib/javax/swing/UIDefaults.class
  M   classpath/lib/javax/swing/UIDefaults$ProxyLazyValue.class
  M
  classpath/lib/javax/swing/UIManager$MultiplexUIDefaults$MultiplexEnumeration.class
 
  See the attached svn-status.gz file for a complete diff (replace ! with D,
  ?
  with A).
 
   - I'd like to ask Tom (or somebody else) to look at the patches
 for the rhug/java repository.
 
   - Ask to rebuild the .class and .h files using this new ecj.jar on the
   trunk,
 after the ecj.jar is uploaded.
 
  There are issues building OpenJDK and IcedTea with this new compiler.
  Please
  see the IcedTea ML for a follow-up posting.
 
Matthias
 
  
  Is this ecj buildable with gcj?  My experience of 3.8 is that it isn't
  buildable
  without the javax.lang.model code that is now in GNU Classpath, but hasn't
  yet been
  merged to gcj (it's not yet ready for that).
 
 I used
 
   gcj-4.8 -C -g -I/usr/share/ant/lib/ant.jar @files
 
 and that seems to work well enough to build libjava.
 
 

 Compiling source in 
 /mnt/builder/portage.build/portage/dev-java/eclipse-ecj-4.2.1/work ...
 * bootstrapping ecj with /usr/lib/gcj-jdk-4.8.0/bin/javac ...

1. ERROR in org/eclipse/jdt/internal/compiler/apt/dispatch/RoundDispatcher.java 
(at line 21)
import javax.annotation.processing.RoundEnvironment;
   
The import javax.annotation cannot be resolved
--
2. ERROR in org/eclipse/jdt/internal/compiler/apt/dispatch/RoundDispatcher.java 
(at line 22)
import javax.lang.model.element.Element;
   ^^
The import javax.lang cannot be resolved
--
3. ERROR in org/eclipse/jdt/internal/compiler/apt/dispatch/RoundDispatcher.java 
(at line 23)
import javax.lang.model.element.TypeElement;
   ^^
The import javax.lang cannot be resolved

and so on...

78 problems (78 errors) * ERROR: dev-java/eclipse-ecj-4.2.1 failed (compile 
phase):

Are you using a complete ecj or deleting some classes?
-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: [patch] update ecj to ecj-3.8.2/4.2.2

2013-04-15 Thread Andrew Hughes
- Original Message -
 Am 15.04.2013 16:02, schrieb Andrew Hughes:
  Are you using a complete ecj or deleting some classes?
 
 I did use what I did send in the patch, and what should be same as is in the
 current version of ecj.jar as distributed on gcc.gnu.org.
 
 

It's not clear from that patch what exactly is being compiled.  I do see some
rm calls so I suspect bits of ecj are being deleted.

I'd rather we wait until the javax.lang.model work is merged and a more complete
ecj can be used.
-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: [patch] update ecj to ecj-3.8.2/4.2.2

2013-04-15 Thread Andrew Hughes
- Original Message -
 
 
 - Original Message -
  From: Matthias Klose d...@ubuntu.com
  To: GCJ-patches java-patc...@gcc.gnu.org
  Cc: Jon VanAlten jon.vanal...@redhat.com, classpath@gnu.org, Tom
  Tromey tro...@redhat.com
  Sent: Monday, April 15, 2013 6:21:45 AM
  Subject: [patch] update ecj to ecj-3.8.2/4.2.2
  
  It looks like this ecj is already used
  within the Fedora disto, however only locally patched (at least I couldn't
  find
  any mail sent to java-patches).
  
 
 My bad.  I honestly didn't have any idea what the upstream process would be.
 My
 history in the free java world starts after openjdk/icedtea, so all the gcj
 fluff isn't really known well to me, and I don't really know where to look
 for
 information (pointers appreciated!  :D  ).  So I sort of let it slip through
 the cracks.
 
 I did bring it up on an earlier thread[1], and it seems like by accident it
 also went to java-patches.  Now I know for next time, if and when there is a
 next time.
 

Don't feel bad, Jon.  It's not your fault.  I was around for the gcj fluff
(perhaps wording it better would be a good idea though) and I still have no
idea how this is updated, despite asking on this list at least once.

And to be honest, I still don't.

 cheers,
 jon
 
 [1]
 http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2013-March/022168.html
 

-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: [GSoC 2013] projects information

2013-04-12 Thread Andrew Hughes


- Original Message -
 My name is Claudiu Olteanu, I'm from Bucharest, Romania and I study at the
 University 'Politehnica' of Bucharest, the Faculty of Automatic Control and
 Computers Science. I'm a third year student and I would like to participate
 to GSoC this summer. After I took a look at the projects list I decided that
 it would be interesting and motivating to work on one of these projects :
 - Update the SQL interfaces
 - Update the JMX implementation
 - Add more ImageIO support
 - Add more sound support
 
 I will appreciate it if you give me more details about them and some advice
 that can put me on track.
 
 
 You can find my CV here[1] in case you want to know more about me.
 
 Regards,
 Claudiu
 
 [1] -
  https://docs.google.com/file/d/0BwSntkUS-WYzVUVoZkYxdzNvNmc/edit?usp=sharing

I take it you've read:

http://developer.classpath.org/mediation/GoogleSoC2013

Can you be more specific about what details you require? What you're asking here
is pretty broad.

Thanks,
-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: Permission to translate your page at http://icedtea.classpath.org/

2013-04-11 Thread Andrew Hughes
distro-pkg-...@openjdk.java.net is the IcedTea mailing list.

- Original Message -
 Not sure where to send this...
 
 
 Begin forwarded message:
 
 *From:* Anja Skrba an...@webhostinggeeks.com
 *Date:* April 10, 2013, 4:32:42 PM EDT
 *To:* c...@gnu.org
 *Subject:* *Permission to translate your page at
 http://icedtea.classpath.org/*
 *Reply-To:* Anja Skrba an...@webhostinggeeks.com
 
 
 Dear Sir,
 
 I am writing to inquire regarding your web page about IcedTea project where
 I have found a lot of useful information. My name is Anja and I'm currently
 studying at the Faculty of Computer Science in Belgrade.
 Here is the URL of your article: http://icedtea.classpath.org/wiki/Main_Page
 
 I would like to share it with the people from Former Yugoslav Republics:
 Serbia, Montenegro, Croatia, Slovenia, Macedonia, Bosnia and Herzegovina.
 
 I would be grateful if you could allow me to translate your writing into
 Serbo-Croatian language, that is used in all Former Yugoslav Republics and
 to post it on my website. Hopefully, it will help our people to gather some
 additional knowledge about computing.
 
 I hope to hear from you soon.
 
 Regards,
 Anja Skrba
 an...@webhostinggeeks.com
 http://science.webhostinggeeks.com/
 Tel: +381 62 300604
 

-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: [cp-patches] [RFC/PATCH] Check for gettext m4 macros in autogen.sh

2013-03-13 Thread Andrew Hughes
- Original Message -
 On Tue, 2013-03-12 at 22:27 -0400, Brian Jones wrote:
  I'm sorry I'm not a good one to review this.  They changed the
  auto*
  tools quite a bit since I used to mess with them.  Is autogen.sh
  something auto* creates, just wondering if it is okay to modify...
 
 Yes it is fine. We provide autogen.sh.
 
 These days for a new project one would probably use autoreconf
 provided
 by autoconf. But that didn't exist when we introduced our own
 autogen.sh
 script.
 

Our script does use autoreconf among other things. It's for developers
working with the repository to generate the necessary autotools files
that would be included in a distribution tarball.

The change looks fine, Pekka.

 Cheers,
 
 Mark
 
 
 

-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: Building GNU Classpath on Fedora 17

2013-03-12 Thread Andrew Hughes
- Original Message -
 Hi Brian,
 
 On Mon, Mar 11, 2013 at 4:41 PM, Brian Jones cbjon...@gmail.com
 wrote:
  Add a configure check for whatever the dependency is...
 
 I'm having difficult time figuring out what to check for... It seems
 that gettext-devel package provides AC_LIB_PREPARE_PREFIX via
 /usr/share/aclocal/lib-prefix.m4 that's automagically picked up by
 autogen.sh. Surely I can't just go and check if the file exists?
 
 Pekka
 
 

Looking at rpm -ql gettext-devel on my RHEL system, it seems to add a slew
of m4 files to /usr/share/aclocal.  Maybe if -e /usr/share/aclocal/gettext.m4
in autogen.sh would be sufficient?

configure is the wrong place as this is the script that creates configure :)

FWIW, I've never been a fan of these -devel packages.  They seem to cause more
problems than they solve.
-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: Building GNU Classpath on Fedora 17

2013-03-12 Thread Andrew Hughes


- Original Message -
 On Tue, Mar 12, 2013 at 12:47 PM, Andrew Hughes
 gnu.and...@redhat.com wrote:
  Looking at rpm -ql gettext-devel on my RHEL system, it seems to add
  a slew
  of m4 files to /usr/share/aclocal.  Maybe if -e
  /usr/share/aclocal/gettext.m4
  in autogen.sh would be sufficient?
 
 The attached patch works for me. Does it look OK to commit?
 

I don't really see the need for the have_gettext variable.  Wouldn't:

if [ ! -e /usr/share/aclocal/gettext.m4 ] ; then 
echo
echo You must have gettext installed to compile $PROJECT.
DIE=1
fi

be simpler?

I am a little worried that there are systems where gettext.m4 will not
be in that location.  Using the result of $(aclocal --print-ac-dir) instead
of /usr/share/aclocal would be a better option i.e.

if [ ! -e $(aclocal --print-ac-dir)/gettext.m4 ] 

-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: [cp-patches] [RFC/PATCH] Add autogen-generated files to gitignore

2013-03-11 Thread Andrew Hughes
- Original Message -
 On Sat, Mar 09, 2013 at 11:03:22AM +0200, Pekka Enberg wrote:
  Make sure git status does not show up files after autogen.sh has
  been
  run.
  
  Signed-off-by: Pekka Enberg penb...@kernel.org
  ---
   .gitignore |5 +
   ChangeLog  |4 
   2 files changed, 9 insertions(+), 0 deletions(-)
  
  diff --git a/.gitignore b/.gitignore
  index 817e215..1b3d546 100644
  --- a/.gitignore
  +++ b/.gitignore
  @@ -21,3 +21,8 @@ install-sh
   missing
   mkinstalldirs
   INSTALL
  +m4/libtool.m4
  +m4/ltoptions.m4
  +m4/ltsugar.m4
  +m4/ltversion.m4
  +m4/lt~obsolete.m4
 
 This looks fine, these are all libtool files.
 Might it make sense to ignore m4/libtool and m4/lt*m4?
 Or does libtool only ever generate these 5 files?
 
 Thanks,
 
 Mark
 
 

Fine by me.  I've been planning to commit the same, but there's always 
something I'm working on.
-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: [cp-patches] [RFC/PATCH] AnnotationInvocationHandler type parametrization

2013-03-11 Thread Andrew Hughes
- Original Message -
 On Sat, 2013-03-09 at 12:26 +0200, Pekka Enberg wrote:
  On Sat, Mar 09, 2013 at 11:36:13AM +0200, Pekka Enberg wrote:
   Type parametrize uses of generic types in
   AnnotationInvocationHandler.
  
  On Sat, Mar 9, 2013 at 12:09 PM, Mark Wielaard m...@klomp.org
  wrote:
   Generally we avoided generics for VM interface files, so VMs can
   ignore
   any modern class format extensions in their bootstrap classes.
  
  It shouldn't make any difference to the VM classloader because of
  type
  erasure. What am I missing?
 
 There are some other small changes in the class file format, class
 access flags, attributes. But the main reason was source
 compatibility.
 It was convenient if the VM and VM interface classes could be build
 with
 any java language compiler out there (even these days only javac and
 ecj
 support 1.5+ fully) since they were often build independently from
 the
 rest of the core classes during bootstrapping of the VM. And keeping
 the
 core class VM interface as simple as possible, since some of the VM
 interface classes could be overridden by a VM is easier when not
 using
 generics.
 
 Anyway, I think this class isn't really a VM interface class, so it
 should be fine.
 
 I guess I am just not a big fan of using fancy new (haha, it is 2013
 Mark...) language features unless really necessary.
 

I'd rather we left this until after the next release and updated all VM
interfaces to 1.5 level at the same time.  That's why I've deliberately
avoided updating them so far.

Take 0.99.1 as being the watershed for pre-1.5 VM interfaces.

 Cheers,
 
 Mark
 
 
 

-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: Building GNU Classpath on Fedora 17

2013-03-11 Thread Andrew Hughes


- Original Message -
 Hello,
 
 GNU Classpath build fails as follows with stock Fedora 17 libtools:
 
 [penberg@golgotha classpath]$ sh autogen.sh
 configure.ac:505: warning: AC_LIB_PREPARE_PREFIX is m4_require'd but
 not m4_defun'd
 m4/iconv.m4:11: AM_ICONV_LINKFLAGS_BODY is expanded from...
 m4/iconv.m4:22: AM_ICONV_LINK is expanded from...
 m4/iconv.m4:77: AM_ICONV is expanded from...
 configure.ac:505: the top level
 configure.ac:505: warning: AC_LIB_RPATH is m4_require'd but not
 m4_defun'd
 m4/iconv.m4:11: AM_ICONV_LINKFLAGS_BODY is expanded from...
 m4/iconv.m4:22: AM_ICONV_LINK is expanded from...
 m4/iconv.m4:77: AM_ICONV is expanded from...
 configure.ac:505: the top level
 configure.ac:505: warning: AC_LIB_PREPARE_PREFIX is m4_require'd but
 not m4_defun'd
 m4/iconv.m4:11: AM_ICONV_LINKFLAGS_BODY is expanded from...
 m4/iconv.m4:22: AM_ICONV_LINK is expanded from...
 m4/iconv.m4:77: AM_ICONV is expanded from...
 configure.ac:505: the top level
 configure.ac:505: warning: AC_LIB_RPATH is m4_require'd but not
 m4_defun'd
 m4/iconv.m4:11: AM_ICONV_LINKFLAGS_BODY is expanded from...
 m4/iconv.m4:22: AM_ICONV_LINK is expanded from...
 m4/iconv.m4:77: AM_ICONV is expanded from...
 configure.ac:505: the top level
 libtoolize: putting auxiliary files in `.'.
 libtoolize: copying file `./ltmain.sh'
 libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
 libtoolize: copying file `m4/libtool.m4'
 libtoolize: copying file `m4/ltoptions.m4'
 libtoolize: copying file `m4/ltsugar.m4'
 libtoolize: copying file `m4/ltversion.m4'
 libtoolize: copying file `m4/lt~obsolete.m4'
 configure.ac:505: warning: AC_LIB_PREPARE_PREFIX is m4_require'd but
 not m4_defun'd
 m4/iconv.m4:11: AM_ICONV_LINKFLAGS_BODY is expanded from...
 m4/iconv.m4:22: AM_ICONV_LINK is expanded from...
 m4/iconv.m4:77: AM_ICONV is expanded from...
 configure.ac:505: the top level
 configure.ac:505: warning: AC_LIB_RPATH is m4_require'd but not
 m4_defun'd
 m4/iconv.m4:11: AM_ICONV_LINKFLAGS_BODY is expanded from...
 m4/iconv.m4:22: AM_ICONV_LINK is expanded from...
 m4/iconv.m4:77: AM_ICONV is expanded from...
 configure.ac:505: the top level
 configure.ac:505: warning: AC_LIB_PREPARE_PREFIX is m4_require'd but
 not m4_defun'd
 m4/iconv.m4:11: AM_ICONV_LINKFLAGS_BODY is expanded from...
 m4/iconv.m4:22: AM_ICONV_LINK is expanded from...
 m4/iconv.m4:77: AM_ICONV is expanded from...
 configure.ac:505: the top level
 configure.ac:505: warning: AC_LIB_RPATH is m4_require'd but not
 m4_defun'd
 m4/iconv.m4:11: AM_ICONV_LINKFLAGS_BODY is expanded from...
 m4/iconv.m4:22: AM_ICONV_LINK is expanded from...
 m4/iconv.m4:77: AM_ICONV is expanded from...
 configure.ac:505: the top level
 configure:18624: error: possibly undefined macro:
 AC_LIB_PREPARE_PREFIX
   If this token and others are legitimate, please use
   m4_pattern_allow.
   See the Autoconf documentation.
 configure:18625: error: possibly undefined macro: AC_LIB_RPATH
 configure:18630: error: possibly undefined macro:
 AC_LIB_LINKFLAGS_BODY
 configure:18638: error: possibly undefined macro: AC_LIB_APPENDTOVAR
 autoreconf: /usr/bin/autoconf failed with exit status: 1
 
 Is there any reason we depend on an older version of libtool?
 
 Pekka
 
 

I wasn't aware we did.

What version of libtool does F17 have?  I build with 2.4.2 at present.
-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: [cp-patches] [patch] let gjavah accept -source 1.[567]

2013-01-10 Thread Andrew Hughes


- Original Message -
 On Mon, 2013-01-07 at 09:54 +0100, Mark Wielaard wrote:
  On Sun, 2013-01-06 at 18:00 +0100, Matthias Klose wrote:
   Am 19.12.2012 18:37, schrieb Mark Wielaard:
If you really meant gjdoc I think it would be OK to try to
accept it,
but maybe with a warning message that it is untested?
   
   yes, I meant gjdoc. Here is an updated patch.
   
 Matthias
   
 * tools/gnu/classpath/tools/gjdoc/Main.java: Accept -source 1.5,
 1.6, 1.7.
  
  That looks reasonable to me.
 
 As requested on irc, I have pushed this patch to the git repo for
 Matthias.
 

Thanks.  Beat me to it :)

 Cheers,
 
 Mark
 
 
 

-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: [cp-patches] [patch] let gjavah accept -source 1.[567]

2012-12-20 Thread Andrew Hughes


- Original Message -
 On Wed, Dec 19, 2012 at 02:01:10PM +0100, Matthias Klose wrote:
  Currently gjavah only accepts -source 1.4 and lower, and errors out
  for any
  other value. Would it be reasonable to accept higher versions too?
 
 I think that should be fine for gjavah, I cannot think of something
 in the bytecode that would impact jni/cni header generation.
 
 But your patch is for gjdoc. There I think there are source
 constructs
 that might be a problem in newer versions. It should support some of
 the new 1.5 source level features, but I am not sure if it handles
 everything nor whether it handles any 1.6 and 1.7 extensions.
 
  Index: classpath/tools/gnu/classpath/tools/gjdoc/Main.java
  ===
  --- classpath/tools/gnu/classpath/tools/gjdoc/Main.java (Revision
  194604)
  +++ classpath/tools/gnu/classpath/tools/gjdoc/Main.java
  (Arbeitskopie)
  @@ -1339,10 +1310,13 @@
   option_source = args[0];
   if (!1.2.equals(option_source)
!1.3.equals(option_source)
  - !1.4.equals(option_source)) {
  + !1.4.equals(option_source)
  + !1.5.equals(option_source)
  + !1.6.equals(option_source)
  + !1.7.equals(option_source)) {
 
 If you really meant gjdoc I think it would be OK to try to accept it,
 but maybe with a warning message that it is untested?
 
 Cheers,
 
 Mark
 
 
 

The question would make a lot more sense for gjdoc than gjavah :-)

As is, it does support 1.5 to a degree (enough to compile the Classpath
docs anyway; we should try OpenJDK at some point).  There are no source
changes in 1.6 and minimal ones in 1.7 so these should be easy to support,
if they aren't already.

I'm generally in favour of removing unnecessary version checks as they
only mask the real bugs (e.g. when the parser hits a construct it can't handle)
and would have to be allowed to actually implement the newer versions anyway.
I think this is more a case of neglected code (given there were 1.5 updates)
rather than a design choice.

Note that I have a JAPI run of gjdoc vs. javadoc's API which points out some
of the missing API (mainly, if not all, 1.5 stuff AFAICS) and I intend to look
at implementing this soon.

Thanks,
-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: [cp-patches] [patch] let gjavah accept -source 1.[567]

2012-12-19 Thread Andrew Hughes
- Original Message -
 Currently gjavah only accepts -source 1.4 and lower, and errors out
 for any
 other value. Would it be reasonable to accept higher versions too?
 
   Matthias
 
 

Does source even matter to gjavah?  What do higher versions require?
-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: [cp-patches] tagging classpath for GCC import

2012-12-03 Thread Andrew Hughes
- Original Message -
 Hi,
 
 Matthias wanted to import the latest classpath from git into libgcj
 so I have pushed a tag (libgcj-import-20121202) for current HEAD.
 (Note for future reference, to push a tag one uses git push --tags,
 with just git push the tag stays local.)
 
 It seems the git import from CVS lost the old tags. Does anybody
 know of a way to get them from the original CVS history into the
 git repository?
 

Could we not have discussed this first?

I've been working on this for a while already and there's some more bug fixes
I wanted to get in before tagging and merging.

 Thanks,
 
 Mark
 
 

-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: [cp-patches] tagging classpath for GCC import

2012-12-03 Thread Andrew Hughes
- Original Message -
 Am 02.12.2012 22:20, schrieb Mark Wielaard:
  Hi,
  
  Matthias wanted to import the latest classpath from git into libgcj
  so I have pushed a tag (libgcj-import-20121202) for current HEAD.
  (Note for future reference, to push a tag one uses git push --tags,
  with just git push the tag stays local.)
  
  It seems the git import from CVS lost the old tags. Does anybody
  know of a way to get them from the original CVS history into the
  git repository?
 
 I had a hard time getting any clue that the CVS repo was abandoned.
 Now finally
 found http://savannah.gnu.org/git/?group=classpath which is not that
 obvious
 when you start at classpath.org.
 

Try reading the mailing list.  It's been discussed at length at the time
and there's been discussion of commits to it since.

 Further, it looks like classpath did bump the requirement on autoconf
 to 2.69,
 and didn't even bother to document that (m4/iconv.m4 requires macros
 only found
 in 2.69).  classpath itself pretends to require 2.63.

 GCC has 2.64, and won't change for the next release. Any hint how to
 handle this
 properly?


Classpath works with 2.63 on RHEL6.  That's why I lowered it.

What macros are you referring to?  iconv.m4 is dated 2002 in the header.
 
   Matthias
 
 

-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: [cp-patches] [RFC PATCH 4/4] Fix java/lang/String.codePoint{At|Before} exception types

2012-10-30 Thread Andrew Hughes
- Original Message -
 OpenJDK throws StringIndexOutOfBoundsException and so should we.
 
 Signed-off-by: Pekka Enberg penb...@kernel.org
 ---
  ChangeLog |6 ++
  java/lang/String.java |4 
  2 files changed, 10 insertions(+), 0 deletions(-)
 
 diff --git a/ChangeLog b/ChangeLog
 index 5a75061..053ae62 100644
 --- a/ChangeLog
 +++ b/ChangeLog
 @@ -1,5 +1,11 @@
  2012-03-15  Pekka Enberg  penb...@kernel.org
  
 + * java/lang/String.java:
 + (codePointAt): Fix exception type.
 + (codePointBefore): Fix exception type.
 +
 +2012-03-15  Pekka Enberg  penb...@kernel.org
 +
   * java/util/Formatter.java:
   (format): Fix NPE errors.
  
 diff --git a/java/lang/String.java b/java/lang/String.java
 index 45c0daf..eb713ce 100644
 --- a/java/lang/String.java
 +++ b/java/lang/String.java
 @@ -705,6 +705,8 @@ public final class String
 */
public synchronized int codePointAt(int index)
{
 +if (index  0 || index = count)
 +  throw new StringIndexOutOfBoundsException(index);
  // Use the CharSequence overload as we get better range checking
  // this way.
  return Character.codePointAt(this, index);
 @@ -722,6 +724,8 @@ public final class String
 */
public synchronized int codePointBefore(int index)
{
 +if (index  0 || index = count)
 +  throw new StringIndexOutOfBoundsException(index);
  // Use the CharSequence overload as we get better range checking
  // this way.
  return Character.codePointBefore(this, index);
 --
 1.7.7.6
 
 
 

The checks added to codePointBefore here are wrong and broke the OpenJDK
build:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55140

The specification says:

IndexOutOfBoundsException - if the index argument is less than 1 or greater 
than the length of this string.

whereas the code above has clearly just been copied from codePointAt.

I'll commit a fix.
-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: [cp-patches] [RFC PATCH 1/7] Fix java/lang/reflect/Member.getDeclaringClass() return type

2012-10-22 Thread Andrew Hughes
- Original Message -
 Hi Andrew,
 
 Wed, 17 Oct 2012 03:46:19 -0400 (EDT) от Andrew Hughes
 gnu.and...@redhat.com:
 
 
 
 
 
 
 - Original Message -
  Hi Andrew,
  
  Sun, 14 Oct 2012 17:02:52 -0400 (EDT) от Andrew Hughes
   ahug...@redhat.com :
   Because he actually wants them to be included in GNU Classpath.
  
  On Tue, 16 Oct 2012, Ivan Maidanski wrote:
   Can't understand. There are GNU Classpath development branches?
  
  I guess what Andrew is trying to say here is that I work against
  GNU
  Classpath master and submit changes for review and inclusion very
  aggressively.
  
  That pretty much avoids the problem you're having with a huge
  backlog
  of
  unreviewed changes. ;-)
  
 
 What am I saying is it's fine to develop on a branch, of course, but
 if you
 actually want the work included in a release, it has to be on
 trunk/HEAD/whatever.
 So, you recommend me to put the patches I've prepared to SVN
 trunk/HEAD? Are we still going to support SVN? (It seems I don't I
 understand your it has to be on.)
 

Classpath doesn't and never has used Subversion, so I'm confused by this 
comment.


 
 If you're familiar with how Linux is developed, it's like fixing it
 in one of the
 subsystem trees, or linux-next, but never asking Linus to pull it
 into his tree
 for the next release.
 Heard of. Every vendor has its own patched Linux.
 But I don't understand why you are referring to? Activity at Linux
 git significantly differs from that of Classpath, pulling policy
 differs as well and I don't think you going to match.
 

This is nothing to do with vendors.

We're still pretty new at using git for GNU Classpath.  There's no reason
we couldn't adopt a model of working in branches, then asking a maintainer
to pull into HEAD.

 Anyway, as you already noticed, the patches are at a branch on a
 github - anyone could checkout and cherry-pick.
 

Sure. But that won't get them in a future release.

 Regards,
 Ivan
 
 
 
 
 
 
 
 
 
  Pekka
 
 --
 Andrew :)
 
 Free Java Software Engineer
 Red Hat, Inc. ( http://www.redhat.com )
 
 PGP Key: 248BDC07 ( https://keys.indymedia.org/ )
 Fingerprint = EC5A 1F5E C0AD 1D15 8F1F 8F91 3B96 A578 248B DC07
 
 
 

-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: [cp-patches] [RFC PATCH 1/7] Fix java/lang/reflect/Member.getDeclaringClass() return type

2012-10-17 Thread Andrew Hughes
- Original Message -
 Hi Andrew,
 
 Sun, 14 Oct 2012 17:02:52 -0400 (EDT) от Andrew Hughes
 ahug...@redhat.com:
  Because he actually wants them to be included in GNU Classpath.
 
 On Tue, 16 Oct 2012, Ivan Maidanski wrote:
  Can't understand. There are GNU Classpath development branches?
 
 I guess what Andrew is trying to say here is that I work against GNU
 Classpath master and submit changes for review and inclusion very
 aggressively.
 
 That pretty much avoids the problem you're having with a huge backlog
 of
 unreviewed changes. ;-)
 

What am I saying is it's fine to develop on a branch, of course, but if you
actually want the work included in a release, it has to be on 
trunk/HEAD/whatever.

If you're familiar with how Linux is developed, it's like fixing it in one of 
the
subsystem trees, or linux-next, but never asking Linus to pull it into his tree
for the next release.

   Pekka

-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: [cp-patches] GNU Classpath

2012-10-16 Thread Andrew Hughes
- Original Message -
 Hi team,
 
 There could be another way if we can't drop old-style ChangeLog for
 some reason:
 do not alter ChangeLog (i.e. use commit log instead) until the patch
 is fully accepted (e.g., Andrew could get log notes (one or even
 several) from git log of processed patches (of master
 savannah/master) and update ChangeLog (as a separate commit).
 No magic, just deferred update.
 

No.  Updating the ChangeLog is a requirement.

 Regards,
 Ivan
 
 Mon, 15 Oct 2012 09:31:59 +0300 от Pekka Enberg penb...@kernel.org:
 
 
 
 
 
 
 On Sun, Oct 14, 2012 at 11:55 PM, Andrew Hughes 
 gnu.and...@redhat.com  wrote:
  May be it's time to change the policy of patch acceptance from
  please find a person who reviews (among 1 or 2 guys) your code
  to
  if signed FSF paper, and you have patches, post them to ML,
  commit
  to some feature development branch and, if no objections within
  2-3
  weeks, merge the branch to master, in case of further objections
  revert the patches.
  
  No, I don't think this is suitable.
 
 And more importantly, not really necessary now that we're using Git.
 That said, we really need to do something with ChangeLog because it
 causes unnecessary rejects when merging from one git tree to another.
 Can we drop it or did someone have some Git magic to deal with it?
 
 Pekka
 
 

-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: [cp-patches] [RFC PATCH] Bump up Java source and target version to 1.6

2012-10-15 Thread Andrew Hughes


- Original Message -
 On Mon, Oct 15, 2012 at 12:05 AM, Andrew Hughes
 gnu.and...@redhat.com wrote:
  Fair enough. What needs to happen for us to move on to 1.7 and
  eventually 1.8 which both have classfile format and language
  changes?
 
  Even OpenJDK doesn't do this for all class files and 1.8 is not
  going to be
  released for nearly a year.
 
  The only one I see a point in is 1.8 when we start to implement
  code that uses
  lambdas.  The rest don't give a significant advantage against
  preventing ease
  of building the code.
 
 One of the problems is that GNU Classpath needs 1.6 APIs and VM
 features to run applications written in JRuby and Scala and I expect
 them to start relying more on 1.7 features soon.
 
 So we're now in a situation where GNU Classpath still pretends to be
 1.5 (with additional APIs) but the VMs need to advertise 1.6 and 1.7
 support...
 

Yes.  But this has nothing to do with the bytecode format produced.
That only matters if the bytecode for these APIs uses features of these
new versions.

What version is reported is up to the VM.  I'd like VMs to start reporting
1.6, if not 1.7 TBH.  There have been 1.6 APIs for a long time.

That said, we could move to producing 1.6 bytecode after the next release.
I'm planning to do a 0.99.1 release once I've got a few more bug fixes
committed.

 On Mon, Oct 15, 2012 at 12:05 AM, Andrew Hughes
 gnu.and...@redhat.com wrote:
  As a prerequisite, gcj would still have to be able to build if
  these changes were
  integrated.  It currently doesn't have a 1.7 compiler.  That's
  something I'm looking into
  with getting support for the latest ecj into Classpath.
 
 That would be awesome.
 

-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: [cp-patches] [RFC PATCH 1/4] Handle malloc() failure in java_util_VMTimeZone.c file.

2012-10-15 Thread Andrew Hughes
- Original Message -
 From: Ivan Maidanski iv...@mail.ru
 
 2011-07-20  Ivan Maidanski  iv...@mail.ru
 
   * native/jni/java-util/java_util_VMTimeZone.c:
   Include jcl.h file.
   (Java_java_util_VMTimeZone_getSystemTimeZoneId): Throw
   OutOfMemoryException in case of malloc() failure.
 ---
  ChangeLog   |7 +++
  native/jni/java-util/java_util_VMTimeZone.c |7 +++
  2 files changed, 14 insertions(+), 0 deletions(-)
 
 diff --git a/ChangeLog b/ChangeLog
 index 18b6c03..c0d84cd 100644
 --- a/ChangeLog
 +++ b/ChangeLog
 @@ -1,3 +1,10 @@
 +2011-07-20  Ivan Maidanski  iv...@mail.ru
 +
 + * native/jni/java-util/java_util_VMTimeZone.c:
 + Include jcl.h file.
 + (Java_java_util_VMTimeZone_getSystemTimeZoneId): Throw
 + OutOfMemoryException in case of malloc() failure.
 +
  2012-06-10  Ivan Maidanski  iv...@mail.ru
  
   * compat/.gitignore,
 diff --git a/native/jni/java-util/java_util_VMTimeZone.c
 b/native/jni/java-util/java_util_VMTimeZone.c
 index a3a986d..1c4c0cf 100644
 --- a/native/jni/java-util/java_util_VMTimeZone.c
 +++ b/native/jni/java-util/java_util_VMTimeZone.c
 @@ -53,6 +53,7 @@ exception statement from your version. */
  #include stdlib.h
  
  #include jni.h
 +#include jcl.h
  
  #include java_util_VMTimeZone.h
  
 @@ -170,6 +171,12 @@ Java_java_util_VMTimeZone_getSystemTimeZoneId
 (JNIEnv * env,
tz2_len = strlen (tz2);
tzoff_len = jint_to_charbuf (tzoff + 11, tzoffset);
tzid = (char *) malloc (tz1_len + tz2_len + tzoff_len + 1);/*
FIXME alloc */
 +  if (tzid == NULL) {
 +JCL_ThrowException (env, java/lang/OutOfMemoryError,
 +malloc() failed);
 +return 0;
 +  }
 +
memcpy (tzid, tz1, tz1_len);
memcpy (tzid + tz1_len, tzoff + 11 - tzoff_len, tzoff_len);
memcpy (tzid + tz1_len + tzoff_len, tz2, tz2_len);
 --
 1.7.7.6
 
 
 

Can the FIXME now be dropped?
-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: [cp-patches] [RFC PATCH 2/4] Optimize emptySet/Map/List() in Collections class.

2012-10-15 Thread Andrew Hughes


- Original Message -
 From: Ivan Maidanski iv...@mail.ru
 
 2011-07-20  Ivan Maidanski  iv...@mail.ru
 
   * java/util/Collections.java:
   (emptySet(), EmptySet.iterator(), emptyList(), emptyMap(),
   EmptyMap.entrySet(), EmptyMap.keySet(), EmptyMap.values(),
   SingletonList.subList(int, int)): Suppress unchecked warnings.
   (emptySet(), emptyList(), emptyMap()): Don't create new instance
   (use
   the corresponding immutable container instance); remove FIXME.
   (EmptySet.equals(Object), EmptyList.equals(Object),
   EmptyMap.entrySet(), EmptyMap.equals(Object), EmptyMap.keySet(),
   EmptyMap.values(), SingletonList.subList(int, int)): Add generic
   typing.
   (SynchronizedCollection.toArray(T[])): Rename T type to E (to
   suppress compiler warning about type hiding).
 ---
  ChangeLog  |   15 +++
  java/util/Collections.java |   33 +++--
  2 files changed, 34 insertions(+), 14 deletions(-)
 
 diff --git a/ChangeLog b/ChangeLog
 index c0d84cd..5690754 100644
 --- a/ChangeLog
 +++ b/ChangeLog
 @@ -1,5 +1,20 @@
  2011-07-20  Ivan Maidanski  iv...@mail.ru
  
 + * java/util/Collections.java:
 + (emptySet(), EmptySet.iterator(), emptyList(), emptyMap(),
 + EmptyMap.entrySet(), EmptyMap.keySet(), EmptyMap.values(),
 + SingletonList.subList(int, int)): Suppress unchecked warnings.
 + (emptySet(), emptyList(), emptyMap()): Don't create new instance
 (use
 + the corresponding immutable container instance); remove FIXME.
 + (EmptySet.equals(Object), EmptyList.equals(Object),
 + EmptyMap.entrySet(), EmptyMap.equals(Object), EmptyMap.keySet(),
 + EmptyMap.values(), SingletonList.subList(int, int)): Add generic
 + typing.
 + (SynchronizedCollection.toArray(T[])): Rename T type to E (to
 + suppress compiler warning about type hiding).
 +
 +2011-07-20  Ivan Maidanski  iv...@mail.ru
 +
   * native/jni/java-util/java_util_VMTimeZone.c:
   Include jcl.h file.
   (Java_java_util_VMTimeZone_getSystemTimeZoneId): Throw
 diff --git a/java/util/Collections.java b/java/util/Collections.java
 index 828c6ec..e7e7056 100644
 --- a/java/util/Collections.java
 +++ b/java/util/Collections.java
 @@ -120,10 +120,10 @@ public class Collections
 * @return an empty parameterized set.
 * @since 1.5
 */
 +  @SuppressWarnings(unchecked)
public static final T SetT emptySet()
{
 -/* FIXME: Could this be optimized? */
 -return new EmptySetT();
 +return (SetT) EMPTY_SET;
}

This is ugly, but it seems to be the right thing according to the Javadoc:

Implementation note: Implementations of this method need not create a separate 
Set object for each call. Using this method is likely to have comparable cost 
to using the like-named field. (Unlike this method, the field does not provide 
type safety.

  
/**
 @@ -161,6 +161,7 @@ public class Collections
   * @return A non-iterating iterator.
   */
  // This is really cheating! I think it's perfectly valid,
  though.
 +@SuppressWarnings(unchecked)
  public IteratorT iterator()
  {
return (IteratorT) EMPTY_LIST.iterator();
 @@ -196,7 +197,7 @@ public class Collections
   */
  public boolean equals(Object o)
  {
 -  return o instanceof Set  ((Set) o).isEmpty();
 +  return o instanceof Set?  ((Set?) o).isEmpty();
  }
  
  /**
 @@ -288,10 +289,10 @@ public class Collections
 * @return an empty parameterized list.
 * @since 1.5
 */
 +  @SuppressWarnings(unchecked)
public static final T ListT emptyList()
{
 -/* FIXME: Could this be optimized? */
 -return new EmptyListT();
 +return (ListT) EMPTY_LIST;
}
  
/**
 @@ -369,7 +370,7 @@ public class Collections
   */
  public boolean equals(Object o)
  {
 -  return o instanceof List  ((List) o).isEmpty();
 +  return o instanceof List?  ((List?) o).isEmpty();
  }
  
  /**
 @@ -480,10 +481,10 @@ public class Collections
 * @return an empty parameterized map.
 * @since 1.5
 */
 +  @SuppressWarnings(unchecked)
public static final K,V MapK,V emptyMap()
{
 -/* FIXME: Could this be optimized? */
 -return new EmptyMapK,V();
 +return (MapK,V) EMPTY_MAP;
}
  
/**
 @@ -511,9 +512,10 @@ public class Collections
   * There are no entries.
   * @return The empty set.
   */
 +@SuppressWarnings(unchecked)
  public SetMap.EntryK, V entrySet()
  {
 -  return EMPTY_SET;
 +  return (SetMap.EntryK, V) EMPTY_SET;
  }
  
  // The remaining methods are optional, but provide a performance
 @@ -546,7 +548,7 @@ public class Collections
   */
  public boolean equals(Object o)
  {
 -  return o instanceof Map  ((Map) o).isEmpty();
 +  return o instanceof Map?,?  ((Map?,?) o).isEmpty();
  }
  
  /**
 @@ -572,9 +574,10 @@ public class 

Re: [cp-patches] [RFC PATCH 4/4] Fix java/lang/String.codePoint{At|Before} exception types

2012-10-15 Thread Andrew Hughes


- Original Message -
 OpenJDK throws StringIndexOutOfBoundsException and so should we.
 
 Signed-off-by: Pekka Enberg penb...@kernel.org
 ---
  ChangeLog |6 ++
  java/lang/String.java |4 
  2 files changed, 10 insertions(+), 0 deletions(-)
 
 diff --git a/ChangeLog b/ChangeLog
 index 5a75061..053ae62 100644
 --- a/ChangeLog
 +++ b/ChangeLog
 @@ -1,5 +1,11 @@
  2012-03-15  Pekka Enberg  penb...@kernel.org
  
 + * java/lang/String.java:
 + (codePointAt): Fix exception type.
 + (codePointBefore): Fix exception type.
 +
 +2012-03-15  Pekka Enberg  penb...@kernel.org
 +
   * java/util/Formatter.java:
   (format): Fix NPE errors.
  
 diff --git a/java/lang/String.java b/java/lang/String.java
 index 45c0daf..eb713ce 100644
 --- a/java/lang/String.java
 +++ b/java/lang/String.java
 @@ -705,6 +705,8 @@ public final class String
 */
public synchronized int codePointAt(int index)
{
 +if (index  0 || index = count)
 +  throw new StringIndexOutOfBoundsException(index);
  // Use the CharSequence overload as we get better range checking
  // this way.
  return Character.codePointAt(this, index);
 @@ -722,6 +724,8 @@ public final class String
 */
public synchronized int codePointBefore(int index)
{
 +if (index  0 || index = count)
 +  throw new StringIndexOutOfBoundsException(index);
  // Use the CharSequence overload as we get better range checking
  // this way.
  return Character.codePointBefore(this, index);
 --
 1.7.7.6
 
 
 

Ok.
-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: [cp-patches] [RFC PATCH 4/4] Fix java/lang/String.codePoint{At|Before} exception types

2012-10-15 Thread Andrew Hughes


- Original Message -
 OpenJDK throws StringIndexOutOfBoundsException and so should we.
 
 Signed-off-by: Pekka Enberg penb...@kernel.org
 ---
  ChangeLog |6 ++
  java/lang/String.java |4 
  2 files changed, 10 insertions(+), 0 deletions(-)
 
 diff --git a/ChangeLog b/ChangeLog
 index 5a75061..053ae62 100644
 --- a/ChangeLog
 +++ b/ChangeLog
 @@ -1,5 +1,11 @@
  2012-03-15  Pekka Enberg  penb...@kernel.org
  
 + * java/lang/String.java:
 + (codePointAt): Fix exception type.
 + (codePointBefore): Fix exception type.
 +
 +2012-03-15  Pekka Enberg  penb...@kernel.org
 +

The ChangeLog is wrong.  You haven't documented the parameters of the
methods.

   * java/util/Formatter.java:
   (format): Fix NPE errors.
  
 diff --git a/java/lang/String.java b/java/lang/String.java
 index 45c0daf..eb713ce 100644
 --- a/java/lang/String.java
 +++ b/java/lang/String.java
 @@ -705,6 +705,8 @@ public final class String
 */
public synchronized int codePointAt(int index)
{
 +if (index  0 || index = count)
 +  throw new StringIndexOutOfBoundsException(index);
  // Use the CharSequence overload as we get better range checking
  // this way.
  return Character.codePointAt(this, index);
 @@ -722,6 +724,8 @@ public final class String
 */
public synchronized int codePointBefore(int index)
{
 +if (index  0 || index = count)
 +  throw new StringIndexOutOfBoundsException(index);
  // Use the CharSequence overload as we get better range checking
  // this way.
  return Character.codePointBefore(this, index);
 --
 1.7.7.6
 
 
 

-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: [cp-patches] [RFC PATCH 3/4] Fix NPE in java/util/Formatter.format() method

2012-10-15 Thread Andrew Hughes


- Original Message -
 This patch fixes NPE for the following Malva test cases:
 
   assertEquals(false, String.format(%b, (Object[])null));
   assertEquals(null, String.format(%h, (Object[])null));
   assertEquals(null, String.format(%s, (Object[])null));
   assertEquals(null, String.format(%c, (Object[])null));
   assertEquals(null, String.format(%d, (Object[])null));
   assertEquals(null, String.format(%o, (Object[])null));
   assertEquals(null, String.format(%x, (Object[])null));
 
 Signed-off-by: Pekka Enberg penb...@kernel.org
 ---
  ChangeLog|5 +
  java/util/Formatter.java |   21 ++---
  2 files changed, 23 insertions(+), 3 deletions(-)
 
 diff --git a/ChangeLog b/ChangeLog
 index 5690754..5a75061 100644
 --- a/ChangeLog
 +++ b/ChangeLog
 @@ -1,3 +1,8 @@
 +2012-03-15  Pekka Enberg  penb...@kernel.org
 +
 + * java/util/Formatter.java:
 + (format): Fix NPE errors.
 +
  2011-07-20  Ivan Maidanski  iv...@mail.ru

The ChangeLogs in all these patches are incomplete.  This one
and the Collections one are particularly bad.  There are two
methods called format so it isn't clear to what this refers.
In Collections, the ChangeLog is just unreadable.
-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: [cp-patches] [RFC PATCH v2] Fix NPE in java/util/Formatter.format() method

2012-10-15 Thread Andrew Hughes


- Original Message -
 This patch fixes NPE for the following Malva test cases:
 
   assertEquals(false, String.format(%b, (Object[])null));
   assertEquals(null, String.format(%h, (Object[])null));
   assertEquals(null, String.format(%s, (Object[])null));
   assertEquals(null, String.format(%c, (Object[])null));
   assertEquals(null, String.format(%d, (Object[])null));
   assertEquals(null, String.format(%o, (Object[])null));
   assertEquals(null, String.format(%x, (Object[])null));
 
 Signed-off-by: Pekka Enberg penb...@kernel.org
 ---
  ChangeLog|   10 ++
  java/util/Formatter.java |   21 ++---
  2 files changed, 28 insertions(+), 3 deletions(-)
 
 diff --git a/ChangeLog b/ChangeLog
 index 384918b..746a1f7 100644
 --- a/ChangeLog
 +++ b/ChangeLog
 @@ -1,5 +1,15 @@
  2012-03-15  Pekka Enberg  penb...@kernel.org
  
 + * java/util/Formatter.java:
 + (icharacterFormat(Object,int,int,int,char):
 + Fix NullPointerException for null characters.
 + (basicIntegralConversion(Object, int, int, int, int, char):
 + Fix NullPointerException for null integers.
 + (format(Locale, String, Object...)):
 + Fix NullPointerException for null object.
 +
 +2012-03-15  Pekka Enberg  penb...@kernel.org
 +
   * java/lang/String.java:
   (codePointAt(int))): Fix exception type.
   (codePointBefore(int)): Fix exception type.
 diff --git a/java/util/Formatter.java b/java/util/Formatter.java
 index 62f6845..466fab5 100644
 --- a/java/util/Formatter.java
 +++ b/java/util/Formatter.java
 @@ -678,6 +678,12 @@ public final class Formatter
 conversion);
  noPrecision(precision);
  
 +if (arg == null)
 +  {
 +genericFormat(null, flags, width, precision);
 +return;
 +  }
 +
  int theChar;
  if (arg instanceof Character)
theChar = ((Character) arg).charValue();
 @@ -748,6 +754,12 @@ public final class Formatter
int radix, char
conversion)
{
  assert radix == 8 || radix == 10 || radix == 16;
 +
 +if (arg == null)
 +  {
 +return new CPStringBuilder(null);
 +  }
 +
  noPrecision(precision);
  
  // Some error checking.
 @@ -1353,9 +1365,12 @@ public final class Formatter
argumentIndex = previousArgumentIndex;
  // Argument indices start at 1 but array indices at
  0.
  --argumentIndex;
 -if (argumentIndex  0 || argumentIndex =
 args.length)
 -  throw new
 MissingFormatArgumentException(format.substring(start, index));
 -argument = args[argumentIndex];
 +if (args != null)
 +  {
 +if (argumentIndex  0 || argumentIndex =
 args.length)
 +  throw new
 MissingFormatArgumentException(format.substring(start, index));
 +argument = args[argumentIndex];
 +  }
}
  
  switch (conversion)
 --
 1.7.7.6
 
 
 

This one looks ok now.  Good to go.
-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: [cp-patches] [RFC PATCH] Bump up Java source and target version to 1.6

2012-10-15 Thread Andrew Hughes


- Original Message -
 On Oct 15, 2012, at 2:37 AM, Pekka Enberg penb...@kernel.org wrote:
 
  On Sat, 13 Oct 2012, Ivan Maidanski wrote:
  If you could show the community that upgrading to 1.7 brings some
  benefit (e.g., like above) then it is ok to upgrade to 1.7
  directly
  (thus eliminating Classpath VM implementors efforts to verify with
  1.6).
 
  Java 1.7 has some nice language changes:
 
  http://docs.oracle.com/javase/7/docs/technotes/guides/language/enhancements.html#javase7
 
  and more importantly, invokedynamic, that's heavily used by
  upcoming JRuby
  1.7. IIRC, Scala 2.10 will no longer run on Java 1.5 either.
 
 Pekka
 
 Although jruby needs invokedynamic to perform better I don't think
 this means the class library needs to change source version unless an
 actual API change would be unrecognized otherwise? You do however
 need
 a vm that supports invokedynamic and uses GNU Classpath. Does one
 exist?
 

This is sort of the point I was making, indirectly.  1.7 bytecode doesn't 
help anything until it's supported by VMs and it'll only be used (I imagine)
in java.lang.invoke, which we don't have yet.

It would be interesting to get HotSpot working with GNU Classpath... hahaha!

 

-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: [cp-patches] [RFC PATCH] Bump up Java source and target version to 1.6

2012-10-14 Thread Andrew Hughes
- Original Message -
 On Sat, Oct 6, 2012 at 7:20 AM, Andrew Hughes ahug...@redhat.com
 wrote:
  I was going to ask the same.  I don't see any good reason to change
  this.
 
 Fair enough. What needs to happen for us to move on to 1.7 and
 eventually 1.8 which both have classfile format and language changes?
 

Even OpenJDK doesn't do this for all class files and 1.8 is not going to be
released for nearly a year.

The only one I see a point in is 1.8 when we start to implement code that uses
lambdas.  The rest don't give a significant advantage against preventing ease
of building the code.

As a prerequisite, gcj would still have to be able to build if these changes 
were
integrated.  It currently doesn't have a 1.7 compiler.  That's something I'm 
looking into
with getting support for the latest ecj into Classpath.
-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: [cp-patches] Patch replacing all remaining .cvsignore with .gitignore

2012-07-16 Thread Andrew Hughes
- Original Message -
 Hi Andrew,
 
 On Apr 3, you committed a patch replacing root .cvsignore with
 .gitignore.
 
 I've prepared several patches to complete move to .gitignore (as well
 as to excluded some more auto-generated files):
 1. Replace all .cvsignore files with .gitignore -
 https://github.com/ivmai/classpath/commit/78f20cb718daad4164da4ceac9be54185d9c78ff
 2. Remove duplicate entries in .gitignore; remove empty .gitignore
 files -
 https://github.com/ivmai/classpath/commit/6479ffea252e06fd2a6c4cac024cb2696091a850
 3. Add more auto-generated file to .gitignore -
 https://github.com/ivmai/classpath/commit/ae0451e67dc65a83b29aafa03887b432f81a6c07
 
 Regards,
 Ivan
 

This generally looks ok, but I'll have to go through it in more detail with the 
sources.

I'm not keen on the addition of files that would be removed by make clean, as 
seems to be
added by 3.
-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: [cp-patches] Assertions and System Assertions in GNU Classpath

2012-04-24 Thread Andrew Hughes
- Original Message -
 Hi.
 
 Attached is a patch that enables GNU Classpath to distinguish between
 normal assertions and assertions for system classes (i.e. null
 classloader) as discussed on the Classpath mailing list [1].
 
 Note that the new method
 'java/lang/VMClassLoader.getSystemAssertionStatus()' must be
 implemented
 otherwise an exception will occur.
 

I'm confused about something in this patch which perhaps you can explain.

I was under the impression that all system classes had assertions enabled
and disabled as 'system assertions' (-esa/-dsa).  So I was expecting
the patch to just return this value if the classloader was null.  Why does
it instead retrieve a system classloader and probe that on a per-package/class
basis?  How would these values be set?

As quoted before, the Oracle documentation explicitly states that -ea does
not turn on system assertions.  This patch would imply that e.g. assertions
for java.lang could be turned on by -ea:java.lang.  Is this intentional?

On the administrative side, AFAICS you haven't contributed before.  Do you have
a copyright assignment with the FSF?

 josef
 
 [1]:
 http://developer.classpath.org/pipermail/classpath/2012-April/003195.html
 
 On 04/24/2012 02:29 AM, Andrew Hughes wrote:
  - Original Message -
  Hi there.
 
  I want to reanimate a discussion from 2007 [1,2] about the
  Assertion/System Assertion handling. As far as I know GNU
  Classpath
  can't distinguish between normal assertions
  (-ea/-eanableassertions)
  and
  assertions for system classes (-esa/-enablesystemassertions, i.e.
  classes with no classloader [3]).
  The only interface for the VM is the method
  VMClassLoader.defaultAssertionStatus(). It is not clear if this is
  supposed to return the system assertion status or the normal
  assertion
  status (vm integration doc [4] vs. javadoc [5]). On the one hand,
  it
  is
  used to set the defaultAssertionStatus for java.lang.ClassLoader
  [6]
  which would imply that it is the normal assertion status. On the
  other
  hand, the very same flag is used for setting the assertion status
  for
  system class in java.lang.Class (desiredAssertionStatus)[7].
 
  I think we need two dedicated methods in VMClassLoader.
  getDefaultAssertionStatus() for normal assertions (i.e. -ea) and
  getDefaultSystemAssertionStatus() for system assertions (i.e.
  -esa).
  ClassLoader should use VMClassLoader.getDefaultAssertionStatus()
  as
  its
  default value and Class.getDesiredAssertionStatus() should use
  VMClassLoader.defaultSystemAssertionStatus() for system classes.
 
  I understand that this would be a rather big change because all
  VMs
  using GNU Classpath will fail if they do not adopt their
  VMClassLoader
  accordingly.
 
  I want to revitalize the discussion on this topic and I'm ready to
  prepare a patch for this issue but things should be discussed
  first
  ;).
 
  I hope my explanations are somehow understandable ;).
 
  - josef
 
  PS: I think the patch from 2007 is does not fix this issue as it
  does
  not modify java.lang.Class and java.lang.Classloader receptively.
 
 
  [1]:
  http://developer.classpath.org/pipermail/classpath-patches/2007-August/005601.html
  [2]:
  http://developer.classpath.org/pipermail/classpath-patches/2007-September/005605.html
  [3]:
  http://docs.oracle.com/javase/1.4.2/docs/guide/lang/assert.html#enable-disable
  [4]:
  http://www.gnu.org/software/classpath/docs/cp-vmintegration.html#SEC7
  [5]:
  http://git.savannah.gnu.org/cgit/classpath.git/tree/vm/reference/java/lang/VMClassLoader.java?id=18f4bdd925d1a78d11598fb23dcaf1110772dcae#n334
  [6]:
  http://git.savannah.gnu.org/cgit/classpath.git/tree/java/lang/ClassLoader.java?id=18f4bdd925d1a78d11598fb23dcaf1110772dcae#n220
  [7]:
  http://git.savannah.gnu.org/cgit/classpath.git/tree/java/lang/Class.java?id=18f4bdd925d1a78d11598fb23dcaf1110772dcae#n1233
 
 
  
  You're right.  The issue is here:
  
  But if you use them with no arguments (-ea or -da), they do not
  apply to system classes.
  
  (from
  http://java.sun.com/developer/technicalArticles/JavaLP/assertions/)
  
  Both when the classloader is null (a system class) and when there
  is no class or package-specific setting, the same default setting
  from VMClassLoader.defaultAssertionStatus() is used.
  
  There should instead a separate method for system classes as you
  mention: VMClassLoader.getSystemAssertionStatus()
  (I don't think it needs to be called default because it can't be
  overridden by the class/package settings).
  
  As we're just after a release (0.99), this would be an ideal time
  to add that method.
 
 

Thanks,
-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: Assertions and System Assertions in GNU Classpath

2012-04-23 Thread Andrew Hughes
- Original Message -
 Hi there.
 
 I want to reanimate a discussion from 2007 [1,2] about the
 Assertion/System Assertion handling. As far as I know GNU Classpath
 can't distinguish between normal assertions (-ea/-eanableassertions)
 and
 assertions for system classes (-esa/-enablesystemassertions, i.e.
 classes with no classloader [3]).
 The only interface for the VM is the method
 VMClassLoader.defaultAssertionStatus(). It is not clear if this is
 supposed to return the system assertion status or the normal
 assertion
 status (vm integration doc [4] vs. javadoc [5]). On the one hand, it
 is
 used to set the defaultAssertionStatus for java.lang.ClassLoader [6]
 which would imply that it is the normal assertion status. On the
 other
 hand, the very same flag is used for setting the assertion status for
 system class in java.lang.Class (desiredAssertionStatus)[7].
 
 I think we need two dedicated methods in VMClassLoader.
 getDefaultAssertionStatus() for normal assertions (i.e. -ea) and
 getDefaultSystemAssertionStatus() for system assertions (i.e. -esa).
 ClassLoader should use VMClassLoader.getDefaultAssertionStatus() as
 its
 default value and Class.getDesiredAssertionStatus() should use
 VMClassLoader.defaultSystemAssertionStatus() for system classes.
 
 I understand that this would be a rather big change because all VMs
 using GNU Classpath will fail if they do not adopt their
 VMClassLoader
 accordingly.
 
 I want to revitalize the discussion on this topic and I'm ready to
 prepare a patch for this issue but things should be discussed first
 ;).
 
 I hope my explanations are somehow understandable ;).
 
 - josef
 
 PS: I think the patch from 2007 is does not fix this issue as it does
 not modify java.lang.Class and java.lang.Classloader receptively.
 
 
 [1]:
 http://developer.classpath.org/pipermail/classpath-patches/2007-August/005601.html
 [2]:
 http://developer.classpath.org/pipermail/classpath-patches/2007-September/005605.html
 [3]:
 http://docs.oracle.com/javase/1.4.2/docs/guide/lang/assert.html#enable-disable
 [4]:
 http://www.gnu.org/software/classpath/docs/cp-vmintegration.html#SEC7
 [5]:
 http://git.savannah.gnu.org/cgit/classpath.git/tree/vm/reference/java/lang/VMClassLoader.java?id=18f4bdd925d1a78d11598fb23dcaf1110772dcae#n334
 [6]:
 http://git.savannah.gnu.org/cgit/classpath.git/tree/java/lang/ClassLoader.java?id=18f4bdd925d1a78d11598fb23dcaf1110772dcae#n220
 [7]:
 http://git.savannah.gnu.org/cgit/classpath.git/tree/java/lang/Class.java?id=18f4bdd925d1a78d11598fb23dcaf1110772dcae#n1233
 
 

You're right.  The issue is here:

But if you use them with no arguments (-ea or -da), they do not apply to 
system classes.

(from http://java.sun.com/developer/technicalArticles/JavaLP/assertions/)

Both when the classloader is null (a system class) and when there is no class 
or package-specific setting, the same default setting
from VMClassLoader.defaultAssertionStatus() is used. 

There should instead a separate method for system classes as you mention: 
VMClassLoader.getSystemAssertionStatus()
(I don't think it needs to be called default because it can't be overridden by 
the class/package settings).

As we're just after a release (0.99), this would be an ideal time to add that 
method.
-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: [cp-patches] [commit-cp] classpath ChangeLog native/jni/java-io/java_io_...

2012-04-03 Thread Andrew Hughes
- Original Message -
 On 03/29/2012 05:02 PM, Pekka Enberg wrote:
  git push savannah master
 
 That worked, thanks.  I'm sure someone will let me know if I did
 it wrong.  :-)
 

Looks fine here.  I pulled it in this morning.

 Andrew.
 
 
 

-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: [cp-patches] [commit-cp] classpath ChangeLog native/jni/java-io/java_io_...

2012-03-29 Thread Andrew Hughes
- Original Message -
 CVSROOT:  /sources/classpath
 Module name:  classpath
 Changes by:   Andrew Haley aph  12/03/29 09:32:34
 
 Modified files:
   .  : ChangeLog
   native/jni/java-io: java_io_VMConsole.c
 
 Log message:
   2012-03-25  Gerald Pfeifer  ger...@pfeifer.com
   
   PR libgcj/52694
   * native/jni/java-io/java_io_VMConsole.c (IUCLC): Define, if
   undefined.
 
 CVSWeb URLs:
 http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.9848r2=1.9849
 http://cvs.savannah.gnu.org/viewcvs/classpath/native/jni/java-io/java_io_VMConsole.c?cvsroot=classpathr1=1.1r2=1.2
 
 

The CVS repository is obsolete.  Current development takes place in git:

http://git.savannah.gnu.org/cgit/classpath.git

See this thread: 
http://developer.classpath.org/pipermail/classpath/2012-March/003181.html
-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: [cp-patches] [commit-cp] classpath ChangeLog native/jni/java-io/java_io_...

2012-03-29 Thread Andrew Hughes
- Original Message -
 On 03/29/2012 06:19 PM, Ivan Maidanski wrote:
  Hi Andrew,
 
  Thu, 29 Mar 2012 17:42:17 +0100 от Andrew Haley a...@redhat.com:
  On 03/29/2012 04:58 PM, Ivan Maidanski wrote:
  It would be good to deprecate ChangeLog (used as commit log) as
  well.
 
  Why?  I think this sentence is missing a because ... clause.
 
  Sorry for not explaining you how does git merge work. if you don't
  have a special ChangeLog-aware merge driver installed (like
  git-merge-changelog) you would almost always get merge conflicts
  when pulling public modifications into a privately modified
  ChangeLog file (same for rebasing). Every merge conflict requires
  manual handling. If it is decided to move to VCS that simplifies
  parallel development and branch merging, staying with old commit
  policy (relying on ChangeLog) neutralizes that benefits.

 But that's what the git ChangeLog plugin is for.  GNU projects have
 ChangeLogs; it's up to the VCS to keep up.

  PS. I was surprised to hear that free Java developers prefer SVN to
  Git.

 So was I.  Who said that Java developers prefer SVN to Git?

  How many free Java developers have been contributing to Classpath
  over the passed 3-4 years? And which of them prefer to stay with
  CVS
  and SVN?

 Well, I vastly prefer SVN to anything I've seen recently because of
 its branch handling, but maybe that's only me.  In any case, let's
 not
 have this mailing list degenerate into my VCS versus yours flame
 wars, just like every other list.

Yes, let's not.  I'll just say that from my side, working with individual
changesets makes it a lot easier to dig out individual patches, etc.  Doing
the recent gcj merge with SVN was horrendous compared with the OpenJDK merges
I do (though gcc is a much bigger repo) and I think things would be a lot harder
if OpenJDK used it.

git and mercurial seem pretty much the same to me, the main difference being 
that mercurial
seems to trail git in terms of feature development and git has a usable branch 
system,
rather than the fakery we have to do with mercurial.


 Andrew.



--
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: [commit-cp] classpath ChangeLog native/jni/java-io/java_io_...

2012-03-29 Thread Andrew Hughes
- Original Message -
 CVSROOT:  /sources/classpath
 Module name:  classpath
 Changes by:   Andrew Haley aph  12/03/29 09:32:34
 
 Modified files:
   .  : ChangeLog
   native/jni/java-io: java_io_VMConsole.c
 
 Log message:
   2012-03-25  Gerald Pfeifer  ger...@pfeifer.com
   
   PR libgcj/52694
   * native/jni/java-io/java_io_VMConsole.c (IUCLC): Define, if
   undefined.
 
 CVSWeb URLs:
 http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.9848r2=1.9849
 http://cvs.savannah.gnu.org/viewcvs/classpath/native/jni/java-io/java_io_VMConsole.c?cvsroot=classpathr1=1.1r2=1.2
 
 

The CVS repository is obsolete.  Current development takes place in git:

http://git.savannah.gnu.org/cgit/classpath.git

See this thread: 
http://developer.classpath.org/pipermail/classpath/2012-March/003181.html
-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: GNU Classpath version control migration after .99?

2012-03-19 Thread Andrew Hughes
- Original Message -
 On Mon, Mar 12, 2012 at 10:00 PM, Andrew Hughes ahug...@redhat.com
 wrote:
  Well, you probably know from
 
  http://developer.classpath.org/pipermail/classpath/2012-March/003180.html
 
  that I'm in favour of a move to git sooner rather than later.
 
  How about we give it a week from now (say Monday 19th, 16h00 UTC),
  and if there
  are no objections, we push the existing IcedTea mirror to the
  Classpath Savannah
  project and start using that?
 
 I'm obviously happy with that.
 
 Pekka
 

As the deadline has now passed, I've populated the git repository on Savannah:

http://git.savannah.gnu.org/cgit/classpath.git

This is now the active development repository and the old CVS repository is 
obsolete.
-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: [cp-patches] [RFC/PATCH 2/2] Add missing Java 1.5 java/net methods

2012-03-15 Thread Andrew Hughes


- Original Message -
 On Wed, Mar 14, 2012 at 8:22 PM, Andrew Hughes ahug...@redhat.com
 wrote:
  I don't see how this is better than just not having these APIs.
   Shouldn't
  they at least delegate to VM level?

 That's what the API does with OpenJDK too! Also, the VM is not really
 involved for networking code so I don't see why we'd need to delegate
 anything.


Well they at least need to be documented and the lack of implementation noted 
therein.
--
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: [cp-patches] [RFC/PATCH 1/2] Add missing Java 1.5 java/net classes

2012-03-14 Thread Andrew Hughes


- Original Message -
 Signed-off-by: Pekka Enberg penb...@kernel.org
 ---
  java/net/CacheRequest.java|   52 
  java/net/CacheResponse.java   |   55 +
  java/net/CookieHandler.java   |   68
  +++
  java/net/HttpRetryException.java  |   80
  +
  java/net/ResponseCache.java   |   69
  +++
  java/net/SecureCacheResponse.java |   55 +
  6 files changed, 379 insertions(+), 0 deletions(-)
  create mode 100644 java/net/CacheRequest.java
  create mode 100644 java/net/CacheResponse.java
  create mode 100644 java/net/CookieHandler.java
  create mode 100644 java/net/HttpRetryException.java
  create mode 100644 java/net/ResponseCache.java
  create mode 100644 java/net/SecureCacheResponse.java
 
 diff --git a/java/net/CacheRequest.java b/java/net/CacheRequest.java
 new file mode 100644
 index 000..23e0d9e
 --- /dev/null
 +++ b/java/net/CacheRequest.java
 @@ -0,0 +1,52 @@
 +/* CacheRequest.java --
 +   Copyright (C) 2012  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 java.net;
 +
 +import java.io.IOException;
 +import java.io.OutputStream;
 +
 +
 +/**
 + * @since 1.5
 + */
 +public abstract class CacheRequest
 +{
 +  public abstract OutputStream getBody() throws IOException;
 +
 +  public abstract void abort();
 +}
 diff --git a/java/net/CacheResponse.java
 b/java/net/CacheResponse.java
 new file mode 100644
 index 000..d4cf95f
 --- /dev/null
 +++ b/java/net/CacheResponse.java
 @@ -0,0 +1,55 @@
 +/* CacheResponse.java --
 +   Copyright (C) 2012  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 

Re: [cp-patches] [RFC/PATCH 2/2] Add missing Java 1.5 java/net methods

2012-03-14 Thread Andrew Hughes
- Original Message -
 Signed-off-by: Pekka Enberg penb...@kernel.org
 ---
  java/net/ServerSocket.java |8 
  java/net/Socket.java   |8 
  java/net/SocketImpl.java   |8 
  3 files changed, 24 insertions(+), 0 deletions(-)
 
 diff --git a/java/net/ServerSocket.java b/java/net/ServerSocket.java
 index 1dbd763..453fb29 100644
 --- a/java/net/ServerSocket.java
 +++ b/java/net/ServerSocket.java
 @@ -584,6 +584,14 @@ public class ServerSocket
}
  
/**
 +   * @since 1.5
 +   */
 +  public void setPerformancePreferences(int connectionTime, int
 latency, int bandwidth)
 +  {
 +// Ignored
 +  }
 +
 +  /**
 * Returns the value of this socket as a codeString/code.
 *
 * @return This socket represented as a codeString/code.
 diff --git a/java/net/Socket.java b/java/net/Socket.java
 index 32b12e8..26490e3 100644
 --- a/java/net/Socket.java
 +++ b/java/net/Socket.java
 @@ -1294,4 +1294,12 @@ public class Socket
{
  return outputShutdown;
}
 +
 +  /**
 +   * @since 1.5
 +   */
 +  public void setPerformancePreferences(int connectionTime, int
 latency, int bandwidth)
 +  {
 +// Ignored
 +  }
  }
 diff --git a/java/net/SocketImpl.java b/java/net/SocketImpl.java
 index 77f470b..ab3b636 100644
 --- a/java/net/SocketImpl.java
 +++ b/java/net/SocketImpl.java
 @@ -318,4 +318,12 @@ public abstract class SocketImpl implements
 SocketOptions
{
  throw new IOException(Not implemented in this socket class);
}
 +
 +  /**
 +   * @since 1.5
 +   */
 +  public void setPerformancePreferences(int connectionTime, int
 latency, int bandwidth)
 +  {
 +// Ignored
 +  }
  }
 --
 1.7.6.5
 
 
 

I don't see how this is better than just not having these APIs.  Shouldn't
they at least delegate to VM level?
-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: [cp-patches] [RFC/PATCH 1/6] Fix java/lang/reflect/Member.getDeclaringClass() return type

2012-03-12 Thread Andrew Hughes

- Original Message -
 Signed-off-by: Pekka Enberg penb...@kernel.org
 ---
  java/lang/reflect/Member.java |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
 
 diff --git a/java/lang/reflect/Member.java
 b/java/lang/reflect/Member.java
 index fed962c..945fbf6 100644
 --- a/java/lang/reflect/Member.java
 +++ b/java/lang/reflect/Member.java
 @@ -79,7 +79,7 @@ public interface Member
 *
 * @return the class that declared this member
 */
 -  Class getDeclaringClass();
 +  Class? getDeclaringClass();
  
/**
 * Gets the simple name of this member. This will be a valid Java
 --
 1.7.6.5
 
 
 

Fine. This one's trivial.
-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: [cp-patches] [RFC/PATCH 4/6] Add missing Java 1.7 constructors to java/lang classes

2012-03-12 Thread Andrew Hughes
- Original Message -
 Signed-off-by: Pekka Enberg penb...@kernel.org
 ---
  java/lang/AssertionError.java |   14 +-
  java/lang/LinkageError.java   |   17 +++--
  2 files changed, 28 insertions(+), 3 deletions(-)
 
 diff --git a/java/lang/AssertionError.java
 b/java/lang/AssertionError.java
 index 778eb58..cf953f4 100644
 --- a/java/lang/AssertionError.java
 +++ b/java/lang/AssertionError.java
 @@ -1,5 +1,5 @@
  /* AssertionError.java -- indication of a failed assertion
 -   Copyright (C) 2002, 2005  Free Software Foundation, Inc.
 +   Copyright (C) 2002, 2005, 2012  Free Software Foundation, Inc.
  
  This file is part of GNU Classpath.
  
 @@ -145,4 +145,16 @@ public class AssertionError extends Error
{
  super(Double.toString(msg));
}
 +
 +  /**
 +   * Construct an AssertionError with detail message and cause.
 +   *
 +   * @param msg Detail message.
 +   * @param cause The cause of this exception, may be null
 +   * @since 1.7
 +   */
 +  public AssertionError(String msg, Throwable cause)
 +  {
 +super(msg, cause);
 +  }
  }
 diff --git a/java/lang/LinkageError.java
 b/java/lang/LinkageError.java
 index 0287020..34b0725 100644
 --- a/java/lang/LinkageError.java
 +++ b/java/lang/LinkageError.java
 @@ -1,6 +1,6 @@
  /* LinkageError.java -- thrown when classes valid at separate
  compile times
 cannot be linked to each other
 -   Copyright (C) 1998, 1999, 2001, 2002, 2005  Free Software
 Foundation, Inc.
 +   Copyright (C) 1998, 1999, 2001, 2002, 2005, 2012  Free Software
 Foundation, Inc.
  
  This file is part of GNU Classpath.
  
 @@ -46,7 +46,7 @@ package java.lang;
   *
   * @author Brian Jones
   * @author Tom Tromey (tro...@cygnus.com)
 - * @status updated to 1.4
 + * @status updated to 1.7
   */
  public class LinkageError extends Error
  {
 @@ -71,4 +71,17 @@ public class LinkageError extends Error
{
  super(s);
}
 +
 +  /**
 +   * Construct an LinkageError with detail message and cause.
 +   *
 +   * @param msg Detail message.
 +   * @param cause The cause of this exception, may be null
 +   * @since 1.7
 +   */
 +  public LinkageError(String msg, Throwable cause)
 +  {
 +super(msg, cause);
 +  }
 +
  }
 --
 1.7.6.5
 
 
 

Fine.
-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: [cp-patches] [RFC/PATCH 5/6] Add missing Java 1.7 ReflectiveOperationException class

2012-03-12 Thread Andrew Hughes
- Original Message -
 Signed-off-by: Pekka Enberg penb...@kernel.org
 ---
  java/lang/ClassNotFoundException.java|6 +-
  java/lang/IllegalAccessException.java|6 +-
  java/lang/InstantiationException.java|6 +-
  java/lang/NoSuchFieldException.java  |6 +-
  java/lang/NoSuchMethodException.java |6 +-
  java/lang/ReflectiveOperationException.java  |   88
  ++
  java/lang/reflect/InvocationTargetException.java |6 +-
  7 files changed, 106 insertions(+), 18 deletions(-)
  create mode 100644 java/lang/ReflectiveOperationException.java
 
 diff --git a/java/lang/ClassNotFoundException.java
 b/java/lang/ClassNotFoundException.java
 index 142bc5d..fe1424d 100644
 --- a/java/lang/ClassNotFoundException.java
 +++ b/java/lang/ClassNotFoundException.java
 @@ -1,5 +1,5 @@
  /* ClassNotFoundException.java -- thrown when class definition
  cannot be found
 -   Copyright (C) 1998, 2002, 2005  Free Software Foundation, Inc.
 +   Copyright (C) 1998, 2002, 2005, 2012  Free Software Foundation,
 Inc.
  
  This file is part of GNU Classpath.
  
 @@ -47,9 +47,9 @@ package java.lang;
   * @see Class#forName(String)
   * @see ClassLoader#findSystemClass(String)
   * @see ClassLoader#loadClass(String, boolean)
 - * @status updated to 1.4
 + * @status updated to 1.7
   */
 -public class ClassNotFoundException extends Exception
 +public class ClassNotFoundException extends
 ReflectiveOperationException
  {
/**
 * Compatible with JDK 1.0+.
 diff --git a/java/lang/IllegalAccessException.java
 b/java/lang/IllegalAccessException.java
 index a352c8b..2574f66 100644
 --- a/java/lang/IllegalAccessException.java
 +++ b/java/lang/IllegalAccessException.java
 @@ -1,6 +1,6 @@
  /* IllegalAccessException.java -- thrown on attempt to reflect on
 inaccessible data
 -   Copyright (C) 1998, 1999, 2001, 2002, 2005  Free Software
 Foundation, Inc.
 +   Copyright (C) 1998, 1999, 2001, 2002, 2005, 2012  Free Software
 Foundation, Inc.
  
  This file is part of GNU Classpath.
  
 @@ -71,9 +71,9 @@ import java.lang.reflect.Method;
   * @see Field#getDouble(Object)
   * @see Method#invoke(Object, Object[])
   * @see Constructor#newInstance(Object[])
 - * @status updated to 1.4
 + * @status updated to 1.7
   */
 -public class IllegalAccessException extends Exception
 +public class IllegalAccessException extends
 ReflectiveOperationException
  {
/**
 * Compatible with JDK 1.0+.
 diff --git a/java/lang/InstantiationException.java
 b/java/lang/InstantiationException.java
 index 367b14b..cb2cad1 100644
 --- a/java/lang/InstantiationException.java
 +++ b/java/lang/InstantiationException.java
 @@ -1,6 +1,6 @@
  /* InstantiationException.java -- thrown when reflection cannot
  create an
 instance
 -   Copyright (C) 1998, 1999, 2001, 2002, 2005  Free Software
 Foundation, Inc.
 +   Copyright (C) 1998, 1999, 2001, 2002, 2005, 2012  Free Software
 Foundation, Inc.
  
  This file is part of GNU Classpath.
  
 @@ -46,9 +46,9 @@ package java.lang;
   * @author Brian Jones
   * @author Warren Levy (warr...@cygnus.com)
   * @see Class#newInstance()
 - * @status updated to 1.4
 + * @status updated to 1.7
   */
 -public class InstantiationException extends Exception
 +public class InstantiationException extends
 ReflectiveOperationException
  {
/**
 * Compatible with JDK 1.0+.
 diff --git a/java/lang/NoSuchFieldException.java
 b/java/lang/NoSuchFieldException.java
 index 74d52d1..b43b532 100644
 --- a/java/lang/NoSuchFieldException.java
 +++ b/java/lang/NoSuchFieldException.java
 @@ -1,5 +1,5 @@
  /* NoSuchFieldException.java -- thrown when reflecting a
  non-existant field
 -   Copyright (C) 1998, 1999, 2001, 2002, 2005  Free Software
 Foundation, Inc.
 +   Copyright (C) 1998, 1999, 2001, 2002, 2005, 2012  Free Software
 Foundation, Inc.
  
  This file is part of GNU Classpath.
  
 @@ -45,9 +45,9 @@ package java.lang;
   * @author Brian Jones
   * @author Warren Levy (warr...@cygnus.com)
   * @since 1.1
 - * @status updated to 1.4
 + * @status updated to 1.7
   */
 -public class NoSuchFieldException extends Exception
 +public class NoSuchFieldException extends
 ReflectiveOperationException
  {
/**
 * Compatible with JDK 1.1+.
 diff --git a/java/lang/NoSuchMethodException.java
 b/java/lang/NoSuchMethodException.java
 index e423efb..1162382 100644
 --- a/java/lang/NoSuchMethodException.java
 +++ b/java/lang/NoSuchMethodException.java
 @@ -1,5 +1,5 @@
  /* NoSuchMethodException.java -- thrown when reflecting a
  non-existant method
 -   Copyright (C) 1998, 1999, 2001, 2002, 2005  Free Software
 Foundation, Inc.
 +   Copyright (C) 1998, 1999, 2001, 2002, 2005, 2012  Free Software
 Foundation, Inc.
  
  This file is part of GNU Classpath.
  
 @@ -44,9 +44,9 @@ package java.lang;
   *
   * @author Brian Jones
   * @author Warren Levy (warr...@cygnus.com)
 - * @status updated to 1.4
 + * @status updated to 1.7
   */
 -public 

Re: [cp-patches] [RFC/PATCH 2/6] Add missing java/lang/System.lineSeparator() method

2012-03-12 Thread Andrew Hughes
- Original Message -
 Signed-off-by: Pekka Enberg penb...@kernel.org
 ---
  java/lang/System.java |   12 
  1 files changed, 12 insertions(+), 0 deletions(-)
 
 diff --git a/java/lang/System.java b/java/lang/System.java
 index 51b3259..9d86991 100644
 --- a/java/lang/System.java
 +++ b/java/lang/System.java
 @@ -97,6 +97,8 @@ public final class System
 */
public static final PrintStream out =
VMSystem.makeStandardOutputStream();
  
 +  private static final String LINE_SEPARATOR =
 SystemProperties.getProperty(line.separator);
 +
/**
 * The standard output PrintStream.  This is assigned at startup
 and
 * starts its life perfectly valid. Although it is marked final,
 you can
 @@ -713,6 +715,16 @@ public final class System
}
  
/**
 +   * Returns the system-dependent line separator.
 +   *
 +   * @return the system-dependent line separator.
 +   */
 +  public static String lineSeparator()
 +  {
 +return LINE_SEPARATOR;
 +  }
 +
 +  /**
 * This is a specialised codeCollection/code, providing
 * the necessary provisions for the collections used by the
 * environment variable map.  Namely, it prevents
 --
 1.7.6.5
 
 
 

Fine.
-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: [cp-patches] [RFC/PATCH 3/6] Add missing Java 1.7 compare() API methods to java/lang classes

2012-03-12 Thread Andrew Hughes
- Original Message -
 Signed-off-by: Pekka Enberg penb...@kernel.org
 ---
  java/lang/Boolean.java   |   15 +++
  java/lang/Byte.java  |   17 +
  java/lang/Character.java |   17 +
  java/lang/Integer.java   |   17 +
  java/lang/Long.java  |   17 +
  java/lang/Short.java |   17 +
  6 files changed, 100 insertions(+), 0 deletions(-)
 
 diff --git a/java/lang/Boolean.java b/java/lang/Boolean.java
 index f2eaf41..0e4afa8 100644
 --- a/java/lang/Boolean.java
 +++ b/java/lang/Boolean.java
 @@ -237,6 +237,21 @@ public final class Boolean implements
 Serializable, ComparableBoolean
}
  
/**
 +   * Compares two unboxed boolean values.
 +   *
 +   * @param x First value to compare.
 +   * @param y Second value to compare.
 +   * @return 0 if both Booleans represent the same value, a positive
 number
 +   * if this Boolean represents true and the other false, and a
 negative
 +   * number otherwise.
 +   * @since 1.7
 +   */
 +  public static int compare(boolean x, boolean y)
 +  {
 +return Boolean.valueOf(x).compareTo(Boolean.valueOf(y));
 +  }
 +
 +  /**
 * If the String argument is true, ignoring case, return true.
 * Otherwise, return false.
 *
 diff --git a/java/lang/Byte.java b/java/lang/Byte.java
 index a1536e1..01e0e03 100644
 --- a/java/lang/Byte.java
 +++ b/java/lang/Byte.java
 @@ -370,4 +370,21 @@ public final class Byte extends Number
 implements ComparableByte
  return value - b.value;
}
  
 +  /**
 +   * Compares two unboxed byte values.
 +   * The result is positive if the first is greater, negative if the
 second
 +   * is greater, and 0 if the two are equal.
 +   *
 +   * @param x First value to compare.
 +   * @param y Second value to compare.
 +   *
 +   * @return positive int if the first value is greater, negative if
 the second
 +   * is greater, and 0 if the two are equal.
 +   * @since 1.7
 +   */
 +  public static int compare(byte x, byte y)
 +  {
 +return Byte.valueOf(x).compareTo(Byte.valueOf(y));
 +  }
 +
  }
 diff --git a/java/lang/Character.java b/java/lang/Character.java
 index 05e641c..f87cde6 100644
 --- a/java/lang/Character.java
 +++ b/java/lang/Character.java
 @@ -4200,6 +4200,23 @@ public final class Character implements
 Serializable, ComparableCharacter
}
  
/**
 +   * Compares two unboxed char values.
 +   * The result is positive if the first is greater, negative if the
 second
 +   * is greater, and 0 if the two are equal.
 +   *
 +   * @param x First value to compare.
 +   * @param y Second value to compare.
 +   *
 +   * @return positive int if the first value is greater, negative if
 the second
 +   * is greater, and 0 if the two are equal.
 +   * @since 1.7
 +   */
 +  public static int compare(char x, char y)
 +  {
 +return Character.valueOf(x).compareTo(Character.valueOf(y));
 +  }
 +
 +  /**
 * Returns an codeCharacter/code object wrapping the value.
 * In contrast to the codeCharacter/code constructor, this
 method
 * will cache some values.  It is used by boxing conversion.
 diff --git a/java/lang/Integer.java b/java/lang/Integer.java
 index f379795..25eb5d5 100644
 --- a/java/lang/Integer.java
 +++ b/java/lang/Integer.java
 @@ -586,6 +586,23 @@ public final class Integer extends Number
 implements ComparableInteger
}
  
/**
 +   * Compares two unboxed int values.
 +   * The result is positive if the first is greater, negative if the
 second
 +   * is greater, and 0 if the two are equal.
 +   *
 +   * @param x First value to compare.
 +   * @param y Second value to compare.
 +   *
 +   * @return positive int if the first value is greater, negative if
 the second
 +   * is greater, and 0 if the two are equal.
 +   * @since 1.7
 +   */
 +  public static int compare(int x, int y)
 +  {
 +return Integer.valueOf(x).compareTo(Integer.valueOf(y));
 +  }
 +
 +  /**
 * Return the number of bits set in x.
 * @param x value to examine
 * @since 1.5
 diff --git a/java/lang/Long.java b/java/lang/Long.java
 index e7579d8..6f31dfa 100644
 --- a/java/lang/Long.java
 +++ b/java/lang/Long.java
 @@ -585,6 +585,23 @@ public final class Long extends Number
 implements ComparableLong
}
  
/**
 +   * Compares two unboxed long values.
 +   * The result is positive if the first is greater, negative if the
 second
 +   * is greater, and 0 if the two are equal.
 +   *
 +   * @param x First value to compare.
 +   * @param y Second value to compare.
 +   *
 +   * @return positive int if the first value is greater, negative if
 the second
 +   * is greater, and 0 if the two are equal.
 +   * @since 1.7
 +   */
 +  public static int compare(long x, long y)
 +  {
 +return Long.valueOf(x).compareTo(Long.valueOf(y));
 +  }
 +
 +  /**
 * Return the number of bits set in x.
 * @param x value to examine
 * @since 1.5
 diff --git a/java/lang/Short.java b/java/lang/Short.java
 index 

Re: [cp-patches] [RFC/PATCH 6/6] Add missing Java 1.7 java/lang/reflect/Modifier methods

2012-03-12 Thread Andrew Hughes


- Original Message -
 Signed-off-by: Pekka Enberg penb...@kernel.org
 ---
  java/lang/reflect/Modifier.java |   42
  ++-
  1 files changed, 41 insertions(+), 1 deletions(-)
 
 diff --git a/java/lang/reflect/Modifier.java
 b/java/lang/reflect/Modifier.java
 index 15bad05..c75f7b8 100644
 --- a/java/lang/reflect/Modifier.java
 +++ b/java/lang/reflect/Modifier.java
 @@ -1,5 +1,5 @@
  /* java.lang.reflect.Modifier
 -   Copyright (C) 1998, 1999, 2001, 2002, 2005, 2008  Free Software
 Foundation, Inc.
 +   Copyright (C) 1998, 1999, 2001, 2002, 2005, 2008, 2012  Free
 Software Foundation, Inc.
  
  This file is part of GNU Classpath.
  
 @@ -300,6 +300,46 @@ public class Modifier
}
  
/**
 +   * @since 1.7
 +   */
 +  public static int classModifiers()
 +  {
 +return PUBLIC | PROTECTED | PRIVATE | STATIC | ABSTRACT | FINAL
 | STRICT;
 +  }
 +
 +  /**
 +   * @since 1.7
 +   */
 +  public static int interfaceModifiers()
 +  {
 +return PUBLIC | PROTECTED | PRIVATE | STATIC | ABSTRACT |
 STRICT;
 +  }
 +
 +  /**
 +   * @since 1.7
 +   */
 +  public static int constructorModifiers()
 +  {
 +return PUBLIC | PROTECTED | PRIVATE;
 +  }
 +
 +  /**
 +   * @since 1.7
 +   */
 +  public static int methodModifiers()
 +  {
 +return PUBLIC | PROTECTED | PRIVATE | STATIC | ABSTRACT | FINAL
 | STRICT | SYNCHRONIZED | NATIVE;
 +  }
 +
 +  /**
 +   * @since 1.7
 +   */
 +  public static int fieldModifiers()
 +  {
 +return PUBLIC | PROTECTED | PRIVATE | STATIC | FINAL | TRANSIENT
 | VOLATILE;
 +  }
 +
 +  /**
 * Get a string representation of all the modifiers represented by
 the
 * given int. The keywords are printed in this order:
 * codelt;public|protected|privategt; abstract static final
 transient
 --
 1.7.6.5
 
 
 

Looks good.
-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: GNU Classpath version control migration after .99?

2012-03-12 Thread Andrew Hughes
- Original Message -
 Hello,
 
 0.99 is almost out of the door so I'd like to begin the discussion on
 version control migration. AFAICT, we've all agreed that we'll dump
 CVS but left the decision open to which tool we'll migrate.
 
 What I'd personally like to see is that once 0.99 is out, we shut
 down
 CVS, convert the git mirrors to read-write git repositories:
 
 http://icedtea.classpath.org/mirror/git
 
 and keep the existing Mercurial mirroring scripts in place.
 
 Thoughts?
 

Well, you probably know from

http://developer.classpath.org/pipermail/classpath/2012-March/003180.html

that I'm in favour of a move to git sooner rather than later.

How about we give it a week from now (say Monday 19th, 16h00 UTC), and if there
are no objections, we push the existing IcedTea mirror to the Classpath Savannah
project and start using that?

 Pekka
 
 

-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: autobuilders and redownloading all sources from classpath.org servers

2012-03-06 Thread Andrew Hughes
- Original Message -
 Hi,
 
 If you are running an autobuilder against the sources of one of the
 classpath.org servers (especially icedtea.classpath.org) could you
 please double check that you are not unnecessarily redownloading
 download drops and/or whole forests when there have been no changes
 since the last time. The server is already over bandwidth limits and
 every unnecessary GB download costs us a little extra money.
 
 If you happen to operate an autobuilder on
 93-38-70-169.ip69.fastwebnet.it (93.38.70.169) please contact me to
 see
 if we can setup something more efficient. I sadly had to disable
 downloads from this host since it was using up ~15%+ of all traffic
 on
 the server.
 
 Thanks,
 
 Mark
 

Maybe it's worth looking at having a '--disable-downloading' option for
the IcedTea build which can be used on autobuilders to make them fail instead?
-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




For Anyone Wondering Why the Release Didn't Happen...

2012-02-22 Thread Andrew Hughes
I hit this when running make distcheck:

texi2dvi ../../doc/cp-tools.texinfo
This is pdfTeX, Version 3.1415926-2.3-1.40.12 (TeX Live 2011)
 restricted \write18 enabled.
entering extended mode
(./../../doc/cp-tools.texinfo
(/home/andrew/builder/classpath.release/classpath-0.99-pre/doc/texinfo.tex
Loading texinfo [version 2009-08-14.15]: pdf, fonts, markup, glyphs,
page headings, tables, conditionals, indexing, sectioning, toc, environments,
defuns, macros, cross references, insertions,
(/usr/share/texmf-dist/tex/generic/epsf/epsf.tex
This is `epsf.tex' v2.7.4 14 February 2011
) localization, formatting, and turning on texinfo input format.) [1] [2]
[-1] Chapter 1
./../../doc/cp-tools.texinfo:272: Undefined control sequence.
@itemindicate -@gcctabopt 
   
@itemzzz ...indent @setbox 0=@hbox {@itemindicate 
  {#1}}@itemindex {#1}@nobre...
l.272 @item -debug
  
? 

Help welcomed.  I've tried removing various bits and twiddling, but to no joy.
-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




0.99 Release

2012-02-01 Thread Andrew Hughes
Hi all,

I'd like to do a new GNU Classpath release just after FOSDEM (3rd-6th Feb.).
I was hoping to get it in before, but the locale fixing has taken longer than 
expected.
There are a lot of unreleased fixes in there, including these latest locale
improvements.

Are there any objections to a release on the 8th of February?
-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




[cp-patches] FYI: Add support for translating metazones

2008-07-07 Thread Andrew Hughes
This adds support for translating metazones (e.g. GMT) to
standard names (Europe/London for GMT in en_GB) using the
new metazones.properties file.

ChangeLog:

2008-07-07  Andrew John Hughes  [EMAIL PROTECTED]

* java/text/DateFormatSymbols.java:
Use metazones to convert metazone names to standard
Continent/City form.  Also add hack to include GMT
as a short name.
* resource/java/text/metazones.properties:
New properties file for mapping metazones to standard
zone names.

-- 
A. :)

Room 122, Department of Computer Science
http://www.dcs.shef.ac.uk/~andrew
PGP Key: 0D118B89 (http://subkeys.pgp.net)
Fingerprint: 711E 2AC8 72FE F5CE BB0C  0637 9678 5E51 0D11 8B89
Index: java/text/DateFormatSymbols.java
===
RCS file: /sources/classpath/classpath/java/text/DateFormatSymbols.java,v
retrieving revision 1.24
diff -u -r1.24 DateFormatSymbols.java
--- java/text/DateFormatSymbols.java7 Jul 2008 03:01:11 -   1.24
+++ java/text/DateFormatSymbols.java7 Jul 2008 14:58:35 -
@@ -40,12 +40,17 @@
 
 import gnu.java.locale.LocaleHelper;
 
+import java.io.IOException;
+
 import java.text.spi.DateFormatSymbolsProvider;
 
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Locale;
+import java.util.Map;
 import java.util.MissingResourceException;
+import java.util.Properties;
 import java.util.ResourceBundle;
 import java.util.ServiceLoader;
 import java.util.TimeZone;
@@ -74,6 +79,27 @@
   String[] weekdays;
 
   /**
+   * The set of properties for obtaining the metazone data.
+   */
+  private static transient final Properties properties;
+
+  /**
+   * Reads in the properties.
+   */
+  static
+  {
+properties = new Properties();
+try 
+  {
+
properties.load(DateFormatSymbols.class.getResourceAsStream(metazones.properties));
+  }
+catch (IOException exception)
+  {
+System.out.println(Failed to load weeks resource:  + exception);
+  }
+  }
+
+  /**
* The timezone strings supplied by the runtime.
*/
   private String[][] runtimeZoneStrings;
@@ -110,21 +136,40 @@
 try
   {
 int index = 0;
+   String country = locale.getCountry();
+   MapString,String[] systemZones = new HashMapString,String[]();
 String data = res.getString(zoneStrings);
String[] zones = data.split(\u00a9);
for (int a = 0; a  zones.length; ++a)
  {
String[] strings = zones[a].split(\u00ae);
+   // Workaround for missing short GMT display name
+   // See http://www.unicode.org/cldr/bugs/locale-bugs/incoming?id=1885
+   if (strings[0].equals(GMT))
+ strings[2] = GMT;
+   String type = properties.getProperty(strings[0] + . + country);
+   if (type == null)
+ type = properties.getProperty(strings[0] + .DEFAULT);
+   if (type != null)
+ strings[0] = type;
if (strings.length  5)
  {
String[] newStrings = new String[5];
System.arraycopy(strings, 0, newStrings, 0, strings.length);
-   for (int b = strings.length; a  newStrings.length; ++a)
+   for (int b = strings.length; b  newStrings.length; ++b)
  newStrings[b] = ;
strings = newStrings;
  }
-   allZones.add(strings);
+   String[] existing = systemZones.get(strings[0]);
+   if (existing != null  existing.length  1)
+ {
+   for (int b = 1; b  existing.length; ++b)
+ if (!existing[b].equals())
+   strings[b] = existing[b];  
+ }
+   systemZones.put(strings[0], strings);
  }
+   allZones.addAll(systemZones.values());
   }
 catch (MissingResourceException e)
   {
Index: resource/java/text/metazones.properties
===
RCS file: resource/java/text/metazones.properties
diff -N resource/java/text/metazones.properties
--- /dev/null   1 Jan 1970 00:00:00 -
+++ resource/java/text/metazones.properties 7 Jul 2008 14:58:35 -
@@ -0,0 +1,323 @@
+# This document is automatically generated by gnu.supplementgen
+
+Acre.DEFAULT=America/Rio_Branco
+Afghanistan.DEFAULT=Asia/Kabul
+Africa_Central.BI=Africa/Bujumbura
+Africa_Central.BW=Africa/Gaborone
+Africa_Central.CD=Africa/Lubumbashi
+Africa_Central.DEFAULT=Africa/Maputo
+Africa_Central.MW=Africa/Blantyre
+Africa_Central.RW=Africa/Kigali
+Africa_Central.ZM=Africa/Lusaka
+Africa_Central.ZW=Africa/Harare
+Africa_Eastern.DEFAULT=Africa/Nairobi
+Africa_Eastern.DJ=Africa/Djibouti
+Africa_Eastern.ER=Africa/Asmera
+Africa_Eastern.ET=Africa/Addis_Ababa
+Africa_Eastern.KM=Indian/Comoro
+Africa_Eastern.MG=Indian/Antananarivo
+Africa_Eastern.SO=Africa/Mogadishu