cleanup — notNull

This commit is contained in:
Vladimir Krivosheev
2018-07-31 16:55:18 +02:00
parent 6e6035392b
commit 28a39064ff
6 changed files with 11 additions and 40 deletions
@@ -1,30 +1,17 @@
/*
* Copyright 2000-2013 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-2018 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 com.intellij.compiler.impl.javaCompiler.javac;
import com.intellij.openapi.application.PathMacroFilter;
import org.jdom.Attribute;
import org.jdom.Element;
import org.jetbrains.annotations.NotNull;
/**
* @author nik
*/
public class JavacConfigurationMacroFilter extends PathMacroFilter {
@Override
public boolean recursePathMacros(Attribute attribute) {
public boolean recursePathMacros(@NotNull Attribute attribute) {
if (attribute.getName().equals("value")) {
Element parent = attribute.getParent();
if (parent != null && "option".equals(parent.getName()) && "ADDITIONAL_OPTIONS_STRING".equals(parent.getAttributeValue("name"))) {
@@ -7,8 +7,6 @@ import org.jetbrains.annotations.NotNull;
/**
* Allows to disable expansion of path macros in the values of certain properties.
*
* @author yole
*/
public abstract class PathMacroFilter {
public boolean skipPathMacros(@NotNull Element element) {
@@ -19,7 +17,7 @@ public abstract class PathMacroFilter {
return false;
}
public boolean recursePathMacros(Attribute attribute) {
public boolean recursePathMacros(@NotNull Attribute attribute) {
return false;
}
}
@@ -1,4 +1,4 @@
// Copyright 2000-2017 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.
// Copyright 2000-2018 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 com.intellij.execution.configuration;
import com.intellij.openapi.application.PathMacroFilter;
@@ -16,7 +16,7 @@ class RunConfigurationPathMacroFilter extends PathMacroFilter {
}
@Override
public boolean recursePathMacros(Attribute attribute) {
public boolean recursePathMacros(@NotNull Attribute attribute) {
final Element parent = attribute.getParent();
if (parent != null && "option".equals(parent.getName())) {
final Element grandParent = parent.getParentElement();
@@ -1,4 +1,4 @@
// Copyright 2000-2017 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.
// Copyright 2000-2018 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 com.intellij.run;
import com.intellij.application.options.PathMacrosCollector;
@@ -43,7 +43,7 @@ public class PathMacrosCollectorTest extends TestCase {
final Set<String> macros = PathMacrosCollector.getMacroNames(root, new PathMacroFilter() {
@Override
public boolean recursePathMacros(Attribute attribute) {
public boolean recursePathMacros(@NotNull Attribute attribute) {
return "value".equals(attribute.getName());
}
}, new PathMacrosImpl());
@@ -37,7 +37,7 @@ public class CompositePathMacroFilter extends PathMacroFilter {
}
@Override
public boolean recursePathMacros(Attribute attribute) {
public boolean recursePathMacros(@NotNull Attribute attribute) {
for (PathMacroFilter filter : myFilters) {
if (filter.recursePathMacros(attribute)) return true;
}
@@ -1,18 +1,4 @@
/*
* Copyright 2000-2017 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-2018 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 com.intellij.openapi.components.impl.stores;
import com.intellij.application.options.PathMacrosCollector;
@@ -72,7 +58,7 @@ public class DirectoryStorageUtil {
continue;
}
Element state = (Element)elementChildren.get(0).detach();
Element state = elementChildren.get(0).detach();
if (JDOMUtil.isEmpty(state)) {
continue;
}