Skip to content

Commit 713171b

Browse files
author
Mohamed Ezzat
committed
squid:S1197 - Array designators should be on the type, not the variable
1 parent 7027064 commit 713171b

File tree

29 files changed

+68
-68
lines changed

29 files changed

+68
-68
lines changed

biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/PeptidePropertiesImpl.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ private double getIsoelectricPointInnovagen(ProteinSequence sequence){
322322
//
323323
// Ct Nt Sm Sc Sn
324324
//
325-
private final double cPk[][] = {
325+
private final double[][] cPk = {
326326
{3.55, 7.59, 0.0}, // A
327327
{3.55, 7.50, 0.0}, // B
328328
{3.55, 7.50, 9.00}, // C
@@ -365,7 +365,7 @@ private double getIsoelectricPointExpasy(String sequence){
365365
//
366366
// Compute the amino-acid composition.
367367
//
368-
int comp[] = new int[26];
368+
int[] comp = new int[26];
369369
for(int i = 0; i < sequence.length(); i++){
370370
int index = sequence.charAt(i) - 'A';
371371
if(index < 0 || index >= 26) continue;
@@ -430,7 +430,7 @@ private double getNetChargeExpasy(String sequence, double pHPoint){
430430
//
431431
// Compute the amino-acid composition.
432432
//
433-
int comp[] = new int[26];
433+
int[] comp = new int[26];
434434
for(int i = 0; i < sequence.length(); i++){
435435
int index = sequence.charAt(i) - 'A';
436436
if(index < 0 || index >= 26) continue;
@@ -444,7 +444,7 @@ private double getNetChargeExpasy(String sequence, double pHPoint){
444444
return getNetChargeExpasy(comp, nTermResidue, cTermResidue, pHPoint);
445445
}
446446

447-
private double getNetChargeExpasy(int comp[], int nTermResidue, int cTermResidue, double ph){
447+
private double getNetChargeExpasy(int[] comp, int nTermResidue, int cTermResidue, double ph){
448448
double cter = 0.0;
449449
if(cTermResidue >= 0 && cTermResidue < 26) cter = exp10(-cPk[cTermResidue][0]) / (exp10(-cPk[cTermResidue][0]) + exp10(-ph));
450450
double nter = 0.0;

biojava-core/src/main/java/org/biojava/nbio/core/sequence/io/BufferedReaderBytesRead.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
public class BufferedReaderBytesRead extends Reader {
6666

6767
private Reader in;
68-
private char cb[];
68+
private char[] cb;
6969
private int nChars, nextChar;
7070
private static final int INVALIDATED = -2;
7171
private static final int UNMARKED = -1;
@@ -150,7 +150,7 @@ private void fill() throws IOException {
150150
dst = delta;
151151
} else {
152152
/* Reallocate buffer to accommodate read-ahead limit */
153-
char ncb[] = new char[readAheadLimit];
153+
char[] ncb = new char[readAheadLimit];
154154
System.arraycopy(cb, markedChar, ncb, 0, delta);
155155
cb = ncb;
156156
markedChar = 0;
@@ -286,7 +286,7 @@ private int read1(char[] cbuf, int off, int len) throws IOException {
286286
* @exception IOException If an I/O error occurs
287287
*/
288288
@Override
289-
public int read(char cbuf[], int off, int len) throws IOException {
289+
public int read(char[] cbuf, int off, int len) throws IOException {
290290
synchronized (lock) {
291291
ensureOpen();
292292
if ((off < 0) || (off > cbuf.length) || (len < 0)

biojava-core/src/main/java/org/biojava/nbio/core/sequence/io/FastaReaderHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public static LinkedHashMap<String, DNASequence> readFastaDNASequence(
130130
return dnaSequences;
131131
}
132132

133-
public static void main(String args[]) throws Exception {
133+
public static void main(String[] args) throws Exception {
134134

135135
LinkedHashMap<String, DNASequence> dnaSequences = FastaReaderHelper.readFastaDNASequence(new File("fasta.fna"));
136136
for (DNASequence sequence : dnaSequences.values()) {

biojava-core/src/main/java/org/biojava/nbio/core/sequence/io/GenbankReaderHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ public static LinkedHashMap<String, DNASequence> readGenbankDNASequence(
161161
return dnaSequences;
162162
}
163163

164-
public static void main(String args[]) throws Exception {
164+
public static void main(String[] args) throws Exception {
165165

166166
LinkedHashMap<String, DNASequence> dnaSequences = GenbankReaderHelper.readGenbankDNASequence(new File("src/test/resources/NM_000266.gb"), true);
167167
for (DNASequence sequence : dnaSequences.values()) {

biojava-core/src/main/java/org/biojava/nbio/core/sequence/location/InsdcParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ private Strand getGroupLocationStrand(List<Location> ll){
296296
return returnStrand;
297297
}
298298

299-
public static void main(String args[]){
299+
public static void main(String[] args){
300300
String[] testStrings = {
301301
"J00194.1:100..202",
302302
"A00001.5:34..45",

biojava-core/src/main/java/org/biojava/nbio/core/util/UncompressInputStream.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ static public void uncompress( String fileInName, FileOutputStream out) throws I
481481

482482
private static final boolean debugTiming = false;
483483

484-
public static void main(String args[]) throws Exception {
484+
public static void main(String[] args) throws Exception {
485485
if (args.length != 1) {
486486
logger.info("Usage: UncompressInputStream <file>");
487487
System.exit(1);

biojava-genome/src/main/java/org/biojava/nbio/genome/GeneFeatureHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -875,7 +875,7 @@ static public LinkedHashMap<String, GeneSequence> getGeneSequences(Collection<Ch
875875
return geneSequenceHashMap;
876876
}
877877

878-
public static void main(String args[]) throws Exception {
878+
public static void main(String[] args) throws Exception {
879879
/* if (false) {
880880
LinkedHashMap<String, ChromosomeSequence> chromosomeSequenceList = GeneFeatureHelper.loadFastaAddGeneFeaturesFromGeneMarkGTF(new File("Scaffolds.fna"), new File("genemark_hmm.gtf"));
881881
LinkedHashMap<String, ProteinSequence> proteinSequenceList = GeneFeatureHelper.getProteinSequences(chromosomeSequenceList.values());

biojava-genome/src/main/java/org/biojava/nbio/genome/parsers/gff/Feature.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ public String toString() {
317317
* @deprecated
318318
*/
319319
@Deprecated
320-
public static void main(String args[])
320+
public static void main(String[] args)
321321
throws Exception {
322322
//Feature f= new Feature();
323323
//intentionally perverse

biojava-genome/src/main/java/org/biojava/nbio/genome/parsers/gff/FeatureList.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ public int compare(FeatureI a, FeatureI b) {
488488
* whose seqnames differ.
489489
*/
490490
public FeatureList sortByStart() {
491-
FeatureI array[] = toArray(new FeatureI[1]);
491+
FeatureI[] array = toArray(new FeatureI[1]);
492492

493493
Arrays.sort(array, new FeatureComparator());
494494

@@ -501,7 +501,7 @@ public FeatureList sortByStart() {
501501
*/
502502
// FIXME features may have a null location() !!
503503
@Deprecated
504-
static public void main(String args[]) {
504+
static public void main(String[] args) {
505505
}
506506

507507

biojava-genome/src/main/java/org/biojava/nbio/genome/parsers/gff/GFF3Reader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ private static Feature parseLine(String s) {
170170

171171

172172

173-
public static void main(String args[]) throws Exception {
173+
public static void main(String[] args) throws Exception {
174174
long start = System.currentTimeMillis();
175175
@SuppressWarnings("unused")
176176
FeatureList listGenes = GFF3Reader.read("/home/melo/workspace/release/stdout.combined.checked2.gtf");

0 commit comments

Comments
 (0)