Project

General

Profile

« Previous | Next » 

Revision 41857

fixed a CastException

View differences:

modules/dnet-core-services/trunk/src/main/java/eu/dnetlib/enabling/resultset/registry/ResultSetRegistryImpl.java
28 28
	@SuppressWarnings("unchecked")
29 29
	@Override
30 30
	public <T> ResultSetListener<T> getResultSetById(final String rsId) throws ResultSetException {
31
		final ResultSetListener<?> rs = (ResultSetListener<?>) this.cache.get(rsId);
32

  
33
		if (rs != null) {
34
			return (ResultSetListener<T>) rs;
35
		} else {
36
			throw new ResultSetException("Missing resultset with id " + rsId);
31
		final Element elem = this.cache.get(rsId);
32
		if (elem != null) {
33
			final ResultSetListener<T> rs = (ResultSetListener<T>) elem.getObjectValue();
34
			if (rs != null) { return rs; }
37 35
		}
36
		throw new ResultSetException("Missing resultset with id " + rsId);
38 37
	}
39 38

  
40 39
	@Override

Also available in: Unified diff