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

uber / cadence-java-client / 2622

06 Nov 2024 10:24PM UTC coverage: 76.159% (-3.0%) from 79.182%
2622

Pull #948

buildkite

shijiesheng
fix format
Pull Request #948: fix bug in QueryWorkflowParameters.toString

2 of 2 new or added lines in 1 file covered. (100.0%)

617 existing lines in 8 files now uncovered.

14755 of 19374 relevant lines covered (76.16%)

0.76 hits per line

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

62.5
/src/main/java/com/uber/cadence/internal/compatibility/thrift/Helpers.java
1
/*
2
 *  Modifications Copyright (c) 2017-2021 Uber Technologies Inc.
3
 *  Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
4
 *
5
 *  Licensed under the Apache License, Version 2.0 (the "License"). You may not
6
 *  use this file except in compliance with the License. A copy of the License is
7
 *  located at
8
 *
9
 *  http://aws.amazon.com/apache2.0
10
 *
11
 *  or in the "license" file accompanying this file. This file is distributed on
12
 *  an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
13
 *  express or implied. See the License for the specific language governing
14
 *  permissions and limitations under the License.
15
 */
16
package com.uber.cadence.internal.compatibility.thrift;
17

18
import com.google.protobuf.ByteString;
19
import com.google.protobuf.Duration;
20
import com.google.protobuf.Int64Value;
21
import com.google.protobuf.Timestamp;
22
import com.google.protobuf.util.Durations;
23
import com.google.protobuf.util.Timestamps;
24

25
class Helpers {
×
26

27
  static long toInt64Value(Int64Value v) {
UNCOV
28
    return v.getValue();
×
29
  }
30

31
  static long timeToUnixNano(Timestamp t) {
32
    return Timestamps.toNanos(t);
1✔
33
  }
34

35
  static int durationToDays(Duration d) {
36
    return (int) Durations.toDays(d);
1✔
37
  }
38

39
  static int durationToSeconds(Duration d) {
40
    return (int) Durations.toSeconds(d);
1✔
41
  }
42

43
  static byte[] byteStringToArray(ByteString t) {
44
    if (t == null || t.size() == 0) {
1✔
45
      return null;
×
46
    }
47
    return t.toByteArray();
1✔
48
  }
49
}
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

© 2025 Coveralls, Inc