From 018467598ec9d771daacae70b5397ad568b2ca80 Mon Sep 17 00:00:00 2001 From: Endi Sukma Dewata Date: Mon, 26 Mar 2012 21:43:20 -0500 Subject: Replaced deprecated DataInputStream.readLine(). The deprecated readLine() method in DataInputStream has been replaced by the same method in BufferedReader. Ticket #3 --- .../com/netscape/cms/publish/publishers/OCSPPublisher.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'base/common/src/com/netscape/cms/publish/publishers') diff --git a/base/common/src/com/netscape/cms/publish/publishers/OCSPPublisher.java b/base/common/src/com/netscape/cms/publish/publishers/OCSPPublisher.java index 600bbd110..f3e9d3c6f 100644 --- a/base/common/src/com/netscape/cms/publish/publishers/OCSPPublisher.java +++ b/base/common/src/com/netscape/cms/publish/publishers/OCSPPublisher.java @@ -17,8 +17,9 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.cms.publish.publishers; -import java.io.DataInputStream; +import java.io.BufferedReader; import java.io.IOException; +import java.io.InputStreamReader; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.net.Socket; @@ -44,7 +45,7 @@ import com.netscape.cmsutil.http.JssSSLSocketFactory; /** * This publisher writes certificate and CRL into * a directory. - * + * * @version $Revision$, $Date$ */ public class OCSPPublisher implements ILdapPublisher, IExtendedPluginInfo { @@ -202,7 +203,7 @@ public class OCSPPublisher implements ILdapPublisher, IExtendedPluginInfo { /** * Publishs a object to the ldap directory. - * + * * @param conn a Ldap connection * (null if LDAP publishing is not enabled) * @param dn dn of the ldap entry to publish cert @@ -299,7 +300,7 @@ public class OCSPPublisher implements ILdapPublisher, IExtendedPluginInfo { // Read the response mLogger.log(ILogger.EV_SYSTEM, ILogger.S_OTHER, ILogger.LL_INFO, "OCSPPublisher: start getting response"); - DataInputStream dis = new DataInputStream(socket.getInputStream()); + BufferedReader dis = new BufferedReader(new InputStreamReader(socket.getInputStream())); String nextline; String error = ""; boolean status = false; @@ -340,7 +341,7 @@ public class OCSPPublisher implements ILdapPublisher, IExtendedPluginInfo { /** * Unpublishs a object to the ldap directory. - * + * * @param conn the Ldap connection * (null if LDAP publishing is not enabled) * @param dn dn of the ldap entry to unpublish cert -- cgit