File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
internal-api/src/main/java/datadog/trace/api/git Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,8 @@ public class GitInfoProvider {
2424 INSTANCE .registerGitInfoBuilder (new UserSuppliedGitInfoBuilder ());
2525 }
2626
27+ static final String NULL_PATH_STRING = Paths .get ("" ).toAbsolutePath ().toString ();
28+
2729 private volatile Collection <GitInfoBuilder > builders = Collections .emptyList ();
2830
2931 // in regular cases git info has to be built only once,
@@ -42,7 +44,7 @@ public GitInfo getGitInfo() {
4244
4345 public GitInfo getGitInfo (@ Nullable String repositoryPath ) {
4446 if (repositoryPath == null ) {
45- repositoryPath = Paths . get ( "" ). toAbsolutePath (). toString () ;
47+ repositoryPath = NULL_PATH_STRING ;
4648 }
4749 return gitInfoCache .computeIfAbsent (repositoryPath , this ::buildGitInfo );
4850 }
You can’t perform that action at this time.
0 commit comments