Skip to content

Commit

Permalink
headers
Browse files Browse the repository at this point in the history
  • Loading branch information
joanvr committed Aug 24, 2023
1 parent fbdfc9a commit 3311668
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ public TreeVisitor<?, ExecutionContext> getVisitor() {
return Preconditions.check(
Preconditions.and(
Preconditions.or(
new UsesMethod<>(TIMER + " record*(..)", false),
new UsesMethod<>(TIMER + " wrap(..)", false)
new UsesMethod<>(TIMER + " record*(*)", false),
new UsesMethod<>(TIMER + " wrap(*)", false)
),
Preconditions.and(
Preconditions.not(new UsesMethod<>(TIMER + " record(java.time.Duration)", false)),
Expand All @@ -66,7 +66,7 @@ public TreeVisitor<?, ExecutionContext> getVisitor() {

private final ChangeType changeTypeRegistry = new ChangeType("io.micrometer.core.instrument.MeterRegistry", "io.micrometer.observation.ObservationRegistry", null);
private final ChangeType changeTypeTimer = new ChangeType("io.micrometer.core.instrument.Timer","io.micrometer.observation.Observation", null);
private final ChangeMethodName changeRecord = new ChangeMethodName(OBSERVATION + " record*(..)", "observe", null, null);
private final ChangeMethodName changeRecord = new ChangeMethodName(OBSERVATION + " record*(*)", "observe", null, null);

@Override
public J.CompilationUnit visitCompilationUnit(J.CompilationUnit compilationUnit, ExecutionContext executionContext) {
Expand Down
15 changes: 15 additions & 0 deletions src/main/java/org/openrewrite/micrometer/package-info.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright 2023 the original author or authors.
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* https://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@NonNullApi @NonNullFields
package org.openrewrite.micrometer;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ void test(Runnable arg) {
import io.micrometer.common.KeyValues;
import io.micrometer.observation.Observation;
import io.micrometer.observation.ObservationRegistry;
class Test {
private ObservationRegistry registry;
Expand Down

0 comments on commit 3311668

Please sign in to comment.