Skip to content

Commit

Permalink
spotless fixes for test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianBruckner committed Jan 9, 2025
1 parent 3b19c67 commit 576ef17
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

import static java.util.logging.Level.FINE;
import static java.util.logging.Level.SEVERE;
import static java.util.logging.Level.WARNING;

import com.google.errorprone.annotations.CanIgnoreReturnValue;
import io.opentelemetry.instrumentation.api.internal.cache.Cache;
Expand Down Expand Up @@ -118,6 +117,7 @@ public HelperInjector(

List<HelperClassDefinition> helpers =
helperClassNames.stream()
.distinct()
.map(
className ->
HelperClassDefinition.create(
Expand Down Expand Up @@ -184,11 +184,8 @@ public DynamicType.Builder<?> transform(
HelperClassDefinition::getClassName,
helper -> () -> helper.getBytecode().getBytecode(),
(a, b) -> {
logger.log(
WARNING,
"Duplicate classname for helper class in module {0} detected",
new Object[] {this.requestingName});
return a;
throw new IllegalStateException(
"Duplicate classnames for helper class detected!");
},
LinkedHashMap::new));

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/

package helper;

public class DuplicateHelper {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/

package helper;

import static net.bytebuddy.matcher.ElementMatchers.named;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/

package helper;

import static java.util.Collections.singletonList;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/

package helper;

import static org.assertj.core.api.Assertions.assertThat;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/

package helper;

class DuplicateHelperTestClass {
Expand Down

0 comments on commit 576ef17

Please sign in to comment.