Remove unused imports (#12970)

This commit is contained in:
sabi0 2023-12-28 19:28:24 +01:00 committed by GitHub
parent 948970be58
commit 9c9949b2bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 13 deletions

View File

@ -21,22 +21,16 @@ import java.io.InputStream;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLConnection;
import java.nio.channels.Channels;
import java.nio.channels.FileChannel;
import java.nio.channels.ReadableByteChannel;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.EnumSet;
import java.util.Locale;
import java.util.concurrent.TimeUnit;
import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;
import static java.nio.file.StandardOpenOption.APPEND;
/**
* Standalone class that can be used to download a gradle-wrapper.jar
@ -60,7 +54,7 @@ public class WrapperDownloader {
}
public static void checkVersion() {
int major = Runtime.getRuntime().version().feature();
int major = Runtime.version().feature();
if (major < 17 || major > 21) {
throw new IllegalStateException("java version must be between 17 and 21, your version: " + major);
}

View File

@ -21,12 +21,10 @@ import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.Optional;
import java.util.Set;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import javax.lang.model.element.AnnotationMirror;
import javax.lang.model.element.Element;
import javax.lang.model.element.ElementKind;
import javax.lang.model.element.ExecutableElement;
@ -75,8 +73,7 @@ public class MissingDoclet extends StandardDoclet {
@Override
public Set<Doclet.Option> getSupportedOptions() {
Set<Doclet.Option> options = new HashSet<>();
options.addAll(super.getSupportedOptions());
Set<Doclet.Option> options = new HashSet<>(super.getSupportedOptions());
options.add(new Doclet.Option() {
@Override
public int getArgumentCount() {
@ -410,7 +407,7 @@ public class MissingDoclet extends StandardDoclet {
case MODULE:
case PACKAGE:
// for modules/packages, we don't have filename + line number, fully qualify
fullMessage.append(element.toString());
fullMessage.append(element);
break;
case METHOD:
case CONSTRUCTOR:

View File

@ -21,7 +21,6 @@ import java.io.IOException;
import java.util.Objects;
import org.apache.lucene.index.LeafReaderContext;
import org.apache.lucene.search.*;
import org.apache.lucene.search.Matches;
/** Query wrapper that forces its wrapped Query to use the default doc-by-doc BulkScorer. */
class ForceNoBulkScoringQuery extends Query {