Skip to content

Commit 98a6162

Browse files
committed
minor cleanup
1 parent 6260067 commit 98a6162

File tree

1 file changed

+5
-4
lines changed
  • graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/socket

1 file changed

+5
-4
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/socket/SocketBuiltins.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@
4141
package com.oracle.graal.python.builtins.objects.socket;
4242

4343
import java.io.IOException;
44-
import java.net.*;
44+
import java.net.InetAddress;
45+
import java.net.InetSocketAddress;
46+
import java.net.SocketAddress;
47+
import java.net.SocketException;
4548
import java.nio.ByteBuffer;
4649
import java.nio.channels.ServerSocketChannel;
4750
import java.nio.channels.SocketChannel;
@@ -57,7 +60,6 @@
5760
import com.oracle.graal.python.builtins.objects.bytes.PByteArray;
5861
import com.oracle.graal.python.builtins.objects.bytes.PBytes;
5962
import com.oracle.graal.python.builtins.objects.bytes.PIBytesLike;
60-
import com.oracle.graal.python.builtins.objects.exception.OSErrorEnum;
6163
import com.oracle.graal.python.builtins.objects.tuple.PTuple;
6264
import com.oracle.graal.python.nodes.function.PythonBuiltinBaseNode;
6365
import com.oracle.graal.python.nodes.function.PythonBuiltinNode;
@@ -69,7 +71,6 @@
6971
import com.oracle.truffle.api.dsl.GenerateNodeFactory;
7072
import com.oracle.truffle.api.dsl.NodeFactory;
7173
import com.oracle.truffle.api.dsl.Specialization;
72-
import com.oracle.truffle.api.frame.VirtualFrame;
7374

7475
@CoreFunctions(extendClasses = PythonBuiltinClassType.PSocket)
7576
@SuppressWarnings("unused")
@@ -158,7 +159,7 @@ else if (socket.getServerSocket() != null) {
158159
throw raise(PythonBuiltinClassType.OSError, "Bad file descriptor");
159160
}
160161
}
161-
getContext().getResources().closeSocket(socket.getFileno());
162+
getContext().getResources().close(socket.getFileno());
162163
return PNone.NONE;
163164
}
164165
}

0 commit comments

Comments
 (0)