From c88f578602bb5990dd4804a84dbd2229d91c4d0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20Rosick=C3=BD?= Date: Wed, 20 Mar 2024 15:03:52 +0100 Subject: [PATCH] fix jruby warnings --- ext/nio4r/org/nio4r/ByteBuffer.java | 2 +- ext/nio4r/org/nio4r/Monitor.java | 4 ++-- ext/nio4r/org/nio4r/Selector.java | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ext/nio4r/org/nio4r/ByteBuffer.java b/ext/nio4r/org/nio4r/ByteBuffer.java index 05480f7..8764b7c 100644 --- a/ext/nio4r/org/nio4r/ByteBuffer.java +++ b/ext/nio4r/org/nio4r/ByteBuffer.java @@ -27,7 +27,7 @@ */ public class ByteBuffer extends RubyObject { private static final long serialVersionUID = -6903439483039149324L; - private java.nio.ByteBuffer byteBuffer; + private transient java.nio.ByteBuffer byteBuffer; public static RaiseException newOverflowError(ThreadContext context, String message) { RubyClass klass = context.runtime.getModule("NIO").getClass("ByteBuffer").getClass("OverflowError"); diff --git a/ext/nio4r/org/nio4r/Monitor.java b/ext/nio4r/org/nio4r/Monitor.java index c723073..bfe5d1c 100644 --- a/ext/nio4r/org/nio4r/Monitor.java +++ b/ext/nio4r/org/nio4r/Monitor.java @@ -14,9 +14,9 @@ public class Monitor extends RubyObject { private static final long serialVersionUID = -3733782997115074794L; - private SelectionKey key; + private transient SelectionKey key; private RubyIO io; - private IRubyObject interests, selector, value, closed; + private transient IRubyObject interests, selector, value, closed; public Monitor(final Ruby ruby, RubyClass rubyClass) { super(ruby, rubyClass); diff --git a/ext/nio4r/org/nio4r/Selector.java b/ext/nio4r/org/nio4r/Selector.java index 016ec35..99c0f28 100644 --- a/ext/nio4r/org/nio4r/Selector.java +++ b/ext/nio4r/org/nio4r/Selector.java @@ -22,7 +22,7 @@ public class Selector extends RubyObject { private static final long serialVersionUID = -14562818539414873L; - private java.nio.channels.Selector selector; + private transient java.nio.channels.Selector selector; private HashMap cancelledKeys; private volatile boolean wakeupFired; @@ -234,7 +234,7 @@ private int doSelect(Ruby runtime, ThreadContext context, IRubyObject timeout) { cancelKeys(); try { - context.getThread().beforeBlockingCall(); + context.getThread().beforeBlockingCall(context); if(timeout.isNil()) { result = this.selector.select(); } else {