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

devonfw / IDEasy / 13858963404

14 Mar 2025 02:38PM UTC coverage: 67.657% (-1.0%) from 68.619%
13858963404

push

github

web-flow
#1024: Move urls into url-updater module (#1025)

Co-authored-by: Jörg Hohwiller <hohwille@users.noreply.github.com>

3036 of 4915 branches covered (61.77%)

Branch coverage included in aggregate %.

7825 of 11138 relevant lines covered (70.25%)

3.07 hits per line

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

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

3
/**
4
 * Status information for a specific (download) URL.
5
 */
6
public class UrlStatus {
7

8
  private UrlStatusState success;
9

10
  private UrlStatusState error;
11

12
  private transient boolean stillUsed;
13

14
  /**
15
   * The constructor.
16
   */
17
  public UrlStatus() {
18

19
    super();
2✔
20
  }
1✔
21

22
  /**
23
   * @return the {@link UrlStatusState} of the last success.
24
   */
25
  public UrlStatusState getSuccess() {
26

27
    return this.success;
3✔
28
  }
29

30
  /**
31
   * @param success the new value of {@link #getSuccess()}.
32
   */
33
  public void setSuccess(UrlStatusState success) {
34

35
    this.success = success;
3✔
36
  }
1✔
37

38
  /**
39
   * @return the {@link UrlStatusState} of the last error or {@code null} if no error has ever occurred.
40
   */
41
  public UrlStatusState getError() {
42

43
    return this.error;
3✔
44
  }
45

46
  /**
47
   * @param error the new value of {@link #getError()}.
48
   */
49
  public void setError(UrlStatusState error) {
50

51
    this.error = error;
3✔
52
  }
1✔
53

54
  /**
55
   * @return {@code true} if entirely empty, {@code false} otherwise.
56
   */
57
  public boolean checkEmpty() {
58

59
    return (this.error == null) && (this.success == null);
×
60
  }
61

62
  /**
63
   * ATTENTION: This is not a standard getter (isStillUsed()) since otherwise Jackson will write it to JSON.
64
   *
65
   * @return {@code true} if still {@link StatusJson#getOrCreateUrlStatus(String) used}, {@code false} otherwise (if the entire version has been processed, it
66
   *     will be removed via {@link StatusJson#cleanup()}.
67
   */
68
  public boolean checkStillUsed() {
69

70
    return this.stillUsed;
×
71
  }
72

73
  /**
74
   * Sets {@link #checkStillUsed()} to {@code true}.
75
   */
76
  void markStillUsed() {
77

78
    this.stillUsed = true;
×
79
  }
×
80

81
}
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