Skip to content

Commit

Permalink
Make maven happy
Browse files Browse the repository at this point in the history
  • Loading branch information
aozarov committed Dec 31, 2014
1 parent ede6867 commit 938b04d
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .checkstyle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>

<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="false">
<fileset name="all" enabled="true" check-config-name="Copy of Google Checks" local="false">
<fileset name="all" enabled="true" check-config-name="Google Checks" local="false">
<file-match-pattern match-pattern="." include-pattern="true"/>
</fileset>
</fileset-config>
8 changes: 4 additions & 4 deletions .project
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,22 @@
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<name>ntut.csie.rleht.builder.RLBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>ntut.csie.rleht.builder.RLBuilder</name>
<name>ch.acanda.eclipse.pmd.builder.PMDBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>ch.acanda.eclipse.pmd.builder.PMDBuilder</name>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
Expand Down
3 changes: 3 additions & 0 deletions .settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonN
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
org.eclipse.jdt.core.compiler.problem.deadCode=warning
Expand All @@ -19,6 +21,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=warning
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<version>3.2</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
Expand Down
14 changes: 7 additions & 7 deletions src/main/java/com/google/gcloud/ExceptionHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Sets;
import com.google.gcloud.ExceptionHandler.Interceptor.RetryResult;

import java.io.Serializable;
import java.lang.reflect.Method;
Expand Down Expand Up @@ -140,10 +139,10 @@ static final class RetryInfo implements Serializable {

private static final long serialVersionUID = -4264634837841455974L;
private final Class<? extends Exception> exception;
private final RetryResult retry;
private final Interceptor.RetryResult retry;
private final Set<RetryInfo> children = Sets.newHashSet();

RetryInfo(Class<? extends Exception> exception, RetryResult retry) {
RetryInfo(Class<? extends Exception> exception, Interceptor.RetryResult retry) {
this.exception = checkNotNull(exception);
this.retry = retry;
}
Expand Down Expand Up @@ -174,10 +173,10 @@ private ExceptionHandler(Builder builder) {
Sets.intersection(retriableExceptions, nonRetriableExceptions).isEmpty(),
"Same exception was found in both retriable and non-retriable sets");
for (Class<? extends Exception> exception : retriableExceptions) {
addToRetryInfos(retryInfos, new RetryInfo(exception, RetryResult.RETRY));
addToRetryInfos(retryInfos, new RetryInfo(exception, Interceptor.RetryResult.RETRY));
}
for (Class<? extends Exception> exception : nonRetriableExceptions) {
addToRetryInfos(retryInfos, new RetryInfo(exception, RetryResult.ABORT));
addToRetryInfos(retryInfos, new RetryInfo(exception, Interceptor.RetryResult.ABORT));
}
}

Expand Down Expand Up @@ -242,13 +241,14 @@ public Set<Class<? extends Exception>> getNonRetriableExceptions() {

boolean shouldRetry(Exception ex) {
for (Interceptor interceptor : interceptors) {
RetryResult retryResult = interceptor.shouldRetry(ex);
Interceptor.RetryResult retryResult = interceptor.shouldRetry(ex);
if (retryResult != null) {
return retryResult.booleanValue();
}
}
RetryInfo retryInfo = findMostSpecificRetryInfo(retryInfos, ex.getClass());
RetryResult retryResult = retryInfo == null ? RetryResult.ABORT : retryInfo.retry;
Interceptor.RetryResult retryResult =
retryInfo == null ? Interceptor.RetryResult.ABORT : retryInfo.retry;
for (Interceptor interceptor : interceptors) {
retryResult = firstNonNull(interceptor.shouldRetry(ex, retryResult), retryResult);
}
Expand Down

0 comments on commit 938b04d

Please sign in to comment.