Skip to content

Commit bb14709

Browse files
committed
Removing almost all warnings in structure module, some logging changes
1 parent 47ab723 commit bb14709

File tree

14 files changed

+29
-24
lines changed

14 files changed

+29
-24
lines changed

biojava-structure/src/main/java/org/biojava/nbio/structure/BioAssemblyIdentifier.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
import org.biojava.nbio.structure.align.util.AtomCache;
2929

3030
public class BioAssemblyIdentifier implements StructureIdentifier {
31+
32+
private static final long serialVersionUID = -356206725119993449L;
33+
3134
private String pdbCode;
3235
private int biolNr;
3336

biojava-structure/src/main/java/org/biojava/nbio/structure/PDBHeader.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import org.slf4j.Logger;
2626
import org.slf4j.LoggerFactory;
2727

28-
import java.io.Serializable;
2928
import java.lang.reflect.InvocationTargetException;
3029
import java.lang.reflect.Method;
3130
import java.text.DateFormat;

biojava-structure/src/main/java/org/biojava/nbio/structure/align/pairwise/AlternativeAlignment.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -671,8 +671,8 @@ private void getPdbRegions(Atom[] ca1, Atom[] ca2){
671671
Chain c1 = p1.getChain();
672672
Chain c2 = p2.getChain();
673673

674-
String cid1 = c1.getChainID();
675-
String cid2 = c2.getChainID();
674+
String cid1 = c1.getId();
675+
String cid2 = c2.getId();
676676

677677
String pdb1 = p1.getResidueNumber().toString();
678678
String pdb2 = p2.getResidueNumber().toString();

biojava-structure/src/main/java/org/biojava/nbio/structure/align/util/AFPAlignmentDisplay.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,7 @@ public static Map<String,Double> calcIdSimilarity(char[] seq1, char[] seq2, int
338338
int i;
339339
int eqr = 0;
340340

341+
@SuppressWarnings("unused")
341342
int count = 0;
342343
for(i = 0; i < alnLength; i ++) {
343344

biojava-structure/src/main/java/org/biojava/nbio/structure/basepairs/BasePairParameters.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,8 @@ private static String complement(String sequence, boolean RNA) {
731731
* @param b An array of length 3 or 4 (4th component is ignored)
732732
* @return The cross product of the vectors (just the first three components
733733
*/
734-
private static double[] cross(double[] a, double[] b) {
734+
@SuppressWarnings("unused")
735+
private static double[] cross(double[] a, double[] b) {
735736
assert a.length >= 3 && b.length >= 3;
736737
double[] result = new double[4];
737738
result[0] = a[1]*b[2]-a[2]*b[1];

biojava-structure/src/main/java/org/biojava/nbio/structure/basepairs/MismatchedBasePairParameters.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@
4141
*/
4242
public class MismatchedBasePairParameters extends BasePairParameters {
4343

44-
public static final double DEFAULT_MAX_STAGGER = 2.0;
44+
private static final long serialVersionUID = 2837124340169886674L;
45+
46+
public static final double DEFAULT_MAX_STAGGER = 2.0;
4547
public static final double DEFAULT_MAX_PROPELLER = 60.0;
4648
public static final double DEFAULT_MAX_SHEAR = 5.0;
4749
public static final double DEFAULT_MAX_STRETCH = 5.0;

biojava-structure/src/main/java/org/biojava/nbio/structure/basepairs/TertiaryBasePairParameters.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@
4242
*/
4343
public class TertiaryBasePairParameters extends BasePairParameters {
4444

45-
public static final double DEFAULT_MAX_STAGGER = 2.0;
45+
private static final long serialVersionUID = 2556427111533466577L;
46+
47+
public static final double DEFAULT_MAX_STAGGER = 2.0;
4648
public static final double DEFAULT_MAX_PROPELLER = 60.0;
4749
// These are the criteria used to select proper base pairs.
4850
private double maxStagger = DEFAULT_MAX_STAGGER,

biojava-structure/src/main/java/org/biojava/nbio/structure/domain/PDPDomain.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,11 @@
3333
import org.biojava.nbio.structure.align.util.AtomCache;
3434

3535
public class PDPDomain implements StructureIdentifier {
36-
String identifier;
37-
SubstructureIdentifier canonical;
36+
private static final long serialVersionUID = 6894463080739943026L;
37+
38+
private String identifier;
39+
private SubstructureIdentifier canonical;
40+
3841
public static final Pattern PDP_NAME_PATTERN = Pattern.compile("^(?:PDP:)([0-9][a-z0-9]{3})(\\w)(\\w)$",Pattern.CASE_INSENSITIVE);
3942

4043
public PDPDomain(String pdpDomainName, List<ResidueRange> ranges) {

biojava-structure/src/main/java/org/biojava/nbio/structure/io/EntityFinder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,8 @@ private static EntityInfo findNonPolyEntityWithDescription(String description, L
194194

195195
private static boolean areResNumbersAligned(Chain c1, Chain c2) {
196196

197-
boolean isC1prot = StructureTools.isProtein(c1);
198-
boolean isC2prot = StructureTools.isProtein(c2);
197+
boolean isC1prot = c1.isProtein();
198+
boolean isC2prot = c2.isProtein();
199199

200200
// different kind of chain: we won't try to align them
201201
if (isC1prot != isC2prot ) return false;

biojava-structure/src/main/java/org/biojava/nbio/structure/io/PDBFileParser.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3140,10 +3140,10 @@ private void assignChainsAndEntities(){
31403140
for (Chain c:model) {
31413141

31423142
// we only have entities for polymeric chains, all others are ignored for assigning entities
3143-
if (StructureTools.isChainWaterOnly(c)) {
3143+
if (c.isWaterOnly()) {
31443144
waterChains.add(c);
31453145

3146-
} else if (StructureTools.isChainPureNonPolymer(c)) {
3146+
} else if (c.isPureNonPolymer()) {
31473147
nonPolyChains.add(c);
31483148

31493149
} else {

0 commit comments

Comments
 (0)