bodewig 2003/01/13 04:05:52
Modified: . WHATSNEW build.xml
src/main/org/apache/tools/ant/taskdefs Get.java
Log:
Enable <get> compilation without Sun classes.
PR: 16006
Submitted by: Dalibor Topic <robilad at yahoo dot com>
Revision Changes Path
1.337 +3 -0 jakarta-ant/WHATSNEW
Index: WHATSNEW
===================================================================
RCS file: /home/cvs/jakarta-ant/WHATSNEW,v
retrieving revision 1.336
retrieving revision 1.337
diff -u -r1.336 -r1.337
--- WHATSNEW 9 Jan 2003 08:23:17 -0000 1.336
+++ WHATSNEW 13 Jan 2003 12:05:51 -0000 1.337
@@ -85,6 +85,9 @@
elements in Ant and the refid attribute didn't point to an existing
project reference.
+* The <get> task can now be compiled (and Ant thus bootstrapped) using
+ Kaffee.
+
Other changes:
--------------
* The filesetmanifest attribute of <jar> has been reenabled.
1.341 +0 -1 jakarta-ant/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-ant/build.xml,v
retrieving revision 1.340
retrieving revision 1.341
diff -u -r1.340 -r1.341
--- build.xml 6 Jan 2003 07:48:44 -0000 1.340
+++ build.xml 13 Jan 2003 12:05:51 -0000 1.341
@@ -169,7 +169,6 @@
</selector>
<selector id="needs.sun.b64">
<or>
- <filename name="${ant.package}/taskdefs/Get*"/>
<filename name="${optional.package}/splash/SplashTask*"/>
</or>
</selector>
1.31 +6 -5
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Get.java
Index: Get.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Get.java,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- Get.java 25 Jul 2002 15:21:04 -0000 1.30
+++ Get.java 13 Jan 2003 12:05:52 -0000 1.31
@@ -1,7 +1,7 @@
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2000-2002 The Apache Software Foundation. All rights
+ * Copyright (c) 2000-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -146,10 +146,11 @@
String encoding;
// check to see if sun's Base64 encoder is available.
try {
- sun.misc.BASE64Encoder encoder =
- (sun.misc.BASE64Encoder)
-
Class.forName("sun.misc.BASE64Encoder").newInstance();
- encoding = encoder.encode (up.getBytes());
+ Object encoder =
+
Class.forName("sun.misc.BASE64Encoder").newInstance();
+ encoding = (String)
+ encoder.getClass().getMethod("encode", new
Class[] {byte[].class})
+ .invoke(encoder, new Object[] {up.getBytes()});
} catch (Exception ex) { // sun's base64 encoder isn't
available
Base64Converter encoder = new Base64Converter();
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>