author | erikj |
Tue, 12 Sep 2017 19:03:39 +0200 | |
changeset 47216 | 71c04702a3d5 |
parent 36858 | jdk/test/sun/net/ftp/FtpURLConnectionLeak.java@53f90d1cdac4 |
child 52113 | f48838bdcc31 |
permissions | -rw-r--r-- |
36858
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
1 |
/* |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
2 |
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
4 |
* |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
8 |
* |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
13 |
* accompanied this code). |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
14 |
* |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
18 |
* |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
21 |
* questions. |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
22 |
*/ |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
23 |
|
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
24 |
/* |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
25 |
* @test |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
26 |
* @bug 7167293 |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
27 |
* @summary FtpURLConnection doesn't close FTP connection when FileNotFoundException is thrown |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
28 |
* @library ../www/ftptest/ |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
29 |
* @build FtpServer FtpCommandHandler FtpAuthHandler FtpFileSystemHandler |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
30 |
* @run main FtpURLConnectionLeak |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
31 |
*/ |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
32 |
import java.io.FileNotFoundException; |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
33 |
import java.io.IOException; |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
34 |
import java.io.InputStream; |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
35 |
import java.io.OutputStream; |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
36 |
import java.net.URL; |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
37 |
|
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
38 |
public class FtpURLConnectionLeak { |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
39 |
|
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
40 |
public static void main(String[] args) throws Exception { |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
41 |
FtpServer server = new FtpServer(0); |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
42 |
server.setFileSystemHandler(new CustomFileSystemHandler("/")); |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
43 |
server.setAuthHandler(new MyAuthHandler()); |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
44 |
int port = server.getLocalPort(); |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
45 |
server.start(); |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
46 |
URL url = new URL("ftp://localhost:" + port + "/filedoesNotExist.txt"); |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
47 |
for (int i = 0; i < 3; i++) { |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
48 |
try { |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
49 |
InputStream stream = url.openStream(); |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
50 |
} catch (FileNotFoundException expectedFirstTimeAround) { |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
51 |
// should always reach this point since the path does not exist |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
52 |
} catch (IOException expected) { |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
53 |
System.out.println("caught expected " + expected); |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
54 |
int times = 1; |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
55 |
do { |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
56 |
// give some time to close the connection... |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
57 |
System.out.println("sleeping... " + times); |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
58 |
Thread.sleep(times * 1000); |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
59 |
} while (server.activeClientsCount() > 0 && times++ < 5); |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
60 |
|
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
61 |
if (server.activeClientsCount() > 0) { |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
62 |
server.killClients(); |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
63 |
throw new RuntimeException("URLConnection didn't close the" + |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
64 |
" FTP connection on FileNotFoundException"); |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
65 |
} |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
66 |
} finally { |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
67 |
server.terminate(); |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
68 |
} |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
69 |
} |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
70 |
} |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
71 |
|
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
72 |
static class CustomFileSystemHandler implements FtpFileSystemHandler { |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
73 |
|
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
74 |
private String currentDir; |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
75 |
|
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
76 |
public CustomFileSystemHandler(String path) { |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
77 |
currentDir = path; |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
78 |
} |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
79 |
|
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
80 |
@Override |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
81 |
public boolean cd(String path) { |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
82 |
currentDir = path; |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
83 |
return true; |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
84 |
} |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
85 |
|
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
86 |
@Override |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
87 |
public boolean cdUp() { |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
88 |
throw new UnsupportedOperationException("Not supported yet."); |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
89 |
} |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
90 |
|
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
91 |
@Override |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
92 |
public String pwd() { |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
93 |
throw new UnsupportedOperationException("Not supported yet."); |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
94 |
} |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
95 |
|
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
96 |
@Override |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
97 |
public boolean fileExists(String name) { |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
98 |
throw new UnsupportedOperationException("Not supported yet."); |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
99 |
} |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
100 |
|
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
101 |
@Override |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
102 |
public InputStream getFile(String name) { |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
103 |
return null; //return null so that server will return 550 File not found. |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
104 |
} |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
105 |
|
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
106 |
@Override |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
107 |
public long getFileSize(String name) { |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
108 |
throw new UnsupportedOperationException("Not supported yet."); |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
109 |
} |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
110 |
|
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
111 |
@Override |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
112 |
public InputStream listCurrentDir() { |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
113 |
return null; |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
114 |
} |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
115 |
|
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
116 |
@Override |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
117 |
public OutputStream putFile(String name) { |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
118 |
throw new UnsupportedOperationException("Not supported yet."); |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
119 |
} |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
120 |
|
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
121 |
@Override |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
122 |
public boolean removeFile(String name) { |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
123 |
throw new UnsupportedOperationException("Not supported yet."); |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
124 |
} |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
125 |
|
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
126 |
@Override |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
127 |
public boolean mkdir(String name) { |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
128 |
throw new UnsupportedOperationException("Not supported yet."); |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
129 |
} |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
130 |
|
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
131 |
@Override |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
132 |
public boolean rename(String from, String to) { |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
133 |
throw new UnsupportedOperationException("Not supported yet."); |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
134 |
} |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
135 |
|
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
136 |
} |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
137 |
|
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
138 |
static class MyAuthHandler implements FtpAuthHandler { |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
139 |
|
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
140 |
@Override |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
141 |
public int authType() { |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
142 |
return 0; |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
143 |
} |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
144 |
|
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
145 |
@Override |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
146 |
public boolean authenticate(String user, String password) { |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
147 |
return true; |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
148 |
} |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
149 |
|
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
150 |
@Override |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
151 |
public boolean authenticate(String user, String password, String account) { |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
152 |
return true; |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
153 |
} |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
154 |
} |
53f90d1cdac4
7167293: FtpURLConnection connection leak on FileNotFoundException
vtewari
parents:
diff
changeset
|
155 |
} |