Skip to content

Commit

Permalink
version 1.0.8: update SimpleRequestArguments.getArgument case value i…
Browse files Browse the repository at this point in the history
…s null (youngmonkeys#45)
  • Loading branch information
tvd12 authored Oct 10, 2022
1 parent a9a2ede commit 56d9445
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 13 deletions.
2 changes: 1 addition & 1 deletion ezyhttp-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.tvd12</groupId>
<artifactId>ezyhttp</artifactId>
<version>1.0.7</version>
<version>1.0.8</version>
</parent>

<artifactId>ezyhttp-client</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion ezyhttp-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.tvd12</groupId>
<artifactId>ezyhttp</artifactId>
<version>1.0.7</version>
<version>1.0.8</version>
</parent>

<artifactId>ezyhttp-core</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion ezyhttp-server-boot/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.tvd12</groupId>
<artifactId>ezyhttp</artifactId>
<version>1.0.7</version>
<version>1.0.8</version>
</parent>

<artifactId>ezyhttp-server-boot</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion ezyhttp-server-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.tvd12</groupId>
<artifactId>ezyhttp</artifactId>
<version>1.0.7</version>
<version>1.0.8</version>
</parent>

<artifactId>ezyhttp-server-core</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

import lombok.Getter;
import lombok.Setter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@SuppressWarnings("unchecked")
public class SimpleRequestArguments implements RequestArguments {
Expand Down Expand Up @@ -53,11 +55,14 @@ public class SimpleRequestArguments implements RequestArguments {
@Getter
protected Map<String, Object> redirectionAttributes;

private static final Logger LOGGER =
LoggerFactory.getLogger(SimpleRequestArguments.class);

@Override
public <T> T getArgument(Object key) {
Object argument = arguments != null ? arguments.get(key) : null;
if (argument == null && debug) {
throw new NullPointerException("there is no value for argment: " + key);
LOGGER.error("there is no value for argment: {}", key);
}
return (T) argument;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ public void argumentButDebugTest() {
sut.setDebug(true);

// when
Throwable e = Asserts.assertThrows(() -> sut.getArgument("unknown"));
Object actual = sut.getArgument("unknown");

// then
Asserts.assertEqualsType(e, NullPointerException.class);
Asserts.assertNull(actual);
sut.release();
}

Expand Down
2 changes: 1 addition & 1 deletion ezyhttp-server-graphql/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.tvd12</groupId>
<artifactId>ezyhttp</artifactId>
<version>1.0.7</version>
<version>1.0.8</version>
</parent>
<artifactId>ezyhttp-server-graphql</artifactId>

Expand Down
2 changes: 1 addition & 1 deletion ezyhttp-server-jetty/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.tvd12</groupId>
<artifactId>ezyhttp</artifactId>
<version>1.0.7</version>
<version>1.0.8</version>
</parent>

<artifactId>ezyhttp-server-jetty</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion ezyhttp-server-management/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.tvd12</groupId>
<artifactId>ezyhttp</artifactId>
<version>1.0.7</version>
<version>1.0.8</version>
</parent>
<artifactId>ezyhttp-server-management</artifactId>
<name>ezyhttp-server-management</name>
Expand Down
2 changes: 1 addition & 1 deletion ezyhttp-server-thymeleaf/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.tvd12</groupId>
<artifactId>ezyhttp</artifactId>
<version>1.0.7</version>
<version>1.0.8</version>
</parent>
<artifactId>ezyhttp-server-thymeleaf</artifactId>

Expand Down
2 changes: 1 addition & 1 deletion ezyhttp-server-tomcat/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.tvd12</groupId>
<artifactId>ezyhttp</artifactId>
<version>1.0.7</version>
<version>1.0.8</version>
</parent>

<artifactId>ezyhttp-server-tomcat</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<version>1.0.5</version>
</parent>
<artifactId>ezyhttp</artifactId>
<version>1.0.7</version>
<version>1.0.8</version>
<packaging>pom</packaging>

<name>ezyhttp</name>
Expand Down

0 comments on commit 56d9445

Please sign in to comment.