From b7f68ecec14a0ca0a740140a2260b73cc4bdd33c Mon Sep 17 00:00:00 2001 From: Vladimir Krivosheev Date: Wed, 6 Dec 2017 13:49:19 +0100 Subject: [PATCH] add NotNull to read/writeExternal --- .../jar/JarApplicationConfiguration.java | 18 +++--------------- .../ExternalSystemRunConfiguration.java | 8 +++++--- .../UnknownRunConfiguration.java | 16 ++-------------- .../junit/RuntimeConfigurationProducer.java | 18 +++--------------- .../DeployToServerRunConfiguration.java | 8 +++++--- .../debugger/RemoteDebugConfiguration.java | 18 +++--------------- .../sm/runner/MockRuntimeConfiguration.java | 18 +++--------------- .../AbstractRerunFailedTestsAction.java | 18 +++--------------- .../config/execution/AntRunConfiguration.java | 18 +++--------------- .../devkit/src/run/PluginRunConfiguration.java | 18 +++--------------- .../maven/execution/MavenRunConfiguration.java | 18 +++--------------- .../xpath/xslt/run/XsltRunConfiguration.java | 4 ++-- 12 files changed, 38 insertions(+), 142 deletions(-) diff --git a/java/execution/impl/src/com/intellij/execution/jar/JarApplicationConfiguration.java b/java/execution/impl/src/com/intellij/execution/jar/JarApplicationConfiguration.java index 3b303115580c..ed1b5eba36a1 100644 --- a/java/execution/impl/src/com/intellij/execution/jar/JarApplicationConfiguration.java +++ b/java/execution/impl/src/com/intellij/execution/jar/JarApplicationConfiguration.java @@ -1,17 +1,5 @@ /* - * Copyright 2000-2016 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-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. */ package com.intellij.execution.jar; @@ -65,7 +53,7 @@ public class JarApplicationConfiguration extends LocatableConfigurationBase impl } @Override - public void readExternal(Element element) throws InvalidDataException { + public void readExternal(@NotNull Element element) throws InvalidDataException { super.readExternal(element); JavaRunConfigurationExtensionManager.getInstance().readExternal(this, element); XmlSerializer.deserializeInto(myBean, element); @@ -92,7 +80,7 @@ public class JarApplicationConfiguration extends LocatableConfigurationBase impl } @Override - public void writeExternal(Element element) throws WriteExternalException { + public void writeExternal(@NotNull Element element) throws WriteExternalException { super.writeExternal(element); JavaRunConfigurationExtensionManager.getInstance().writeExternal(this, element); XmlSerializer.serializeInto(myBean, element, SERIALIZATION_FILTERS); diff --git a/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/execution/ExternalSystemRunConfiguration.java b/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/execution/ExternalSystemRunConfiguration.java index 8c0e75a14aff..edec72b4e3ee 100644 --- a/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/execution/ExternalSystemRunConfiguration.java +++ b/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/execution/ExternalSystemRunConfiguration.java @@ -1,4 +1,6 @@ -// 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-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. + */ package com.intellij.openapi.externalSystem.service.execution; import com.intellij.build.*; @@ -122,7 +124,7 @@ public class ExternalSystemRunConfiguration extends LocatableConfigurationBase i } @Override - public void readExternal(Element element) throws InvalidDataException { + public void readExternal(@NotNull Element element) throws InvalidDataException { super.readExternal(element); Element e = element.getChild(ExternalSystemTaskExecutionSettings.TAG_NAME); if (e != null) { @@ -132,7 +134,7 @@ public class ExternalSystemRunConfiguration extends LocatableConfigurationBase i } @Override - public void writeExternal(Element element) throws WriteExternalException { + public void writeExternal(@NotNull Element element) throws WriteExternalException { super.writeExternal(element); element.addContent(XmlSerializer.serialize(mySettings, new SerializationFilter() { @Override diff --git a/platform/lang-api/src/com/intellij/execution/configurations/UnknownRunConfiguration.java b/platform/lang-api/src/com/intellij/execution/configurations/UnknownRunConfiguration.java index 9e9b24a8330b..89294e1e2e20 100644 --- a/platform/lang-api/src/com/intellij/execution/configurations/UnknownRunConfiguration.java +++ b/platform/lang-api/src/com/intellij/execution/configurations/UnknownRunConfiguration.java @@ -1,17 +1,5 @@ /* - * 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-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. */ package com.intellij.execution.configurations; @@ -118,7 +106,7 @@ public class UnknownRunConfiguration implements RunConfiguration, WithoutOwnBefo } @Override - public void readExternal(final Element element) throws InvalidDataException { + public void readExternal(@NotNull final Element element) throws InvalidDataException { myStoredElement = JDOMUtil.internElement(element); } diff --git a/platform/lang-api/src/com/intellij/execution/junit/RuntimeConfigurationProducer.java b/platform/lang-api/src/com/intellij/execution/junit/RuntimeConfigurationProducer.java index a43e6f5766fc..bb38f0b0b3ea 100644 --- a/platform/lang-api/src/com/intellij/execution/junit/RuntimeConfigurationProducer.java +++ b/platform/lang-api/src/com/intellij/execution/junit/RuntimeConfigurationProducer.java @@ -1,17 +1,5 @@ /* - * 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-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. */ package com.intellij.execution.junit; @@ -216,12 +204,12 @@ public abstract class RuntimeConfigurationProducer implements Comparable, Clonea } @Override - public void readExternal(Element element) throws InvalidDataException { + public void readExternal(@NotNull Element element) throws InvalidDataException { myConfig.readExternal(element); } @Override - public void writeExternal(Element element) throws WriteExternalException { + public void writeExternal(@NotNull Element element) throws WriteExternalException { myConfig.writeExternal(element); } diff --git a/platform/remote-servers/impl/src/com/intellij/remoteServer/impl/configuration/deployment/DeployToServerRunConfiguration.java b/platform/remote-servers/impl/src/com/intellij/remoteServer/impl/configuration/deployment/DeployToServerRunConfiguration.java index e3f8cc0420ab..dd8b85ae5097 100644 --- a/platform/remote-servers/impl/src/com/intellij/remoteServer/impl/configuration/deployment/DeployToServerRunConfiguration.java +++ b/platform/remote-servers/impl/src/com/intellij/remoteServer/impl/configuration/deployment/DeployToServerRunConfiguration.java @@ -1,4 +1,6 @@ -// 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-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. + */ package com.intellij.remoteServer.impl.configuration.deployment; import com.intellij.configurationStore.ComponentSerializationUtil; @@ -174,7 +176,7 @@ public class DeployToServerRunConfiguration() { @Override diff --git a/plugins/maven/src/main/java/org/jetbrains/idea/maven/execution/MavenRunConfiguration.java b/plugins/maven/src/main/java/org/jetbrains/idea/maven/execution/MavenRunConfiguration.java index 9903c2d730c8..e3d8e66f1bd4 100644 --- a/plugins/maven/src/main/java/org/jetbrains/idea/maven/execution/MavenRunConfiguration.java +++ b/plugins/maven/src/main/java/org/jetbrains/idea/maven/execution/MavenRunConfiguration.java @@ -1,17 +1,5 @@ /* - * 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-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. */ package org.jetbrains.idea.maven.execution; @@ -137,7 +125,7 @@ public class MavenRunConfiguration extends LocatableConfigurationBase implements } @Override - public void readExternal(Element element) throws InvalidDataException { + public void readExternal(@NotNull Element element) throws InvalidDataException { super.readExternal(element); Element mavenSettingsElement = element.getChild(MavenSettings.TAG); @@ -152,7 +140,7 @@ public class MavenRunConfiguration extends LocatableConfigurationBase implements } @Override - public void writeExternal(Element element) throws WriteExternalException { + public void writeExternal(@NotNull Element element) throws WriteExternalException { super.writeExternal(element); element.addContent(XmlSerializer.serialize(mySettings)); } diff --git a/plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/xslt/run/XsltRunConfiguration.java b/plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/xslt/run/XsltRunConfiguration.java index faab7a69ea42..7cd556bb87bd 100644 --- a/plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/xslt/run/XsltRunConfiguration.java +++ b/plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/xslt/run/XsltRunConfiguration.java @@ -218,7 +218,7 @@ public final class XsltRunConfiguration extends LocatableConfigurationBase imple @Override @SuppressWarnings({ "unchecked" }) - public void readExternal(Element element) throws InvalidDataException { + public void readExternal(@NotNull Element element) throws InvalidDataException { super.readExternal(element); DefaultJDOMExternalizer.readExternal(this, element); @@ -281,7 +281,7 @@ public final class XsltRunConfiguration extends LocatableConfigurationBase imple } @Override - public void writeExternal(Element element) throws WriteExternalException { + public void writeExternal(@NotNull Element element) throws WriteExternalException { super.writeExternal(element); DefaultJDOMExternalizer.writeExternal(this, element);