Skip to content
This repository was archived by the owner on May 28, 2018. It is now read-only.

Commit f805b28

Browse files
author
Michal Gajdos
committed
PR#138 - Fixed copyrights.
Change-Id: I3efd78bb7335f89b8747747a21a3fcb91ddcdfbe Signed-off-by: Michal Gajdos <[email protected]>
1 parent 67a2e94 commit f805b28

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

tests/e2e/src/test/java/org/glassfish/jersey/tests/e2e/client/ResponseCloseTest.java

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
33
*
4-
* Copyright (c) 2012-2013 Oracle and/or its affiliates. All rights reserved.
4+
* Copyright (c) 2012-2015 Oracle and/or its affiliates. All rights reserved.
55
*
66
* The contents of this file are subject to the terms of either the GNU
77
* General Public License Version 2 only ("GPL") or the Common Development
@@ -49,7 +49,6 @@
4949
import org.glassfish.jersey.test.JerseyTest;
5050

5151
import org.junit.Test;
52-
5352
import static org.junit.Assert.assertFalse;
5453
import static org.junit.Assert.fail;
5554

@@ -81,15 +80,14 @@ protected Application configure() {
8180
return new ResourceConfig(SimpleResource.class);
8281
}
8382

84-
8583
@Test
8684
public void testReadAfterClose() {
8785
final Response response = target().path("simple").request().get(Response.class);
8886
response.close();
8987
try {
9088
response.readEntity(String.class);
9189
fail("IllegalStateException expected when reading entity after response has been closed.");
92-
} catch (IllegalStateException ex) {
90+
} catch (final IllegalStateException ex) {
9391
// expected
9492
}
9593
}
@@ -101,7 +99,7 @@ public void testCloseBeforeReadingEmptyContentHasNoEffect() {
10199
try {
102100
response.readEntity(String.class);
103101
fail("IllegalStateException expected when reading entity after response has been closed.");
104-
} catch (IllegalStateException ex) {
102+
} catch (final IllegalStateException ex) {
105103
// expected
106104
}
107105
}
@@ -115,7 +113,7 @@ public void testReadAfterMultipleClose() {
115113
try {
116114
response.readEntity(String.class);
117115
fail("IllegalStateException expected when reading entity after response has been closed.");
118-
} catch (IllegalStateException ex) {
116+
} catch (final IllegalStateException ex) {
119117
// expected
120118
}
121119
}
@@ -128,7 +126,7 @@ public void testReadBufferedEntityAfterClose() {
128126
try {
129127
response.readEntity(String.class);
130128
fail("IllegalStateException expected when reading a buffered entity after response has been closed.");
131-
} catch (IllegalStateException ex) {
129+
} catch (final IllegalStateException ex) {
132130
// expected
133131
}
134132
}
@@ -140,7 +138,7 @@ public void testBufferEntityAfterClose() {
140138
try {
141139
response.bufferEntity();
142140
fail("IllegalStateException expected when reading a buffered entity after response has been closed.");
143-
} catch (IllegalStateException ex) {
141+
} catch (final IllegalStateException ex) {
144142
// expected
145143
}
146144
}
@@ -152,7 +150,7 @@ public void testGetEntityAfterClose() {
152150
try {
153151
response.getEntity();
154152
fail("IllegalStateException expected when reading a buffered entity after response has been closed.");
155-
} catch (IllegalStateException ex) {
153+
} catch (final IllegalStateException ex) {
156154
// expected
157155
}
158156
}
@@ -162,9 +160,9 @@ public void testHasEntityAfterClose() {
162160
final Response response = target().path("simple").request().get(Response.class);
163161
response.close();
164162
try {
165-
boolean hasEntity = response.hasEntity();
163+
final boolean hasEntity = response.hasEntity();
166164
assertFalse("Should return false when the connection is already closed", hasEntity);
167-
} catch (IllegalStateException ex) {
165+
} catch (final IllegalStateException ex) {
168166
fail("IllegalStateException should have been caught inside hasEntity.");
169167
}
170168
}

0 commit comments

Comments
 (0)