Skip to content

Commit

Permalink
refactor: Curly brackets around if/else one-line body
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisVerkhoturov committed Sep 20, 2017
1 parent 31d042e commit 11a9c1f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/main/java/picard/sam/HitsForInsert.java
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,12 @@ record -> record.getIntegerAttribute(SAMTag.HI.name()),
final Integer hiTagValueOfSecond = secondOfPair.get(i).getIntegerAttribute(SAMTag.HI.name());

if (nonNull(hiTagValueOfFirst) && nonNull(hiTagValueOfSecond)) {
if (hiTagValueOfFirst < hiTagValueOfSecond) secondOfPair.add(i, null);
else if (hiTagValueOfSecond < hiTagValueOfFirst) firstOfPairOrFragment.add(i, null);
if (hiTagValueOfFirst < hiTagValueOfSecond) {
secondOfPair.add(i, null);
}
else if (hiTagValueOfFirst > hiTagValueOfSecond) {
firstOfPairOrFragment.add(i, null);
}
// else the are correlated
}

Expand Down Expand Up @@ -283,7 +287,7 @@ void coordinateByMate() {
/**
* @return true if records belong to the same pairwise alignment
*/
private static boolean arePair(SAMRecord first, SAMRecord second) {
private static boolean arePair(final SAMRecord first, final SAMRecord second) {
return nonNull(first) && nonNull(second)
&& first.getMateAlignmentStart() == second.getAlignmentStart()
&& first.getAlignmentStart() == second.getMateAlignmentStart()
Expand Down

0 comments on commit 11a9c1f

Please sign in to comment.