Skip to content

Commit 75c29b6

Browse files
committed
Modified the exception to take in account this particular case
1 parent e49b69b commit 75c29b6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,9 @@ protected void assertLocation() {
128128
int st = getStart().getPosition();
129129
int e = getEnd().getPosition();
130130

131-
if (st > e) {
131+
if (st > e && ! circular) {
132132
throw new IllegalStateException(
133-
String.format("Start (%d) is greater than end (%d); "
133+
String.format("Start (%d) is greater than end (%d) in non circular sequence; "
134134
+ "this is an incorrect format",
135135
st, e));
136136
}

0 commit comments

Comments
 (0)