Skip to content
Snippets Groups Projects
Commit ba606938 authored by kaloyane's avatar kaloyane
Browse files

minor: [LMS-2033] getSampleForUpdate() now returns NULL instead of throwing a runtime exception.

SVN: 19950
parent ce21d505
No related branches found
No related tags found
No related merge requests found
...@@ -150,12 +150,7 @@ abstract class AbstractTransactionState<T extends DataSetInformation> ...@@ -150,12 +150,7 @@ abstract class AbstractTransactionState<T extends DataSetInformation>
new SampleIdentifierFactory(sampleIdentifierString).createIdentifier(); new SampleIdentifierFactory(sampleIdentifierString).createIdentifier();
ch.systemsx.cisd.openbis.generic.shared.basic.dto.Sample sample = ch.systemsx.cisd.openbis.generic.shared.basic.dto.Sample sample =
openBisService.tryGetSampleWithExperiment(sampleIdentifier); openBisService.tryGetSampleWithExperiment(sampleIdentifier);
// TODO KE: Ask Sekhar if we should throw an exception or simply return NULL
if (sample == null)
{
throw new IllegalArgumentException("Could not find sample with identifier"
+ sampleIdentifierString);
}
Sample result = new Sample(sample); Sample result = new Sample(sample);
samplesToBeUpdated.add(result); samplesToBeUpdated.add(result);
return result; return result;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment