Skip to content

Commit

Permalink
correct indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jvmaia committed Oct 1, 2017
1 parent 030f5a1 commit 25e77ab
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions python/common/org/python/types/Bytes.java
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ public org.python.Object __contains__(org.python.Object slice) {
byte[] bslice;
if (slice instanceof org.python.types.Int) {
int islice = (int) ((org.python.types.Int) slice).value;
if (islice < 0 || islice > 255){
if (islice < 0 || islice > 255) {
throw new org.python.exceptions.ValueError("byte must be in range(0, 256)\n");
}
bslice = new byte[1];
Expand All @@ -192,16 +192,16 @@ public org.python.Object __contains__(org.python.Object slice) {
throw new org.python.exceptions.TypeError(error_message);
}
int counter_slice = 0;
for (int i = 0; i < this.value.length +1; i++){
if (counter_slice == bslice.length){
return new org.python.types.Bool(true);
} else if (i == this.value.length){
break;
} else if (bslice[counter_slice] == this.value[i]){
counter_slice++;
} else {
counter_slice = 0;
}
for (int i = 0; i < this.value.length + 1; i++) {
if (counter_slice == bslice.length) {
return new org.python.types.Bool(true);
} else if (i == this.value.length) {
break;
} else if (bslice[counter_slice] == this.value[i]) {
counter_slice++;
} else {
counter_slice = 0;
}
}
return new org.python.types.Bool(false);
}
Expand Down

0 comments on commit 25e77ab

Please sign in to comment.