File tree Expand file tree Collapse file tree 11 files changed +29
-14
lines changed
async-client/src/test/java/org/javaee7/jaxrs/asyncclient
async-server/src/test/java/org/javaee7/jaxrs/asyncserver
beanvalidation/src/test/java/org/javaee7/jaxrs/beanvalidation
client-negotiation/src/test/java/org/javaee7/jaxrs/client/negotiation
dynamicfilter/src/test/java/org/javaee7/jaxrs/dynamicfilter
filter/src/test/java/org/javaee7/jaxrs/filter
jaxrs-client/src/test/java/org/javaee7/jaxrs/client
jaxrs-endpoint/src/test/java/org/javaee7/jaxrs/endpoint
jsonp/src/test/java/org/javaee7/jaxrs/jsonp
mapping-exceptions/src/test/java/org/javaee7/jaxrs/mapping/exceptions
singleton/src/test/java/org/javaee7/jaxrs/singleton Expand file tree Collapse file tree 11 files changed +29
-14
lines changed Original file line number Diff line number Diff line change 99import static org .junit .Assert .fail ;
1010
1111import java .net .MalformedURLException ;
12+ import java .net .URI ;
1213import java .net .URL ;
1314import java .util .concurrent .ExecutionException ;
1415import java .util .concurrent .Future ;
@@ -48,7 +49,7 @@ public static WebArchive createDeployment() {
4849 @ Before
4950 public void setUpClass () throws MalformedURLException {
5051 Client client = ClientBuilder .newClient ();
51- target = client .target (new URL (base , "webresources/fruits" ).toExternalForm ());
52+ target = client .target (URI . create ( new URL (base , "webresources/fruits" ).toExternalForm () ));
5253 }
5354
5455 /**
Original file line number Diff line number Diff line change 99import static org .junit .Assert .assertEquals ;
1010
1111import java .net .MalformedURLException ;
12+ import java .net .URI ;
1213import java .net .URL ;
1314
1415import javax .ws .rs .client .Client ;
@@ -44,7 +45,7 @@ public static WebArchive createDeployment() {
4445 @ Before
4546 public void setUpClass () throws MalformedURLException {
4647 Client client = ClientBuilder .newClient ();
47- target = client .target (new URL (base , "webresources/fruits" ).toExternalForm ());
48+ target = client .target (URI . create ( new URL (base , "webresources/fruits" ).toExternalForm () ));
4849 }
4950
5051 /**
Original file line number Diff line number Diff line change 1010import static org .junit .Assert .fail ;
1111
1212import java .net .MalformedURLException ;
13+ import java .net .URI ;
1314import java .net .URL ;
1415
1516import javax .ws .rs .BadRequestException ;
@@ -46,7 +47,7 @@ public static WebArchive createDeployment() {
4647 @ Before
4748 public void setUpClass () throws MalformedURLException {
4849 Client client = ClientBuilder .newClient ();
49- target = client .target (new URL (base , "webresources/endpoint" ).toExternalForm ());
50+ target = client .target (URI . create ( new URL (base , "webresources/endpoint" ).toExternalForm () ));
5051 }
5152
5253 @ Test
Original file line number Diff line number Diff line change 88
99import java .io .IOException ;
1010import java .net .MalformedURLException ;
11+ import java .net .URI ;
1112import java .net .URL ;
1213
1314import javax .ws .rs .client .Client ;
@@ -47,7 +48,7 @@ public static WebArchive createDeployment() {
4748 @ Before
4849 public void setUpClass () throws MalformedURLException {
4950 Client client = ClientBuilder .newClient ();
50- target = client .target (new URL (base , "webresources/persons" ).toExternalForm ());
51+ target = client .target (URI . create ( new URL (base , "webresources/persons" ).toExternalForm () ));
5152 }
5253
5354 @ Test
Original file line number Diff line number Diff line change 88import static org .junit .Assert .assertEquals ;
99
1010import java .net .MalformedURLException ;
11+ import java .net .URI ;
1112import java .net .URL ;
1213
1314import javax .ws .rs .client .Client ;
@@ -48,7 +49,7 @@ public static WebArchive createDeployment() {
4849 @ Before
4950 public void setUpClass () throws MalformedURLException {
5051 Client client = ClientBuilder .newClient ();
51- target = client .target (new URL (base , "webresources/fruits" ).toExternalForm ());
52+ target = client .target (URI . create ( new URL (base , "webresources/fruits" ).toExternalForm () ));
5253 }
5354
5455 @ Test
Original file line number Diff line number Diff line change 88import static org .junit .Assert .assertEquals ;
99
1010import java .net .MalformedURLException ;
11+ import java .net .URI ;
1112import java .net .URL ;
1213
1314import javax .ws .rs .client .Client ;
@@ -45,7 +46,7 @@ public static WebArchive createDeployment() {
4546 public void setUpClass () throws MalformedURLException {
4647 Client client = ClientBuilder .newClient ();
4748 client .register (ClientLoggingFilter .class );
48- target = client .target (new URL (base , "webresources/fruits" ).toExternalForm ());
49+ target = client .target (URI . create ( new URL (base , "webresources/fruits" ).toExternalForm () ));
4950 }
5051
5152 /**
Original file line number Diff line number Diff line change 88import static org .junit .Assert .assertEquals ;
99
1010import java .net .MalformedURLException ;
11+ import java .net .URI ;
1112import java .net .URL ;
1213
1314import javax .ws .rs .client .Client ;
@@ -51,7 +52,7 @@ public static WebArchive createDeployment() {
5152 @ Before
5253 public void setUp () throws MalformedURLException {
5354 Client client = ClientBuilder .newClient ();
54- target = client .target (new URL (base , "webresources/persons" ).toExternalForm ());
55+ target = client .target (URI . create ( new URL (base , "webresources/persons" ).toExternalForm () ));
5556 target .register (Person .class );
5657 }
5758
Original file line number Diff line number Diff line change 99import static org .junit .Assert .assertEquals ;
1010
1111import java .net .MalformedURLException ;
12+ import java .net .URI ;
1213import java .net .URL ;
1314
1415import javax .ws .rs .client .Client ;
@@ -59,7 +60,7 @@ public static WebArchive createDeployment() {
5960 @ Before
6061 public void setupClass () throws MalformedURLException {
6162 Client client = ClientBuilder .newClient ();
62- target = client .target (new URL (base , "webresources/fruit" ).toExternalForm ());
63+ target = client .target (URI . create ( new URL (base , "webresources/fruit" ).toExternalForm () ));
6364 }
6465
6566 /**
Original file line number Diff line number Diff line change 66package org .javaee7 .jaxrs .jsonp ;
77
88import java .net .MalformedURLException ;
9+ import java .net .URI ;
910import java .net .URL ;
11+
1012import javax .json .Json ;
1113import javax .json .JsonObject ;
1214import javax .ws .rs .client .Client ;
1315import javax .ws .rs .client .ClientBuilder ;
1416import javax .ws .rs .client .Entity ;
1517import javax .ws .rs .client .WebTarget ;
1618import javax .ws .rs .core .MediaType ;
19+
1720import org .jboss .arquillian .container .test .api .Deployment ;
1821import org .jboss .arquillian .junit .Arquillian ;
1922import org .jboss .arquillian .test .api .ArquillianResource ;
2225import org .junit .After ;
2326import org .junit .Before ;
2427import org .junit .Test ;
25- import static org .junit .Assert .*;
2628import org .junit .runner .RunWith ;
2729
2830/**
@@ -40,7 +42,7 @@ public class MyResourceTest {
4042 @ Before
4143 public void setUp () throws MalformedURLException {
4244 client = ClientBuilder .newClient ();
43- target = client .target (new URL (base , "webresources/endpoint" ).toExternalForm ());
45+ target = client .target (URI . create ( new URL (base , "webresources/endpoint" ).toExternalForm () ));
4446 }
4547
4648 @ After
Original file line number Diff line number Diff line change 1010import static org .junit .Assert .fail ;
1111
1212import java .net .MalformedURLException ;
13+ import java .net .URI ;
1314import java .net .URL ;
1415
1516import javax .ws .rs .ClientErrorException ;
@@ -49,7 +50,7 @@ public static WebArchive createDeployment() {
4950 public void setUp () throws MalformedURLException {
5051 Client client = ClientBuilder .newClient ();
5152 target = client
52- .target (new URL (base , "webresources/order" ).toExternalForm ());
53+ .target (URI . create ( new URL (base , "webresources/order" ).toExternalForm () ));
5354 }
5455
5556 /**
You can’t perform that action at this time.
0 commit comments