Bug#357427: jikes-kaffe: missing String.replace(String, String)?

Petter Reinholdtsen pere at hungry.com
Fri Mar 17 10:08:00 UTC 2006


Package: jikes-kaffe
Version: 2:1.1.6.91-2
Severity: normal

While trying to build worldwind2d, I ran into a problem using
String.replace().  I extracted the following test code to demonstrate
the problem:

/*
 Test code based on real world example found in worldwind2d
*/
public class testStringReplace {
    public static void main(String[] args) {

	String data = "foo/{x}/{y}/bar";
	String url = data.replace("{x}",
				  new Integer(1).toString()).replace("{y}",
				  new Integer(2).toString());
	return;
    }
}

When trying to build it using jikes-kaffe, I get this error:

  Found 1 semantic error compiling "testStringReplace.java":

                             <------------------
     8.         String url = data.replace("{x}",
     9.                                   new Integer(1).toString()).replace("{y}",
        ----------------------------------------------------------->

  *** Semantic Error: No applicable overload for a method with
      signature "replace(java.lang.String, java.lang.String)" was
      found in type "java.lang.String". Perhaps you wanted the
      overloaded version "java.lang.String replace(char $1, char $2);"
      instead?

When I try to build the same test code using jikes-classpath, it build
just fine.  Because of this, I believe kaffe must be missing
something. :)

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.8-2-386
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages jikes-kaffe depends on:
ii  jikes                       1:1.22-4     Fast Java compiler adhering to lan
ii  kaffe-common                2:1.1.6.91-2 Files shared between all Kaffe VM

jikes-kaffe recommends no packages.

-- no debconf information




More information about the pkg-java-maintainers mailing list