changeset 13443:a32e78dc747d

8146567: Remove dead code finalizer methods Reviewed-by: dfuchs, alanb
author rriggs
date Mon, 11 Jan 2016 10:24:20 -0500
parents 8630d3de3737
children 5be075daee3a
files src/java.base/share/classes/sun/net/www/http/HttpClient.java src/java.base/share/classes/sun/net/www/protocol/jar/URLJarFile.java
diffstat 2 files changed, 2 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/sun/net/www/http/HttpClient.java	Mon Jan 11 10:03:36 2016 -0500
+++ b/src/java.base/share/classes/sun/net/www/http/HttpClient.java	Mon Jan 11 10:24:20 2016 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -967,12 +967,6 @@
         return "";
     }
 
-    @Override
-    protected void finalize() throws Throwable {
-        // This should do nothing.  The stream finalizer will
-        // close the fd.
-    }
-
     public void setDoNotRetry(boolean value) {
         // failedOnce is used to determine if a request should be retried.
         failedOnce = value;
--- a/src/java.base/share/classes/sun/net/www/protocol/jar/URLJarFile.java	Mon Jan 11 10:03:36 2016 -0500
+++ b/src/java.base/share/classes/sun/net/www/protocol/jar/URLJarFile.java	Mon Jan 11 10:24:20 2016 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -108,13 +108,6 @@
         return false;
     }
 
-    /*
-     * close the jar file.
-     */
-    protected void finalize() throws IOException {
-        close();
-    }
-
     /**
      * Returns the <code>ZipEntry</code> for the given entry name or
      * <code>null</code> if not found.