Skip to content

Commit 752b3b5

Browse files
committed
Sync JTL with main
1 parent c7dd807 commit 752b3b5

File tree

7 files changed

+25
-7
lines changed

7 files changed

+25
-7
lines changed

log4j-layout-template-json/pom.xml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,24 @@
8181
</configuration>
8282
</plugin>
8383

84+
<!-- Disable Failsafe, tests are in the `-test` module. -->
85+
<plugin>
86+
<groupId>org.apache.maven.plugins</groupId>
87+
<artifactId>maven-failsafe-plugin</artifactId>
88+
<configuration>
89+
<skip>true</skip>
90+
</configuration>
91+
</plugin>
92+
93+
<!-- Disable Surefire, tests are in the `-test` module. -->
94+
<plugin>
95+
<groupId>org.apache.maven.plugins</groupId>
96+
<artifactId>maven-surefire-plugin</artifactId>
97+
<configuration>
98+
<skip>true</skip>
99+
</configuration>
100+
</plugin>
101+
84102
</plugins>
85103
</build>
86104

log4j-layout-template-json/src/main/java/org/apache/logging/log4j/layout/template/json/JsonTemplateLayout.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ public JsonTemplateLayout build() {
507507
}
508508

509509
private void validate() {
510-
Objects.requireNonNull(configuration, "config");
510+
Objects.requireNonNull(configuration, "configuration");
511511
if (Strings.isBlank(eventTemplate) && Strings.isBlank(eventTemplateUri)) {
512512
throw new IllegalArgumentException("both eventTemplate and eventTemplateUri are blank");
513513
}

log4j-layout-template-json/src/main/java/org/apache/logging/log4j/layout/template/json/resolver/CaseConverterResolver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ private static ErrorHandlingStrategy readErrorHandlingStrategy(final TemplateRes
201201
if (strategyName == null) {
202202
return ErrorHandlingStrategy.REPLACE;
203203
}
204-
for (ErrorHandlingStrategy strategy : ErrorHandlingStrategy.values()) {
204+
for (final ErrorHandlingStrategy strategy : ErrorHandlingStrategy.values()) {
205205
if (strategy.name.equals(strategyName)) {
206206
return strategy;
207207
}

log4j-layout-template-json/src/main/java/org/apache/logging/log4j/layout/template/json/resolver/TemplateResolver.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ default boolean isResolvable() {
4848
* For instance, the stack trace resolver can be short-circuited using this
4949
* check if the stack traces are disabled in the layout configuration.
5050
*/
51-
default boolean isResolvable(V value) {
51+
default boolean isResolvable(final V value) {
5252
return true;
5353
}
5454

@@ -62,7 +62,7 @@ default boolean isResolvable(V value) {
6262
*
6363
* @param succeedingEntry false, if this is the first element in a collection; true, otherwise
6464
*/
65-
default void resolve(V value, JsonWriter jsonWriter, boolean succeedingEntry) {
65+
default void resolve(final V value, final JsonWriter jsonWriter, final boolean succeedingEntry) {
6666
resolve(value, jsonWriter);
6767
}
6868
}

log4j-layout-template-json/src/main/java/org/apache/logging/log4j/layout/template/json/resolver/TemplateResolverContext.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ interface TemplateResolverContext<V, C extends TemplateResolverContext<V, C>> {
5252
* @param node the root object of the read template
5353
* @return the root object of the template to be compiled
5454
*/
55-
default Object processTemplateBeforeResolverInjection(Object node) {
55+
default Object processTemplateBeforeResolverInjection(final Object node) {
5656
return node;
5757
}
5858
}

log4j-layout-template-json/src/main/java/org/apache/logging/log4j/layout/template/json/resolver/TemplateResolverInterceptor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public interface TemplateResolverInterceptor<V, C extends TemplateResolverContex
4949
* @param node the root object of the read template
5050
* @return the root object of the template to be compiled
5151
*/
52-
default Object processTemplateBeforeResolverInjection(C context, Object node) {
52+
default Object processTemplateBeforeResolverInjection(final C context, final Object node) {
5353
return node;
5454
}
5555
}

log4j-layout-template-json/src/main/java/org/apache/logging/log4j/layout/template/json/util/JsonWriter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@ private void writeNumber(final Number number) {
700700
} else {
701701
final long longNumber = number.longValue();
702702
final double doubleValue = number.doubleValue();
703-
if (Double.compare(longNumber, doubleValue) == 0) {
703+
if (Double.compare((double) longNumber, doubleValue) == 0) {
704704
writeNumber(longNumber);
705705
} else {
706706
writeNumber(doubleValue);

0 commit comments

Comments
 (0)