From 2f45d465a580a20f52fea466e7a6e3729829d6c5 Mon Sep 17 00:00:00 2001 From: HÃ¥kon Hallingstad Date: Sat, 31 Oct 2020 13:38:23 +0100 Subject: Use javadoc-no-fork and various fixes --- .../src/main/java/com/yahoo/component/Spec.java | 4 +--- .../main/java/com/yahoo/container/util/Util.java | 27 ---------------------- .../com/yahoo/container/util/package-info.java | 5 ---- 3 files changed, 1 insertion(+), 35 deletions(-) delete mode 100644 component/src/main/java/com/yahoo/container/util/Util.java delete mode 100644 component/src/main/java/com/yahoo/container/util/package-info.java (limited to 'component/src') diff --git a/component/src/main/java/com/yahoo/component/Spec.java b/component/src/main/java/com/yahoo/component/Spec.java index d4fc68324b7..75a3523d032 100644 --- a/component/src/main/java/com/yahoo/component/Spec.java +++ b/component/src/main/java/com/yahoo/component/Spec.java @@ -1,8 +1,6 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.component; -import static com.yahoo.container.util.Util.firstNonNull; - /** * Code common to ComponentId and ComponentSpecification * @@ -28,7 +26,7 @@ final class Spec { this.versionHandler = versionHandler; this.name = name; - this.version = firstNonNull(version, versionHandler.emptyVersion()); + this.version = version == null ? versionHandler.emptyVersion() : version; this.namespace = namespace; } diff --git a/component/src/main/java/com/yahoo/container/util/Util.java b/component/src/main/java/com/yahoo/container/util/Util.java deleted file mode 100644 index 605ae75643b..00000000000 --- a/component/src/main/java/com/yahoo/container/util/Util.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.container.util; - -/** - * TODO: What is this? - * - * @author Tony Vaagenes - */ -// TODO: Move to a a more appropriate package in vespajlib -// TODO: Fix name -public class Util { - - // TODO: What is this? - @SafeVarargs - public static T firstNonNull(T... args) { - for (T arg : args) { - if (arg != null) - return arg; - } - return null; - } - - // TODO: What is this? - public static String quote(Object object) { - return "'" + object + "'"; - } -} diff --git a/component/src/main/java/com/yahoo/container/util/package-info.java b/component/src/main/java/com/yahoo/container/util/package-info.java deleted file mode 100644 index 717e21b8e6e..00000000000 --- a/component/src/main/java/com/yahoo/container/util/package-info.java +++ /dev/null @@ -1,5 +0,0 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -@ExportPackage -package com.yahoo.container.util; - -import com.yahoo.osgi.annotation.ExportPackage; -- cgit v1.2.3