From 9ce870373944258385a2dca39237901b1c36d9cd Mon Sep 17 00:00:00 2001 From: Sasha Sherstnev Date: Tue, 10 Sep 2013 16:06:14 +0100 Subject: [PATCH] Add "safe type casting" warnings --- .../compbio/ws/server/SequenceAnnotationService.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/webservices/compbio/ws/server/SequenceAnnotationService.java b/webservices/compbio/ws/server/SequenceAnnotationService.java index 0b450d1..641c745 100644 --- a/webservices/compbio/ws/server/SequenceAnnotationService.java +++ b/webservices/compbio/ws/server/SequenceAnnotationService.java @@ -60,15 +60,16 @@ public abstract class SequenceAnnotationService extends GenericMetadataServic return WSUtil.getAnnotation(jobId, log); } + @SuppressWarnings("unchecked") public String analize(List sequences) throws UnsupportedRuntimeException, LimitExceededException, JobSubmissionException { WSUtil.validateFastaInput(sequences); ConfiguredExecutable confIUPred = init(sequences); - return WSUtil.analize(sequences, confIUPred, log, "analize", - getLimit("")); + return WSUtil.analize(sequences, confIUPred, log, "analize", getLimit("")); } + @SuppressWarnings("unchecked") public String customAnalize(List sequences, List> options) throws UnsupportedRuntimeException, LimitExceededException, JobSubmissionException, @@ -81,8 +82,7 @@ public abstract class SequenceAnnotationService extends GenericMetadataServic List params = WSUtil.getCommands(options, AACon.KEY_VALUE_SEPARATOR); confAACon.addParameters(params); - return WSUtil.analize(sequences, confAACon, log, "customAnalize", - getLimit("")); + return WSUtil.analize(sequences, confAACon, log, "customAnalize", getLimit("")); } public String presetAnalize(List sequences, Preset preset) @@ -92,11 +92,12 @@ public abstract class SequenceAnnotationService extends GenericMetadataServic if (preset == null) { throw new WrongParameterException("Preset must be provided!"); } + @SuppressWarnings("unchecked") ConfiguredExecutable confAAcon = init(sequences); confAAcon.addParameters(preset.getOptions()); + @SuppressWarnings("unchecked") Limit limit = getLimit(preset.getName()); return WSUtil .analize(sequences, confAAcon, log, "presetAnalize", limit); } - } -- 1.7.10.2