Skip to content

Commit

Permalink
Using Object instead of a specific type irritates some thread safety …
Browse files Browse the repository at this point in the history
…tests. Fix that.

RELNOTES=n/a

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=172504355
  • Loading branch information
lowasser authored and cpovirk committed Oct 17, 2017
1 parent 2f63703 commit 01d18f2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Expand Up @@ -321,9 +321,9 @@ private static final class WeakSafeLock extends ForwardingLock {
private final Lock delegate;

@SuppressWarnings("unused")
private final Object strongReference;
private final WeakSafeReadWriteLock strongReference;

WeakSafeLock(Lock delegate, Object strongReference) {
WeakSafeLock(Lock delegate, WeakSafeReadWriteLock strongReference) {
this.delegate = delegate;
this.strongReference = strongReference;
}
Expand All @@ -344,9 +344,9 @@ private static final class WeakSafeCondition extends ForwardingCondition {
private final Condition delegate;

@SuppressWarnings("unused")
private final Object strongReference;
private final WeakSafeReadWriteLock strongReference;

WeakSafeCondition(Condition delegate, Object strongReference) {
WeakSafeCondition(Condition delegate, WeakSafeReadWriteLock strongReference) {
this.delegate = delegate;
this.strongReference = strongReference;
}
Expand Down
8 changes: 4 additions & 4 deletions guava/src/com/google/common/util/concurrent/Striped.java
Expand Up @@ -321,9 +321,9 @@ private static final class WeakSafeLock extends ForwardingLock {
private final Lock delegate;

@SuppressWarnings("unused")
private final Object strongReference;
private final WeakSafeReadWriteLock strongReference;

WeakSafeLock(Lock delegate, Object strongReference) {
WeakSafeLock(Lock delegate, WeakSafeReadWriteLock strongReference) {
this.delegate = delegate;
this.strongReference = strongReference;
}
Expand All @@ -344,9 +344,9 @@ private static final class WeakSafeCondition extends ForwardingCondition {
private final Condition delegate;

@SuppressWarnings("unused")
private final Object strongReference;
private final WeakSafeReadWriteLock strongReference;

WeakSafeCondition(Condition delegate, Object strongReference) {
WeakSafeCondition(Condition delegate, WeakSafeReadWriteLock strongReference) {
this.delegate = delegate;
this.strongReference = strongReference;
}
Expand Down

0 comments on commit 01d18f2

Please sign in to comment.