Remove GWT Annotations

The GWT UI was deprecated and removed from the master branch after the
2.16 release was cut. These annotations are leftovers that are no longer
needed.

Change-Id: I4cade217aef515647637df51820bd7f1c327bd21
This commit is contained in:
Patrick Hiesel
2019-03-14 18:20:35 +01:00
parent 7a82815691
commit 394998c366
11 changed files with 1 additions and 25 deletions

View File

@@ -14,7 +14,6 @@
package com.google.gerrit.common;
import com.google.common.annotations.GwtIncompatible;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
@@ -25,7 +24,6 @@ import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.storage.file.FileBasedConfig;
import org.eclipse.jgit.util.IO;
@GwtIncompatible("Unemulated classes in java.io, java.nio and JGit")
public class FileUtil {
public static boolean modified(FileBasedConfig cfg) throws IOException {
byte[] curVers;

View File

@@ -14,10 +14,8 @@
package com.google.gerrit.common;
import com.google.common.annotations.GwtIncompatible;
import org.eclipse.jgit.revwalk.FooterKey;
@GwtIncompatible("Unemulated com.google.gerrit.common.FooterConstants")
public class FooterConstants {
/** The change ID as used to track patch sets. */
public static final FooterKey CHANGE_ID = new FooterKey("Change-Id");

View File

@@ -14,7 +14,6 @@
package com.google.gerrit.common;
import com.google.common.annotations.GwtIncompatible;
import com.google.common.collect.Sets;
import java.io.IOException;
import java.io.InputStream;
@@ -30,7 +29,6 @@ import java.util.Collection;
import java.util.Collections;
import java.util.Set;
@GwtIncompatible("Unemulated methods in Class and OutputStream")
public final class IoUtil {
public static void copyWithThread(InputStream src, OutputStream dst) {
new Thread("IoUtil-Copy") {

View File

@@ -14,11 +14,9 @@
package com.google.gerrit.common;
import com.google.common.annotations.GwtIncompatible;
import java.nio.file.Path;
import java.util.Objects;
@GwtIncompatible("Unemulated java.nio.file.Path")
public class PluginData {
public final String name;
public final String version;

View File

@@ -18,14 +18,12 @@ import static com.google.common.base.Preconditions.checkArgument;
import static java.nio.charset.StandardCharsets.UTF_8;
import static java.util.Objects.requireNonNull;
import com.google.common.annotations.GwtIncompatible;
import com.google.gerrit.extensions.restapi.RawInput;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import javax.servlet.http.HttpServletRequest;
@GwtIncompatible("Unemulated classes in java.io and javax.servlet")
public class RawInputUtil {
public static RawInput create(String content) {
return create(content.getBytes(UTF_8));

View File

@@ -18,7 +18,6 @@ import static com.google.common.flogger.LazyArgs.lazy;
import static com.google.gerrit.common.FileUtil.lastModified;
import static java.util.stream.Collectors.joining;
import com.google.common.annotations.GwtIncompatible;
import com.google.common.collect.ComparisonChain;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Ordering;
@@ -30,7 +29,6 @@ import java.nio.file.NoSuchFileException;
import java.nio.file.Path;
import java.util.List;
@GwtIncompatible("Unemulated classes in java.nio and Guava")
public final class SiteLibraryLoaderUtil {
private static final FluentLogger logger = FluentLogger.forEnclosingClass();

View File

@@ -18,7 +18,6 @@ import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import com.google.common.annotations.GwtCompatible;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
@@ -28,7 +27,6 @@ import java.lang.annotation.Target;
*/
@Target({METHOD, TYPE})
@Retention(RUNTIME)
@GwtCompatible
public @interface UsedAt {
/** Enumeration of projects that call a method that would otherwise be private. */
enum Project {

View File

@@ -16,7 +16,6 @@ package com.google.gerrit.common;
import static java.nio.charset.StandardCharsets.UTF_8;
import com.google.common.annotations.GwtIncompatible;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.flogger.FluentLogger;
import java.io.BufferedReader;
@@ -24,7 +23,6 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
@GwtIncompatible("Unemulated com.google.gerrit.common.Version")
public class Version {
private static final FluentLogger logger = FluentLogger.forEnclosingClass();

View File

@@ -14,7 +14,6 @@
package com.google.gerrit.common.data;
import com.google.common.annotations.GwtIncompatible;
import com.google.gerrit.reviewdb.client.Account;
import java.util.Collection;
import java.util.List;
@@ -65,7 +64,7 @@ public class SubmitRecord {
public Status status;
public List<Label> labels;
@GwtIncompatible public List<SubmitRequirement> requirements;
public List<SubmitRequirement> requirements;
public String errorMessage;
public static class Label {
@@ -136,7 +135,6 @@ public class SubmitRecord {
}
}
@GwtIncompatible
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@@ -164,7 +162,6 @@ public class SubmitRecord {
return sb.toString();
}
@GwtIncompatible
@Override
public boolean equals(Object o) {
if (o instanceof SubmitRecord) {
@@ -177,7 +174,6 @@ public class SubmitRecord {
return false;
}
@GwtIncompatible
@Override
public int hashCode() {
return Objects.hash(status, labels, errorMessage, requirements);

View File

@@ -17,13 +17,11 @@ package com.google.gerrit.common.data;
import static com.google.common.base.Preconditions.checkState;
import com.google.auto.value.AutoValue;
import com.google.common.annotations.GwtIncompatible;
import com.google.common.base.CharMatcher;
import com.google.common.collect.ImmutableMap;
import java.util.Map;
/** Describes a requirement to submit a change. */
@GwtIncompatible
@AutoValue
@AutoValue.CopyAnnotations
public abstract class SubmitRequirement {

View File

@@ -14,7 +14,6 @@
package com.google.gerrit.common.data;
import com.google.common.annotations.GwtIncompatible;
import com.google.gerrit.reviewdb.client.Branch;
import com.google.gerrit.reviewdb.client.Project;
import java.util.ArrayList;
@@ -24,7 +23,6 @@ import java.util.List;
import org.eclipse.jgit.transport.RefSpec;
/** Portion of a {@link Project} describing superproject subscription rules. */
@GwtIncompatible("Unemulated org.eclipse.jgit.transport.RefSpec")
public class SubscribeSection {
private final List<RefSpec> multiMatchRefSpecs;