Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Checkstyle passes
  • Loading branch information
iamdanfox committed Oct 18, 2018
commit b7363cc82bb4ad6b49469b8250195d9be6401975
4 changes: 0 additions & 4 deletions .baseline/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,6 @@
<property name="illegalPkgs" value="org.apache.log4j, org.apache.logging.log4j, java.util.logging, ch.qos.logback"/>
<message key="import.illegal" value="Use SLF4J instead of a logging framework directly."/>
</module>
<module name="IllegalImport">
<property name="illegalClasses" value="com.google.common.base.Optional, com.google.common.base.Supplier"/>
<message key="import.illegal" value="Use the Java8 version of Guava objects."/>
</module>
<module name="IllegalInstantiation"> <!-- Java Coding Guidelines: Never instantiate primitive types -->
<property name="classes" value="java.lang.Boolean"/>
<property name="classes" value="java.lang.Byte"/>
Expand Down
31 changes: 6 additions & 25 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

buildscript {
repositories {
jcenter()
maven { url "https://plugins.gradle.org/m2/" }
maven { url "http://palantir.bintray.com/releases" }
}

Expand All @@ -26,41 +26,26 @@ buildscript {
classpath 'com.netflix.nebula:gradle-dependency-lock-plugin:4.9.5'
classpath 'com.netflix.nebula:nebula-publishing-plugin:5.1.5'
classpath 'com.palantir.baseline:gradle-baseline-java:0.37.4'
classpath 'com.palantir.gradle.gitversion:gradle-git-version:0.11.0'
classpath 'gradle.plugin.org.inferred:gradle-processors:2.0.0'
}
}

plugins {
id 'com.palantir.git-version' version '0.11.0'
id 'org.inferred.processors' version '1.2.15'
}

apply plugin: 'com.palantir.baseline-config' // provides baselineUpdateConfig task
apply plugin: 'com.palantir.baseline-idea'
apply plugin: 'com.palantir.git-version'
apply plugin: 'com.palantir.baseline'

repositories {
maven { url "http://palantir.bintray.com/releases" }
}

dependencies {
}

allprojects {
version gitVersion()
group 'com.palantir.tracing'

dependencyRecommendations {
strategy OverrideTransitives
propertiesFile file: project.rootProject.file('versions.props')
}
}

