From f5498d558e9ac093416088121d07af4d4c0fddc8 Mon Sep 17 00:00:00 2001 From: Richard North Date: Tue, 20 Oct 2020 21:32:04 +0100 Subject: [PATCH] Update Javadocs --- .../utility/ConfigurationFileImageNameSubstitutor.java | 3 ++- .../testcontainers/utility/DefaultImageNameSubstitutor.java | 3 ++- .../testcontainers/utility/PrefixingImageNameSubstitutor.java | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/org/testcontainers/utility/ConfigurationFileImageNameSubstitutor.java b/core/src/main/java/org/testcontainers/utility/ConfigurationFileImageNameSubstitutor.java index c2652b9eda6..9eb544ac3fd 100644 --- a/core/src/main/java/org/testcontainers/utility/ConfigurationFileImageNameSubstitutor.java +++ b/core/src/main/java/org/testcontainers/utility/ConfigurationFileImageNameSubstitutor.java @@ -4,7 +4,8 @@ import lombok.extern.slf4j.Slf4j; /** - * TODO: Javadocs + * {@link ImageNameSubstitutor} which takes replacement image names from configuration. + * See {@link TestcontainersConfiguration} for the subset of image names which can be substituted using this mechanism. */ @Slf4j public class ConfigurationFileImageNameSubstitutor extends ImageNameSubstitutor { diff --git a/core/src/main/java/org/testcontainers/utility/DefaultImageNameSubstitutor.java b/core/src/main/java/org/testcontainers/utility/DefaultImageNameSubstitutor.java index dada0d5f8d3..6c4e106aa26 100644 --- a/core/src/main/java/org/testcontainers/utility/DefaultImageNameSubstitutor.java +++ b/core/src/main/java/org/testcontainers/utility/DefaultImageNameSubstitutor.java @@ -4,7 +4,8 @@ import lombok.extern.slf4j.Slf4j; /** - * TODO: Javadocs + * Testcontainers' default implementation of {@link ImageNameSubstitutor}. + * Delegates to {@link ConfigurationFileImageNameSubstitutor} followed by {@link PrefixingImageNameSubstitutor}. */ @Slf4j public class DefaultImageNameSubstitutor extends ImageNameSubstitutor { diff --git a/core/src/main/java/org/testcontainers/utility/PrefixingImageNameSubstitutor.java b/core/src/main/java/org/testcontainers/utility/PrefixingImageNameSubstitutor.java index 6f540302935..39ad49bc70b 100644 --- a/core/src/main/java/org/testcontainers/utility/PrefixingImageNameSubstitutor.java +++ b/core/src/main/java/org/testcontainers/utility/PrefixingImageNameSubstitutor.java @@ -24,7 +24,7 @@ public class PrefixingImageNameSubstitutor extends ImageNameSubstitutor { @Override public DockerImageName apply(DockerImageName original) { - final String prefix = configuration.getEnvVarOrProperty(PROPERTY_KEY); + final String prefix = configuration.getEnvVarOrProperty(PROPERTY_KEY, ""); if (prefix != null && !prefix.isEmpty()) { if (!original.asCanonicalNameString().startsWith(prefix)) {