Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

java 7 compliance

  • Loading branch information...
commit 899528c2be2e4a3e677b4b46113f172ae051d5c9 1 parent e81a1e1
@geometer authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/org/geometerplus/zlibrary/core/tree/ZLTree.java
View
8 src/org/geometerplus/zlibrary/core/tree/ZLTree.java
@@ -80,8 +80,8 @@ public synchronized final T getTreeByParagraphNumber(int index) {
if (mySubTrees != null) {
synchronized (mySubTrees) {
for (T subtree : mySubTrees) {
- if (subtree.mySize <= index) {
- index -= subtree.mySize;
+ if (((ZLTree<?>)subtree).mySize <= index) {
+ index -= ((ZLTree<?>)subtree).mySize;
} else {
return (T)subtree.getTreeByParagraphNumber(index);
}
@@ -91,7 +91,7 @@ public synchronized final T getTreeByParagraphNumber(int index) {
throw new RuntimeException("That's impossible!!!");
}
- private synchronized void addSubTree(T subtree, int position) {
+ synchronized void addSubTree(T subtree, int position) {
if (mySubTrees == null) {
mySubTrees = Collections.synchronizedList(new ArrayList<T>());
}
@@ -160,7 +160,7 @@ public boolean hasNext() {
public T next() {
final T element = myCurrentElement;
if (element.hasChildren() && element.Level < myMaxLevel) {
- myCurrentElement = (T)element.mySubTrees.get(0);
+ myCurrentElement = (T)((ZLTree<?>)element).mySubTrees.get(0);
myIndexStack.add(0);
} else {
ZLTree<T> parent = element;
Please sign in to comment.
Something went wrong with that request. Please try again.