fix compilation error for Java 8
This commit is contained in:
parent
d5f7752e98
commit
e7aadc42b8
1 changed files with 11 additions and 10 deletions
|
@ -154,7 +154,7 @@ public class PageContextImpl implements PageContext {
|
||||||
}
|
}
|
||||||
|
|
||||||
listeners.stream()
|
listeners.stream()
|
||||||
.sorted(LISTENER_COMPARATOR)
|
.sorted(createListenerComparator())
|
||||||
.forEach(listener -> listener.notify(event));
|
.forEach(listener -> listener.notify(event));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -262,8 +262,8 @@ public class PageContextImpl implements PageContext {
|
||||||
+ "]";
|
+ "]";
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final Comparator<PageEventListener<?>> LISTENER_COMPARATOR =
|
private static final Comparator<PageEventListener<?>> createListenerComparator() {
|
||||||
new Comparator<>() {
|
return new Comparator<>() {
|
||||||
@Override
|
@Override
|
||||||
public int compare(final PageEventListener<?> o1, final PageEventListener<?> o2) {
|
public int compare(final PageEventListener<?> o1, final PageEventListener<?> o2) {
|
||||||
final int x = o1.priority();
|
final int x = o1.priority();
|
||||||
|
@ -271,5 +271,6 @@ public class PageContextImpl implements PageContext {
|
||||||
return (x < y) ? -1 : ((x == y) ? 0 : 1);
|
return (x < y) ? -1 : ((x == y) ? 0 : 1);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue