Skip to content

Commit 4b5da22

Browse files
authored
fix: stabilize reflection class implementation (#22768)
* fix: stabilize reflection class implementation * Address review: fix formatting as requested
1 parent 7ec4660 commit 4b5da22

File tree

1 file changed

+14
-14
lines changed
  • flow-plugins/flow-maven-plugin/src/main/java/com/vaadin/flow/plugin/maven

1 file changed

+14
-14
lines changed

flow-plugins/flow-maven-plugin/src/main/java/com/vaadin/flow/plugin/maven/Reflector.java

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
import java.util.ArrayList;
3030
import java.util.Collections;
3131
import java.util.Enumeration;
32-
import java.util.HashMap;
32+
import java.util.LinkedHashMap;
3333
import java.util.List;
3434
import java.util.Map;
3535
import java.util.Set;
@@ -309,19 +309,19 @@ private static ReflectorClassLoader createIsolatedClassLoader(
309309
record FilterableArtifact(Artifact artifact, boolean scan) {
310310
}
311311

312-
Map<String, FilterableArtifact> projectDependencies = new HashMap<>(
313-
project.getArtifacts().stream()
314-
// Exclude all maven artifacts to prevent class loading
315-
// clash
316-
// with maven.api class realm
317-
.filter(artifact -> !DEPENDENCIES_GROUP_EXCLUSIONS
318-
.contains(artifact.getGroupId()))
319-
.filter(Reflector::isProductionDependency)
320-
.map(artifact -> new FilterableArtifact(artifact,
321-
shouldScan.test(artifact)))
322-
.collect(Collectors.toMap(
323-
item -> keyMapper.apply(item.artifact),
324-
Function.identity())));
312+
Map<String, FilterableArtifact> projectDependencies = project
313+
.getArtifacts().stream()
314+
// Exclude all maven artifacts to prevent class loading
315+
// clash
316+
// with maven.api class realm
317+
.filter(artifact -> !DEPENDENCIES_GROUP_EXCLUSIONS
318+
.contains(artifact.getGroupId()))
319+
.filter(Reflector::isProductionDependency)
320+
.map(artifact -> new FilterableArtifact(artifact,
321+
shouldScan.test(artifact)))
322+
.collect(Collectors.toMap(
323+
item -> keyMapper.apply(item.artifact),
324+
Function.identity(), (a, b) -> a, LinkedHashMap::new));
325325

326326
if (mojoExecution != null) {
327327

0 commit comments

Comments
 (0)