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

index 33208a0..ed94c23 100644 (file)
@@ -20,9 +20,7 @@ import compbio.runner.conservation.AACon;
 import compbio.runner.structure.RNAalifold;\r
 \r
 @WebService(endpointInterface = "compbio.data.msa.SequenceAnnotation", targetNamespace = JABAService.V2_SERVICE_NAMESPACE, serviceName = "RNAalifoldWS")\r
-public class RNAalifoldWS extends SequenceAnnotationService<RNAalifold> \r
-               implements\r
-                       SequenceAnnotation<RNAalifold> {\r
+public class RNAalifoldWS extends SequenceAnnotationService<RNAalifold> implements SequenceAnnotation<RNAalifold> {\r
 \r
        private static Logger log = Logger.getLogger(RNAalifoldWS.class);\r
        \r
@@ -32,18 +30,19 @@ public class RNAalifoldWS extends SequenceAnnotationService<RNAalifold>
        \r
        // Only purpose is to replace "analize" with "fold" method \r
        // so that a clustal input file and not fasta will be generated\r
+       @SuppressWarnings("unchecked")\r
        @Override\r
        public String analize(List<FastaSequence> sequences)\r
                        throws UnsupportedRuntimeException, LimitExceededException,\r
                        JobSubmissionException {\r
                WSUtil.validateFastaInput(sequences);\r
                ConfiguredExecutable<RNAalifoldWS> confRNAalifold = init(sequences);\r
-               return WSUtil.fold(sequences, confRNAalifold, log, "analize",\r
-                               getLimit(""));\r
+               return WSUtil.fold(sequences, confRNAalifold, log, "analize", getLimit(""));\r
        }\r
 \r
        // Only purpose is to replace "analize" with "fold" method \r
        // so that a clustal input file and not fasta will be generated\r
+       @SuppressWarnings("unchecked")\r
        @Override\r
        public String customAnalize(List<FastaSequence> sequences,\r
                        List<Option<RNAalifold>> options) throws UnsupportedRuntimeException,\r
@@ -51,12 +50,9 @@ public class RNAalifoldWS extends SequenceAnnotationService<RNAalifold>
                        WrongParameterException {\r
                WSUtil.validateFastaInput(sequences);\r
                ConfiguredExecutable<RNAalifold> confRNAalifold = init(sequences);\r
-               \r
-               List<String> params = WSUtil.getCommands(options,\r
-                               RNAalifold.KEY_VALUE_SEPARATOR);\r
+               List<String> params = WSUtil.getCommands(options, RNAalifold.KEY_VALUE_SEPARATOR);\r
                confRNAalifold.addParameters(params);\r
-               return WSUtil.fold(sequences, confRNAalifold, log, "customAnalize",\r
-                               getLimit(""));\r
+               return WSUtil.fold(sequences, confRNAalifold, log, "customAnalize", getLimit(""));\r
        }\r
        \r
        \r
@@ -69,9 +65,6 @@ public class RNAalifoldWS extends SequenceAnnotationService<RNAalifold>
                        Preset<RNAalifold> preset) throws UnsupportedRuntimeException,\r
                        LimitExceededException, JobSubmissionException,\r
                        WrongParameterException {\r
-\r
                return analize(sequences);\r
        }\r
 }\r
-       \r
-       \r