Skip to content

Commit d885e9b

Browse files
authored
fix jruby warnings (#313)
1 parent bb52935 commit d885e9b

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

ext/nio4r/org/nio4r/ByteBuffer.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
*/
2828
public class ByteBuffer extends RubyObject {
2929
private static final long serialVersionUID = -6903439483039149324L;
30-
private java.nio.ByteBuffer byteBuffer;
30+
private transient java.nio.ByteBuffer byteBuffer;
3131

3232
public static RaiseException newOverflowError(ThreadContext context, String message) {
3333
RubyClass klass = context.runtime.getModule("NIO").getClass("ByteBuffer").getClass("OverflowError");

ext/nio4r/org/nio4r/Monitor.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414

1515
public class Monitor extends RubyObject {
1616
private static final long serialVersionUID = -3733782997115074794L;
17-
private SelectionKey key;
17+
private transient SelectionKey key;
1818
private RubyIO io;
19-
private IRubyObject interests, selector, value, closed;
19+
private transient IRubyObject interests, selector, value, closed;
2020

2121
public Monitor(final Ruby ruby, RubyClass rubyClass) {
2222
super(ruby, rubyClass);

ext/nio4r/org/nio4r/Selector.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
public class Selector extends RubyObject {
2424
private static final long serialVersionUID = -14562818539414873L;
25-
private java.nio.channels.Selector selector;
25+
private transient java.nio.channels.Selector selector;
2626
private HashMap<SelectableChannel,SelectionKey> cancelledKeys;
2727
private volatile boolean wakeupFired;
2828

@@ -234,7 +234,7 @@ private int doSelect(Ruby runtime, ThreadContext context, IRubyObject timeout) {
234234

235235
cancelKeys();
236236
try {
237-
context.getThread().beforeBlockingCall();
237+
context.getThread().beforeBlockingCall(context);
238238
if(timeout.isNil()) {
239239
result = this.selector.select();
240240
} else {

0 commit comments

Comments
 (0)