Skip to content

Commit

Permalink
Update errorProneVersion to v2.21.0 (#989)
Browse files Browse the repository at this point in the history
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Trask Stalnaker <[email protected]>
  • Loading branch information
renovate[bot] and trask authored Aug 3, 2023
1 parent f75d7b5 commit d50127b
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ private static String generateIngressOperation(SpanData span) {
// the more levels/parts we get from API path the higher chance for getting high cardinality
// data
if (httpTarget != null) {
operation = extractAPIPathValue(httpTarget);
operation = extractApiPathValue(httpTarget);
if (isKeyPresent(span, HTTP_METHOD)) {
String httpMethod = span.getAttributes().get(HTTP_METHOD);
if (httpMethod != null) {
Expand All @@ -290,7 +290,7 @@ private static String generateRemoteOperation(SpanData span) {
URL url;
if (httpUrl != null) {
url = new URL(httpUrl);
remoteOperation = extractAPIPathValue(url.getPath());
remoteOperation = extractApiPathValue(url.getPath());
}
} catch (MalformedURLException e) {
logger.log(Level.FINEST, "invalid http.url attribute: ", httpUrl);
Expand All @@ -312,7 +312,7 @@ private static String generateRemoteOperation(SpanData span) {
* @param httpTarget http request target string value. Eg, /payment/1234
* @return the first part from the http target. Eg, /payment
*/
private static String extractAPIPathValue(String httpTarget) {
private static String extractApiPathValue(String httpTarget) {
if (httpTarget == null || httpTarget.isEmpty()) {
return "/";
}
Expand Down
2 changes: 1 addition & 1 deletion dependencyManagement/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ val DEPENDENCY_BOMS = listOf(

val autoServiceVersion = "1.1.1"
val autoValueVersion = "1.10.2"
val errorProneVersion = "2.19.1"
val errorProneVersion = "2.21.0"
val prometheusVersion = "0.16.0"
val mockitoVersion = "4.11.0"
val slf4jVersion = "2.0.7"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public static long getDefaultBlockSize() {
// Initialize buffer to empty array to subvert null checks.
private byte[] buffer = new byte[0];
private int index = 0;
private boolean reachedEOF = false;
private boolean reachedEndOfFile = false;
// There is a recording id and an id you get from the recording for the stream.
// streamId is the id for the stream.
private final long streamid;
Expand All @@ -53,7 +53,7 @@ public static long getDefaultBlockSize() {
@Override
public int read() throws IOException {

if (!reachedEOF && index == 0) {
if (!reachedEndOfFile && index == 0) {
Object[] params = new Object[] {streamid};
String[] signature = new String[] {long.class.getName()};
try {
Expand All @@ -63,7 +63,7 @@ public int read() throws IOException {
}
}

if (reachedEOF || (reachedEOF = (buffer == null))) {
if (reachedEndOfFile || (reachedEndOfFile = (buffer == null))) {
return -1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,15 @@
*/
public class RecordingOptions {

/* Default values of some options. */
private static final String EMPTY_STRING = "";
private static final String NO_LIMIT = "0";

/* Options hash table keys. */
private enum Option {
NAME("name", EMPTY_STRING),
NAME("name", ""),
MAX_AGE("maxAge", NO_LIMIT),
MAX_SIZE("maxSize", NO_LIMIT),
DUMP_ON_EXIT("dumpOnExit", "false"),
DESTINATION("destination", EMPTY_STRING),
DESTINATION("destination", ""),
DISK("disk", "false"),
DURATION("duration", NO_LIMIT);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public CoreRuntimeAttach(String agentJarResourceName) {
* Attach the OpenTelemetry Java agent to the current JVM. The attachment must be requested at the
* beginning of the main method.
*/
@SuppressWarnings("MemberName")
public void attachJavaagentToCurrentJVM() {
if (!shouldAttach()) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public final class RuntimeAttach {
* Attach the OpenTelemetry Java agent to the current JVM. The attachment must be requested at the
* beginning of the main method.
*/
@SuppressWarnings("MemberName")
public static void attachJavaagentToCurrentJVM() {

CoreRuntimeAttach distroRuntimeAttach = new CoreRuntimeAttach("/otel-agent.jar");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ private static boolean isEntryDuplicate(ZipException ze) {
return ze.getMessage() != null && ze.getMessage().contains("duplicate");
}

@SuppressWarnings("BanClassLoader")
private InputStream getInputStreamForEntry(JarEntry inEntry, ZipEntry outEntry)
throws IOException {

Expand Down

0 comments on commit d50127b

Please sign in to comment.