X Tutup
Skip to content

Commit 320fa7b

Browse files
author
Mohamed Ezzat
committed
squid:S1157 - Case insensitive string comparisons should be made without intermediate upper or lower casing
1 parent 417e2da commit 320fa7b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

biojava-protein-disorder/src/main/java/org/biojava/nbio/ronn/InputParameters.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,10 @@ ResultLayout parseFormat(String format) {
105105
return ResultLayout.VERTICAL;
106106
}
107107
format = format.trim().substring(InputParameters.formatKey.length());
108-
if (format.toUpperCase().equals("V")) {
108+
if ("V".equalsIgnoreCase(format)) {
109109
return ResultLayout.VERTICAL;
110110
}
111-
if (format.toUpperCase().equals("H")) {
111+
if ("H".equalsIgnoreCase(format)) {
112112
return ResultLayout.HORIZONTAL;
113113
}
114114
throw new IllegalArgumentException("Unrecognised format: '" + format

biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmtf/MmtfStructureReader.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,11 +395,11 @@ public void setXtalInfo(String spaceGroupString, float[] unitCell, double[][] nc
395395
*/
396396
private int getGroupTypIndicator(String currentGroupType) {
397397
// At the moment - peptide like is a HETATM group (consistent with biojava)
398-
if(currentGroupType.toUpperCase().equals("PEPTIDE-LIKE")){
398+
if("PEPTIDE-LIKE".equalsIgnoreCase(currentGroupType)){
399399
return 0;
400400
}
401401
// Again to correspond with Biojava - but I suspect we really want this to be 1
402-
if(currentGroupType.toUpperCase().equals("D-PEPTIDE LINKING")){
402+
if("D-PEPTIDE LINKING".equalsIgnoreCase(currentGroupType)){
403403
return 0;
404404
}
405405
if(currentGroupType.toUpperCase().contains("PEPTIDE")){

0 commit comments

Comments
 (0)
X Tutup