Fix version number for recent API additions
Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/31f68af8 Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/31f68af8 Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/31f68af8 Branch: refs/heads/master Commit: 31f68af86c503862230514d67c18a7a6616312c7 Parents: 06dcce4 Author: Matt Sicker <[email protected]> Authored: Sat Oct 14 12:10:59 2017 -0500 Committer: Matt Sicker <[email protected]> Committed: Sat Oct 14 12:10:59 2017 -0500 ---------------------------------------------------------------------- .../log4j/util/EnvironmentPropertySource.java | 2 +- .../log4j/util/PropertiesPropertySource.java | 2 +- .../logging/log4j/util/PropertiesUtil.java | 46 ++++++++++---------- .../log4j/util/PropertyFilePropertySource.java | 2 +- .../logging/log4j/util/PropertySource.java | 6 +-- .../util/SystemPropertiesPropertySource.java | 2 +- .../util/PropertiesPropertySourceTest.java | 3 -- .../log4j/util/PropertySourceCamelCaseTest.java | 3 -- .../log4j/util/PropertySourceTokenizerTest.java | 3 -- src/site/xdoc/manual/async.xml | 4 +- src/site/xdoc/manual/configuration.xml.vm | 4 +- 11 files changed, 34 insertions(+), 43 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/31f68af8/log4j-api/src/main/java/org/apache/logging/log4j/util/EnvironmentPropertySource.java ---------------------------------------------------------------------- diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/util/EnvironmentPropertySource.java b/log4j-api/src/main/java/org/apache/logging/log4j/util/EnvironmentPropertySource.java index 03cdb7f..af8c23e 100644 --- a/log4j-api/src/main/java/org/apache/logging/log4j/util/EnvironmentPropertySource.java +++ b/log4j-api/src/main/java/org/apache/logging/log4j/util/EnvironmentPropertySource.java @@ -23,7 +23,7 @@ import java.util.Map; * with {@code LOG4J_} so as not to conflict with other variables. Normalized environment variables follow a scheme * like this: {@code log4j2.fooBarProperty} would normalize to {@code LOG4J_FOO_BAR_PROPERTY}. * - * @since 2.9.1 + * @since 2.10.0 */ public class EnvironmentPropertySource implements PropertySource { @Override http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/31f68af8/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesPropertySource.java ---------------------------------------------------------------------- diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesPropertySource.java b/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesPropertySource.java index 80777a6..6f3e8f4 100644 --- a/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesPropertySource.java +++ b/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesPropertySource.java @@ -23,7 +23,7 @@ import java.util.Properties; * PropertySource backed by a {@link Properties} instance. Normalized property names follow a scheme like this: * {@code Log4jContextSelector} would normalize to {@code log4j2.contextSelector}. * - * @since 2.9.1 + * @since 2.10.0 */ public class PropertiesPropertySource implements PropertySource { http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/31f68af8/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java ---------------------------------------------------------------------- diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java b/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java index d5918c0..472088d 100644 --- a/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java +++ b/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java @@ -18,18 +18,16 @@ package org.apache.logging.log4j.util; import java.io.IOException; import java.io.InputStream; -import java.net.URL; import java.nio.charset.Charset; -import java.nio.charset.UnsupportedCharsetException; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Map; import java.util.Properties; +import java.util.ResourceBundle; import java.util.ServiceLoader; import java.util.Set; import java.util.TreeSet; -import java.util.ResourceBundle; import java.util.concurrent.ConcurrentHashMap; /** @@ -42,6 +40,7 @@ import java.util.concurrent.ConcurrentHashMap; * {@code META-INF/services/org.apache.logging.log4j.util.PropertySource} with a list of fully qualified class names * implementing that interface. * </p> + * * @see PropertySource */ public final class PropertiesUtil { @@ -73,7 +72,7 @@ public final class PropertiesUtil { /** * Loads and closes the given property input stream. If an error occurs, log to the status logger. * - * @param in a property input stream. + * @param in a property input stream. * @param source a source object describing the source, like a resource string or a URL. * @return a new Properties object */ @@ -106,6 +105,7 @@ public final class PropertiesUtil { /** * Returns {@code true} if the specified property is defined, regardless of its value (it may not have a value). + * * @param name the name of the property to verify * @return {@code true} if the specified property is defined, regardless of its value */ @@ -128,7 +128,7 @@ public final class PropertiesUtil { /** * Gets the named property as a boolean value. * - * @param name the name of the property to look up + * @param name the name of the property to look up * @param defaultValue the default value to use if the property is undefined * @return the boolean value of the property or {@code defaultValue} if undefined. */ @@ -140,16 +140,16 @@ public final class PropertiesUtil { /** * Gets the named property as a boolean value. * - * @param name the name of the property to look up - * @param defaultValueIfAbsent the default value to use if the property is undefined + * @param name the name of the property to look up + * @param defaultValueIfAbsent the default value to use if the property is undefined * @param defaultValueIfPresent the default value to use if the property is defined but not assigned * @return the boolean value of the property or {@code defaultValue} if undefined. */ public boolean getBooleanProperty(final String name, final boolean defaultValueIfAbsent, - final boolean defaultValueIfPresent) { + final boolean defaultValueIfPresent) { final String prop = getStringProperty(name); return prop == null ? defaultValueIfAbsent - : prop.isEmpty() ? defaultValueIfPresent : "true".equalsIgnoreCase(prop); + : prop.isEmpty() ? defaultValueIfPresent : "true".equalsIgnoreCase(prop); } /** @@ -166,7 +166,7 @@ public final class PropertiesUtil { * Gets the named property as a Charset value. If we cannot find the named Charset, see if it is mapped in * file {@code Log4j-charsets.properties} on the class path. * - * @param name the name of the property to look up + * @param name the name of the property to look up * @param defaultValue the default value to use if the property is undefined * @return the Charset value of the property or {@code defaultValue} if undefined. */ @@ -186,14 +186,14 @@ public final class PropertiesUtil { } } LowLevelLogUtil.log("Unable to get Charset '" + charsetName + "' for property '" + name + "', using default " - + defaultValue + " and continuing."); + + defaultValue + " and continuing."); return defaultValue; } /** * Gets the named property as a double. * - * @param name the name of the property to look up + * @param name the name of the property to look up * @param defaultValue the default value to use if the property is undefined * @return the parsed double value of the property or {@code defaultValue} if it was undefined or could not be parsed. */ @@ -212,10 +212,10 @@ public final class PropertiesUtil { /** * Gets the named property as an integer. * - * @param name the name of the property to look up + * @param name the name of the property to look up * @param defaultValue the default value to use if the property is undefined * @return the parsed integer value of the property or {@code defaultValue} if it was undefined or could not be - * parsed. + * parsed. */ public int getIntegerProperty(final String name, final int defaultValue) { final String prop = getStringProperty(name); @@ -232,7 +232,7 @@ public final class PropertiesUtil { /** * Gets the named property as a long. * - * @param name the name of the property to look up + * @param name the name of the property to look up * @param defaultValue the default value to use if the property is undefined * @return the parsed long value of the property or {@code defaultValue} if it was undefined or could not be parsed. */ @@ -261,7 +261,7 @@ public final class PropertiesUtil { /** * Gets the named property as a String. * - * @param name the name of the property to look up + * @param name the name of the property to look up * @param defaultValue the default value to use if the property is undefined * @return the String value of the property or {@code defaultValue} if undefined. */ @@ -288,7 +288,7 @@ public final class PropertiesUtil { /** * Reloads all properties. This is primarily useful for unit tests. * - * @since 2.9.1 + * @since 2.10.0 */ public void reload() { environment.reload(); @@ -297,15 +297,15 @@ public final class PropertiesUtil { /** * Provides support for looking up global configuration properties via environment variables, property files, * and system properties, in three variations: - * + * <p> * Normalized: all log4j-related prefixes removed, remaining property is camelCased with a log4j2 prefix for * property files and system properties, or follows a LOG4J_FOO_BAR format for environment variables. - * - * Legacy: the original property name as defined in the source pre-2.9. - * + * <p> + * Legacy: the original property name as defined in the source pre-2.10.0. + * <p> * Tokenized: loose matching based on word boundaries. * - * @since 2.9.1 + * @since 2.10.0 */ private static class Environment { @@ -377,7 +377,7 @@ public final class PropertiesUtil { * object with the prefix removed. * * @param properties The Properties to evaluate. - * @param prefix The prefix to extract. + * @param prefix The prefix to extract. * @return The subset of properties. */ public static Properties extractSubset(final Properties properties, final String prefix) { http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/31f68af8/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertyFilePropertySource.java ---------------------------------------------------------------------- diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertyFilePropertySource.java b/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertyFilePropertySource.java index 5b11718..3adbb24 100644 --- a/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertyFilePropertySource.java +++ b/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertyFilePropertySource.java @@ -24,7 +24,7 @@ import java.util.Properties; /** * PropertySource backed by a properties file. Follows the same conventions as {@link PropertiesPropertySource}. * - * @since 2.9.1 + * @since 2.10.0 */ public class PropertyFilePropertySource extends PropertiesPropertySource { http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/31f68af8/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertySource.java ---------------------------------------------------------------------- diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertySource.java b/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertySource.java index c334879..75399d9 100644 --- a/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertySource.java +++ b/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertySource.java @@ -28,7 +28,7 @@ import java.util.regex.Pattern; /** * A source for global configuration properties. * - * @since 2.9.1 + * @since 2.10.0 */ public interface PropertySource { @@ -59,7 +59,7 @@ public interface PropertySource { /** * Comparator for ordering PropertySource instances by priority. * - * @since 2.9.1 + * @since 2.10.0 */ class Comparator implements java.util.Comparator<PropertySource>, Serializable { private static final long serialVersionUID = 1L; @@ -73,7 +73,7 @@ public interface PropertySource { /** * Utility methods useful for PropertySource implementations. * - * @since 2.9.1 + * @since 2.10.0 */ final class Util { private static final String PREFIXES = "(?i:^log4j2?[-._/]?|^org\\.apache\\.logging\\.log4j\\.)?"; http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/31f68af8/log4j-api/src/main/java/org/apache/logging/log4j/util/SystemPropertiesPropertySource.java ---------------------------------------------------------------------- diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/util/SystemPropertiesPropertySource.java b/log4j-api/src/main/java/org/apache/logging/log4j/util/SystemPropertiesPropertySource.java index 290a604..af10fb0 100644 --- a/log4j-api/src/main/java/org/apache/logging/log4j/util/SystemPropertiesPropertySource.java +++ b/log4j-api/src/main/java/org/apache/logging/log4j/util/SystemPropertiesPropertySource.java @@ -22,7 +22,7 @@ import java.util.Map; * PropertySource backed by the current system properties. Other than having a higher priority over normal properties, * this follows the same rules as {@link PropertiesPropertySource}. * - * @since 2.9.1 + * @since 2.10.0 */ public class SystemPropertiesPropertySource implements PropertySource { http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/31f68af8/log4j-api/src/test/java/org/apache/logging/log4j/util/PropertiesPropertySourceTest.java ---------------------------------------------------------------------- diff --git a/log4j-api/src/test/java/org/apache/logging/log4j/util/PropertiesPropertySourceTest.java b/log4j-api/src/test/java/org/apache/logging/log4j/util/PropertiesPropertySourceTest.java index 2f07972..c1c97ef 100644 --- a/log4j-api/src/test/java/org/apache/logging/log4j/util/PropertiesPropertySourceTest.java +++ b/log4j-api/src/test/java/org/apache/logging/log4j/util/PropertiesPropertySourceTest.java @@ -27,9 +27,6 @@ import org.junit.runners.Parameterized; import static org.junit.Assert.assertEquals; -/** - * - */ @RunWith(Parameterized.class) public class PropertiesPropertySourceTest { http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/31f68af8/log4j-api/src/test/java/org/apache/logging/log4j/util/PropertySourceCamelCaseTest.java ---------------------------------------------------------------------- diff --git a/log4j-api/src/test/java/org/apache/logging/log4j/util/PropertySourceCamelCaseTest.java b/log4j-api/src/test/java/org/apache/logging/log4j/util/PropertySourceCamelCaseTest.java index c746199..a197085 100644 --- a/log4j-api/src/test/java/org/apache/logging/log4j/util/PropertySourceCamelCaseTest.java +++ b/log4j-api/src/test/java/org/apache/logging/log4j/util/PropertySourceCamelCaseTest.java @@ -26,9 +26,6 @@ import org.junit.runners.Parameterized; import static org.junit.Assert.assertEquals; -/** - * - */ @RunWith(Parameterized.class) public class PropertySourceCamelCaseTest { http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/31f68af8/log4j-api/src/test/java/org/apache/logging/log4j/util/PropertySourceTokenizerTest.java ---------------------------------------------------------------------- diff --git a/log4j-api/src/test/java/org/apache/logging/log4j/util/PropertySourceTokenizerTest.java b/log4j-api/src/test/java/org/apache/logging/log4j/util/PropertySourceTokenizerTest.java index 3b25af7..dd1d49c 100644 --- a/log4j-api/src/test/java/org/apache/logging/log4j/util/PropertySourceTokenizerTest.java +++ b/log4j-api/src/test/java/org/apache/logging/log4j/util/PropertySourceTokenizerTest.java @@ -26,9 +26,6 @@ import org.junit.runners.Parameterized; import static org.junit.Assert.assertEquals; -/** - * - */ @RunWith(Parameterized.class) public class PropertySourceTokenizerTest { http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/31f68af8/src/site/xdoc/manual/async.xml ---------------------------------------------------------------------- diff --git a/src/site/xdoc/manual/async.xml b/src/site/xdoc/manual/async.xml index 80cbcdb..48340b6 100644 --- a/src/site/xdoc/manual/async.xml +++ b/src/site/xdoc/manual/async.xml @@ -184,7 +184,7 @@ <tt>log4j2.component.properties</tt> and including this file in the classpath of the application. </p> <p> - Note that system properties were renamed into a more consistent style in Log4j 2.9.1. All old property + Note that system properties were renamed into a more consistent style in Log4j 2.10.0. All old property names are still supported which are documented <a href="configuration.html#SystemProperties">here</a>. </p> <a name="SysPropsAllAsync" /> @@ -365,7 +365,7 @@ <tt>log4j2.component.properties</tt> and including this file in the classpath of the application. </p> <p> - Note that system properties were renamed into a more consistent style in Log4j 2.9.1. All old property + Note that system properties were renamed into a more consistent style in Log4j 2.10. All old property names are still supported which are documented <a href="configuration.html#SystemProperties">here</a>. </p> <a name="SysPropsMixedSync-Async" /> http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/31f68af8/src/site/xdoc/manual/configuration.xml.vm ---------------------------------------------------------------------- diff --git a/src/site/xdoc/manual/configuration.xml.vm b/src/site/xdoc/manual/configuration.xml.vm index e7b1e12..09e7ebc 100644 --- a/src/site/xdoc/manual/configuration.xml.vm +++ b/src/site/xdoc/manual/configuration.xml.vm @@ -1571,7 +1571,7 @@ public class AwesomeTest { Any spaces present in the property name are for visual flow and should be removed. </p> <p> - Note that beginning in Log4j 2.9.1, all system property names have been normalized to follow a consistent + Note that beginning in Log4j 2.10, all system property names have been normalized to follow a consistent naming scheme. While the old property names are still supported for backwards compatibility, it is recommended to update configurations to use the new style. This system is extensible and is enabled through the @@ -1621,7 +1621,7 @@ public class AwesomeTest { The following is a list of available global configuration properties. Note that these can only be set once per JVM process unlike configuration settings available in configuration files. The <i>Property Name</i> column contains the name used in properties files and system properties; <i>Environemt Variable</i> - for the equivalent environment variable; and <i>Legacy Property Name</i> for the pre-2.9.1 name. + for the equivalent environment variable; and <i>Legacy Property Name</i> for the pre-2.10 name. </p> <table> <caption align="top">Log4j 2 global configuration properties</caption>
