-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed minor compilation errors in their static analysis. But the plugin assumes a commercial installation for local analysis. The open-source portal doesn't seem to accept the emit-db due to not having a build-log.txt file. So more debugging is required to figure out how to integrate with Coverity Scan. Despite that, merging since the changes were benign and we might get it working in the future.
- Loading branch information
Showing
15 changed files
with
63 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,11 +15,13 @@ | |
*/ | ||
package com.github.benmanes.caffeine.cache.testing; | ||
|
||
import java.io.Serializable; | ||
import java.util.concurrent.TimeUnit; | ||
|
||
import com.github.benmanes.caffeine.cache.Cache; | ||
import com.github.benmanes.caffeine.cache.Caffeine; | ||
import com.github.benmanes.caffeine.cache.RandomSeedEnforcer; | ||
import com.github.benmanes.caffeine.cache.Ticker; | ||
import com.github.benmanes.caffeine.cache.testing.CacheSpec.CacheExecutor; | ||
import com.github.benmanes.caffeine.cache.testing.CacheSpec.CacheWeigher; | ||
import com.github.benmanes.caffeine.cache.testing.CacheSpec.Expire; | ||
|
@@ -34,6 +36,7 @@ | |
* @author [email protected] (Ben Manes) | ||
*/ | ||
public final class CaffeineCacheFromContext { | ||
interface SerializableTicker extends Ticker, Serializable {} | ||
|
||
private CaffeineCacheFromContext() {} | ||
|
||
|
@@ -65,7 +68,8 @@ public static <K, V> Cache<K, V> newCaffeineCache(CacheContext context) { | |
builder.refreshAfterWrite(context.refresh.timeNanos(), TimeUnit.NANOSECONDS); | ||
} | ||
if (context.expires() || context.refreshes()) { | ||
builder.ticker(context.ticker()); | ||
SerializableTicker ticker = context.ticker()::read; | ||
builder.ticker(ticker); | ||
} | ||
if (context.keyStrength == ReferenceType.WEAK) { | ||
builder.weakKeys(); | ||
|
28 changes: 0 additions & 28 deletions
28
caffeine/src/test/java/com/github/benmanes/caffeine/cache/testing/FakeTicker.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.