Skip to content

Commit df18df4

Browse files
committed
- fixes code deffects reported by static analysis
1 parent 034407d commit df18df4

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

src/main/java/com/microsoft/graph/http/BaseRequest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public abstract class BaseRequest<T> implements IHttpRequest {
6464
/**
6565
* The request stats header value format string
6666
*/
67-
public static final String REQUEST_STATS_HEADER_VALUE_FORMAT_STRING = "graph-java/v%s";
67+
public static final String REQUEST_STATS_HEADER_VALUE_FORMAT_STRING = "graph-java/v";
6868

6969
/**
7070
* The HTTP method for this request
@@ -168,7 +168,7 @@ public BaseRequest(@Nonnull final String requestUrl,
168168
final String sdkVersion = client == null ? null : client.getServiceSDKVersion();
169169
if(sdkVersion != null) {
170170
final HeaderOption requestStatsHeader = new HeaderOption(REQUEST_STATS_HEADER_NAME,
171-
String.format(REQUEST_STATS_HEADER_VALUE_FORMAT_STRING, sdkVersion));
171+
REQUEST_STATS_HEADER_VALUE_FORMAT_STRING + sdkVersion);
172172
headersOptions.add(requestStatsHeader);
173173
}
174174
}

src/main/java/com/microsoft/graph/serializer/FallbackTypeAdapterFactory.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,7 @@ public T read(final JsonReader reader) throws IOException {
146146
String value = reader.nextString();
147147
T incoming = enumValues.get(CaseFormat.LOWER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, value));
148148
if (incoming == null) {
149-
logger.logDebug(
150-
String.format(
151-
"The following value %s could not be recognized as a member of the enum",
152-
value)
153-
);
149+
logger.logDebug("The following value "+value+" could not be recognized as a member of the enum");
154150
return enumValues.get(NO_KNOWN_VALUE);
155151
}
156152
return incoming;

0 commit comments

Comments
 (0)