Skip to content

Commit

Permalink
Fixed the JDK version compatibility issue with Buffer class
Browse files Browse the repository at this point in the history
  • Loading branch information
endoplasmicR authored and cyrille-leclerc committed Feb 28, 2021
1 parent 8f57ffa commit 66c8e01
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/org/jmxtrans/agent/StatsDOutputWriter.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
*/
package org.jmxtrans.agent;

import java.nio.Buffer;
import org.jmxtrans.agent.util.CachingReference;
import org.jmxtrans.agent.util.ConfigurationUtils;
import org.jmxtrans.agent.util.StringUtils2;
Expand Down Expand Up @@ -228,7 +229,7 @@ public synchronized boolean flush() {
} // empty buffer

// send and reset the buffer
sendBuffer.flip();
((Buffer)sendBuffer).flip();
final int nbSentBytes = channel.send(sendBuffer, address);
sendBuffer.limit(sendBuffer.capacity());
sendBuffer.rewind();
Expand Down

0 comments on commit 66c8e01

Please sign in to comment.