Maybe we could show the transitivity problem by create a new API that uses something unrelated from String package, like StringBuffer and switches to StringBuilder, but I am not really sure, so I am putting this to branch
1.1 --- a/samples/reexport/src-api1.0/api/String.java Sat Jun 14 09:54:12 2008 +0200
1.2 +++ b/samples/reexport/src-api1.0/api/String.java Sat Jun 14 09:54:13 2008 +0200
1.3 @@ -2,7 +2,7 @@
1.4
1.5 // BEGIN: reexport.String10
1.6 public final class String {
1.7 - private final char[] chars;
1.8 + final char[] chars;
1.9
1.10 public String(char[] chars) {
1.11 this.chars = chars.clone();
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/samples/reexport/src-api1.0/api/StringBuffer.java Sat Jun 14 09:54:13 2008 +0200
2.3 @@ -0,0 +1,20 @@
2.4 +package api;
2.5 +
2.6 +public final class StringBuffer {
2.7 + private char[] current;
2.8 +
2.9 + public StringBuffer() {
2.10 + current = new char[0];
2.11 + }
2.12 +
2.13 + public synchronized StringBuffer append(String s) {
2.14 + char[] arr = new char[current.length + s.chars.length];
2.15 + System.arraycopy(current, 0, arr, 0, current.length);
2.16 + System.arraycopy(s.chars, 0, arr, current.length, s.chars.length);
2.17 + return this;
2.18 + }
2.19 +
2.20 + public synchronized String getString() {
2.21 + return new String(current);
2.22 + }
2.23 +}
3.1 --- a/samples/reexport/src-api2.0/api/String.java Sat Jun 14 09:54:12 2008 +0200
3.2 +++ b/samples/reexport/src-api2.0/api/String.java Sat Jun 14 09:54:13 2008 +0200
3.3 @@ -1,9 +1,7 @@
3.4 package api;
3.5
3.6 -import api.*;
3.7 -
3.8 public final class String {
3.9 - private final char[] chars;
3.10 + final char[] chars;
3.11
3.12 public String(char[] chars) {
3.13 this.chars = chars.clone();
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
4.2 +++ b/samples/reexport/src-api2.0/api/StringBuffer.java Sat Jun 14 09:54:13 2008 +0200
4.3 @@ -0,0 +1,20 @@
4.4 +package api;
4.5 +
4.6 +public final class StringBuffer {
4.7 + private char[] current;
4.8 +
4.9 + public StringBuffer() {
4.10 + current = new char[0];
4.11 + }
4.12 +
4.13 + public StringBuffer append(String s) {
4.14 + char[] arr = new char[current.length + s.chars.length];
4.15 + System.arraycopy(current, 0, arr, 0, current.length);
4.16 + System.arraycopy(s.chars, 0, arr, current.length, s.chars.length);
4.17 + return this;
4.18 + }
4.19 +
4.20 + public String getString() {
4.21 + return new String(current);
4.22 + }
4.23 +}
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
5.2 +++ b/samples/reexport/src-api2.0/api/StringBuilder.java Sat Jun 14 09:54:13 2008 +0200
5.3 @@ -0,0 +1,21 @@
5.4 +package api;
5.5 +
5.6 +/** @since 2.0 */
5.7 +public final class StringBuilder {
5.8 + private char[] current;
5.9 +
5.10 + public StringBuilder() {
5.11 + current = new char[0];
5.12 + }
5.13 +
5.14 + public StringBuilder append(String s) {
5.15 + char[] arr = new char[current.length + s.chars.length];
5.16 + System.arraycopy(current, 0, arr, 0, current.length);
5.17 + System.arraycopy(s.chars, 0, arr, current.length, s.chars.length);
5.18 + return this;
5.19 + }
5.20 +
5.21 + public String getString() {
5.22 + return new String(current);
5.23 + }
5.24 +}