You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by br...@apache.org on 2009/05/25 00:47:26 UTC

svn commit: r778252 - in /incubator/pivot/trunk/web: .classpath src/pivot/web/Query.java test/pivot/web/test/QueryDictionaryTest.java

Author: brindy
Date: Sun May 24 22:47:26 2009
New Revision: 778252

URL: http://svn.apache.org/viewvc?rev=778252&view=rev
Log:
PIVOT-125
Updated classpath to use JUnit 4, not 3
Removed uncessary supress unchecked warning
Build 'request properties' (i.e. request headers) correctly by building a comma separated list of values for a key with multiple values

Modified:
    incubator/pivot/trunk/web/.classpath
    incubator/pivot/trunk/web/src/pivot/web/Query.java
    incubator/pivot/trunk/web/test/pivot/web/test/QueryDictionaryTest.java

Modified: incubator/pivot/trunk/web/.classpath
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/web/.classpath?rev=778252&r1=778251&r2=778252&view=diff
==============================================================================
--- incubator/pivot/trunk/web/.classpath (original)
+++ incubator/pivot/trunk/web/.classpath Sun May 24 22:47:26 2009
@@ -5,6 +5,6 @@
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
 	<classpathentry combineaccessrules="false" kind="src" path="/core"/>
 	<classpathentry kind="lib" path="lib/servlet-api.jar"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>

Modified: incubator/pivot/trunk/web/src/pivot/web/Query.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/web/src/pivot/web/Query.java?rev=778252&r1=778251&r2=778252&view=diff
==============================================================================
--- incubator/pivot/trunk/web/src/pivot/web/Query.java (original)
+++ incubator/pivot/trunk/web/src/pivot/web/Query.java Sun May 24 22:47:26 2009
@@ -472,9 +472,14 @@
             }
 
             for (String key : requestHeaders) {
+                StringBuffer buffer = new StringBuffer();
                 for (int index = 0; index < requestHeaders.getLength(key); index++) {
-                    connection.setRequestProperty(key, requestHeaders.get(key, index));
+                    if (index > 0) {
+                        buffer.append(",");
+                    }
+                    buffer.append(requestHeaders.get(key, index));
                 }
+                connection.setRequestProperty(key, buffer.toString());
             }
 
             // Set the input/output state

Modified: incubator/pivot/trunk/web/test/pivot/web/test/QueryDictionaryTest.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/web/test/pivot/web/test/QueryDictionaryTest.java?rev=778252&r1=778251&r2=778252&view=diff
==============================================================================
--- incubator/pivot/trunk/web/test/pivot/web/test/QueryDictionaryTest.java (original)
+++ incubator/pivot/trunk/web/test/pivot/web/test/QueryDictionaryTest.java Sun May 24 22:47:26 2009
@@ -9,7 +9,6 @@
 
 public class QueryDictionaryTest extends TestCase {
 
-	@SuppressWarnings("unchecked")
 	public void testQueryDictionary() {
 		QueryDictionary dict = new Query.QueryDictionary();