You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "spark shen (JIRA)" <ji...@apache.org> on 2007/07/31 03:22:53 UTC
[jira] Created: (HARMONY-4576) [classlib][luni] AbstractList's
remove method will throw unexpected ConcurrentModificationException
[classlib][luni] AbstractList's remove method will throw unexpected ConcurrentModificationException
---------------------------------------------------------------------------------------------------
Key: HARMONY-4576
URL: https://issues.apache.org/jira/browse/HARMONY-4576
Project: Harmony
Issue Type: Bug
Components: Classlib
Reporter: spark shen
class MockRemoveFailureArrayList<E> extends AbstractList<E> {
@Override
public E get(int location) {
// TODO Auto-generated method stub
return null;
}
@Override
public int size() {
// TODO Auto-generated method stub
return 0;
}
public E remove(int idx) {
modCount+=2;
return null;
}
public int getModCount(){
return modCount;
}
}
//test remove for failure by inconsistency of modCount and expectedModCount
public void test_remove(){
MockRemoveFailureArrayList<String> mrfal = new MockRemoveFailureArrayList<String>();
Iterator<String> imrfal= mrfal.iterator();
imrfal.next();
imrfal.remove();
try{
imrfal.remove();
}
catch(ConcurrentModificationException e){
fail("Excepted to catch IllegalStateException not ConcurrentModificationException");
}
catch(IllegalStateException e){
//Excepted to catch IllegalStateException here
}
}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (HARMONY-4576) [classlib][luni] AbstractList's
remove method will throw unexpected ConcurrentModificationException
Posted by "Leo Li (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-4576?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Leo Li reassigned HARMONY-4576:
-------------------------------
Assignee: Leo Li
> [classlib][luni] AbstractList's remove method will throw unexpected ConcurrentModificationException
> ---------------------------------------------------------------------------------------------------
>
> Key: HARMONY-4576
> URL: https://issues.apache.org/jira/browse/HARMONY-4576
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: spark shen
> Assignee: Leo Li
> Attachments: AbstractList-patch.txt, AbstractListTest-patch.txt
>
>
> The following test case will fail on harmony, but pass on RI.
> class MockRemoveFailureArrayList<E> extends AbstractList<E> {
> @Override
> public E get(int location) {
> // TODO Auto-generated method stub
> return null;
> }
> @Override
> public int size() {
> // TODO Auto-generated method stub
> return 0;
> }
>
> public E remove(int idx) {
> modCount+=2;
> return null;
> }
>
> public int getModCount(){
> return modCount;
> }
> }
>
> //test remove for failure by inconsistency of modCount and expectedModCount
> public void test_remove(){
> MockRemoveFailureArrayList<String> mrfal = new MockRemoveFailureArrayList<String>();
> Iterator<String> imrfal= mrfal.iterator();
> imrfal.next();
> imrfal.remove();
> try{
> imrfal.remove();
> fail("Should throw IllegalStateException");
> }
> catch(IllegalStateException e){
> //Excepted to catch IllegalStateException here
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (HARMONY-4576) [classlib][luni] AbstractList's
remove method will throw unexpected ConcurrentModificationException
Posted by "spark shen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-4576?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
spark shen closed HARMONY-4576.
-------------------------------
Verified at r561231. Thanks.
> [classlib][luni] AbstractList's remove method will throw unexpected ConcurrentModificationException
> ---------------------------------------------------------------------------------------------------
>
> Key: HARMONY-4576
> URL: https://issues.apache.org/jira/browse/HARMONY-4576
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: spark shen
> Assignee: Leo Li
> Attachments: AbstractList-patch.txt, AbstractListTest-patch.txt
>
>
> The following test case will fail on harmony, but pass on RI.
> class MockRemoveFailureArrayList<E> extends AbstractList<E> {
> @Override
> public E get(int location) {
> // TODO Auto-generated method stub
> return null;
> }
> @Override
> public int size() {
> // TODO Auto-generated method stub
> return 0;
> }
>
> public E remove(int idx) {
> modCount+=2;
> return null;
> }
>
> public int getModCount(){
> return modCount;
> }
> }
>
> //test remove for failure by inconsistency of modCount and expectedModCount
> public void test_remove(){
> MockRemoveFailureArrayList<String> mrfal = new MockRemoveFailureArrayList<String>();
> Iterator<String> imrfal= mrfal.iterator();
> imrfal.next();
> imrfal.remove();
> try{
> imrfal.remove();
> fail("Should throw IllegalStateException");
> }
> catch(IllegalStateException e){
> //Excepted to catch IllegalStateException here
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-4576) [classlib][luni] AbstractList's
remove method will throw unexpected ConcurrentModificationException
Posted by "spark shen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-4576?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
spark shen updated HARMONY-4576:
--------------------------------
Attachment: AbstractList-patch.txt
> [classlib][luni] AbstractList's remove method will throw unexpected ConcurrentModificationException
> ---------------------------------------------------------------------------------------------------
>
> Key: HARMONY-4576
> URL: https://issues.apache.org/jira/browse/HARMONY-4576
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: spark shen
> Attachments: AbstractList-patch.txt, AbstractListTest-patch.txt
>
>
> The following test case will fail on harmony, but pass on RI.
> class MockRemoveFailureArrayList<E> extends AbstractList<E> {
> @Override
> public E get(int location) {
> // TODO Auto-generated method stub
> return null;
> }
> @Override
> public int size() {
> // TODO Auto-generated method stub
> return 0;
> }
>
> public E remove(int idx) {
> modCount+=2;
> return null;
> }
>
> public int getModCount(){
> return modCount;
> }
> }
>
> //test remove for failure by inconsistency of modCount and expectedModCount
> public void test_remove(){
> MockRemoveFailureArrayList<String> mrfal = new MockRemoveFailureArrayList<String>();
> Iterator<String> imrfal= mrfal.iterator();
> imrfal.next();
> imrfal.remove();
> try{
> imrfal.remove();
> fail("Should throw IllegalStateException");
> }
> catch(IllegalStateException e){
> //Excepted to catch IllegalStateException here
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-4576) [classlib][luni] AbstractList's
remove method will throw unexpected ConcurrentModificationException
Posted by "spark shen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-4576?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
spark shen updated HARMONY-4576:
--------------------------------
Attachment: AbstractListTest-patch.txt
> [classlib][luni] AbstractList's remove method will throw unexpected ConcurrentModificationException
> ---------------------------------------------------------------------------------------------------
>
> Key: HARMONY-4576
> URL: https://issues.apache.org/jira/browse/HARMONY-4576
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: spark shen
> Attachments: AbstractList-patch.txt, AbstractListTest-patch.txt
>
>
> The following test case will fail on harmony, but pass on RI.
> class MockRemoveFailureArrayList<E> extends AbstractList<E> {
> @Override
> public E get(int location) {
> // TODO Auto-generated method stub
> return null;
> }
> @Override
> public int size() {
> // TODO Auto-generated method stub
> return 0;
> }
>
> public E remove(int idx) {
> modCount+=2;
> return null;
> }
>
> public int getModCount(){
> return modCount;
> }
> }
>
> //test remove for failure by inconsistency of modCount and expectedModCount
> public void test_remove(){
> MockRemoveFailureArrayList<String> mrfal = new MockRemoveFailureArrayList<String>();
> Iterator<String> imrfal= mrfal.iterator();
> imrfal.next();
> imrfal.remove();
> try{
> imrfal.remove();
> fail("Should throw IllegalStateException");
> }
> catch(IllegalStateException e){
> //Excepted to catch IllegalStateException here
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (HARMONY-4576) [classlib][luni] AbstractList's
remove method will throw unexpected ConcurrentModificationException
Posted by "Leo Li (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-4576?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Leo Li resolved HARMONY-4576.
-----------------------------
Resolution: Fixed
Hi, Spark
Patch applied at r561214. Thank you for your improvement. Please verify whether the problem is resolved as you expected.
Good luck!
Leo.
> [classlib][luni] AbstractList's remove method will throw unexpected ConcurrentModificationException
> ---------------------------------------------------------------------------------------------------
>
> Key: HARMONY-4576
> URL: https://issues.apache.org/jira/browse/HARMONY-4576
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: spark shen
> Assignee: Leo Li
> Attachments: AbstractList-patch.txt, AbstractListTest-patch.txt
>
>
> The following test case will fail on harmony, but pass on RI.
> class MockRemoveFailureArrayList<E> extends AbstractList<E> {
> @Override
> public E get(int location) {
> // TODO Auto-generated method stub
> return null;
> }
> @Override
> public int size() {
> // TODO Auto-generated method stub
> return 0;
> }
>
> public E remove(int idx) {
> modCount+=2;
> return null;
> }
>
> public int getModCount(){
> return modCount;
> }
> }
>
> //test remove for failure by inconsistency of modCount and expectedModCount
> public void test_remove(){
> MockRemoveFailureArrayList<String> mrfal = new MockRemoveFailureArrayList<String>();
> Iterator<String> imrfal= mrfal.iterator();
> imrfal.next();
> imrfal.remove();
> try{
> imrfal.remove();
> fail("Should throw IllegalStateException");
> }
> catch(IllegalStateException e){
> //Excepted to catch IllegalStateException here
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-4576) [classlib][luni] AbstractList's
remove method will throw unexpected ConcurrentModificationException
Posted by "spark shen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-4576?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
spark shen updated HARMONY-4576:
--------------------------------
Description:
The following test case will fail on harmony, but pass on RI.
class MockRemoveFailureArrayList<E> extends AbstractList<E> {
@Override
public E get(int location) {
// TODO Auto-generated method stub
return null;
}
@Override
public int size() {
// TODO Auto-generated method stub
return 0;
}
public E remove(int idx) {
modCount+=2;
return null;
}
public int getModCount(){
return modCount;
}
}
//test remove for failure by inconsistency of modCount and expectedModCount
public void test_remove(){
MockRemoveFailureArrayList<String> mrfal = new MockRemoveFailureArrayList<String>();
Iterator<String> imrfal= mrfal.iterator();
imrfal.next();
imrfal.remove();
try{
imrfal.remove();
fail("Should throw IllegalStateException");
}
catch(IllegalStateException e){
//Excepted to catch IllegalStateException here
}
}
was:
class MockRemoveFailureArrayList<E> extends AbstractList<E> {
@Override
public E get(int location) {
// TODO Auto-generated method stub
return null;
}
@Override
public int size() {
// TODO Auto-generated method stub
return 0;
}
public E remove(int idx) {
modCount+=2;
return null;
}
public int getModCount(){
return modCount;
}
}
//test remove for failure by inconsistency of modCount and expectedModCount
public void test_remove(){
MockRemoveFailureArrayList<String> mrfal = new MockRemoveFailureArrayList<String>();
Iterator<String> imrfal= mrfal.iterator();
imrfal.next();
imrfal.remove();
try{
imrfal.remove();
}
catch(ConcurrentModificationException e){
fail("Excepted to catch IllegalStateException not ConcurrentModificationException");
}
catch(IllegalStateException e){
//Excepted to catch IllegalStateException here
}
}
> [classlib][luni] AbstractList's remove method will throw unexpected ConcurrentModificationException
> ---------------------------------------------------------------------------------------------------
>
> Key: HARMONY-4576
> URL: https://issues.apache.org/jira/browse/HARMONY-4576
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: spark shen
>
> The following test case will fail on harmony, but pass on RI.
> class MockRemoveFailureArrayList<E> extends AbstractList<E> {
> @Override
> public E get(int location) {
> // TODO Auto-generated method stub
> return null;
> }
> @Override
> public int size() {
> // TODO Auto-generated method stub
> return 0;
> }
>
> public E remove(int idx) {
> modCount+=2;
> return null;
> }
>
> public int getModCount(){
> return modCount;
> }
> }
>
> //test remove for failure by inconsistency of modCount and expectedModCount
> public void test_remove(){
> MockRemoveFailureArrayList<String> mrfal = new MockRemoveFailureArrayList<String>();
> Iterator<String> imrfal= mrfal.iterator();
> imrfal.next();
> imrfal.remove();
> try{
> imrfal.remove();
> fail("Should throw IllegalStateException");
> }
> catch(IllegalStateException e){
> //Excepted to catch IllegalStateException here
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.