Hi :
Following is the discussion about JIRA 1492, shall we discuss it here?

public class SubMapTest extends TestCase {
   public void testSubclass() {
       HashMap map = new HashMap();
       map.put("a", "a");
SubMap map2 = new SubMap(map); // Harmony will throw an unexpected exception here.
   }
}

class SubMap<K, V> extends HashMap<K, V> {

   public V put(K key, V value) {
       throw new RuntimeException();
   }
}


>Nathan Beyer
>Harmony's behavior may be different in this case, but I'm not sure I would consider this a valid issue. What's a real use case for this type of sub-classing?
[ Show » <http://issues.apache.org/jira/browse/HARMONY-1492> ]
Nathan Beyer <http://issues.apache.org/jira/secure/ViewProfile.jspa?name=nbeyer> [18/Sep/06 08:41 PM] Harmony's behavior may be different in this case, but I'm not sure I would consider this a valid issue. What's a real use case for this type of sub-classing?

<http://issues.apache.org/jira/secure/ViewProfile.jspa?name=spark+shen>>Spark Shen
>What if change the RuntimeException to UnsupportedOperationException?
[ Show » <http://issues.apache.org/jira/browse/HARMONY-1492> ]
spark shen <http://issues.apache.org/jira/secure/ViewProfile.jspa?name=spark+shen> [18/Sep/06 08:48 PM] What if change the RuntimeException to UnsupportedOperationException?

>Alexey Petrenko
>I'm not sure that this is a valid issue to.
>As far as I understood the issue is that Harmony calls put method in constructor while RI does not. Right?

>If so I do not see any issue here.

--
Spark Shen
China Software Development Lab, IBM


---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to