From f3ccffad050f30535cd358d97d407c9cfbf906d9 Mon Sep 17 00:00:00 2001 From: mmews Date: Fri, 19 Jul 2024 10:04:10 +0200 Subject: [PATCH] fix --- .../N4JSProjectSetupJsonValidatorExtension.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/plugins/org.eclipse.n4js/src/org/eclipse/n4js/validation/validators/packagejson/N4JSProjectSetupJsonValidatorExtension.java b/plugins/org.eclipse.n4js/src/org/eclipse/n4js/validation/validators/packagejson/N4JSProjectSetupJsonValidatorExtension.java index ab42175a37..9959365969 100644 --- a/plugins/org.eclipse.n4js/src/org/eclipse/n4js/validation/validators/packagejson/N4JSProjectSetupJsonValidatorExtension.java +++ b/plugins/org.eclipse.n4js/src/org/eclipse/n4js/validation/validators/packagejson/N4JSProjectSetupJsonValidatorExtension.java @@ -10,7 +10,6 @@ */ package org.eclipse.n4js.validation.validators.packagejson; -import static com.google.common.base.Preconditions.checkState; import static com.google.common.base.Strings.nullToEmpty; import static org.eclipse.n4js.packagejson.PackageJsonProperties.DEPENDENCIES; import static org.eclipse.n4js.packagejson.PackageJsonProperties.DEV_DEPENDENCIES; @@ -159,6 +158,7 @@ import org.eclipse.xtext.xbase.lib.StringExtensions; import org.eclipse.xtext.xbase.lib.util.ToStringBuilder; +import com.google.common.base.Preconditions; import com.google.common.base.Predicate; import com.google.common.base.Predicates; import com.google.common.collect.HashMultimap; @@ -316,10 +316,8 @@ public void checkConsistentPolyfills(JSONDocument document) { // Search for clashes in Polyfill: // markermap: {lib1,lib2,...}->"filledname" - Multimap, String> markerMapLibs2FilledName = LinkedListMultimap.create(); // Value is - // QualifiedName - // of - // polyfill_Element + // Value is QualifiedName of polyfill_Element + Multimap, String> markerMapLibs2FilledName = LinkedListMultimap.create(); for (String polyExport_QN : exportedPolyfills_QN_to_PolyProvision.keySet()) { List polyProvisions = exportedPolyfills_QN_to_PolyProvision.get(polyExport_QN); if (polyProvisions.size() > 1) { @@ -656,7 +654,7 @@ public void checkExternalProjectDoesNotReferenceWorkspaceProject(JSONValue depen while (!stack.isEmpty()) { N4JSProjectConfigSnapshot actual = stack.pop(); String actualId = actual.getPackageName(); - checkState(actual.isExternal(), + Preconditions.checkState(actual.isExternal(), "Implementation error. Only external projects are expected: %s.".formatted(actual)); if (!visitedProjectNames.add(actualId)) { @@ -1406,7 +1404,7 @@ private void checkReference(ValidationProjectReference ref, Map