Skip to content

Commit

Permalink
Fixed checkstyle formatting
Browse files Browse the repository at this point in the history
Upgraded detekt version
  • Loading branch information
sheinbergon committed Oct 17, 2020
1 parent cf83f85 commit 2d8d53c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class AffinityAgentTest {

private val secondCoreAffinity = AffinityDescriptor.from(`2L`)

private val defaultAffinity = org.sheinbergon.needle.default
private val defaultAffinity = default
}

@BeforeEach
Expand All @@ -32,7 +32,7 @@ class AffinityAgentTest {
val agentFile = Paths.get(agentUrl.toURI()).toFile().absolutePath
val pid = ProcessHandle.current().pid()
val vm = VirtualMachine.attach(pid.toString())
vm.loadAgent(agentFile, CONFIGURATION_PATH);
vm.loadAgent(agentFile, CONFIGURATION_PATH)
vm.detach()
}

Expand Down Expand Up @@ -67,7 +67,6 @@ class AffinityAgentTest {
affinity.toString() shouldBeEqualTo defaultAffinity.toString()
}


@Test
fun `Verify NeedleAffinity annotation agent exclusion`() {
lateinit var affinity: AffinityDescriptor
Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins {
id 'maven-publish'
id 'io.codearte.nexus-staging' version '0.22.0'
id "org.jetbrains.kotlin.jvm" version "1.4.10"
id "io.gitlab.arturbosch.detekt" version "1.10.0"
id "io.gitlab.arturbosch.detekt" version "1.14.1"
id 'io.franzbecker.gradle-lombok' version '3.3.0'
}

Expand Down Expand Up @@ -91,13 +91,13 @@ subprojects {
}

checkstyle {
toolVersion '8.34'
toolVersion '8.36.2'
configFile file("$rootDir/checkstyle.xml")
configDir rootDir
}

detekt {
toolVersion = "1.10.0"
toolVersion = "1.14.1"
config = files("$rootDir/detekt.yml")
input = files("src/main/kotlin", "src/test/kotlin")
buildUponDefaultConfig = true
Expand Down
6 changes: 6 additions & 0 deletions core/src/main/java/org/sheinbergon/needle/Pinned.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@

public interface Pinned {

/**
* Get the current `Pinned` if executing from within one.
*
* @return an {@code Optional} containing the current {@link Pinned},
* or empty if the calling code does not run within one.
*/
@Nonnull
static Optional<Pinned> current() {
return Optional.of(Thread.currentThread())
Expand Down
2 changes: 1 addition & 1 deletion core/src/test/kotlin/org/sheinbergon/needle/PinnedTest.kt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.sheinbergon.needle;
package org.sheinbergon.needle

import kotlinx.atomicfu.AtomicRef
import kotlinx.atomicfu.atomic
Expand Down

0 comments on commit 2d8d53c

Please sign in to comment.