add @SuppressWarnings(NonAtomicVolatileUpdate) (#5606)

Co-authored-by: 吴晟 Wu Sheng <wu.sheng@foxmail.com>
This commit is contained in:
Xin,Zhang 2020-10-01 17:28:18 +08:00 committed by GitHub
parent 6f99a24c43
commit 1cddb60a00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -30,6 +30,7 @@ import org.apache.skywalking.apm.commons.datacarrier.buffer.QueueBuffer;
public class MultipleChannelsConsumer extends Thread {
private volatile boolean running;
private volatile ArrayList<Group> consumeTargets;
@SuppressWarnings("NonAtomicVolatileUpdate")
private volatile long size;
private final long consumeCycle;

View File

@ -22,6 +22,7 @@ package org.apache.skywalking.apm.commons.datacarrier.partition;
* use normal int to rolling.
*/
public class SimpleRollingPartitioner<T> implements IDataPartitioner<T> {
@SuppressWarnings("NonAtomicVolatileUpdate")
private volatile int i = 0;
@Override