Skip to content

Commit

Permalink
SI-7484 Add @SupressWarning(rawtypes/unchecked)
Browse files Browse the repository at this point in the history
  • Loading branch information
soc committed May 17, 2013
1 parent be405ee commit cba29e6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/library/scala/collection/concurrent/CNodeBase.java
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@


abstract class CNodeBase<K, V> extends MainNode<K, V> { abstract class CNodeBase<K, V> extends MainNode<K, V> {


@SuppressWarnings("rawtypes")
public static final AtomicIntegerFieldUpdater<CNodeBase> updater = AtomicIntegerFieldUpdater.newUpdater(CNodeBase.class, "csize"); public static final AtomicIntegerFieldUpdater<CNodeBase> updater = AtomicIntegerFieldUpdater.newUpdater(CNodeBase.class, "csize");


public volatile int csize = -1; public volatile int csize = -1;
Expand Down
1 change: 1 addition & 0 deletions src/library/scala/collection/concurrent/INodeBase.java
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@


abstract class INodeBase<K, V> extends BasicNode { abstract class INodeBase<K, V> extends BasicNode {


@SuppressWarnings("rawtypes")
public static final AtomicReferenceFieldUpdater<INodeBase, MainNode> updater = AtomicReferenceFieldUpdater.newUpdater(INodeBase.class, MainNode.class, "mainnode"); public static final AtomicReferenceFieldUpdater<INodeBase, MainNode> updater = AtomicReferenceFieldUpdater.newUpdater(INodeBase.class, MainNode.class, "mainnode");


public static final Object RESTART = new Object(); public static final Object RESTART = new Object();
Expand Down
2 changes: 2 additions & 0 deletions src/library/scala/collection/concurrent/MainNode.java
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@


abstract class MainNode<K, V> extends BasicNode { abstract class MainNode<K, V> extends BasicNode {


@SuppressWarnings("rawtypes")
public static final AtomicReferenceFieldUpdater<MainNode, MainNode> updater = AtomicReferenceFieldUpdater.newUpdater(MainNode.class, MainNode.class, "prev"); public static final AtomicReferenceFieldUpdater<MainNode, MainNode> updater = AtomicReferenceFieldUpdater.newUpdater(MainNode.class, MainNode.class, "prev");


public volatile MainNode<K, V> prev = null; public volatile MainNode<K, V> prev = null;
Expand All @@ -33,6 +34,7 @@ public void WRITE_PREV(MainNode<K, V> nval) {
// do we need this? unclear in the javadocs... // do we need this? unclear in the javadocs...
// apparently not - volatile reads are supposed to be safe // apparently not - volatile reads are supposed to be safe
// irregardless of whether there are concurrent ARFU updates // irregardless of whether there are concurrent ARFU updates
@Deprecated @SuppressWarnings("unchecked")
public MainNode<K, V> READ_PREV() { public MainNode<K, V> READ_PREV() {
return updater.get(this); return updater.get(this);
} }
Expand Down

0 comments on commit cba29e6

Please sign in to comment.