From cb28df6b30b6ca3349efc858e686cdd9f0183210 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yann=20C=C3=A9bron?= Date: Thu, 25 Apr 2019 16:04:23 +0200 Subject: [PATCH] [devkit] ExtensionPointCandidate: cleanup GitOrigin-RevId: 21bb5fb5e03a32009986ec15e5949fad88755972 --- .../src/util/ExtensionPointCandidate.java | 26 +++++-------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/plugins/devkit/devkit-core/src/util/ExtensionPointCandidate.java b/plugins/devkit/devkit-core/src/util/ExtensionPointCandidate.java index 13db4271bb7c..a76ad20fc0a8 100644 --- a/plugins/devkit/devkit-core/src/util/ExtensionPointCandidate.java +++ b/plugins/devkit/devkit-core/src/util/ExtensionPointCandidate.java @@ -1,23 +1,11 @@ -/* - * Copyright 2000-2014 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.idea.devkit.util; import com.intellij.psi.SmartPsiElementPointer; import com.intellij.psi.xml.XmlTag; +import java.util.Objects; + public class ExtensionPointCandidate extends PointableCandidate { public final String epName; public final String attributeName; @@ -57,10 +45,10 @@ public class ExtensionPointCandidate extends PointableCandidate { ExtensionPointCandidate candidate = (ExtensionPointCandidate)o; - if (epName != null ? !epName.equals(candidate.epName) : candidate.epName != null) return false; - if (attributeName != null ? !attributeName.equals(candidate.attributeName) : candidate.attributeName != null) return false; - if (tagName != null ? !tagName.equals(candidate.tagName) : candidate.tagName != null) return false; - if (beanClassName != null ? !beanClassName.equals(candidate.beanClassName) : candidate.beanClassName != null) return false; + if (!Objects.equals(epName, candidate.epName)) return false; + if (!Objects.equals(attributeName, candidate.attributeName)) return false; + if (!Objects.equals(tagName, candidate.tagName)) return false; + if (!Objects.equals(beanClassName, candidate.beanClassName)) return false; return true; }