Add "safe type casting" warnings
authorSasha Sherstnev <a.sherstnev@dundee.ac.uk>
Tue, 10 Sep 2013 15:06:14 +0000 (16:06 +0100)
committerSasha Sherstnev <a.sherstnev@dundee.ac.uk>
Tue, 10 Sep 2013 15:06:14 +0000 (16:06 +0100)
webservices/compbio/ws/server/SequenceAnnotationService.java

index 0b450d1..641c745 100644 (file)
@@ -60,15 +60,16 @@ public abstract class SequenceAnnotationService<T> extends GenericMetadataServic
                return WSUtil.getAnnotation(jobId, log);\r
        }\r
 \r
+       @SuppressWarnings("unchecked")\r
        public String analize(List<FastaSequence> sequences)\r
                        throws UnsupportedRuntimeException, LimitExceededException,\r
                        JobSubmissionException {\r
                WSUtil.validateFastaInput(sequences);\r
                ConfiguredExecutable<T> confIUPred = init(sequences);\r
-               return WSUtil.analize(sequences, confIUPred, log, "analize",\r
-                               getLimit(""));\r
+               return WSUtil.analize(sequences, confIUPred, log, "analize", getLimit(""));\r
        }\r
 \r
+       @SuppressWarnings("unchecked")\r
        public String customAnalize(List<FastaSequence> sequences,\r
                        List<Option<T>> options) throws UnsupportedRuntimeException,\r
                        LimitExceededException, JobSubmissionException,\r
@@ -81,8 +82,7 @@ public abstract class SequenceAnnotationService<T> extends GenericMetadataServic
                List<String> params = WSUtil.getCommands(options,\r
                                AACon.KEY_VALUE_SEPARATOR);\r
                confAACon.addParameters(params);\r
-               return WSUtil.analize(sequences, confAACon, log, "customAnalize",\r
-                               getLimit(""));\r
+               return WSUtil.analize(sequences, confAACon, log, "customAnalize", getLimit(""));\r
        }\r
 \r
        public String presetAnalize(List<FastaSequence> sequences, Preset<T> preset)\r
@@ -92,11 +92,12 @@ public abstract class SequenceAnnotationService<T> extends GenericMetadataServic
                if (preset == null) {\r
                        throw new WrongParameterException("Preset must be provided!");\r
                }\r
+               @SuppressWarnings("unchecked")\r
                ConfiguredExecutable<T> confAAcon = init(sequences);\r
                confAAcon.addParameters(preset.getOptions());\r
+               @SuppressWarnings("unchecked")\r
                Limit<T> limit = getLimit(preset.getName());\r
                return WSUtil\r
                                .analize(sequences, confAAcon, log, "presetAnalize", limit);\r
        }\r
-\r
 }\r