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

devonfw / IDEasy / 9907372175

12 Jul 2024 11:49AM UTC coverage: 61.142% (-0.02%) from 61.162%
9907372175

push

github

hohwille
fixed tests

1997 of 3595 branches covered (55.55%)

Branch coverage included in aggregate %.

5296 of 8333 relevant lines covered (63.55%)

2.8 hits per line

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

20.0
cli/src/main/java/com/devonfw/tools/ide/url/model/folder/UrlEdition.java
1
package com.devonfw.tools.ide.url.model.folder;
2

3
import com.devonfw.tools.ide.url.model.AbstractUrlFolderWithParent;
4
import com.devonfw.tools.ide.url.model.file.UrlSecurityFile;
5

6
/**
7
 * An {@link UrlFolder} representing the actual edition of a {@link UrlTool}. The default edition may have the same {@link #getName() name} as the
8
 * {@link UrlTool} itself. However, tools like "intellij" may have editions like "community" or "ultimate".
9
 */
10
public class UrlEdition extends AbstractUrlFolderWithParent<UrlTool, UrlVersion> {
11

12
  private UrlSecurityFile securityFile;
13

14
  /**
15
   * The constructor.
16
   *
17
   * @param parent the {@link #getParent() parent folder}.
18
   * @param name the {@link #getName() filename}.
19
   */
20
  public UrlEdition(UrlTool parent, String name) {
21

22
    super(parent, name);
4✔
23
  }
1✔
24

25
  /**
26
   * This method is used to add new children to the children collection of an instance from this class.
27
   *
28
   * @param name The name of the {@link UrlVersion} object that should be created.
29
   */
30
  @Override
31
  protected UrlVersion newChild(String name) {
32

33
    return new UrlVersion(this, name);
6✔
34
  }
35

36
  /**
37
   * @return the {@link UrlSecurityFile} of this {@link UrlEdition}. Will be lazily initialized on the first call of this method. If the file exists, it will be
38
   * loaded, otherwise it will be empty and only created on save if data was added.
39
   */
40
  public UrlSecurityFile getSecurityFile() {
41

42
    if (this.securityFile == null) {
×
43
      this.securityFile = new UrlSecurityFile(this);
×
44
      this.securityFile.load(false);
×
45
    }
46
    return this.securityFile;
×
47
  }
48

49
  @Override
50
  public void save() {
51

52
    super.save();
×
53
    if (this.securityFile != null) {
×
54
      this.securityFile.save();
×
55
    }
56
  }
×
57

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