Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mmews committed Jul 19, 2024
1 parent 3bb0ede commit f3ccffa
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -316,10 +316,8 @@ public void checkConsistentPolyfills(JSONDocument document) {

// Search for clashes in Polyfill:
// markermap: {lib1,lib2,...}->"filledname"
Multimap<Set<JSONStringLiteral>, String> markerMapLibs2FilledName = LinkedListMultimap.create(); // Value is
// QualifiedName
// of
// polyfill_Element
// Value is QualifiedName of polyfill_Element
Multimap<Set<JSONStringLiteral>, String> markerMapLibs2FilledName = LinkedListMultimap.create();
for (String polyExport_QN : exportedPolyfills_QN_to_PolyProvision.keySet()) {
List<PolyFilledProvision> polyProvisions = exportedPolyfills_QN_to_PolyProvision.get(polyExport_QN);
if (polyProvisions.size() > 1) {
Expand Down Expand Up @@ -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)) {
Expand Down Expand Up @@ -1406,7 +1404,7 @@ private void checkReference(ValidationProjectReference ref, Map<String, N4JSProj
}

// create only a single validation issue for a particular project reference.
if (currentProjectName == refName && !allowReflexive) {
if (Objects.equals(currentProjectName, refName) && !allowReflexive) {
// reflexive self-references
addProjectReferencesItselfIssue(ref.astRepresentation);
return;
Expand Down

0 comments on commit f3ccffa

Please sign in to comment.