Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public void uploadPackFile(String gitRemoteUrl, String currentCommitHash, Path p
RequestBody packFileBody = RequestBody.create(OCTET_STREAM, packFileContents);

String packFileName = packFile.getFileName().toString();
String packFileNameWithoutRandomPrefix = packFileName.substring(packFileName.indexOf("-") + 1);
String packFileNameWithoutRandomPrefix = packFileName.substring(packFileName.indexOf('-') + 1);

RequestBody requestBody =
new MultipartBody.Builder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ private Ranged buildNext() {
if (!checked) {
checked = true;
// Header evidence format is <headerName>: <headerValue>
int separatorIndex = evidenceValue.indexOf(":");
int separatorIndex = evidenceValue.indexOf(':');
if (separatorIndex < 1) {
return null; // Wrong evidence format: there is no separator or <headerName>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1014,7 +1014,7 @@ private Flow<Void> maybePublishRequestData(AppSecRequestContext ctx) {
}

Map<String, List<String>> queryParams = EMPTY_QUERY_PARAMS;
int i = savedRawURI.indexOf("?");
int i = savedRawURI.indexOf('?');
if (i != -1) {
String qs = savedRawURI.substring(i + 1);
// ideally we'd have the query string as parsed by the server
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ class TagsAssert {
if (paramString != null && !paramString.isEmpty()) {
String[] pairs = paramString.split("&")
for (String pair : pairs) {
int idx = pair.indexOf("=")
int idx = pair.indexOf('=')
if (idx > 0) {
spanQueryParams.add(pair.substring(0, idx))
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ private Map<String, String> parseTagListToMap(List<String> input) {

Map<String, String> resultMap = new HashMap<>(input.size());
for (String s : input) {
int colonIndex = s.indexOf(":");
int colonIndex = s.indexOf(':');
if (colonIndex > -1
&& colonIndex < s.length() - 1) { // ensure there's a colon that's not at the start or end
String key = s.substring(0, colonIndex);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,8 @@ private boolean extractB3(final String firstValue) {
if (firstValue.length() == 1) {
samplingPriority = convertSamplingPriority(firstValue);
} else {
final int firstIndex = firstValue.indexOf("-");
final int secondIndex = firstValue.indexOf("-", firstIndex + 1);
final int firstIndex = firstValue.indexOf('-');
final int secondIndex = firstValue.indexOf('-', firstIndex + 1);
if (firstIndex != -1) {
final String b3TraceId = firstValue.substring(0, firstIndex);
if (!setTraceId(b3TraceId)) {
Expand Down
2 changes: 1 addition & 1 deletion internal-api/src/main/java/datadog/trace/api/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -4639,7 +4639,7 @@ private Map<String, String> getAzureAppServicesTags() {
// Example: 8c500027-5f00-400e-8f00-60000000000f+apm-dotnet-EastUSwebspace
// Format: {subscriptionId}+{planResourceGroup}-{hostedInRegion}
String websiteOwner = getEnv("WEBSITE_OWNER_NAME");
int plusIndex = websiteOwner == null ? -1 : websiteOwner.indexOf("+");
int plusIndex = websiteOwner == null ? -1 : websiteOwner.indexOf('+');

// The subscription ID of the site instance in Azure App Services
String subscriptionId = null;
Expand Down