Skip to content

Commit

Permalink
Issue #64 Refactor project according to IntelliJ inspection suggestions.
Browse files Browse the repository at this point in the history
  • Loading branch information
simondelabici committed Mar 24, 2020
1 parent 93f306f commit e48fa30
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main/java/org/epics/ca/impl/search/ChannelSearchManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -160,17 +160,17 @@ public void cancel()
/**
* Broadcast transport.
*/
private BroadcastTransport broadcastTransport;
private final BroadcastTransport broadcastTransport;

/**
* Search (datagram) sequence number.
*/
private volatile int sequenceNumber = 0;
private final AtomicInteger sequenceNumber = new AtomicInteger( 0 );

/**
* Send byte buffer (frame)
*/
private ByteBuffer sendBuffer;
private final ByteBuffer sendBuffer;

/**
* Constructor.
Expand Down Expand Up @@ -198,8 +198,8 @@ private void initializeSendBuffer()
sendBuffer.clear ();

// put version message
sequenceNumber++;
Messages.generateVersionRequestMessage (broadcastTransport, sendBuffer, (short) 0, sequenceNumber, true);
sequenceNumber.incrementAndGet();
Messages.generateVersionRequestMessage (broadcastTransport, sendBuffer, (short) 0, sequenceNumber.get(), true);
}

/**
Expand Down

0 comments on commit e48fa30

Please sign in to comment.