Skip to content

Commit f37b37b

Browse files
author
Gerald Unterrainer
committed
Merge branch 'develop'
2 parents bfc0158 + ea555e6 commit f37b37b

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
<modelVersion>4.0.0</modelVersion>
1212
<artifactId>rest-client</artifactId>
13-
<version>0.0.4</version>
13+
<version>0.0.5</version>
1414
<name>RestClient</name>
1515
<packaging>jar</packaging>
1616

src/main/java/info/unterrainer/commons/restclient/BaseBuilder.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@
1212

1313
import com.fasterxml.jackson.core.type.TypeReference;
1414
import com.fasterxml.jackson.databind.JavaType;
15+
import com.fasterxml.jackson.databind.type.TypeFactory;
1516

1617
import info.unterrainer.commons.httpserver.jsons.ListJson;
1718
import info.unterrainer.commons.restclient.RestClient.HttpGetCall;
19+
import info.unterrainer.commons.serialization.JsonMapper;
1820
import lombok.AccessLevel;
1921
import lombok.RequiredArgsConstructor;
2022
import lombok.extern.slf4j.Slf4j;
@@ -67,7 +69,9 @@ public R addUrl(final String urlPart) {
6769
*/
6870
@SuppressWarnings("unchecked")
6971
public R isListJson() {
70-
javaType = client.jsonMapper.getTypeFactory().constructParametricType(ListJson.class, type);
72+
JsonMapper mapper = client.jsonMapper;
73+
TypeFactory typeFactory = mapper.getTypeFactory();
74+
javaType = typeFactory.constructParametricType(ListJson.class, type);
7175
return (R) this;
7276
}
7377

src/main/java/info/unterrainer/commons/restclient/KeycloakContext.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,16 @@ public <T> PostKeycloakBuilder<T> post(final RestClient client, final Class<?> t
3333
}
3434

3535
void update(final RestClient client) {
36-
long now = System.currentTimeMillis();
36+
if (userName == null) {
37+
log.error("UserName is null");
38+
return;
39+
}
40+
if (password == null) {
41+
log.error("Password is null");
42+
return;
43+
}
3744

45+
long now = System.currentTimeMillis();
3846
log.debug("now: [{}]", now);
3947
log.debug("accessToken: [{}]", accessToken);
4048
log.debug("refreshTimestamp: [{}]", refreshTimestamp);

0 commit comments

Comments
 (0)