• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

temporalio / sdk-java / #158

pending completion
#158

push

github-actions

web-flow
Fix stacktrace cutoff methods initialization (#1699)

22 of 22 new or added lines in 4 files covered. (100.0%)

16957 of 20826 relevant lines covered (81.42%)

0.81 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

20.0
/temporal-sdk/src/main/java/io/temporal/internal/common/env/ReflectionUtils.java
1
/*
2
 * Copyright (C) 2022 Temporal Technologies, Inc. All Rights Reserved.
3
 *
4
 * Copyright (C) 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
5
 *
6
 * Modifications copyright (C) 2017 Uber Technologies, Inc.
7
 *
8
 * Licensed under the Apache License, Version 2.0 (the "License");
9
 * you may not use this material except in compliance with the License.
10
 * You may obtain a copy of the License at
11
 *
12
 *   http://www.apache.org/licenses/LICENSE-2.0
13
 *
14
 * Unless required by applicable law or agreed to in writing, software
15
 * distributed under the License is distributed on an "AS IS" BASIS,
16
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
 * See the License for the specific language governing permissions and
18
 * limitations under the License.
19
 */
20

21
package io.temporal.internal.common.env;
22

23
import com.google.common.base.Joiner;
24

25
public final class ReflectionUtils {
26
  private ReflectionUtils() {}
27

28
  public static String getMethodNameForStackTraceCutoff(
29
      Class<?> clazz, String methodName, Class<?>... parameterTypes) throws RuntimeException {
30
    try {
31
      return clazz.getName() + "." + clazz.getMethod(methodName, parameterTypes).getName();
1✔
32
    } catch (NoSuchMethodException e) {
×
33
      throw new RuntimeException(
×
34
          "Reflection code that publishes the methods signatures is out of sync with actual method signatures. Class '"
35
              + clazz.getCanonicalName()
×
36
              + "' is expected to have method '"
37
              + methodName
38
              + "' with parameters {"
39
              + Joiner.on(", ").join(parameterTypes)
×
40
              + "}",
41
          e);
42
    }
43
  }
44
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc