Skip to content

Commit c451336

Browse files
dougqhclaude
andcommitted
Brace single-statement null-check ifs per style convention
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent b917792 commit c451336

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

  • internal-api/src/main/java/datadog/trace/api

internal-api/src/main/java/datadog/trace/api/TagMap.java

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -380,8 +380,12 @@ final class Entry extends EntryChange implements Map.Entry<String, Object>, Entr
380380
*/
381381
@Nullable
382382
public static final Entry create(@Nonnull String tag, Object value) {
383-
if (value == null) return null;
384-
if (value instanceof CharSequence && ((CharSequence) value).length() == 0) return null;
383+
if (value == null) {
384+
return null;
385+
}
386+
if (value instanceof CharSequence && ((CharSequence) value).length() == 0) {
387+
return null;
388+
}
385389
return TagMap.Entry.newAnyEntry(tag, value);
386390
}
387391

@@ -1367,7 +1371,9 @@ public Object put(String tag, Object value) {
13671371

13681372
@Override
13691373
public void set(TagMap.EntryReader newEntryReader) {
1370-
if (newEntryReader == null) return;
1374+
if (newEntryReader == null) {
1375+
return;
1376+
}
13711377
this.getAndSet(newEntryReader.entry());
13721378
}
13731379

@@ -1408,7 +1414,9 @@ public void set(String tag, double value) {
14081414

14091415
@Override
14101416
public Entry getAndSet(Entry newEntry) {
1411-
if (newEntry == null) return null;
1417+
if (newEntry == null) {
1418+
return null;
1419+
}
14121420

14131421
this.checkWriteAccess();
14141422

0 commit comments

Comments
 (0)