From 7b42fc13fd0d23ac22fcc17746e85e5703506348 Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Thu, 2 Jan 2020 14:41:23 +0100 Subject: [PATCH] Add a couple of @NotNull annotations to ApplicationInfo GitOrigin-RevId: 85bc58f3b880f20e3879649cd9ac48b8978b4840 --- .../com/intellij/openapi/application/ApplicationInfo.java | 5 ++++- .../openapi/application/impl/ApplicationInfoImpl.java | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/platform/core-api/src/com/intellij/openapi/application/ApplicationInfo.java b/platform/core-api/src/com/intellij/openapi/application/ApplicationInfo.java index 2d13d74edbb0..cdd4af3c0347 100644 --- a/platform/core-api/src/com/intellij/openapi/application/ApplicationInfo.java +++ b/platform/core-api/src/com/intellij/openapi/application/ApplicationInfo.java @@ -1,4 +1,4 @@ -// 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. +// Copyright 2000-2020 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.application; import com.intellij.openapi.components.ServiceManager; @@ -6,6 +6,7 @@ import com.intellij.openapi.util.BuildNumber; import com.intellij.openapi.util.text.StringUtil; import com.intellij.util.ObjectUtils; import org.jetbrains.annotations.ApiStatus; +import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.awt.*; @@ -72,8 +73,10 @@ public abstract class ApplicationInfo { public abstract boolean hasContextHelp(); + @NotNull public abstract String getFullVersion(); + @NotNull public abstract String getStrictVersion(); public static ApplicationInfo getInstance() { diff --git a/platform/core-impl/src/com/intellij/openapi/application/impl/ApplicationInfoImpl.java b/platform/core-impl/src/com/intellij/openapi/application/impl/ApplicationInfoImpl.java index aee19e7d8ecc..ccba0874d477 100644 --- a/platform/core-impl/src/com/intellij/openapi/application/impl/ApplicationInfoImpl.java +++ b/platform/core-impl/src/com/intellij/openapi/application/impl/ApplicationInfoImpl.java @@ -1,4 +1,4 @@ -// 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. +// Copyright 2000-2020 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.application.impl; import com.google.common.annotations.VisibleForTesting; @@ -261,6 +261,7 @@ public final class ApplicationInfoImpl extends ApplicationInfoEx { return myPatchVersion; } + @NotNull @Override public String getFullVersion() { String result; @@ -276,6 +277,7 @@ public final class ApplicationInfoImpl extends ApplicationInfoEx { return result; } + @NotNull @Override public String getStrictVersion() { return myMajorVersion + "." + myMinorVersion + "." + StringUtil.notNullize(myMicroVersion, "0") + "." + StringUtil.notNullize(myPatchVersion, "0");