Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix TraversalStrategyProxy() compile error on java 11 #1982

Merged
merged 1 commit into from
Oct 27, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1659,16 +1659,14 @@ public Iterator<TraversalStrategy<?>> iterator() {
return Collections.emptyIterator();

}
return new MapperIterator<TraversalStrategy<?>,
TraversalStrategy<?>>(
return new MapperIterator<TraversalStrategy<?>, TraversalStrategy<?>>(
this.strategies.iterator(), (strategy) -> {
return new TraversalStrategyProxy<>(strategy);
});
}

@Override
public TraversalStrategies addStrategies(TraversalStrategy<?>...
strategies) {
public TraversalStrategies addStrategies(TraversalStrategy<?>... strategies) {
return this.strategies.addStrategies(strategies);
}

Expand Down Expand Up @@ -1709,8 +1707,10 @@ private final class TraversalStrategyProxy<T extends TraversalStrategy<?>>

private final TraversalStrategy<T> origin;

public TraversalStrategyProxy(TraversalStrategy<T> origin) {
this.origin = origin;
public TraversalStrategyProxy(TraversalStrategy<?> origin) {
@SuppressWarnings({ "rawtypes", "unchecked" })
TraversalStrategy<T> strategy = (TraversalStrategy) origin;
this.origin = strategy;
}

@Override
Expand Down Expand Up @@ -1768,8 +1768,8 @@ public Configuration getConfiguration() {

@Override
public int compareTo(@SuppressWarnings("rawtypes")
Class<? extends TraversalStrategy> otherCategory) {
return this.origin.compareTo(otherCategory);
Class<? extends TraversalStrategy> other) {
return this.origin.compareTo(other);
}

@Override
Expand All @@ -1788,8 +1788,7 @@ public String toString() {
}
}

private static final ThreadLocal<Context> CONTEXTS =
new InheritableThreadLocal<>();
private static final ThreadLocal<Context> CONTEXTS = new InheritableThreadLocal<>();

protected static final Context setContext(Context context) {
Context old = CONTEXTS.get();
Expand Down