Skip to content

Commit

Permalink
Merge pull request #372 from gdgib/G2-1631-Warnings
Browse files Browse the repository at this point in the history
G2-1631 Suppress expected warnings
  • Loading branch information
gdgib authored Aug 31, 2024
2 parents acd8232 + acc8621 commit 8151b31
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,13 @@ protected final void test(final IConsumer2<Path, Path> prep, final IConsumer2<Pa
}
}, HCollection.asSet(kinds).toArray(new Kind[0]));
synchronized (events) {
events.wait(10);
events.wait(100);
}

// Perform the modification
if (modify != null) modify.accept(temp.get(), file);
synchronized (events) {
events.wait(10);
events.wait(100);
}

// Look for the expected events
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

import lombok.Getter;

@SuppressWarnings("removal")
public class BasicServiceLoader<S> implements IServiceLoader<S> {
public class ProviderIterator implements Iterator<Class<? extends S>> {
protected final Iterator<Class<? extends S>> loaded = BasicServiceLoader.this.loaded.values().iterator();
Expand All @@ -48,6 +49,7 @@ protected class ProviderLoader implements Iterator<Class<? extends S>> {

protected String nextProviderName = null;

@SuppressWarnings("deprecation")
@Override
public boolean hasNext() {
if (acc == null) return hasNextInternal();
Expand Down Expand Up @@ -85,6 +87,7 @@ protected void loadConfigs() throws SmartServiceConfigurationError {
}

@Override
@SuppressWarnings("deprecation")
public Class<? extends S> next() {
if (acc == null) return nextInternal();
else return AccessController.doPrivileged((PrivilegedAction<Class<? extends S>>) this::nextInternal, acc);
Expand Down Expand Up @@ -142,6 +145,7 @@ public BasicServiceLoader(Class<?> key, Class<S> type) {
this(key, type, null, null);
}

@SuppressWarnings("deprecation")
public BasicServiceLoader(Class<?> key, Class<S> type, ClassLoader classLoader, ITypeFunction1<S> instantiator) {
this.key = key == null ? type : key;
this.type = Objects.requireNonNull(type, "Type cannot be null");
Expand Down

0 comments on commit 8151b31

Please sign in to comment.