fix merge conflict with PR #93
diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml
index 9f3f7d8..31cb322 100755
--- a/.idea/codeStyleSettings.xml
+++ b/.idea/codeStyleSettings.xml
@@ -30,6 +30,16 @@
<option name="KEEP_SIMPLE_METHODS_IN_ONE_LINE" value="true" />
<option name="KEEP_SIMPLE_CLASSES_IN_ONE_LINE" value="true" />
<option name="KEEP_MULTIPLE_EXPRESSIONS_IN_ONE_LINE" value="true" />
+ <indentOptions>
+ <option name="INDENT_SIZE" value="2" />
+ <option name="TAB_SIZE" value="2" />
+ </indentOptions>
+ </codeStyleSettings>
+ <codeStyleSettings language="XML">
+ <indentOptions>
+ <option name="INDENT_SIZE" value="2" />
+ <option name="TAB_SIZE" value="2" />
+ </indentOptions>
</codeStyleSettings>
</value>
</option>
diff --git a/codeStyle.xml b/codeStyle.xml
index 58db026..25659d3 100644
--- a/codeStyle.xml
+++ b/codeStyle.xml
@@ -48,11 +48,11 @@
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_binary_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="0"/>
-<setting id="org.eclipse.jdt.core.compiler.source" value="1.6"/>
+<setting id="org.eclipse.jdt.core.compiler.source" value="1.8"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_line_comments" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.join_wrapped_lines" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
@@ -68,13 +68,14 @@
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment" value="false"/>
-<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="80"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="120"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
@@ -125,8 +126,8 @@
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.compiler.problem.enumIdentifier" value="error"/>
<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch" value="false"/>
-<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/>
@@ -135,15 +136,15 @@
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="2"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
@@ -153,8 +154,8 @@
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
@@ -170,27 +171,29 @@
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/>
-<setting id="org.eclipse.jdt.core.compiler.compliance" value="1.6"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/>
+<setting id="org.eclipse.jdt.core.compiler.compliance" value="1.8"/>
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="2"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_lambda_body" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_binary_expression" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type" value="insert"/>
@@ -204,8 +207,8 @@
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="16"/>
-<setting id="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="80"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="120"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_import_groups" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value="do not insert"/>
@@ -231,8 +234,8 @@
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_html" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/>
@@ -248,7 +251,7 @@
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="insert"/>
-<setting id="org.eclipse.jdt.core.compiler.codegen.targetPlatform" value="1.6"/>
+<setting id="org.eclipse.jdt.core.compiler.codegen.targetPlatform" value="1.8"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_resources_in_try" value="80"/>
<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation" value="0"/>
@@ -256,6 +259,7 @@
<setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
diff --git a/integration/pom.xml b/integration/pom.xml
index 327b398..63e572d 100755
--- a/integration/pom.xml
+++ b/integration/pom.xml
@@ -1,34 +1,35 @@
<project
- xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <parent>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-parent</artifactId>
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-parent</artifactId>
<version>1.7.8-SNAPSHOT</version>
- </parent>
+ </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>integration</artifactId>
- <packaging>jar</packaging>
- <name>SLF4J Integration tests</name>
+ <artifactId>integration</artifactId>
+ <packaging>jar</packaging>
+ <name>SLF4J Integration tests</name>
- <url>http://www.slf4j.org</url>
+ <url>http://www.slf4j.org</url>
<description>SLF4J integration tests</description>
<dependencies>
- <dependency>
+ <dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
- </dependency>
+ </dependency>
<!-- declaration to circumvent http://jira.codehaus.org/browse/MANTRUN-95 -->
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.1</version>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
</dependency>
<!-- declaration to circumvent http://jira.codehaus.org/browse/MANTRUN-95 -->
<dependency>
@@ -38,7 +39,7 @@
</dependency>
- <!-- some test run Felix in hosted mode -->
+ <!-- some test run Felix in hosted mode -->
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.main</artifactId>
@@ -69,7 +70,7 @@
<phase>package</phase>
<configuration>
<tasks>
- <property name="currentVersion" value="${project.version}" />
+ <property name="currentVersion" value="${project.version}"/>
<property name="compile_classpath" refid="maven.compile.classpath"/>
<property name="runtime_classpath" refid="maven.runtime.classpath"/>
<property name="test_classpath" refid="maven.test.classpath"/>
@@ -86,7 +87,7 @@
<phase>package</phase>
<configuration>
<tasks>
- <property name="currentVersion" value="${project.version}" />
+ <property name="currentVersion" value="${project.version}"/>
<property name="test_classpath" refid="maven.test.classpath"/>
<property name="basedir" value="${basedir}"/>
<ant antfile="${basedir}/osgi-build.xml"/>
diff --git a/jcl-over-slf4j/pom.xml b/jcl-over-slf4j/pom.xml
old mode 100644
new mode 100755
diff --git a/jul-to-slf4j/pom.xml b/jul-to-slf4j/pom.xml
old mode 100644
new mode 100755
index 1dac382..25317d6
--- a/jul-to-slf4j/pom.xml
+++ b/jul-to-slf4j/pom.xml
@@ -3,14 +3,14 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
<parent>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-parent</artifactId>
<version>1.7.8-SNAPSHOT</version>
</parent>
- <modelVersion>4.0.0</modelVersion>
-
<artifactId>jul-to-slf4j</artifactId>
<packaging>jar</packaging>
diff --git a/log4j-over-slf4j/pom.xml b/log4j-over-slf4j/pom.xml
old mode 100644
new mode 100755
index 7a2e9de..b13057e
--- a/log4j-over-slf4j/pom.xml
+++ b/log4j-over-slf4j/pom.xml
@@ -2,13 +2,14 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
<parent>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-parent</artifactId>
<version>1.7.8-SNAPSHOT</version>
</parent>
- <modelVersion>4.0.0</modelVersion>
<artifactId>log4j-over-slf4j</artifactId>
<packaging>jar</packaging>
diff --git a/osgi-over-slf4j/pom.xml b/osgi-over-slf4j/pom.xml
old mode 100644
new mode 100755
index a4b9096..7b813a4
--- a/osgi-over-slf4j/pom.xml
+++ b/osgi-over-slf4j/pom.xml
@@ -1,4 +1,7 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.slf4j</groupId>
@@ -6,9 +9,8 @@
<version>1.7.8-SNAPSHOT</version>
</parent>
- <modelVersion>4.0.0</modelVersion>
-
<artifactId>osgi-over-slf4j</artifactId>
+
<packaging>bundle</packaging>
<name>OSGi LogService implemented over SLF4J</name>
diff --git a/slf4j-api/pom.xml b/slf4j-api/pom.xml
old mode 100644
new mode 100755
index 1104801..ea04ded
--- a/slf4j-api/pom.xml
+++ b/slf4j-api/pom.xml
@@ -2,15 +2,16 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
<parent>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-parent</artifactId>
<version>1.7.8-SNAPSHOT</version>
</parent>
- <modelVersion>4.0.0</modelVersion>
-
<artifactId>slf4j-api</artifactId>
+
<packaging>jar</packaging>
<name>SLF4J API Module</name>
<description>The slf4j API</description>
diff --git a/slf4j-api/src/main/java/org/slf4j/LoggerFactory.java b/slf4j-api/src/main/java/org/slf4j/LoggerFactory.java
index 2e2bb13..4306a45 100755
--- a/slf4j-api/src/main/java/org/slf4j/LoggerFactory.java
+++ b/slf4j-api/src/main/java/org/slf4j/LoggerFactory.java
@@ -73,7 +73,7 @@
static final String UNSUCCESSFUL_INIT_URL = CODES_PREFIX + "#unsuccessfulInit";
static final String UNSUCCESSFUL_INIT_MSG = "org.slf4j.LoggerFactory could not be successfully initialized. See also "
- + UNSUCCESSFUL_INIT_URL;
+ + UNSUCCESSFUL_INIT_URL;
static final int UNINITIALIZED = 0;
static final int ONGOING_INITIALIZATION = 1;
@@ -86,11 +86,8 @@
static NOPLoggerFactory NOP_FALLBACK_FACTORY = new NOPLoggerFactory();
// Support for detecting mismatched logger names.
- static final String DETECT_LOGGER_NAME_MISMATCH_PROPERTY =
- "org.slf4j.LoggerFactory.detectLoggerNameMismatch";
- static boolean DETECT_LOGGER_NAME_MISMATCH =
- Boolean.getBoolean(DETECT_LOGGER_NAME_MISMATCH_PROPERTY);
-
+ static final String DETECT_LOGGER_NAME_MISMATCH_PROPERTY = "org.slf4j.LoggerFactory.detectLoggerNameMismatch";
+ static boolean DETECT_LOGGER_NAME_MISMATCH = Boolean.getBoolean(DETECT_LOGGER_NAME_MISMATCH_PROPERTY);
/**
* It is LoggerFactory's responsibility to track version changes and manage
@@ -99,7 +96,7 @@
* <p/>
* It is assumed that all versions in the 1.6 are mutually compatible.
*/
- static private final String[] API_COMPATIBILITY_LIST = new String[]{"1.6", "1.7"};
+ static private final String[] API_COMPATIBILITY_LIST = new String[] { "1.6", "1.7" };
// private constructor prevents instantiation
private LoggerFactory() {
@@ -153,8 +150,7 @@
INITIALIZATION_STATE = NOP_FALLBACK_INITIALIZATION;
Util.report("Failed to load class \"org.slf4j.impl.StaticLoggerBinder\".");
Util.report("Defaulting to no-operation (NOP) logger implementation");
- Util.report("See " + NO_STATICLOGGERBINDER_URL
- + " for further details.");
+ Util.report("See " + NO_STATICLOGGERBINDER_URL + " for further details.");
} else {
failedBinding(ncde);
throw ncde;
@@ -182,7 +178,7 @@
private final static void fixSubstitutedLoggers() {
List<SubstituteLogger> loggers = TEMP_FACTORY.getLoggers();
- if(loggers.isEmpty()){
+ if (loggers.isEmpty()) {
return;
}
@@ -191,7 +187,7 @@
Util.report("phase were not honored. However, subsequent logging calls to these");
Util.report("loggers will work as normally expected.");
Util.report("See also " + SUBSTITUTE_LOGGER_URL);
- for(SubstituteLogger subLogger : loggers){
+ for (SubstituteLogger subLogger : loggers) {
subLogger.setDelegate(getLogger(subLogger.getName()));
Util.report(subLogger.getName());
}
@@ -210,9 +206,8 @@
}
}
if (!match) {
- Util.report("The requested version " + requested
- + " by your slf4j binding is not compatible with "
- + Arrays.asList(API_COMPATIBILITY_LIST).toString());
+ Util.report("The requested version " + requested + " by your slf4j binding is not compatible with "
+ + Arrays.asList(API_COMPATIBILITY_LIST).toString());
Util.report("See " + VERSION_MISMATCH + " for further details.");
}
} catch (java.lang.NoSuchFieldError nsfe) {
@@ -231,18 +226,16 @@
private static String STATIC_LOGGER_BINDER_PATH = "org/slf4j/impl/StaticLoggerBinder.class";
private static Set<URL> findPossibleStaticLoggerBinderPathSet() {
- // use Set instead of list in order to deal with bug #138
+ // use Set instead of list in order to deal with bug #138
// LinkedHashSet appropriate here because it preserves insertion order during iteration
Set<URL> staticLoggerBinderPathSet = new LinkedHashSet<URL>();
try {
- ClassLoader loggerFactoryClassLoader = LoggerFactory.class
- .getClassLoader();
+ ClassLoader loggerFactoryClassLoader = LoggerFactory.class.getClassLoader();
Enumeration<URL> paths;
if (loggerFactoryClassLoader == null) {
paths = ClassLoader.getSystemResources(STATIC_LOGGER_BINDER_PATH);
} else {
- paths = loggerFactoryClassLoader
- .getResources(STATIC_LOGGER_BINDER_PATH);
+ paths = loggerFactoryClassLoader.getResources(STATIC_LOGGER_BINDER_PATH);
}
while (paths.hasMoreElements()) {
URL path = (URL) paths.nextElement();
@@ -277,11 +270,10 @@
private static void reportActualBinding(Set<URL> staticLoggerBinderPathSet) {
if (isAmbiguousStaticLoggerBinderPathSet(staticLoggerBinderPathSet)) {
- Util.report("Actual binding is of type ["+StaticLoggerBinder.getSingleton().getLoggerFactoryClassStr()+"]");
+ Util.report("Actual binding is of type [" + StaticLoggerBinder.getSingleton().getLoggerFactoryClassStr() + "]");
}
}
-
/**
* Return a logger named according to the name parameter using the statically
* bound {@link ILoggerFactory} instance.
@@ -308,12 +300,9 @@
if (DETECT_LOGGER_NAME_MISMATCH) {
Class<?> autoComputedCallingClass = Util.getCallingClass();
if (nonMatchingClasses(clazz, autoComputedCallingClass)) {
- Util.report(String.format(
- "Detected logger name mismatch. Given name: \"%s\"; automatic name: \"%s\". " +
- "See http://www.slf4j.org/codes.html#loggerNameMismatch for info. " +
- "Set property %s to \"false\" to disable this check.",
- logger.getName(), autoComputedCallingClass.getName(),
- DETECT_LOGGER_NAME_MISMATCH_PROPERTY));
+ Util.report(String.format("Detected logger name mismatch. Given name: \"%s\"; computed name: \"%s\". ",
+ logger.getName(), autoComputedCallingClass.getName()));
+ Util.report("See http://www.slf4j.org/codes.html#loggerNameMismatch for an explanation");
}
}
return logger;
@@ -323,7 +312,6 @@
return !autoComputedCallingClass.isAssignableFrom(clazz);
}
-
/**
* Return the {@link ILoggerFactory} instance in use.
* <p/>
@@ -339,16 +327,16 @@
performInitialization();
}
switch (INITIALIZATION_STATE) {
- case SUCCESSFUL_INITIALIZATION:
- return StaticLoggerBinder.getSingleton().getLoggerFactory();
- case NOP_FALLBACK_INITIALIZATION:
- return NOP_FALLBACK_FACTORY;
- case FAILED_INITIALIZATION:
- throw new IllegalStateException(UNSUCCESSFUL_INIT_MSG);
- case ONGOING_INITIALIZATION:
- // support re-entrant behavior.
- // See also http://bugzilla.slf4j.org/show_bug.cgi?id=106
- return TEMP_FACTORY;
+ case SUCCESSFUL_INITIALIZATION:
+ return StaticLoggerBinder.getSingleton().getLoggerFactory();
+ case NOP_FALLBACK_INITIALIZATION:
+ return NOP_FALLBACK_FACTORY;
+ case FAILED_INITIALIZATION:
+ throw new IllegalStateException(UNSUCCESSFUL_INIT_MSG);
+ case ONGOING_INITIALIZATION:
+ // support re-entrant behavior.
+ // See also http://bugzilla.slf4j.org/show_bug.cgi?id=106
+ return TEMP_FACTORY;
}
throw new IllegalStateException("Unreachable code");
}
diff --git a/slf4j-api/src/test/java/org/slf4j/helpers/MessageFormatterTest.java b/slf4j-api/src/test/java/org/slf4j/helpers/MessageFormatterTest.java
index 2a377a7..6696dbe 100755
--- a/slf4j-api/src/test/java/org/slf4j/helpers/MessageFormatterTest.java
+++ b/slf4j-api/src/test/java/org/slf4j/helpers/MessageFormatterTest.java
@@ -26,13 +26,14 @@
import java.util.Arrays;
-import junit.framework.TestCase;
+import org.junit.Test;
+
+import static org.junit.Assert.*;
/**
* @author Ceki Gulcu
- *
*/
-public class MessageFormatterTest extends TestCase {
+public class MessageFormatterTest {
Integer i1 = new Integer(1);
Integer i2 = new Integer(2);
@@ -43,11 +44,13 @@
String result;
+ @Test
public void testNull() {
result = MessageFormatter.format(null, i1).getMessage();
assertEquals(null, result);
}
+ @Test
public void nullParametersShouldBeHandledWithoutBarfing() {
result = MessageFormatter.format("Value is {}.", null).getMessage();
assertEquals("Value is null.", result);
@@ -77,6 +80,7 @@
assertEquals("Val1 is null, val2 is null, val3 is 3", result);
}
+ @Test
public void verifyOneParameterIsHandledCorrectly() {
result = MessageFormatter.format("Value is {}.", i3).getMessage();
assertEquals("Value is 3.", result);
@@ -115,6 +119,7 @@
assertEquals("File name is C:\\App folder.zip.", result);
}
+ @Test
public void testTwoParameters() {
result = MessageFormatter.format("Value {} is smaller than {}.", i1, i2)
.getMessage();
@@ -151,6 +156,7 @@
assertEquals("Value {} is smaller than 1", result);
}
+ @Test
public void testExceptionIn_toString() {
Object o = new Object() {
public String toString() {
@@ -162,6 +168,7 @@
}
+ @Test
public void testNullArray() {
String msg0 = "msg0";
String msg1 = "msg1 {}";
@@ -184,6 +191,7 @@
}
// tests the case when the parameters are supplied in a single array
+ @Test
public void testArrayFormat() {
result = MessageFormatter.arrayFormat(
"Value {} is smaller than {} and {}.", ia0).getMessage();
@@ -212,6 +220,7 @@
assertEquals("Val1=1, Val2={", result);
}
+ @Test
public void testArrayValues() {
Integer p0 = i1;
Integer[] p1 = new Integer[] { i2, i3 };
@@ -246,6 +255,7 @@
}
+ @Test
public void testMultiDimensionalArrayValues() {
Integer[][] multiIntegerA = new Integer[][] { ia0, ia1 };
result = MessageFormatter.arrayFormat("{}{}",
@@ -274,6 +284,7 @@
result);
}
+ @Test
public void testCyclicArrays() {
{
Object[] cyclicA = new Object[1];
@@ -292,6 +303,7 @@
}
}
+ @Test
public void testArrayThrowable() {
FormattingTuple ft;
Throwable t = new Throwable();
diff --git a/slf4j-ext/pom.xml b/slf4j-ext/pom.xml
old mode 100644
new mode 100755
index 6bb0a5f..dea712b
--- a/slf4j-ext/pom.xml
+++ b/slf4j-ext/pom.xml
@@ -2,15 +2,16 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
<parent>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-parent</artifactId>
<version>1.7.8-SNAPSHOT</version>
</parent>
- <modelVersion>4.0.0</modelVersion>
-
<artifactId>slf4j-ext</artifactId>
+
<packaging>jar</packaging>
<name>SLF4J Extensions Module</name>
<description>Extensions to the SLF4J API</description>
diff --git a/slf4j-jcl/pom.xml b/slf4j-jcl/pom.xml
old mode 100644
new mode 100755
index c2c36bc..b7c7f46
--- a/slf4j-jcl/pom.xml
+++ b/slf4j-jcl/pom.xml
@@ -1,39 +1,39 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <parent>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-parent</artifactId>
- <version>1.7.8-SNAPSHOT</version>
- </parent>
-
- <modelVersion>4.0.0</modelVersion>
+ <modelVersion>4.0.0</modelVersion>
- <artifactId>slf4j-jcl</artifactId>
- <packaging>jar</packaging>
- <name>SLF4J JCL Binding</name>
+ <parent>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-parent</artifactId>
+ <version>1.7.8-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>slf4j-jcl</artifactId>
+ <packaging>jar</packaging>
+ <name>SLF4J JCL Binding</name>
<description>SLF4J JCL Binding</description>
- <url>http://www.slf4j.org</url>
-
+ <url>http://www.slf4j.org</url>
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </dependency>
+ <artifactId>slf4j-api</artifactId>
+ </dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
- </dependency>
+ </dependency>
</dependencies>
-
+
<build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
@@ -44,7 +44,7 @@
</manifestEntries>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
</archive>
- </configuration>
+ </configuration>
</plugin>
</plugins>
diff --git a/slf4j-jdk14/pom.xml b/slf4j-jdk14/pom.xml
old mode 100644
new mode 100755
index ad08db3..5a044d4
--- a/slf4j-jdk14/pom.xml
+++ b/slf4j-jdk14/pom.xml
@@ -3,14 +3,14 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
<parent>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-parent</artifactId>
<version>1.7.8-SNAPSHOT</version>
</parent>
- <modelVersion>4.0.0</modelVersion>
-
<artifactId>slf4j-jdk14</artifactId>
<packaging>jar</packaging>
diff --git a/slf4j-log4j12/pom.xml b/slf4j-log4j12/pom.xml
old mode 100644
new mode 100755
index 88e971f..bc0ffc8
--- a/slf4j-log4j12/pom.xml
+++ b/slf4j-log4j12/pom.xml
@@ -3,15 +3,16 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
<parent>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-parent</artifactId>
<version>1.7.8-SNAPSHOT</version>
</parent>
- <modelVersion>4.0.0</modelVersion>
-
<artifactId>slf4j-log4j12</artifactId>
+
<packaging>jar</packaging>
<name>SLF4J LOG4J-12 Binding</name>
<description>SLF4J LOG4J-12 Binding</description>
diff --git a/slf4j-migrator/pom.xml b/slf4j-migrator/pom.xml
old mode 100644
new mode 100755
index cf78d0b..7514cce
--- a/slf4j-migrator/pom.xml
+++ b/slf4j-migrator/pom.xml
@@ -3,6 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.slf4j</groupId>
@@ -10,9 +11,8 @@
<version>1.7.8-SNAPSHOT</version>
</parent>
- <modelVersion>4.0.0</modelVersion>
-
<artifactId>slf4j-migrator</artifactId>
+
<packaging>jar</packaging>
<name>SLF4J Migrator</name>
<description>SLF4J Migrator</description>
diff --git a/slf4j-nop/pom.xml b/slf4j-nop/pom.xml
old mode 100644
new mode 100755
index 774183a..133d0b9
--- a/slf4j-nop/pom.xml
+++ b/slf4j-nop/pom.xml
@@ -3,15 +3,16 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
<parent>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-parent</artifactId>
<version>1.7.8-SNAPSHOT</version>
</parent>
- <modelVersion>4.0.0</modelVersion>
-
<artifactId>slf4j-nop</artifactId>
+
<packaging>jar</packaging>
<name>SLF4J NOP Binding</name>
<description>SLF4J NOP Binding</description>
diff --git a/slf4j-simple/pom.xml b/slf4j-simple/pom.xml
old mode 100644
new mode 100755
index cedebfd..b26ec04
--- a/slf4j-simple/pom.xml
+++ b/slf4j-simple/pom.xml
@@ -1,14 +1,14 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
<parent>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-parent</artifactId>
<version>1.7.8-SNAPSHOT</version>
</parent>
- <modelVersion>4.0.0</modelVersion>
-
<artifactId>slf4j-simple</artifactId>
<packaging>jar</packaging>
<name>SLF4J Simple Binding</name>
diff --git a/slf4j-simple/src/test/java/org/slf4j/DetectLoggerNameMismatchTest.java b/slf4j-simple/src/test/java/org/slf4j/DetectLoggerNameMismatchTest.java
index b903592..7634444 100755
--- a/slf4j-simple/src/test/java/org/slf4j/DetectLoggerNameMismatchTest.java
+++ b/slf4j-simple/src/test/java/org/slf4j/DetectLoggerNameMismatchTest.java
@@ -96,10 +96,7 @@
"Actual value of byteArrayOutputStream: " + String.valueOf(byteArrayOutputStream),
String.valueOf(byteArrayOutputStream).contains(
"Detected logger name mismatch. Given name: \"java.lang.String\"; " +
- "automatic name: \"org.slf4j.DetectLoggerNameMismatchTest\". " +
- "See http://www.slf4j.org/codes.html#loggerNameMismatch for info. " +
- "Set property org.slf4j.LoggerFactory.detectLoggerNameMismatch to " +
- "\"false\" to disable this check."));
+ "computed name: \"org.slf4j.DetectLoggerNameMismatchTest\". "));
}
/*
diff --git a/slf4j-site/pom.xml b/slf4j-site/pom.xml
old mode 100644
new mode 100755
index 5b7ec0c..f016347
--- a/slf4j-site/pom.xml
+++ b/slf4j-site/pom.xml
@@ -2,15 +2,16 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
<parent>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-parent</artifactId>
<version>1.7.8-SNAPSHOT</version>
</parent>
- <modelVersion>4.0.0</modelVersion>
-
<artifactId>slf4j-site</artifactId>
+
<packaging>jar</packaging>
<name>SLF4J Site</name>
<description>SLF4J Site</description>
@@ -30,6 +31,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
+ <version>3.3</version>
<configuration>
<outputDirectory>${project.parent.basedir}/target/site
</outputDirectory>