This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: Small offer
- From: Per Bothner <per at bothner dot com>
- To: Yaroslav Kavenchuk <kavenchuk at gmail dot com>
- Cc: kawa at sourceware dot org
- Date: Wed, 17 Dec 2008 00:05:25 -0800
- Subject: Re: Small offer
- References: <4947CCFC.5000808@gmail.com>
Yaroslav Kavenchuk wrote:
I'd like to use some functionality. Does this patch have meaning?
I don't know how useful it is, but it doesn't hurt to do it this way,
so I checked it in.
And maybe need to use StringBuilder?
The problem is that StringBuilder is Java5-or-later-only.
Kawa is supposed to be buildable on older Java's (though
that doesn't get much testing).
This works, though, using the Kawa pre-processor:
/* #ifdef JAVA5 */
StringBuilder buf = new StringBuilder(100);
/* #else */
// StringBuffer buf = new StringBuffer(100);
/* #endif */
--
--Per Bothner
per@bothner.com http://per.bothner.com/