subprojects {
apply plugin: 'java'
apply plugin: 'com.palantir.baseline-checkstyle'
apply plugin: 'com.palantir.baseline-eclipse'
apply plugin: 'com.palantir.baseline-idea'
apply plugin: 'com.palantir.baseline-error-prone'
apply plugin: "org.inferred.processors"

repositories {
jcenter()
Expand Down Expand Up @@ -102,11 +87,7 @@ subprojects {

configurations.errorprone {
resolutionStrategy {
force 'com.google.guava:guava:21.0'
force 'com.google.guava:guava:23.6.1-jre'
}
}

tasks.withType(JavaCompile) {
options.compilerArgs += ['-XepDisableWarningsInGeneratedCode']
}
}
5 changes: 2 additions & 3 deletions tracing-api/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
apply plugin: "org.inferred.processors"

apply from: "$rootDir/gradle/publish-jar.gradle"

dependencies {
Expand All @@ -10,5 +8,6 @@ dependencies {
testCompile "org.mockito:mockito-core"
testCompile "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml"

processor "org.immutables:value"
annotationProcessor "org.immutables:value"
compileOnly "org.immutables:value::annotations"
}
3 changes: 2 additions & 1 deletion tracing-jaxrs/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@ dependencies {
testCompile "org.jmock:jmock"
testCompile "org.mockito:mockito-core"

processor "org.immutables:value"
annotationProcessor "org.immutables:value"
compileOnly "org.immutables:value::annotations"
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public final class JaxRsTracersTest {
@Test
public void testWrappingStreamingOutput_streamingOutputTraceIsIsolated() throws Exception {
Tracer.startSpan("outside");
StreamingOutput streamingOutput = JaxRsTracers.wrap((os) -> {
StreamingOutput streamingOutput = JaxRsTracers.wrap(os -> {
Tracer.startSpan("inside"); // never completed
});
streamingOutput.write(new ByteArrayOutputStream());
Expand All @@ -38,7 +38,7 @@ public void testWrappingStreamingOutput_streamingOutputTraceIsIsolated() throws
@Test
public void testWrappingStreamingOutput_traceStateIsCapturedAtConstructionTime() throws Exception {
Tracer.startSpan("before-construction");
StreamingOutput streamingOutput = JaxRsTracers.wrap((os) -> {
StreamingOutput streamingOutput = JaxRsTracers.wrap(os -> {
assertThat(Tracer.completeSpan().get().getOperation()).isEqualTo("before-construction");
});
Tracer.startSpan("after-construction");
Expand Down
3 changes: 0 additions & 3 deletions tracing-jersey/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
* limitations under the License.
*/


apply plugin: 'org.inferred.processors'

apply from: "${rootDir}/gradle/publish-jar.gradle"

dependencies {
Expand Down
2 changes: 0 additions & 2 deletions tracing-okhttp3/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
* limitations under the License.
*/

apply plugin: 'org.inferred.processors'

apply from: "${rootDir}/gradle/publish-jar.gradle"

dependencies {
Expand Down
5 changes: 2 additions & 3 deletions tracing/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
* limitations under the License.
*/

apply plugin: 'org.inferred.processors'

apply from: "${rootDir}/gradle/publish-jar.gradle"

dependencies {
Expand All @@ -35,5 +33,6 @@ dependencies {
testCompile "org.mockito:mockito-core"
testCompile "io.zipkin.java:zipkin"

processor "org.immutables:value"
annotationProcessor "org.immutables:value"
compileOnly "org.immutables:value::annotations"
}
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ protected Runnable wrapTask(Runnable command) {
*
* @throws NullPointerException if any element of {@code tasks} is null
*/
private final <T> ImmutableList<Callable<T>> wrapTasks(
private <T> ImmutableList<Callable<T>> wrapTasks(
Collection<? extends Callable<T>> tasks) {
ImmutableList.Builder<Callable<T>> builder = ImmutableList.builder();
for (Callable<T> task : tasks) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
*/
abstract class WrappingScheduledExecutorService extends WrappingExecutorService
implements ScheduledExecutorService {
final ScheduledExecutorService delegate;
private final ScheduledExecutorService delegate;

protected WrappingScheduledExecutorService(ScheduledExecutorService delegate) {
super(delegate);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

package com.palantir.tracing;

// CHECKSTYLE:OFF

import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Matchers.any;
import static org.mockito.Mockito.never;
Expand Down Expand Up @@ -50,6 +52,7 @@
import zipkin.Codec;
import zipkin.Endpoint;

// CHECKSTYLE:ON

public final class AsyncSlf4jSpanObserverTest {

Expand Down
1 change: 1 addition & 0 deletions tracing/src/test/java/com/palantir/tracing/TracerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ public void after() {
public void testIdsMustBeNonNullAndNotEmpty() throws Exception {
try {
Tracer.initTrace(Optional.empty(), null);
fail("Didn't throw");
} catch (IllegalArgumentException e) {
assertThat(e).hasMessage("traceId must be non-empty: null");
}
Expand Down
2 changes: 1 addition & 1 deletion versions.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ch.qos.logback:logback-classic = 1.1.7
com.fasterxml.jackson.*:jackson-* = 2.9.5
com.google.guava:guava = 20.0
com.google.guava:guava = 23.6.1-jre
com.palantir.safe-logging:* = 1.3.0
com.squareup.okhttp3:okhttp = 3.9.0
io.dropwizard:dropwizard-* = 1.3.1
Expand Down