Skip to content

Commit

Permalink
Corrected Java 1.5 syntax issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
freakboy3742 committed Mar 5, 2017
1 parent 0ca77f1 commit ac84a23
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions python/common/org/python/types/Str.java
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ public org.python.Object __getitem__(org.python.Object index) {
__doc__ = ""
)
public org.python.Iterable __iter__() {
java.util.List<org.python.Object> listOfStrs = new ArrayList<>();
java.util.List<org.python.Object> listOfStrs = new java.util.ArrayList<org.python.Object>();
for (int i = 0; i < this.value.length(); i++) {
listOfStrs.add(new Str(this.value.substring(i, i + 1)));
}
Expand Down Expand Up @@ -566,7 +566,7 @@ public org.python.Object center(org.python.Object width, org.python.Object charT
} else {
throw new org.python.exceptions.TypeError("Fill char must of type String");
}

if (width instanceof org.python.types.Int) {
String str = this.value;
int widthVal = (int)((org.python.types.Int)width).value;
Expand All @@ -577,9 +577,9 @@ public org.python.Object center(org.python.Object width, org.python.Object charT
int diff = widthVal - strLen;
int lenFirst = (diff)/2;
int lenSecond = diff - lenFirst;

java.lang.StringBuffer returnString = new java.lang.StringBuffer(widthVal);

for (int i = 0; i < lenFirst; i++) {
returnString.append(fillChar);
}
Expand Down

0 comments on commit ac84a23

Please sign in to comment.