• 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

96.26
cli/src/main/java/com/devonfw/tools/ide/common/Tag.java
1
package com.devonfw.tools.ide.common;
2

3
import java.util.Collection;
4
import java.util.Collections;
5
import java.util.HashMap;
6
import java.util.HashSet;
7
import java.util.Locale;
8
import java.util.Map;
9
import java.util.Objects;
10
import java.util.Set;
11

12
/**
13
 * A {@link Tag} represents a classifier or category. A tool and plugin can be associated with {@link Tag}s allowing end users to find them.
14
 */
15
public final class Tag {
16

17
  private static final Tag[] NO_TAGS = new Tag[0];
3✔
18

19
  private static final Map<String, Tag> TAG_MAP = new HashMap<>(128);
5✔
20

21
  private static final Collection<Tag> ALL_TAGS = Collections.unmodifiableCollection(TAG_MAP.values());
4✔
22

23
  /** The root {@link Tag}. */
24
  public static final Tag ROOT = new Tag();
4✔
25

26
  static {
27
    TAG_MAP.put(ROOT.id, ROOT);
6✔
28
  }
29

30
  /** {@link #getParent() Parent} for miscellaneous (undefined) tags. */
31
  public static final Tag MISC = create("miscellaneous", ROOT, true, "misc");
6✔
32

33
  /** {@link #getParent() Parent} for programming-languages. */
34
  public static final Tag LANGUAGE = create("language", ROOT, true, "programming");
6✔
35

36
  /** {@link Tag} for JVM (Java Virtual Machine). */
37
  public static final Tag JVM = create("java-virtual-machine", LANGUAGE, false, "jvm");
6✔
38

39
  /** {@link Tag} for Java. */
40
  public static final Tag JAVA = create("java", JVM);
4✔
41

42
  /** {@link Tag} for Kotlin. */
43
  public static final Tag KOTLIN = create("kotlin", JVM);
4✔
44

45
  /** {@link Tag} for Scala. */
46
  public static final Tag SCALA = create("scala", JVM);
4✔
47

48
  /** {@link Tag} for DotNet (.NET). */
49
  public static final Tag DOTNET = create("dotnet", LANGUAGE, false, "net");
6✔
50

51
  /** {@link Tag} for C#. */
52
  public static final Tag CS = create("c#", DOTNET, false, "cs", "csharp");
15✔
53

54
  /** {@link Tag} for C. */
55
  public static final Tag C = create("c", LANGUAGE);
4✔
56

57
  /** {@link Tag} for Rust. */
58
  public static final Tag RUST = create("rust", LANGUAGE, false, "rs");
6✔
59

60
  /** {@link Tag} for C++. */
61
  public static final Tag CPP = create("c++", LANGUAGE, false, "cpp");
6✔
62

63
  /** {@link Tag} for Python. */
64
  public static final Tag PYTHON = create("python", LANGUAGE);
4✔
65

66
  /** {@link Tag} for Ruby. */
67
  public static final Tag RUBY = create("ruby", LANGUAGE);
4✔
68

69
  /** {@link Tag} for Perl. */
70
  public static final Tag PERL = create("perl", LANGUAGE);
4✔
71

72
  /** {@link Tag} for Shell scripting. */
73
  public static final Tag SHELL = create("shell", JVM, false, "script");
6✔
74

75
  /** {@link Tag} for Bash. */
76
  public static final Tag BASH = create("bash", SHELL, false, "terminal");
6✔
77

78
  /** {@link Tag} for TypeScript. */
79
  public static final Tag JAVA_SCRIPT = create("javascript", LANGUAGE, false, "js");
6✔
80

81
  /** {@link Tag} for TypeScript. */
82
  public static final Tag TYPE_SCRIPT = create("typescript", JAVA_SCRIPT, false, "ts");
6✔
83

84
  /** {@link #getParent() Parent} for programming-languages. */
85
  public static final Tag IDE = create("ide", ROOT);
4✔
86

87
  /** {@link Tag} for Eclipse. */
88
  public static final Tag ECLIPSE = create("eclipse", IDE);
4✔
89

90
  /** {@link Tag} for IDEA (JetBrains IDE Platform). */
91
  public static final Tag IDEA = create("idea", IDE);
4✔
92

93
  /** {@link Tag} for IntelliJ. */
94
  public static final Tag INTELLIJ = create("intellij", IDEA);
4✔
95

96
  /** {@link Tag} for IntelliJ. */
97
  public static final Tag ANDROID_STUDIO = create("android-studio", IDEA);
4✔
98

99
  /** {@link Tag} for VS-Code. */
100
  public static final Tag VS_CODE = create("vscode", IDE, false, "visualstudiocode");
6✔
101

102
  /** {@link Tag} for (code-)generators (including template-engines, etc.). */
103
  public static final Tag GENERATOR = create("generator", ROOT);
4✔
104

105
  /** {@link #getParent() Parent} for frameworks. */
106
  public static final Tag FRAMEWORK = create("framework", ROOT, true);
5✔
107

108
  /** {@link Tag} for Spring(framework). */
109
  public static final Tag SPRING = create("spring", FRAMEWORK, false, new String[] { "springframework", "springboot" },
21✔
110
      JAVA);
111

112
  /** {@link Tag} for Quarkus. */
113
  public static final Tag QUARKUS = create("quarkus", FRAMEWORK, false, null, JAVA);
12✔
114

115
  /** {@link Tag} for Micronaut. */
116
  public static final Tag MICRONAUT = create("micronaut", FRAMEWORK, false, null, JAVA);
12✔
117

118
  /** {@link Tag} for Angular. */
119
  public static final Tag ANGULAR = create("angular", FRAMEWORK, false, new String[] { "ng", "angularjs" },
21✔
120
      TYPE_SCRIPT);
121

122
  /** {@link Tag} for React. */
123
  public static final Tag REACT = create("react", FRAMEWORK, false, null, TYPE_SCRIPT);
12✔
124

125
  /** {@link Tag} for Vue. */
126
  public static final Tag VUE = create("vue", FRAMEWORK, false, null, TYPE_SCRIPT);
12✔
127

128
  /** {@link Tag} for Cordova. */
129
  public static final Tag CORDOVA = create("cordova", FRAMEWORK, false, null, JAVA_SCRIPT);
12✔
130

131
  /** {@link Tag} for Ionic. */
132
  public static final Tag IONIC = create("ionic", CORDOVA, false);
5✔
133

134
  /** {@link #getParent() Parent} for quality-assurance. */
135
  public static final Tag QA = create("quality-assurance", ROOT, false, "qa", "quality");
15✔
136

137
  /** {@link Tag} for everything related to testing. */
138
  public static final Tag TEST = create("testing", QA, false, "test");
6✔
139

140
  /** {@link Tag} for everything related to testing. */
141
  public static final Tag MOCK = create("mocking", TEST, false, "mock");
6✔
142

143
  /** {@link Tag} for everything related to testing. */
144
  public static final Tag CODE_QA = create("static-code-analysis", QA, false, "codeqa");
6✔
145

146
  /** {@link #getParent() Parent} for linters. */
147
  public static final Tag LINTING = create("linter", QA, false, "lint", "linting");
15✔
148

149
  /** {@link Tag} for everything related to documentation. */
150
  public static final Tag DOCUMENTATION = create("documentation", ROOT, false, "doc");
6✔
151

152
  /** {@link #getParent() Parent} for file formats. */
153
  public static final Tag FORMAT = create("format", ROOT, true);
5✔
154

155
  /** {@link Tag} for JSON. */
156
  public static final Tag JSON = create("json", FORMAT);
4✔
157

158
  /** {@link Tag} for YAML. */
159
  public static final Tag YAML = create("yaml", FORMAT, false, "yml");
6✔
160

161
  /** {@link Tag} for CSS. */
162
  public static final Tag CSS = create("css", FORMAT);
4✔
163

164
  /** {@link Tag} for Properties. */
165
  public static final Tag PROPERTIES = create("properties", FORMAT);
4✔
166

167
  /** {@link Tag} for AsciiDoc. */
168
  public static final Tag ASCII_DOC = create("ascii-doc", FORMAT, false, new String[] { "adoc" }, DOCUMENTATION);
17✔
169

170
  /** {@link Tag} for MarkDown. */
171
  public static final Tag MARK_DOWN = create("markdown", DOCUMENTATION, false, new String[] { "md" }, DOCUMENTATION);
17✔
172

173
  /** {@link Tag} for YAML. */
174
  public static final Tag PDF = create("pdf", FORMAT, false, null, DOCUMENTATION);
12✔
175

176
  /** {@link Tag} for HTML. */
177
  public static final Tag HTML = create("html", FORMAT, false, null, DOCUMENTATION);
12✔
178

179
  /** {@link Tag} for machine-learning. */
180
  public static final Tag MACHINE_LEARNING = create("machine-learning", ROOT, false, "ml");
6✔
181

182
  /** {@link Tag} for artificial-intelligence. */
183
  public static final Tag ARTIFICIAL_INTELLIGENCE = create("artificial-intelligence", MACHINE_LEARNING, false, "ai");
6✔
184

185
  /** {@link Tag} for data-science. */
186
  public static final Tag DATA_SCIENCE = create("data-science", ROOT);
4✔
187

188
  /** {@link Tag} for business-intelligence. */
189
  public static final Tag BUSINESS_INTELLIGENCE = create("business-intelligence", ROOT, false, "bi", "datawarehouse",
19✔
190
      "dwh");
191

192
  /** {@link #Tag} for productivity. */
193
  public static final Tag ARCHITECTURE = create("architecture", ROOT);
4✔
194

195
  /** {@link Tag} for AsciiDoc. */
196
  public static final Tag UML = create("uml", ARCHITECTURE, false, null, DOCUMENTATION);
12✔
197

198
  /** {@link #Tag} for security. */
199
  public static final Tag SECURITY = create("security", ROOT, false, "cve");
6✔
200

201
  /** {@link #Tag} for collaboration. */
202
  public static final Tag COLLABORATION = create("collaboration", ROOT, false, "collab");
6✔
203

204
  /** {@link #Tag} for virtualization. */
205
  public static final Tag VIRTUALIZATION = create("virtualization", ROOT, false, "vm");
6✔
206

207
  /** {@link #Tag} for docker. */
208
  public static final Tag DOCKER = create("docker", VIRTUALIZATION);
4✔
209

210
  /** {@link #Tag} for docker. */
211
  public static final Tag KUBERNETES = create("kubernetes", DOCKER, false, "k8s");
6✔
212

213
  /** {@link #Tag} for WSL. */
214
  public static final Tag WSL = create("wsl", VIRTUALIZATION);
4✔
215

216
  /** {@link Tag} for everything related to databases. */
217
  public static final Tag DB = create("database", ROOT);
4✔
218

219
  /** {@link #Tag} for network. */
220
  public static final Tag NETWORK = create("network", ROOT, false, "remote");
6✔
221

222
  /** {@link #Tag} for HTTP. */
223
  public static final Tag HTTP = create("http", NETWORK);
4✔
224

225
  /** {@link #Tag} for REST. */
226
  public static final Tag REST = create("rest", HTTP);
4✔
227

228
  /** {@link #Tag} for secure-shell. */
229
  public static final Tag SSH = create("secure-shell", NETWORK, false, "ssh", "scp");
15✔
230

231
  /** {@link #Tag} for capture. */
232
  public static final Tag CAPTURE = create("capture", ROOT, false, "capturing");
6✔
233

234
  /** {@link #Tag} for capture. */
235
  public static final Tag SCREENSHOT = create("screenshot", CAPTURE);
4✔
236

237
  /** {@link #Tag} for capture. */
238
  public static final Tag SCREEN_RECORDING = create("screenrecording", CAPTURE, false, "videocapture");
6✔
239

240
  /** {@link #Tag} for productivity. */
241
  public static final Tag PRODUCTIVITY = create("productivity", ROOT);
4✔
242

243
  /** {@link #Tag} for regular-expression. */
244
  public static final Tag REGEX = create("regular-expression", PRODUCTIVITY, false, "regex", "regexp");
15✔
245

246
  /** {@link #Tag} for search. */
247
  public static final Tag SEARCH = create("search", PRODUCTIVITY, false, "find");
6✔
248

249
  /** {@link #Tag} for spellchecker. */
250
  public static final Tag SPELLCHECKER = create("spellchecker", PRODUCTIVITY, false, "spellcheck", "spellchecking");
15✔
251

252
  /** {@link #Tag} for analyse. */
253
  public static final Tag ANALYSE = create("analyse", ROOT, false, "analyze", "analysis");
15✔
254

255
  /** {@link #Tag} for monitoring. */
256
  public static final Tag MONITORING = create("monitoring", ANALYSE, false, "monitor");
6✔
257

258
  /** {@link #Tag} for formatter. */
259
  public static final Tag FORMATTER = create("formatter", ROOT, false, "codeformat", "codeformatter");
15✔
260

261
  /** {@link #Tag} for user-experience. */
262
  public static final Tag UX = create("user-experience", PRODUCTIVITY, false, "ux");
6✔
263

264
  /** {@link #Tag} for style. */
265
  public static final Tag STYLE = create("style", UX, false, "theme", "icon", "skin");
19✔
266

267
  /** {@link #Tag} for style. */
268
  public static final Tag KEYBINDING = create("keybinding", UX, false, "keybindings", "keymap");
15✔
269

270
  /** {@link #Tag} for draw(ing). */
271
  public static final Tag DRAW = create("draw", UX, false, "diagram", "paint");
15✔
272

273
  /** {@link #Tag} for cloud. */
274
  public static final Tag CLOUD = create("cloud", ROOT);
4✔
275

276
  /** {@link #Tag} for infrastructure-as-code. */
277
  public static final Tag IAC = create("infrastructure-as-code", CLOUD, false, "iac");
6✔
278

279
  /** {@link #Tag} for software-configuration-management. */
280
  public static final Tag CONFIG_MANAGEMENT = create("software-configuration-management", ROOT, false,
15✔
281
      "configmanagement", "configurationmanagement");
282

283
  /** {@link #Tag} for build-management. */
284
  public static final Tag BUILD = create("build-management", CONFIG_MANAGEMENT, false, "build");
6✔
285

286
  /** {@link #Tag} for version-control. */
287
  public static final Tag VCS = create("version-control", CONFIG_MANAGEMENT, false, "vcs", "versioncontrolsystem");
15✔
288

289
  /** {@link #Tag} for issue-management. */
290
  public static final Tag ISSUE = create("issue-management", CONFIG_MANAGEMENT, false, "issue");
6✔
291

292
  /** {@link #Tag} for git. */
293
  public static final Tag GIT = create("git", VCS);
4✔
294

295
  /** {@link #Tag} for github. */
296
  public static final Tag GITHUB = create("github", GIT);
4✔
297

298

299
  /** {@link #Tag} for diff (tools that compare files and determine the difference). */
300
  public static final Tag DIFF = create("diff", CONFIG_MANAGEMENT, false, "patch");
6✔
301

302
  /** {@link #Tag} for diff (tools that compare files and determine the difference). */
303
  public static final Tag RUNTIME = create("runtime", ROOT);
4✔
304

305
  /** {@link #getParent() Parent} for operating-system. */
306
  public static final Tag OS = create("operating-system", ROOT, true, "os");
6✔
307

308
  /** {@link #Tag} for Windows. */
309
  public static final Tag WINDOWS = create("windows", OS);
4✔
310

311
  /** {@link #Tag} for Mac. */
312
  public static final Tag MAC = create("mac", OS, false, "macos", "osx");
15✔
313

314
  /** {@link #Tag} for Linux. */
315
  public static final Tag LINUX = create("linux", OS, false);
5✔
316

317
  /** {@link #getParent() Parent} for cryptography. */
318
  public static final Tag CRYPTO = create("cryptography", ROOT, false, "crypto");
6✔
319

320
  /** {@link #Tag} for encryption. */
321
  public static final Tag ENCRYPTION = create("encryption", CRYPTO);
5✔
322

323
  private final String id;
324

325
  private final Tag parent;
326

327
  private final boolean isAbstract;
328

329
  private final Tag[] additionalParents;
330

331
  private Tag() {
2✔
332

333
    this.id = "<root>";
3✔
334
    this.parent = null;
3✔
335
    this.isAbstract = true;
3✔
336
    this.additionalParents = NO_TAGS;
3✔
337
  }
1✔
338

339
  private Tag(String id, Tag parent, boolean isAbstract, Tag... additionalParents) {
340

341
    super();
2✔
342
    Objects.requireNonNull(id);
3✔
343
    Objects.requireNonNull(parent);
3✔
344
    assert (id.toLowerCase(Locale.ROOT).equals(id));
7!
345
    this.id = id;
3✔
346
    this.parent = parent;
3✔
347
    this.isAbstract = isAbstract;
3✔
348
    this.additionalParents = additionalParents;
3✔
349
  }
1✔
350

351
  /**
352
   * @return the identifier and name of this tag.
353
   */
354
  public String getId() {
355

356
    return this.id;
3✔
357
  }
358

359
  /**
360
   * @return the parent {@link Tag} or {@code null} if this is the root tag.
361
   */
362
  public Tag getParent() {
363

364
    return this.parent;
3✔
365
  }
366

367
  /**
368
   * @param i the index of the requested parent. Should be in the range from {@code 0} to
369
   * <code>{@link #getParentCount()}-1</code>.
370
   * @return the requested {@link Tag}.
371
   */
372
  public Tag getParent(int i) {
373

374
    if (i == 0) {
2✔
375
      return this.parent;
3✔
376
    }
377
    return this.additionalParents[i - 1];
7✔
378
  }
379

380
  /**
381
   * @return the number of {@link #getParent(int) parents} available.
382
   */
383
  public int getParentCount() {
384

385
    if (this.parent == null) {
3✔
386
      return 0;
2✔
387
    }
388
    return this.additionalParents.length + 1;
6✔
389
  }
390

391
  /**
392
   * @return {@code true} if this {@link Tag} is abstract and cannot be selected since it is just a generic parent container, {@code false} otherwise.
393
   */
394
  public boolean isAbstract() {
395

396
    return this.isAbstract;
3✔
397
  }
398

399
  public boolean isAncestorOf(Tag tag) {
400

401
    return isAncestorOf(tag, false);
5✔
402
  }
403

404
  /**
405
   * @param tag the {@link Tag} to check.
406
   * @param includeAdditionalParents - {@code true} if {@link #getParent(int) additional parents} should be included, {@code false} otherwise (only consider
407
   * {@link #getParent() primary parent}).
408
   * @return {@code true} if the given {@link Tag} is an ancestor of this tag, {@code false} otherwise. An ancestor is a direct or indirect
409
   * {@link #getParent() parent}. Therefore, if {@link #ROOT} is given as {@link Tag} parameter, this method should always return {@code true}.
410
   */
411
  public boolean isAncestorOf(Tag tag, boolean includeAdditionalParents) {
412

413
    Tag ancestor = this.parent;
3✔
414
    while (ancestor != null) {
2✔
415
      if (ancestor == tag) {
3✔
416
        return true;
2✔
417
      }
418
      ancestor = ancestor.parent;
4✔
419
    }
420
    if (includeAdditionalParents) {
2✔
421
      for (Tag p : this.additionalParents) {
15!
422
        do {
423
          if (p == tag) {
3✔
424
            return true;
2✔
425
          }
426
          p = p.parent;
3✔
427
        } while (p != null);
2!
428
      }
429
    }
430
    return false;
2✔
431
  }
432

433
  @Override
434
  public String toString() {
435

436
    return this.id;
3✔
437
  }
438

439
  /**
440
   * @param id the {@link #getId() ID} of the tag.
441
   * @param parent the {@link #getParent() parent tag}.
442
   * @param isAbstract the {@link #isAbstract() abstract flag}.
443
   * @return the new {@link Tag}.
444
   */
445
  static Tag create(String id, Tag parent) {
446

447
    return create(id, parent, false);
5✔
448
  }
449

450
  /**
451
   * @param id the {@link #getId() ID} of the tag.
452
   * @param parent the {@link #getParent() parent tag}.
453
   * @param isAbstract the {@link #isAbstract() abstract flag}.
454
   * @return the new {@link Tag}.
455
   */
456
  static Tag create(String id, Tag parent, boolean isAbstract) {
457

458
    return create(id, parent, isAbstract, null, NO_TAGS);
7✔
459
  }
460

461
  /**
462
   * @param id the {@link #getId() ID} of the tag.
463
   * @param parent the {@link #getParent() parent tag}.
464
   * @param isAbstract the {@link #isAbstract() abstract flag}.
465
   * @return the new {@link Tag}.
466
   */
467
  static Tag create(String id, Tag parent, boolean isAbstract, String synonym) {
468

469
    return create(id, parent, isAbstract, new String[] { synonym }, NO_TAGS);
12✔
470
  }
471

472
  /**
473
   * @param id the {@link #getId() ID} of the tag.
474
   * @param parent the {@link #getParent() parent tag}.
475
   * @param isAbstract the {@link #isAbstract() abstract flag}.
476
   * @return the new {@link Tag}.
477
   */
478
  static Tag create(String id, Tag parent, boolean isAbstract, String... synonyms) {
479

480
    return create(id, parent, isAbstract, synonyms, NO_TAGS);
7✔
481
  }
482

483
  /**
484
   * @param id the {@link #getId() ID} of the tag.
485
   * @param parent the {@link #getParent() parent tag}.
486
   * @param isAbstract the {@link #isAbstract() abstract flag}.
487
   * @return the new {@link Tag}.
488
   */
489
  static Tag create(String id, Tag parent, boolean isAbstract, String[] synonyms, Tag... additionalParents) {
490

491
    Tag tag = new Tag(id, parent, isAbstract, additionalParents);
8✔
492
    add(id, tag);
3✔
493
    if (synonyms != null) {
2✔
494
      for (String synonym : synonyms) {
16✔
495
        add(synonym, tag);
3✔
496
      }
497
    }
498
    return tag;
2✔
499
  }
500

501
  private static void add(String key, Tag tag) {
502

503
    Tag duplicate = TAG_MAP.put(normalizeKey(key), tag);
7✔
504
    if (duplicate != null) {
2!
505
      throw new IllegalStateException("Duplicate tag for " + key);
×
506
    }
507
  }
1✔
508

509
  private static String normalizeKey(String key) {
510

511
    return key.replace("-", "").replace(".", "");
8✔
512
  }
513

514
  private static Tag require(String key) {
515

516
    Tag tag = TAG_MAP.get(normalizeKey(key));
6✔
517
    if (tag == null) {
2!
518
      throw new IllegalStateException("Could not find required tag " + key);
×
519
    }
520
    return tag;
2✔
521
  }
522

523
  /**
524
   * @param id the {@link #getId() ID} of the requested {@link Tag}.
525
   * @return the {@link Tag} with the given {@link #getId() ID}. Will be lazily created as child of {@link #MISC} if not already exists.
526
   */
527
  public static Tag of(String id) {
528

529
    final String tagId = id.trim();
3✔
530
    int slash = tagId.indexOf('/');
4✔
531
    if (slash >= 0) {
2✔
532
      String parentId = tagId.substring(0, slash);
5✔
533
      Tag parent = require(parentId);
3✔
534
      String childId = tagId.substring(slash + 1);
6✔
535
      return TAG_MAP.computeIfAbsent(normalizeKey(childId), i -> new Tag(childId, parent, false, NO_TAGS));
17✔
536
    }
537
    return TAG_MAP.computeIfAbsent(normalizeKey(tagId), i -> new Tag(tagId, MISC, false, NO_TAGS));
16✔
538
  }
539

540
  /**
541
   * @return the {@link Collections} of all available {@link Tag}s.
542
   */
543
  public static Collection<Tag> getAll() {
544

545
    return ALL_TAGS;
2✔
546
  }
547

548
  /**
549
   * @param tagsCsv the tags as {@link String} in CSV format («first-tag»,...,«last-tag»). May be {@code null} or empty.
550
   * @return the parsed {@link Set} of {@link Tag}s.
551
   */
552
  public static Set<Tag> parseCsv(String tagsCsv) {
553

554
    if (tagsCsv == null) {
2✔
555
      return Collections.emptySet();
2✔
556
    }
557
    tagsCsv = tagsCsv.trim().toLowerCase(Locale.ROOT);
5✔
558
    if (tagsCsv.isEmpty()) {
3✔
559
      return Collections.emptySet();
2✔
560
    }
561
    String[] tagArray = tagsCsv.split(",");
4✔
562
    Set<Tag> tags = new HashSet<>(tagArray.length);
6✔
563
    for (String tag : tagArray) {
16✔
564
      tags.add(of(tag));
5✔
565
    }
566
    assert (tags.size() == tagArray.length);
6!
567
    return Set.of(tags.toArray(new Tag[tags.size()]));
8✔
568
  }
569

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