Skip to content
This repository was archived by the owner on May 18, 2024. It is now read-only.
This repository was archived by the owner on May 18, 2024. It is now read-only.

CachedDataAccessController.getSpectrumById() ClassCastException #12

Description

@Tobias-Ternent

In class: CachedDataAccessController

L166

Spectrum getSpectrumById(Comparable id, boolean useCache) {
    return useCache ? (Spectrum) cache.get(CacheEntry.SPECTRUM, id) : null;
}

This method is being used by the PX submission pipeline:

Spectrum spectrum = dataAccessController.getSpectrumById(specId);

java.lang.ClassCastException: java.util.Collections$SynchronizedMap cannot be cast to uk.ac.ebi.pride.utilities.data.core.Spectrum

So the cache.get() is returning a SynchonizedMap instead of just one Spectrum object.

Tobias

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions