aherbert commented on PR #485:
URL:
https://github.com/apache/commons-collections/pull/485#issuecomment-2090443105
I duplicated AbstractLinkedListTest with some modifications:
```java
class AbstractLinkedListForJava21Test<E> extends AbstractListTest<E> {
AbstractLinkedListForJava21Test() {
super(AbstractLinkedListForJava21Test.class.getSimpleName());
}
// ...
@Override
public String getCompatibilityVersion() {
return null;
}
@Override
protected boolean skipSerializedCanonicalTests() {
return true;
}
@Override
public AbstractLinkedListForJava21<E> getCollection() {
return (AbstractLinkedListForJava21<E>) super.getCollection();
}
@Override
public List<E> makeObject() {
return new DefaultAbstractLinkedListForJava21<>();
}
private class DefaultAbstractLinkedListForJava21<E> extends
AbstractLinkedListForJava21<E> {
DefaultAbstractLinkedListForJava21() {
init();
}
private void readObject(final ObjectInputStream in) throws
IOException, ClassNotFoundException {
in.defaultReadObject();
doReadObject(in);
}
private void writeObject(final ObjectOutputStream out) throws
IOException {
out.defaultWriteObject();
doWriteObject(out);
}
}
}
```
Coverage of the new linked list class is 94%. There is no coverage of
sublist iterators or creating from a Collection. These may have to be added
from other tests of the old AbstractLinkedList, or elsewhere.
I have skipped the canonical serialization test. For this release there is
no backward compatibility to maintain.
It is a start towards hitting the coverage thresholds.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]