RE: PING: Re: [cp-patches] RFC: Fix for "XXX" use in java.util.Currency

2005-04-10 Thread Jeroen Frijters
Andrew John Hughes wrote:
> On Mon, 2005-03-28 at 01:41 +0100, Andrew John Hughes wrote:
> > The attached patch allows examples such as the following:
> > 
> > NumberFormat.getCurrencyInstance(Locale.ENGLISH).getCurrency()
> > 
> > to succeed with the result of a Currency instance containing "XXX"
> > rather than throwing a NullPointerException.  This is Sun's 
> behaviour,
> > which is made possible by allowing "XXX" to be supplied to
> > Currency.getInstance(String).  This is something we have discussed
> > before, which has lead to the introduction of the String version
> > of this value in java.text.DecimalFormatSymbols (11 Jan - 
> Fix for Bug #11545).
> > 
> > Should we allow this horrible design decision to creep into
> > GNU Classpath?  Comments please.
> > 
> > Changelog:
> > 
> > 2005-03-28  Andrew John Hughes  <[EMAIL PROTECTED]>
> > 
> > * java/text/DecimalFormatSymbols.java:
> > Added retrieval of "XXX" instance in place of null.
> > * java/util/Currency.java,
> > (Currency(String)): New constructor for the XXX special case.
> > (getInstance(String)): Allow special case of "XXX".
> > 
> Does anyone have any comments on this patch, posted March 
> 28th?  Should I commit it or not?

I like it and I vote for committing it.

Regards,
Jeroen


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


[cp-patches] [Patch] wrong casting in ImageIO

2005-04-10 Thread Michael Koch
Hi list,


I just commited the attached patch to fix an issue in
javax.imageio.ImageIO. A cast was wrong in ReaderFormatFilter.filter().
Thanks to David Gilbert for reporting this bug.


Michael


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

* javax/imageio/ImageIO.java (ReaderFormatFilter.filter):
Fixed wrong casting.

Index: javax/imageio/ImageIO.java
===
RCS file: /cvsroot/classpath/classpath/javax/imageio/ImageIO.java,v
retrieving revision 1.5
diff -u -r1.5 ImageIO.java
--- javax/imageio/ImageIO.java  16 Feb 2005 07:05:33 -  1.5
+++ javax/imageio/ImageIO.java  11 Apr 2005 06:50:46 -
@@ -80,7 +80,7 @@
 {
   if (provider instanceof ImageReaderSpi)
 {
-  ImageWriterSpi spi = (ImageWriterSpi) provider;
+  ImageReaderSpi spi = (ImageReaderSpi) provider;
   String[] formatNames = spi.getFormatNames();
 
   for (int i = formatNames.length - 1; i >= 0; --i)
___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


Re: [cp-patches] META-INF support

2005-04-10 Thread Michael Koch
On Mon, Apr 11, 2005 at 03:59:00AM +0100, Andrew John Hughes wrote:

> As to a jar version, we considered this recently on the list.  One
> reason we call it glibj.zip is because it can't be used as a normal jar,
> and using a different file extension (which still fits the content,
> because jars, AFAIK, are just zips with defined metadata) helps
> differentiate it.  I can foresee someone posting a GCJ bug when they try
> to use -findirect-dispatch on it...

Would not work as java.lang.Object and some other VM important classes
are too different (currently).

> Index: examples/Makefile.am
> ===
> RCS file: /cvsroot/classpath/classpath/examples/Makefile.am,v
> retrieving revision 1.3
> diff -u -3 -p -u -r1.3 Makefile.am
> --- examples/Makefile.am  7 Feb 2005 02:32:37 -   1.3
> +++ examples/Makefile.am  11 Apr 2005 02:49:55 -
> @@ -11,7 +11,7 @@ if FOUND_GCJX
>  JCOMPILER = $(GCJX) -bootclasspath '' -sourcepath '' -classpath 
> $(top_builddir)/lib:.
>  else
>  if FOUND_ECJ
> -JCOMPILER = $(ECJ) --bootclasspath '$(top_builddir)/lib' --classpath .
> +JCOMPILER = $(ECJ) -bootclasspath '$(top_builddir)/lib' -classpath .
>  else
>  error dunno how to setup the JCOMPILER and compile
>  endif

In a separate patch this would be obvious and already in I guess. ;-)

> Index: lib/Makefile.am
> ===
> RCS file: /cvsroot/classpath/classpath/lib/Makefile.am,v
> retrieving revision 1.79
> diff -u -3 -p -u -r1.79 Makefile.am
> --- lib/Makefile.am   7 Feb 2005 02:32:37 -   1.79
> +++ lib/Makefile.am   11 Apr 2005 02:50:04 -
> @@ -53,6 +53,7 @@ install-data-local: genclasses compile-c
>   cp -R java $(DESTDIR)$(pkgdatadir)
>   cp -R javax $(DESTDIR)$(pkgdatadir)
>   cp -R org $(DESTDIR)$(pkgdatadir)
> + cp -R META-INF $(DESTDIR)$(pkgdatadir)
>  
>  # FIXME - should mimic doc/api/Makefile.am instead...
>  uninstall-local:
> @@ -60,13 +61,14 @@ uninstall-local:
>   rm -rf $(DESTDIR)$(pkgdatadir)/java
>   rm -rf $(DESTDIR)$(pkgdatadir)/javax
>   rm -rf $(DESTDIR)$(pkgdatadir)/org
> + rm -rf $(DESTDIR)$(pkgdatadir)/META-INF
>  
>  endif # INSTALL_CLASS_FILES
>  
>  .PHONY: genclasses
>  
>  glibj.zip: classes compile-classes resources
> - if test "$(ZIP)" != ""; then $(ZIP) -r -D glibj.zip gnu java javax org 
> > /dev/null; fi
> + if test "$(ZIP)" != ""; then $(ZIP) -r -D glibj.zip gnu java javax org 
> META-INF > /dev/null; fi
>  
>  resources:
>   if ! [ -e gnu ]; then mkdir gnu; fi
> @@ -78,6 +80,8 @@ resources:
>   @list='$(propertyfiles)'; for p in $$list; do \
> cp $(top_srcdir)/resource/$$p $$p; \
>   done
> + if [ -e META-INF ]; then rm -rf META-INF; fi
> + cp -r $(top_srcdir)/resource/META-INF .
>   touch resources
>  
>  classes: genclasses
> @@ -122,6 +126,7 @@ clean-local:
>   -rm -rf java
>   -rm -rf javax
>   -rm -rf org
> + -rm -rf META-INF
>  
>  dist-hook:
>   mkdir -p $(distdir)

How does $(top_srcdir)/resource/META-INF gets created? It's not in CVS.


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

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


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


[cp-patches] CORBA Build FIx

2005-04-10 Thread Andrew John Hughes
I'm committing the attached trivial patch to fix the build
which broke with Audrius' latest patch.

Changelog:

2005-04-11  Andrew John Hughes  <[EMAIL PROTECTED]>

* org/omg/CORBA/Request.java:
(send_deferred): Added missing 'abstract' keyword.

-- 
Andrew :-)

Please avoid sending me Microsoft Office (e.g. Word, PowerPoint) attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html

No software patents in Europe -- http://nosoftwarepatents.com

"Value your freedom, or you will lose it, teaches history. 
`Don't bother us with politics' respond those who don't want to learn." 
-- Richard Stallman

Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html
public class gcj extends Freedom implements Java { ... }
Index: org/omg/CORBA/Request.java
===
RCS file: /cvsroot/classpath/classpath/org/omg/CORBA/Request.java,v
retrieving revision 1.1
diff -u -3 -p -u -r1.1 Request.java
--- org/omg/CORBA/Request.java  10 Apr 2005 10:22:05 -  1.1
+++ org/omg/CORBA/Request.java  11 Apr 2005 03:19:52 -
@@ -216,7 +216,7 @@ public abstract class Request
* Allow later check of the request status by [EMAIL PROTECTED] 
#poll_response()} and
* retrieving the results by [EMAIL PROTECTED] #get_response()}.
*/
-  public void send_deferred();
+  public abstract void send_deferred();
 
   /**
* Send a request and forget about it, not waiting for a response.


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


Re: [cp-patches] META-INF support

2005-04-10 Thread Andrew John Hughes
On Sun, 2005-04-10 at 08:18 +0200, Michael Koch wrote:
> On Sun, Apr 10, 2005 at 03:42:39AM +0200, Robert Schuster wrote:
> > -BEGIN PGP SIGNED MESSAGE-
> > Hash: SHA1
> > 
> > Hi,
> > AFAIK we support not only delivery as glibj.zip but as glibj.jar and as
> > a plain directory. The patch looks as if it only works for the zip-case.
> > Are there any reasons to make this different for the other two variants?
> 
> WE dont support glibj.jar for some reasons but you are right that we
> support a plain directory tree.
> 
> 
> Michael

Yes, you're spot on; sorry, it was my mistake in creating the patch
(guess I'm too used to just using the zip method).  Please find attached
an updated version that should handle both.

As to a jar version, we considered this recently on the list.  One
reason we call it glibj.zip is because it can't be used as a normal jar,
and using a different file extension (which still fits the content,
because jars, AFAIK, are just zips with defined metadata) helps
differentiate it.  I can foresee someone posting a GCJ bug when they try
to use -findirect-dispatch on it...

Thanks,
-- 
Andrew :-)

Please avoid sending me Microsoft Office (e.g. Word, PowerPoint)
attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html

No software patents in Europe -- http://nosoftwarepatents.com

"Value your freedom, or you will lose it, teaches history.
`Don't bother us with politics' respond those who don't want to learn."
-- Richard Stallman

Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html
public class gcj extends Freedom implements Java { ... }

Index: examples/Makefile.am
===
RCS file: /cvsroot/classpath/classpath/examples/Makefile.am,v
retrieving revision 1.3
diff -u -3 -p -u -r1.3 Makefile.am
--- examples/Makefile.am	7 Feb 2005 02:32:37 -	1.3
+++ examples/Makefile.am	11 Apr 2005 02:49:55 -
@@ -11,7 +11,7 @@ if FOUND_GCJX
 JCOMPILER = $(GCJX) -bootclasspath '' -sourcepath '' -classpath $(top_builddir)/lib:.
 else
 if FOUND_ECJ
-JCOMPILER = $(ECJ) --bootclasspath '$(top_builddir)/lib' --classpath .
+JCOMPILER = $(ECJ) -bootclasspath '$(top_builddir)/lib' -classpath .
 else
 error dunno how to setup the JCOMPILER and compile
 endif
Index: lib/Makefile.am
===
RCS file: /cvsroot/classpath/classpath/lib/Makefile.am,v
retrieving revision 1.79
diff -u -3 -p -u -r1.79 Makefile.am
--- lib/Makefile.am	7 Feb 2005 02:32:37 -	1.79
+++ lib/Makefile.am	11 Apr 2005 02:50:04 -
@@ -53,6 +53,7 @@ install-data-local: genclasses compile-c
 	cp -R java $(DESTDIR)$(pkgdatadir)
 	cp -R javax $(DESTDIR)$(pkgdatadir)
 	cp -R org $(DESTDIR)$(pkgdatadir)
+	cp -R META-INF $(DESTDIR)$(pkgdatadir)
 
 # FIXME - should mimic doc/api/Makefile.am instead...
 uninstall-local:
@@ -60,13 +61,14 @@ uninstall-local:
 	rm -rf $(DESTDIR)$(pkgdatadir)/java
 	rm -rf $(DESTDIR)$(pkgdatadir)/javax
 	rm -rf $(DESTDIR)$(pkgdatadir)/org
+	rm -rf $(DESTDIR)$(pkgdatadir)/META-INF
 
 endif # INSTALL_CLASS_FILES
 
 .PHONY: genclasses
 
 glibj.zip: classes compile-classes resources
-	if test "$(ZIP)" != ""; then $(ZIP) -r -D glibj.zip gnu java javax org > /dev/null; fi
+	if test "$(ZIP)" != ""; then $(ZIP) -r -D glibj.zip gnu java javax org META-INF > /dev/null; fi
 
 resources:
 	if ! [ -e gnu ]; then mkdir gnu; fi
@@ -78,6 +80,8 @@ resources:
 	@list='$(propertyfiles)'; for p in $$list; do \
 	  cp $(top_srcdir)/resource/$$p $$p; \
 	done
+	if [ -e META-INF ]; then rm -rf META-INF; fi
+	cp -r $(top_srcdir)/resource/META-INF .
 	touch resources
 
 classes: genclasses
@@ -122,6 +126,7 @@ clean-local:
 	-rm -rf java
 	-rm -rf javax
 	-rm -rf org
+	-rm -rf META-INF
 
 dist-hook:
 	mkdir -p $(distdir)


signature.asc
Description: This is a digitally signed message part
___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


[cp-patches] FYI: Minor fix to SimpleDateFormat

2005-04-10 Thread Sven de Marothy
2005-04-10  Sven de Marothy  <[EMAIL PROTECTED]>

* java/text/SimpleDateFormat.java:
(formatWithAttribute): Pad year before truncating digits.

Index: java/text/SimpleDateFormat.java
===
RCS file: /cvsroot/classpath/classpath/java/text/SimpleDateFormat.java,v
retrieving revision 1.44
diff -u -r1.44 SimpleDateFormat.java
--- java/text/SimpleDateFormat.java	9 Mar 2005 22:29:20 -	1.44
+++ java/text/SimpleDateFormat.java	10 Apr 2005 19:07:49 -
@@ -680,7 +680,7 @@
 		buffer.setDefaultAttribute (DateFormat.Field.YEAR);
 		if (cf.getSize() == 2)
 		  {
-		temp = String.valueOf (calendar.get (Calendar.YEAR));
+		temp = "00"+String.valueOf (calendar.get (Calendar.YEAR));
 		buffer.append (temp.substring (temp.length() - 2));
 		  }
 		else
___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


Re: [cp-patches] META-INF support

2005-04-10 Thread Michael Koch
On Sun, Apr 10, 2005 at 03:42:39AM +0200, Robert Schuster wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Hi,
> AFAIK we support not only delivery as glibj.zip but as glibj.jar and as
> a plain directory. The patch looks as if it only works for the zip-case.
> Are there any reasons to make this different for the other two variants?

WE dont support glibj.jar for some reasons but you are right that we
support a plain directory tree.


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

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


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


Re: [cp-patches] Re: -ko on libjava/external/sax/org/xml/sax/helpers/NamespaceSupport.java

2005-04-10 Thread Michael Koch
On Sat, Apr 09, 2005 at 11:17:55PM +0100, Andrew John Hughes wrote:
> On Sat, 2005-04-09 at 13:07 -0700, Geoffrey Keating wrote:
> > I did
> > 
> > cvs admin -ko 
> > libjava/external/sax/org/xml/sax/helpers/NamespaceSupport.java
> > 
> > because it contains an $Id$ tag.  (I would have just removed the tag, 
> > or used -kk, but I understand this comes from elsewhere and we want to 
> > minimise local changes.)
> 
> GNU Classpath contains the same series of files, and this has been
> suggested as an appropriate solution in the past (although I don't think
> anyone has actually gone through with it...)

...

> If others agree (and such action has not already taken place), I
> volunteer to do the same procedure on each of these for the GNU
> Classpath tree.

Please go ahead.


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

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


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