Skip to content

Commit 5587677

Browse files
Avoid null-pointer exception if direction is not specified
Change-Id: Idbef18368a1a7db5dd2c878a29af93d3d6a9bedf
1 parent dc564b3 commit 5587677

File tree

1 file changed

+3
-2
lines changed
  • cf-java-logging-support-core/src/main/java/com/sap/hcp/cf/logging/common

1 file changed

+3
-2
lines changed

cf-java-logging-support-core/src/main/java/com/sap/hcp/cf/logging/common/RequestRecord.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,10 @@ public RequestRecord(String layerKey) {
9393
*/
9494
public RequestRecord(String layerKey, Direction direction) {
9595
addTag(Fields.LAYER, layerKey);
96-
if (direction != null) {
97-
this.direction = direction;
96+
if (direction == null) {
97+
direction = Direction.OUT;
9898
}
99+
this.direction = direction;
99100
addTag(Fields.DIRECTION, direction.toString());
100101
setDefaults();
101102
start();

0 commit comments

Comments
 (0)