Simplify code
This commit is contained in:
@@ -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");
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user