Skip to content

Commit 87a7644

Browse files
authored
Merge pull request biojava#566 from andviane/master
GenericInsdcHeaderFormat: Fixed formatting codes.
2 parents 805c286 + d6c187b commit 87a7644

4 files changed

Lines changed: 5 additions & 4 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ private String _insdc_feature_location_string(FeatureInterface<AbstractSequence<
186186
if(f.getLocations().getStrand() != Strand.NEGATIVE) {
187187
StringBuilder sb = new StringBuilder();
188188
Formatter formatter = new Formatter(sb,Locale.US);
189-
formatter.format("Inconsistent strands: %r for parent, %r for child", feature.getLocations().getStrand(), f.getLocations().getStrand());
189+
formatter.format("Inconsistent strands: %s for parent, %s for child", feature.getLocations().getStrand(), f.getLocations().getStrand());
190190
String output = formatter.toString();
191191
formatter.close();
192192
throw new RuntimeException(output);

biojava-structure/src/main/java/org/biojava/nbio/structure/symmetry/utils/SymmetryTools.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ private static double getResetVal(double unpenalizedScore,
106106
double nResFromMainDiag, double[] gradientPolyCoeff,
107107
double gradientExpCoeff) {
108108

109-
if (unpenalizedScore == Double.NaN)
109+
if (Double.isNaN(unpenalizedScore))
110110
return 0; // what else?
111111

112112
// We can actually return a positive value if this is high enough

biojava-structure/src/test/java/org/biojava/nbio/structure/io/TestMMcifOrganismParsing.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525

2626

2727
import org.biojava.nbio.structure.EntityInfo;
28+
import org.biojava.nbio.structure.EntityType;
2829
import org.biojava.nbio.structure.Structure;
2930
import org.biojava.nbio.structure.StructureException;
3031
import org.biojava.nbio.structure.StructureIO;
@@ -92,7 +93,7 @@ private void checkPDB(String pdbId, String organismTaxId) throws IOException, St
9293
assertTrue(s.getEntityInfos().size() > 0);
9394

9495
for ( EntityInfo c : s.getEntityInfos()) {
95-
if(c.getType().equals("polymer")) {
96+
if(EntityType.POLYMER.equals(c.getType())) {
9697
assertNotNull(c.getOrganismTaxId());
9798
if(pdbId.equals("3zd6")){
9899
if(c.getMolId()==2) {

biojava-survival/src/main/java/org/biojava/nbio/survival/cox/CoxInfo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ public String getCoefficientText(boolean header, String beginLine, String beginC
287287
public static String fmt(Double d, int precision, int pad) {
288288
if(d == null)
289289
return "";
290-
if(d == Double.NaN)
290+
if(Double.isNaN(d))
291291
return "";
292292
String value = "";
293293
DecimalFormat dfe = new DecimalFormat("0.00E0");

0 commit comments

Comments
 (0)