void (State state, MavenProjectReaderResult readerResult, boolean reset) { MavenModel model = readerResult.mavenModel; Set<MavenId> newUnresolvedArtifacts = new HashSet<>(); LinkedHashSet<MavenRemoteRepository> newRepositories = new LinkedHashSet<>(); LinkedHashSet<MavenArtifact> newDependencies = new LinkedHashSet<>(); LinkedHashSet<MavenArtifactNode> newDependencyTree = new LinkedHashSet<>(); LinkedHashSet<MavenPlugin> newPlugins = new LinkedHashSet<>(); LinkedHashSet<MavenArtifact> newExtensions = new LinkedHashSet<>(); LinkedHashSet<MavenArtifact> newAnnotationProcessors = new LinkedHashSet<>(); if (!reset) { if (state.myUnresolvedArtifactIds != null) newUnresolvedArtifacts.addAll(state.myUnresolvedArtifactIds); if (state.myRemoteRepositories != null) newRepositories.addAll(state.myRemoteRepositories); if (state.myDependencies != null) newDependencies.addAll(state.myDependencies); if (state.myDependencyTree != null) newDependencyTree.addAll(state.myDependencyTree); if (state.myPlugins != null) newPlugins.addAll(state.myPlugins); if (state.myExtensions != null) newExtensions.addAll(state.myExtensions); if (state.myAnnotationProcessors != null) newAnnotationProcessors.addAll(state.myAnnotationProcessors); } newUnresolvedArtifacts.addAll(readerResult.unresolvedArtifactIds); newRepositories.addAll(model.getRemoteRepositories()); newDependencyTree.addAll(model.getDependencyTree()); newDependencies.addAll(model.getDependencies()); newPlugins.addAll(model.getPlugins()); newExtensions.addAll(model.getExtensions()); state.myUnresolvedArtifactIds = newUnresolvedArtifacts; state.myRemoteRepositories = new ArrayList<>(newRepositories); state.myDependencies = new ArrayList<>(newDependencies); state.myDependencyTree = new ArrayList<>(newDependencyTree); state.myPlugins = new ArrayList<>(newPlugins); state.myExtensions = new ArrayList<>(newExtensions); state.myAnnotationProcessors = new ArrayList<>(newAnnotationProcessors); }