I suggest you write a helper method to create a String with that constructor using reflection (setAccessible(true)).
Regards, Tim Nathan Beyer wrote: > Since I probably share some responsibility in the "String is special" topic > being brought up, I wanted to try out the "golden ticket" bit for some > further enhancements. > > I've made some changes to String to add the new Java 5 APIs related to code > points, StringBuilder, etc. > > I've posted a proposed patch on this issue [1]. I'd already opened this bug. > The patch contains updates to String and StringTest. > > There is one concern that I have about the code and the test (and all String > tests we have in general). There's the possibility of a String being > constructed with a non-zero offset; there's a package-private constructor > String(int start, int len, char[] data). I haven't found any other way to > setup this variant and I'd like to test all of the methods when the offset > is greater than 0, but this requires the test case to be in the "java.lang" > package. I know this has been an issue that been discussed on and off, but > didn't think any concrete solution had been arrived at for doing this and I > haven't seen any test cases in the java package spaces. > > Please let me know if there are any questions or if any more information is > needed. Thanks. > > -Nathan > > > --------------------------------------------------------------------- > Terms of use : http://incubator.apache.org/harmony/mailing.html > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Tim Ellison ([EMAIL PROTECTED]) IBM Java technology centre, UK. --------------------------------------------------------------------- Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
