Author: bfitzpat
Date: 2012-05-16 15:41:44 -0400 (Wed, 16 May 2012)
New Revision: 41083
Modified:
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/utils/JAXRSTester.java
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/views/JAXRSWSTestView2.java
Log:
JBIDE-11732 - Fixing issue with extra '?' in JAX-RS parameterized URL
Modified:
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/utils/JAXRSTester.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/utils/JAXRSTester.java 2012-05-16
19:24:17 UTC (rev 41082)
+++
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/utils/JAXRSTester.java 2012-05-16
19:41:44 UTC (rev 41083)
@@ -160,9 +160,9 @@
// build the complete URL
URL url = null;
- if (query != null) {
+ if (query != null && query.trim().length() > 0) {
// add the ? if there are parameters
- if (!address.endsWith("?")) {//$NON-NLS-1$
+ if (!address.endsWith("?") &&
!address.contains("?")) {//$NON-NLS-1$ //$NON-NLS-2$
// if we're a "GET" - add the ? by default
if (methodType.equalsIgnoreCase("GET")) { //$NON-NLS-1$
@@ -177,6 +177,8 @@
address = address + "?"; //$NON-NLS-1$
}
}
+ } else if (address.contains("?")) { //$NON-NLS-1$
+ address = address + "&"; //$NON-NLS-1$
}
// add parms to the url if we have some
url = new URL(address + query);
Modified:
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/views/JAXRSWSTestView2.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/views/JAXRSWSTestView2.java 2012-05-16
19:24:17 UTC (rev 41082)
+++
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/views/JAXRSWSTestView2.java 2012-05-16
19:41:44 UTC (rev 41083)
@@ -1655,6 +1655,10 @@
getCurrentHistoryEntry().setWsTech(wsTech);
+ if (!getCurrentHistoryEntry().getUrl().contentEquals(urlText)) {
+ getCurrentHistoryEntry().setUrl(urlText);
+ }
+
final String url = getCurrentHistoryEntry().getUrl();
final String action = getCurrentHistoryEntry().getAction();
String tempBody = getCurrentHistoryEntry().getBody();
Show replies by date