The class ObjectStoreException in Alibaba contains this override of the getCause() method:
@Override public RepositoryException getCause() { return (RepositoryException)super.getCause(); }
That triggers ClassCastException's in our unit tests, because the cause of ObjectStoreException is by no means restricted to RepositoryException's, as assumed in the method. There are also code paths in Alibaba that:
set the cause to e.g. QueryEvaluationException (see e.g. RDFSContainer.get).
set the cause to other Exception types (see e.g. ObjectIterator.close/hasNext/next)
Could this please be fixed? (either by really restricting the cause to RepositoryException, or by dropping the override). In the former case the constructor should probably be changed to only allow RepositoryException (now it accepts any Exception as cause).
The class ObjectStoreException in Alibaba contains this override of the
getCause() method:
@Override
public RepositoryException getCause() {
return (RepositoryException)super.getCause();
}
That triggers ClassCastException's in our unit tests, because the cause of ObjectStoreException is by no means restricted to RepositoryException's, as assumed in the method. There are also code paths in Alibaba that:
set the cause to e.g. QueryEvaluationException (see e.g. RDFSContainer.get).
set the cause to other Exception types (see e.g. ObjectIterator.close/hasNext/next)
Could this please be fixed? (either by really restricting the cause to
RepositoryException, or by dropping the override). In the former case the constructor should probably be changed to only allow RepositoryException (now it accepts any Exception as cause).