Skip to content

Commit

Permalink
upgrade to 1.4.5 and update changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
stevehu committed Sep 22, 2017
1 parent f45b4a6 commit 5063636
Show file tree
Hide file tree
Showing 31 changed files with 76 additions and 29 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

### Changed

## 1.4.5 - 2017-09-22
### Added

### Changed
- fixes #102 Return invalid json error in body handler for malformed body

## 1.4.4 - 2017-09-20
### Added

Expand Down
2 changes: 1 addition & 1 deletion audit/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>com.networknt</groupId>
<artifactId>light-4j</artifactId>
<version>1.4.4</version>
<version>1.4.5</version>
<relativePath>..</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion balance/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>com.networknt</groupId>
<artifactId>light-4j</artifactId>
<version>1.4.4</version>
<version>1.4.5</version>
<relativePath>..</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion body/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>com.networknt</groupId>
<artifactId>light-4j</artifactId>
<version>1.4.4</version>
<version>1.4.5</version>
<relativePath>..</relativePath>
</parent>

Expand Down
41 changes: 41 additions & 0 deletions body/src/test/java/com/networknt/body/BodyHandlerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,47 @@ public void run() {
}
}

@Test
public void testPostInvalidJson() throws Exception {
final AtomicReference<ClientResponse> reference = new AtomicReference<>();
final Http2Client client = Http2Client.getInstance();
final CountDownLatch latch = new CountDownLatch(1);
final ClientConnection connection;
try {
connection = client.connect(new URI("http://localhost:8080"), Http2Client.WORKER, Http2Client.SSL, Http2Client.POOL, OptionMap.EMPTY).get();
} catch (Exception e) {
throw new ClientException(e);
}

try {
String post = "{post";
connection.getIoThread().execute(new Runnable() {
@Override
public void run() {
final ClientRequest request = new ClientRequest().setMethod(Methods.POST).setPath("/post");
request.getRequestHeaders().put(Headers.HOST, "localhost");
request.getRequestHeaders().put(Headers.CONTENT_TYPE, "application/json");
request.getRequestHeaders().put(Headers.TRANSFER_ENCODING, "chunked");
connection.sendRequest(request, client.createClientCallback(reference, latch, post));
}
});
latch.await(10, TimeUnit.SECONDS);
} catch (Exception e) {
logger.error("IOException: ", e);
throw new ClientException(e);
} finally {
IoUtils.safeClose(connection);
}
int statusCode = reference.get().getResponseCode();
// as content type and body is mismatched, the body will be ignored.
Assert.assertEquals(400, statusCode);
if(statusCode == 400) {
Status status = Config.getInstance().getMapper().readValue(reference.get().getAttachment(Http2Client.RESPONSE_BODY), Status.class);
Assert.assertNotNull(status);
Assert.assertEquals("ERR10015", status.getCode());
}
}

@Test
public void testPostJsonList() throws Exception {
final AtomicReference<ClientResponse> reference = new AtomicReference<>();
Expand Down
2 changes: 1 addition & 1 deletion client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>com.networknt</groupId>
<artifactId>light-4j</artifactId>
<version>1.4.4</version>
<version>1.4.5</version>
<relativePath>..</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion cluster/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>com.networknt</groupId>
<artifactId>light-4j</artifactId>
<version>1.4.4</version>
<version>1.4.5</version>
<relativePath>..</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion config/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>com.networknt</groupId>
<artifactId>light-4j</artifactId>
<version>1.4.4</version>
<version>1.4.5</version>
<relativePath>..</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion consul/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>com.networknt</groupId>
<artifactId>light-4j</artifactId>
<version>1.4.4</version>
<version>1.4.5</version>
<relativePath>..</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion correlation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>com.networknt</groupId>
<artifactId>light-4j</artifactId>
<version>1.4.4</version>
<version>1.4.5</version>
<relativePath>..</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion cors/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>com.networknt</groupId>
<artifactId>light-4j</artifactId>
<version>1.4.4</version>
<version>1.4.5</version>
<relativePath>..</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion docs/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ googleAnalytics = ""
provider = "GitHub"
repo_url = "https://github.com/networknt/light-4j"

version = "1.4.4"
version = "1.4.5"
logo = "images/logo.png"
favicon = ""

Expand Down
2 changes: 1 addition & 1 deletion dump/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>com.networknt</groupId>
<artifactId>light-4j</artifactId>
<version>1.4.4</version>
<version>1.4.5</version>
<relativePath>..</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion exception/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>com.networknt</groupId>
<artifactId>light-4j</artifactId>
<version>1.4.4</version>
<version>1.4.5</version>
<relativePath>..</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion handler/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>com.networknt</groupId>
<artifactId>light-4j</artifactId>
<version>1.4.4</version>
<version>1.4.5</version>
<relativePath>..</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion health/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>com.networknt</groupId>
<artifactId>light-4j</artifactId>
<version>1.4.4</version>
<version>1.4.5</version>
<relativePath>..</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion info/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>com.networknt</groupId>
<artifactId>light-4j</artifactId>
<version>1.4.4</version>
<version>1.4.5</version>
<relativePath>..</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion limit/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>com.networknt</groupId>
<artifactId>light-4j</artifactId>
<version>1.4.4</version>
<version>1.4.5</version>
<relativePath>..</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion mask/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>com.networknt</groupId>
<artifactId>light-4j</artifactId>
<version>1.4.4</version>
<version>1.4.5</version>
<relativePath>..</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion metrics/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>com.networknt</groupId>
<artifactId>light-4j</artifactId>
<version>1.4.4</version>
<version>1.4.5</version>
<relativePath>..</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.networknt</groupId>
<artifactId>light-4j</artifactId>
<version>1.4.4</version>
<version>1.4.5</version>
<packaging>pom</packaging>
<name>Parent POM</name>
<description>Light 4J Framework Components</description>
Expand Down
2 changes: 1 addition & 1 deletion registry/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>com.networknt</groupId>
<artifactId>light-4j</artifactId>
<version>1.4.4</version>
<version>1.4.5</version>
<relativePath>..</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion sanitizer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>com.networknt</groupId>
<artifactId>light-4j</artifactId>
<version>1.4.4</version>
<version>1.4.5</version>
<relativePath>..</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion security/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>com.networknt</groupId>
<artifactId>light-4j</artifactId>
<version>1.4.4</version>
<version>1.4.5</version>
<relativePath>..</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>com.networknt</groupId>
<artifactId>light-4j</artifactId>
<version>1.4.4</version>
<version>1.4.5</version>
<relativePath>..</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>com.networknt</groupId>
<artifactId>light-4j</artifactId>
<version>1.4.4</version>
<version>1.4.5</version>
<relativePath>..</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion status/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>com.networknt</groupId>
<artifactId>light-4j</artifactId>
<version>1.4.4</version>
<version>1.4.5</version>
<relativePath>..</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion switcher/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>com.networknt</groupId>
<artifactId>light-4j</artifactId>
<version>1.4.4</version>
<version>1.4.5</version>
<relativePath>..</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion traceability/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>com.networknt</groupId>
<artifactId>light-4j</artifactId>
<version>1.4.4</version>
<version>1.4.5</version>
<relativePath>..</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion utility/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>com.networknt</groupId>
<artifactId>light-4j</artifactId>
<version>1.4.4</version>
<version>1.4.5</version>
<relativePath>..</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion zookeeper/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>com.networknt</groupId>
<artifactId>light-4j</artifactId>
<version>1.4.4</version>
<version>1.4.5</version>
<relativePath>..</relativePath>
</parent>

Expand Down

0 comments on commit 5063636

Please sign in to comment.