diff options
author | Adam Young <ayoung@redhat.com> | 2011-12-05 17:42:21 -0500 |
---|---|---|
committer | Adam Young <ayoung@redhat.com> | 2011-12-05 20:14:07 -0500 |
commit | 3c1a4af339dc1761b3a68abe9b0f26bd3cb389cf (patch) | |
tree | 0dc5335d8b0e21c2801ac04cf3470e1efbcff92a /pki/base/silent/src/com/netscape/pkisilent/http | |
parent | 8bcaa20e72e97b9392cc65bd3428a93170720b77 (diff) | |
download | pki-3c1a4af339dc1761b3a68abe9b0f26bd3cb389cf.tar.gz pki-3c1a4af339dc1761b3a68abe9b0f26bd3cb389cf.tar.xz pki-3c1a4af339dc1761b3a68abe9b0f26bd3cb389cf.zip |
PKISilent type safety changes
Specifies the types for the collections.
Changes no behavior, and, due to erasure, should not even change the resulting byte code.
Diffstat (limited to 'pki/base/silent/src/com/netscape/pkisilent/http')
4 files changed, 29 insertions, 29 deletions
diff --git a/pki/base/silent/src/com/netscape/pkisilent/http/CertSelection.java b/pki/base/silent/src/com/netscape/pkisilent/http/CertSelection.java index a759cca2c..078bb5882 100644 --- a/pki/base/silent/src/com/netscape/pkisilent/http/CertSelection.java +++ b/pki/base/silent/src/com/netscape/pkisilent/http/CertSelection.java @@ -33,7 +33,7 @@ public class CertSelection implements SSLClientCertificateSelectionCallback client_cert = nickname; } - public String select(Vector nicknames) + public String select(@SuppressWarnings("rawtypes") Vector nicknames) { // when this method is called by SSLSocket we get a vector diff --git a/pki/base/silent/src/com/netscape/pkisilent/http/HTMLDocument.java b/pki/base/silent/src/com/netscape/pkisilent/http/HTMLDocument.java index 8d6048dea..df95f8611 100644 --- a/pki/base/silent/src/com/netscape/pkisilent/http/HTMLDocument.java +++ b/pki/base/silent/src/com/netscape/pkisilent/http/HTMLDocument.java @@ -35,16 +35,16 @@ public class HTMLDocument // A list of URLs of files that should be retrieved along with the main // contents of the document. This may include any images contained in the // document, and possibly any external stylesheets. - LinkedHashSet associatedFiles; + LinkedHashSet<String> associatedFiles; // A list of URLs of frames that are contained in the document. - LinkedHashSet documentFrames; + LinkedHashSet<String> documentFrames; // A list of URLs of links that are contained in the document. - LinkedHashSet documentLinks; + LinkedHashSet<String> documentLinks; // A list of URLs of images that are contained in the document. - LinkedHashSet documentImages; + LinkedHashSet<String> documentImages; // A regular expression pattern that can be used to extract a URI from an HREF // tag. @@ -210,10 +210,10 @@ public class HTMLDocument try { - associatedFiles = new LinkedHashSet(); - documentFrames = new LinkedHashSet(); - documentLinks = new LinkedHashSet(); - documentImages = new LinkedHashSet(); + associatedFiles = new LinkedHashSet<String>(); + documentFrames = new LinkedHashSet<String>(); + documentLinks = new LinkedHashSet<String>(); + documentImages = new LinkedHashSet<String>(); textData = new StringBuffer(); lastElementStartPos = 0; diff --git a/pki/base/silent/src/com/netscape/pkisilent/http/HTTPClient.java b/pki/base/silent/src/com/netscape/pkisilent/http/HTTPClient.java index 4431be8ef..9c840fcdc 100644 --- a/pki/base/silent/src/com/netscape/pkisilent/http/HTTPClient.java +++ b/pki/base/silent/src/com/netscape/pkisilent/http/HTTPClient.java @@ -1008,7 +1008,7 @@ public class HTTPClient implements SSLCertificateApprovalCallback { // Create an array list that we will use to hold the chunks of information // read from the server. - ArrayList bufferList = new ArrayList(); + ArrayList<ByteBuffer> bufferList = new ArrayList<ByteBuffer>(); // Create a variable to hold the total number of bytes in the data. diff --git a/pki/base/silent/src/com/netscape/pkisilent/http/HTTPResponse.java b/pki/base/silent/src/com/netscape/pkisilent/http/HTTPResponse.java index 5b88ac277..08358f357 100644 --- a/pki/base/silent/src/com/netscape/pkisilent/http/HTTPResponse.java +++ b/pki/base/silent/src/com/netscape/pkisilent/http/HTTPResponse.java @@ -27,13 +27,13 @@ import com.netscape.pkisilent.common.Utilities; public class HTTPResponse { // The set of cookie values included in this response. - ArrayList cookieValueList; + ArrayList<String> cookieValueList; // The names of the headers included in this response. - ArrayList headerNameList; + ArrayList<String> headerNameList; // The values of the headers included in this response. - ArrayList headerValueList; + ArrayList<String> headerValueList; // The actual data associated with this response. byte[] responseData; @@ -57,8 +57,8 @@ public class HTTPResponse String responseMessage; // Parsed Content Name/Value pair info - ArrayList contentName; - ArrayList contentValue; + ArrayList<String> contentName; + ArrayList<String> contentValue; @@ -80,11 +80,11 @@ public class HTTPResponse contentType = null; contentLength = -1; responseData = new byte[0]; - cookieValueList = new ArrayList(); - headerNameList = new ArrayList(); - headerValueList = new ArrayList(); - contentName = new ArrayList(); - contentValue = new ArrayList(); + cookieValueList = new ArrayList<String>(); + headerNameList = new ArrayList<String>(); + headerValueList = new ArrayList<String>(); + contentName = new ArrayList<String>(); + contentValue = new ArrayList<String>(); } @@ -141,7 +141,7 @@ public class HTTPResponse { if (lowerName.equals(headerNameList.get(i))) { - return (String) headerValueList.get(i); + return headerValueList.get(i); } } @@ -157,7 +157,7 @@ public class HTTPResponse */ public String[] getHeaderValues(String headerName) { - ArrayList valueList = new ArrayList(); + ArrayList<String> valueList = new ArrayList<String>(); String lowerName = headerName.toLowerCase(); for (int i=0; i < headerNameList.size(); i++) @@ -218,8 +218,8 @@ public class HTTPResponse String[][] headerElements = new String[headerNameList.size()][2]; for (int i=0; i < headerNameList.size(); i++) { - headerElements[i][0] = (String) headerNameList.get(i); - headerElements[i][1] = (String) headerValueList.get(i); + headerElements[i][0] = headerNameList.get(i); + headerElements[i][1] = headerValueList.get(i); } return headerElements; @@ -288,19 +288,19 @@ public class HTTPResponse { if (headerName.equals(contentName.get(i))) { - return (String) contentValue.get(i); + return contentValue.get(i); } } return null; } - public ArrayList getContentNames() + public ArrayList<String> getContentNames() { return contentName; } - public ArrayList getContentValues() + public ArrayList<String> getContentValues() { return contentValue; } @@ -370,10 +370,10 @@ public class HTTPResponse { System.out.println("cookie list: " + cookieValueList.get(i)); - String temp = (String) cookieValueList.get(i); + String temp = cookieValueList.get(i); if (temp.startsWith(headerName)) { - return (String) cookieValueList.get(i); + return cookieValueList.get(i); } } |