Skip to content
This repository has been archived by the owner on Jun 30, 2023. It is now read-only.

Fix linter issues. #206

Open
wants to merge 1 commit into
base: 2.0
Choose a base branch
from
Open
Show file tree
Hide file tree
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 @@ -27,7 +27,6 @@

import java.io.IOException;
import java.security.GeneralSecurityException;
import java.util.logging.Level;
import java.util.logging.Logger;

import javax.servlet.http.HttpServletRequest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.ImmutableSet;

import java.util.logging.Level;
import java.util.logging.Logger;

import javax.servlet.http.HttpServletRequest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/
package com.google.api.server.spi.config.model;

import com.google.common.collect.ImmutableListMultimap;
import com.google.common.collect.ImmutableMap;

import com.google.common.collect.ImmutableSet;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ public boolean equals(Object o) {
Objects.equals(peerAuthenticators, config.peerAuthenticators) &&
Objects.equals(typeLoader, config.typeLoader) &&
ignored == config.ignored &&
apiKeyRequired == config.apiKeyRequired &&
Objects.equals(apiKeyRequired, config.apiKeyRequired) &&
Objects.equals(returnType, config.returnType) &&
Objects.equals(metricCosts, config.metricCosts);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,5 +107,12 @@ public boolean equals(Object obj) {
}
return false;
}

@Override
public int hashCode() {
int result = sourceType.hashCode();
result = 31 * result + serializer.hashCode();
return result;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ public abstract class Schema {
/**
* If the schema is an enum, a list of possible enum values in their string representation.
*/
@Nullable public abstract ImmutableList<String> enumValues();
public abstract ImmutableList<String> enumValues();

/**
* If the schema is an enum, a list of enum value descriptions.
*/
@Nullable public abstract ImmutableList<String> enumDescriptions();
public abstract ImmutableList<String> enumDescriptions();

public static Builder builder() {
return new AutoValue_Schema.Builder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.SortedSet;
import java.util.TreeMap;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@

import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.util.Collection;
import java.util.Enumeration;
import java.util.List;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ protected static List<String> getParameterNames(EndpointMethod endpointMethod)
if (annotation == null) {
parameterNames.add(null);
} else {
parameterNames.add((String) annotation.getClass().getMethod("value").invoke(annotation));
parameterNames.add((String) annotation.annotationType().getMethod("value").invoke(annotation));
}
}
endpointMethod.setParameterNames(parameterNames);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,11 @@
package com.google.api.server.spi.response;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ArrayNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.google.api.server.spi.ObjectMapperUtil;
import com.google.api.server.spi.ServiceException;
import com.google.api.server.spi.config.model.ApiSerializationConfig;
import com.google.common.base.Strings;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;

import java.io.IOException;

Expand Down