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

devonfw / IDEasy / 11296076700

11 Oct 2024 04:39PM UTC coverage: 66.803% (+0.7%) from 66.152%
11296076700

push

github

web-flow
#687: prevent checksum recheck (#688)

2406 of 3944 branches covered (61.0%)

Branch coverage included in aggregate %.

6259 of 9027 relevant lines covered (69.34%)

3.05 hits per line

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

70.0
cli/src/main/java/com/devonfw/tools/ide/url/model/file/json/UrlStatusState.java
1
package com.devonfw.tools.ide.url.model.file.json;
2

3
import java.time.Instant;
4

5
/**
6
 * Class for the state information of an URL status check.
7
 *
8
 * @see UrlStatus#getSuccess()
9
 * @see UrlStatus#getError()
10
 */
11
public final class UrlStatusState {
12

13
  private Instant timestamp;
14

15
  private Integer code;
16

17
  private String message;
18

19
  /**
20
   * The constructor.
21
   */
22
  public UrlStatusState() {
23

24
    this(Instant.now());
3✔
25
  }
1✔
26

27
  /**
28
   * The constructor.
29
   *
30
   * @param timestamp the {@link #getTimestamp() timestamp}.
31
   */
32
  public UrlStatusState(Instant timestamp) {
2✔
33

34
    this.timestamp = timestamp;
3✔
35
  }
1✔
36

37
  /**
38
   * @return the {@link Instant} when this status was matched for the last time.
39
   */
40
  public Instant getTimestamp() {
41

42
    return this.timestamp;
3✔
43
  }
44

45
  /**
46
   * @param timestamp the new value of {@link #getTimestamp()}.
47
   */
48
  public void setTimestamp(Instant timestamp) {
49

50
    this.timestamp = timestamp;
3✔
51
  }
1✔
52

53
  /**
54
   * @return the HTTP status code (e.g. 404) or {@code null} if undefined (200 is omitted for success).
55
   */
56
  public Integer getCode() {
57

58
    return this.code;
3✔
59
  }
60

61
  /**
62
   * @param code new value of {@link #getCode()}.
63
   */
64
  public void setCode(Integer code) {
65

66
    this.code = code;
3✔
67
  }
1✔
68

69
  /**
70
   * @return the optional HTTP status message (e.g. error message).
71
   */
72
  public String getMessage() {
73

74
    return this.message;
3✔
75
  }
76

77
  /**
78
   * @param message the new value of {@link #getMessage()}.
79
   */
80
  public void setMessage(String message) {
81

82
    this.message = message;
3✔
83
  }
1✔
84

85
  @Override
86
  public String toString() {
87

88
    return getClass().getSimpleName() + "@" + this.timestamp
×
89
        + ((this.message == null || this.message.isEmpty()) ? "" : ":" + this.message);
×
90
  }
91
}
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