[MOBY-guts] biomoby commit

Paul Gordon gordonp at dev.open-bio.org
Tue Jun 9 19:04:01 UTC 2009


gordonp
Tue Jun  9 15:04:01 EDT 2009
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/test
In directory dev.open-bio.org:/tmp/cvs-serv19955/src/main/org/biomoby/service/test

Modified Files:
	TestHttpServletRequest.java 
Log Message:
Better header support, URL can be null
moby-live/Java/src/main/org/biomoby/service/test TestHttpServletRequest.java,1.4,1.5
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/test/TestHttpServletRequest.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/test/TestHttpServletRequest.java	2008/02/14 06:13:37	1.4
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/test/TestHttpServletRequest.java	2009/06/09 19:04:01	1.5
@@ -17,8 +17,8 @@
 @SuppressWarnings("deprecation")
 public class TestHttpServletRequest implements HttpServletRequest{
 
-    private Hashtable headers = new Hashtable();
-    private Hashtable parameters = new Hashtable();
+    private Map headers = new LinkedHashMap();
+    private Map parameters = new LinkedHashMap();
     private ServletInputStream servletInputStream = null;
     private StringBuffer urlStringBuffer = new StringBuffer();
 
@@ -38,7 +38,7 @@
     }
     
     public Enumeration getParameterNames(){
-	return this.parameters.elements();
+	return (new Vector(this.parameters.keySet())).elements();
     }
     
     public ServletInputStream getInputStream() throws IOException{
@@ -63,7 +63,7 @@
     }
     
     public void setRequestURL(String url){
-	urlStringBuffer = new StringBuffer(url);
+	urlStringBuffer = new StringBuffer(url == null ? "" : url);
     }
 
     public Enumeration getHeaders(String name){
@@ -75,7 +75,7 @@
     }
 
     public Enumeration getHeaderNames(){
-	return headers.keys();
+	return (new Vector(headers.keySet())).elements();
     }
 
     public String getHeader(String name){




More information about the MOBY-guts mailing list