******************************************************************************
###@###.### 2003-08-06
build : tiger preint build
/net/jano/export/disk21/ee/ws/corba/tiger-aug4/build/solaris-sparc/j2sdk-image
Problem description
rmic throws an error while compiling Remote interfaces which takes or returns a Map (or subclasses). But rmic with the latest build from /java/re/jdk/1.5/latest works fine.
bash-2.05$
bash-2.05$ cat RemoteTest.java
import java.util.*;
import java.rmi.*;
import javax.rmi.*;
public interface RemoteTest extends Remote {
Map getMap() throws RemoteException;
}
class RemoteTestImpl extends PortableRemoteObject implements RemoteTest {
public RemoteTestImpl() throws RemoteException { }
public Map getMap() { return null; }
}
bash-2.05$ /net/jano/export/disk21/ee/ws/corba/tiger-aug4/build/solaris-sparc/j2sdk-image/bin/javac RemoteTest.java
bash-2.05$
bash-2.05$ /net/jano/export/disk21/ee/ws/corba/tiger-aug4/build/solaris-sparc/j2sdk-image/bin/rmic -iiop RemoteTestImpl
error: The method java.util.Iterator iterator() declared in interface java.util.Collection cannot override the method of the same signature declared in interface java.lang.Iterable. They must have the same return type.
error: Class RemoteTest contains an invalid return type.
2 errors
bash-2.05$
test suites affected :
$RTM_HOME/tests/interoperability/evolution
$RTM_HOME/tests/interoperability/rmiiiop
$RTM_HOME/tests/product/rmi-iiop
*******************************************************************************
###@###.### 2003-08-07bash-2.05$
this is a jdk bug.
bash-2.05$ /java/re/jdk/1.5/promoted/latest/binaries/solaris-sparc/bin/java -version
java version "1.5.0-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta-b14)
Java HotSpot(TM) Client VM (build 1.5.0-beta-b14, mixed mode)
bash-2.05$ /java/re/jdk/1.5/promoted/latest/binaries/solaris-sparc/bin/javac RemoteTest.java
bash-2.05$
bash-2.05$ /java/re/jdk/1.5/promoted/latest/binaries/solaris-sparc/bin/rmic -iiop RemoteTestImpl
error: The method java.util.Iterator iterator() declared in interface java.util.Collection cannot override the method of the same signature declared in interface java.lang.Iterable. They must have the same return type.
error: Class RemoteTest contains an invalid return type.
2 errors
bash-2.05$
*******************************************************************************