Simplify code

This commit is contained in:
d.kanehira
2018-09-08 02:00:28 +09:00
parent d71cffda55
commit 268b0197ff
2 changed files with 3 additions and 3 deletions

View File

@@ -63,7 +63,7 @@ public abstract class EmbeddedHeaderUtils {
int headerCount = 0;
int headersLength = 0;
for (String header : headers) {
Object value = original.get(header) == null ? null : original.get(header);
Object value = original.get(header);
if (value != null) {
String json = objectMapper.toJson(value);
headerValues[n] = json.getBytes("UTF-8");

View File

@@ -44,7 +44,7 @@ abstract class AbstractBindingLifecycle implements SmartLifecycle {
@Override
public void start() {
if (!running) {
bindables.values().stream().forEach(this::doStartWithBindable);
bindables.values().forEach(this::doStartWithBindable);
this.running = true;
}
}
@@ -52,7 +52,7 @@ abstract class AbstractBindingLifecycle implements SmartLifecycle {
@Override
public void stop() {
if (running) {
bindables.values().stream().forEach(this::doStopWithBindable);
bindables.values().forEach(this::doStopWithBindable);
this.running = false;
}
}