Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions src/java.rmi/share/classes/sun/rmi/log/LogInputStream.java
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,4 @@ public int available() throws IOException {
public void close() {
length = 0;
}

/**
* Closes the stream when garbage is collected.
*/
@SuppressWarnings("removal")
protected void finalize() throws IOException {
close();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,6 @@ public RegistryContext(String host, int port, Hashtable<?, ?> env)
reference = ctx.reference;
}

@SuppressWarnings("removal")
protected void finalize() {
close();
}

public Object lookup(Name name) throws NamingException {
if (name.isEmpty()) {
return (new RegistryContext(this));
Expand Down Expand Up @@ -557,11 +552,6 @@ class BindingEnumeration implements NamingEnumeration<Binding> {
nextName = 0;
}

@SuppressWarnings("removal")
protected void finalize() {
ctx.close();
}

public boolean hasMore() {
if (nextName >= names.length) {
ctx.close();
Expand Down Expand Up @@ -598,8 +588,7 @@ public Binding nextElement() {
}
}

@SuppressWarnings("deprecation")
public void close () {
finalize();
ctx.close();
}
}
Loading