URL oauth = new URL(URL);
URLConnection oauth_connection = oauth.openConnection();
BufferedReader in = new BufferedReader(new InputStreamReader(
oauth_connection.getInputStream()));
String inputLine = "";
String line;
//System.out.println(in.readLine());
while((line = in.readLine()) != null)
inputLine += line;
in.close();
BufferedReader
在该行引发异常:
线程“主”javax.net.ssl.SSLHandshakeException 中的异常:sun.security.validator.ValidatorException:PKIX 路径构建失败:sun.security.provider.certpath.SunCertPathBuilderException:无法在 sun.security 中找到请求目标的有效证书路径.ssl.Alerts.getSSLException(Unknown Source) at sun.security.ssl.SSLSocketImpl.fatal(Unknown Source) at sun.security.ssl.Handshaker.fatalSE(Unknown Source) at sun.security.ssl.Handshaker.fatalSE(Unknown源) 在 sun.security.ssl.ClientHandshaker.serverCertificate(Unknown Source) 在 sun.security.ssl.ClientHandshaker.processMessage(Unknown Source) 在 sun.security.ssl.Handshaker.processLoop(Unknown Source) 在 sun.security.ssl sun.security.ssl.SSLSocketImpl 的 .Handshaker.process_record(未知来源)。readRecord(Unknown Source) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source) at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source) at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source) at sun。 net.www.protocol.https.HttpsClient.afterConnect(Unknown Source) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source ) 在 sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source) 的 HttpsClient.afterConnect(Unknown Source) sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) sun.net.www。协议.https.HttpsURLConnectionImpl.getInputStream(未知来源)sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source) 的 HttpsClient.afterConnect(Unknown Source) sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) sun.net.www。协议.https.HttpsURLConnectionImpl.getInputStream(未知来源)