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

devonfw / IDEasy / 16595189644

29 Jul 2025 11:47AM UTC coverage: 68.562% (-0.06%) from 68.618%
16595189644

push

github

web-flow
#1393: Add HTTP_VERSIONS variable to allow HTTP version fallback/downgrade (#1434)

Co-authored-by: jan-vcapgemini <jan-vincent.hoelzle@capgemini.com>

3307 of 5232 branches covered (63.21%)

Branch coverage included in aggregate %.

8450 of 11916 relevant lines covered (70.91%)

3.13 hits per line

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

72.0
cli/src/main/java/com/devonfw/tools/ide/variable/VariableDefinitionStringList.java
1
package com.devonfw.tools.ide.variable;
2

3
import java.util.Collections;
4
import java.util.List;
5
import java.util.function.Function;
6

7
import com.devonfw.tools.ide.context.IdeContext;
8
import com.devonfw.tools.ide.environment.VariableLine;
9

10
/**
11
 * Implementation of {@link VariableDefinition} for a variable with the {@link #getValueType() value type} {@link String}.
12
 */
13
public class VariableDefinitionStringList extends AbstractVariableDefinitionList<String> {
14

15
  /**
16
   * The constructor.
17
   *
18
   * @param name the {@link #getName() variable name}.
19
   */
20
  public VariableDefinitionStringList(String name) {
21

22
    super(name);
×
23
  }
×
24

25
  /**
26
   * The constructor.
27
   *
28
   * @param name the {@link #getName() variable name}.
29
   * @param legacyName the {@link #getLegacyName() legacy name}.
30
   */
31
  public VariableDefinitionStringList(String name, String legacyName) {
32

33
    super(name, legacyName);
4✔
34
  }
1✔
35

36
  /**
37
   * The constructor.
38
   *
39
   * @param name the {@link #getName() variable name}.
40
   * @param legacyName the {@link #getLegacyName() legacy name}.
41
   * @param defaultValueFactory the factory {@link Function} for the {@link #getDefaultValue(IdeContext) default value}.
42
   */
43
  public VariableDefinitionStringList(String name, String legacyName,
44
      Function<IdeContext, List<String>> defaultValueFactory) {
45

46
    super(name, legacyName, defaultValueFactory);
5✔
47
  }
1✔
48

49
  /**
50
   * The constructor.
51
   *
52
   * @param name the {@link #getName() variable name}.
53
   * @param legacyName the {@link #getLegacyName() legacy name}.
54
   * @param defaultValueFactory the factory {@link Function} for the {@link #getDefaultValue(IdeContext) default value}.
55
   * @param forceDefaultValue the {@link #isForceDefaultValue() forceDefaultValue} flag.
56
   */
57
  public VariableDefinitionStringList(String name, String legacyName,
58
      Function<IdeContext, List<String>> defaultValueFactory, boolean forceDefaultValue) {
59

60
    super(name, legacyName, defaultValueFactory, forceDefaultValue);
×
61
  }
×
62

63
  @Override
64
  protected List<String> parseList(String value, IdeContext context) {
65

66
    return Collections.unmodifiableList(VariableLine.parseArray(value));
4✔
67
  }
68

69
  @Override
70
  protected String parseValue(String value, IdeContext context) {
71

72
    return value;
×
73
  }
74

75
  private boolean isBashArray(String value) {
76

77
    return value.startsWith("(") && value.endsWith(")");
12!
78
  }
79

80
  @Override
81
  public VariableLine migrateLine(VariableLine line) {
82

83
    line = super.migrateLine(line);
4✔
84
    String value = line.getValue();
3✔
85
    if ((value != null) && isBashArray(value)) {
6!
86
      List<String> list = fromString(value, null);
5✔
87
      line = line.withValue(String.join(", ", list));
6✔
88
    }
89
    return line;
2✔
90
  }
91

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