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

devonfw / IDEasy / 26101908636

19 May 2026 01:55PM UTC coverage: 70.982% (+0.003%) from 70.979%
26101908636

Pull #1859

github

web-flow
Merge cf4a7f717 into b4eeee25f
Pull Request #1859: #1392: Smart completions

4472 of 6964 branches covered (64.22%)

Branch coverage included in aggregate %.

11521 of 15567 relevant lines covered (74.01%)

3.14 hits per line

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

77.78
cli/src/main/java/com/devonfw/tools/ide/property/NumberProperty.java
1
package com.devonfw.tools.ide.property;
2

3
import com.devonfw.tools.ide.commandlet.Commandlet;
4
import com.devonfw.tools.ide.completion.CompletionCandidateCollector;
5
import com.devonfw.tools.ide.context.IdeContext;
6
import com.devonfw.tools.ide.validation.PropertyValidator;
7

8
/**
9
 * {@link Property} with {@link #getValueType() value type} {@link Long}.
10
 */
11
public class NumberProperty extends Property<Long> {
12

13
  /**
14
   * The constructor.
15
   *
16
   * @param name the {@link #getName() property name}.
17
   * @param required the {@link #isRequired() required flag}.
18
   * @param alias the {@link #getAlias() property alias}.
19
   */
20
  public NumberProperty(String name, boolean required, String alias) {
21

22
    this(name, required, alias, null);
6✔
23
  }
1✔
24

25
  /**
26
   * The constructor.
27
   *
28
   * @param name the {@link #getName() property name}.
29
   * @param required the {@link #isRequired() required flag}.
30
   * @param alias the {@link #getAlias() property alias}.
31
   * @param validator the {@link PropertyValidator} used to {@link #validate() validate} the {@link #getValue() value}.
32
   */
33
  public NumberProperty(String name, boolean required, String alias, PropertyValidator<Long> validator) {
34

35
    super(name, required, alias, false, validator);
7✔
36
  }
1✔
37

38
  @Override
39
  public Class<Long> getValueType() {
40

41
    return Long.class;
×
42
  }
43

44
  @Override
45
  public Long parse(String valueAsString, IdeContext context) {
46

47
    try {
48
      return Long.valueOf(valueAsString);
3✔
49
    } catch (NumberFormatException e) {
1✔
50
      throw new IllegalArgumentException("Invalid number for property " + getName(), e);
8✔
51
    }
52
  }
53

54
  @Override
55
  protected void completeValue(String arg, IdeContext contextual, Commandlet commandlet,
56
                               CompletionCandidateCollector collector) {}
×
57
}
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