This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gcj trunk / gnu-classpath] String.format(...) undefined


Hanno Meyer-Thurow writes:
 > On Sat, 17 Feb 2007 13:46:15 +0000
 > Andrew Haley <aph@redhat.com> wrote:
 > 
 > > Hanno Meyer-Thurow writes:
 > >  > Hi list,
 > >  > another error I get compiling JUnit-4.2 with gcj 4.2.20070216:
 > > 
 > > String.format is a Java 1.5 method.  gcj 4.2 supports a class library
 > > that corresponds to Java 1.4.  gcj 4.3 will support a class library
 > > that corresponds to Java 1.5.
 > 
 > Woa, how could I. I meant gcj 4.3.20070216. Sorry.

I think it's just a couple of methods that need to be merged from
Classpath:

  /** @since 1.5 */
  public static String format(Locale locale, String format, Object... args)
  {
    Formatter f = new Formatter(locale);
    return f.format(format, args).toString();
  }

  /** @since 1.5 */
  public static String format(String format, Object... args)
  {
    return format(Locale.getDefault(), format, args);
  }

We really need to merge the whole class.

Andrew.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]