Skip to content

Commit b105664

Browse files
Bump org.apache.logging:logging-parent from 12.0.0 to 12.1.0 (#3597)
* Bump org.apache.logging:logging-parent from 12.0.0 to 12.1.0 Bumps [org.apache.logging:logging-parent](https://github.com/apache/logging-parent) from 12.0.0 to 12.1.0. - [Release notes](https://github.com/apache/logging-parent/releases) - [Commits](apache/logging-parent@rel/12.0.0...rel/12.1.0) --- updated-dependencies: - dependency-name: org.apache.logging:logging-parent dependency-version: 12.1.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * style: reformat after `palantir-java-format` upgrade * fix: remove Error Prone overrides * chore: upgrade workflows to `logging-parent` version `12.1.0` * Fix `SEI MET07-J` violations (#3602) * Fix `SEI MET07-J` violations This change: - Deprecates public/protected hiding methods. - Removes package-private hiding methods. - For legacy modules that will disappear in 3.x, just suppresses the warning. Closes #3601 * Try skipping required checks skip-checks: true * Fix compilation errors --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Piotr P. Karwasz <[email protected]>
1 parent 819e8d8 commit b105664

File tree

16 files changed

+31
-45
lines changed

16 files changed

+31
-45
lines changed

.github/workflows/build.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030

3131
build:
3232
if: github.actor != 'dependabot[bot]'
33-
uses: apache/logging-parent/.github/workflows/build-reusable.yaml@rel/12.0.0
33+
uses: apache/logging-parent/.github/workflows/build-reusable.yaml@rel/12.1.0
3434
secrets:
3535
DV_ACCESS_TOKEN: ${{ startsWith(github.ref_name, 'release/') && '' || secrets.GE_ACCESS_TOKEN }}
3636
with:
@@ -41,7 +41,7 @@ jobs:
4141
deploy-snapshot:
4242
needs: build
4343
if: github.repository == 'apache/logging-log4j2' && github.ref_name == 'main'
44-
uses: apache/logging-parent/.github/workflows/deploy-snapshot-reusable.yaml@rel/12.0.0
44+
uses: apache/logging-parent/.github/workflows/deploy-snapshot-reusable.yaml@rel/12.1.0
4545
# Secrets for deployments
4646
secrets:
4747
NEXUS_USERNAME: ${{ secrets.NEXUS_USER }}
@@ -50,7 +50,7 @@ jobs:
5050
deploy-release:
5151
needs: build
5252
if: github.repository == 'apache/logging-log4j2' && startsWith(github.ref_name, 'release/')
53-
uses: apache/logging-parent/.github/workflows/deploy-release-reusable.yaml@rel/12.0.0
53+
uses: apache/logging-parent/.github/workflows/deploy-release-reusable.yaml@rel/12.1.0
5454
# Secrets for deployments
5555
secrets:
5656
GPG_SECRET_KEY: ${{ secrets.LOGGING_GPG_SECRET_KEY }}
@@ -68,7 +68,7 @@ jobs:
6868
needs: [ deploy-snapshot, deploy-release ]
6969
if: ${{ always() && (needs.deploy-snapshot.result == 'success' || needs.deploy-release.result == 'success') }}
7070
name: "verify-reproducibility (${{ needs.deploy-release.result == 'success' && needs.deploy-release.outputs.project-version || needs.deploy-snapshot.outputs.project-version }})"
71-
uses: apache/logging-parent/.github/workflows/verify-reproducibility-reusable.yaml@rel/12.0.0
71+
uses: apache/logging-parent/.github/workflows/verify-reproducibility-reusable.yaml@rel/12.1.0
7272
with:
7373
nexus-url: ${{ needs.deploy-release.result == 'success' && needs.deploy-release.outputs.nexus-url || 'https://repository.apache.org/content/groups/snapshots' }}
7474
# Encode the `runs-on` input as JSON array

.github/workflows/codeql-analysis.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ permissions: read-all
3030
jobs:
3131

3232
analyze:
33-
uses: apache/logging-parent/.github/workflows/codeql-analysis-reusable.yaml@rel/12.0.0
33+
uses: apache/logging-parent/.github/workflows/codeql-analysis-reusable.yaml@rel/12.1.0
3434
with:
3535
java-version: 17
3636
# Permissions required to publish Security Alerts

.github/workflows/deploy-site.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333

3434
deploy-site-stg:
3535
if: github.repository == 'apache/logging-log4j2' && github.ref_name == 'main'
36-
uses: apache/logging-parent/.github/workflows/deploy-site-reusable.yaml@rel/12.0.0
36+
uses: apache/logging-parent/.github/workflows/deploy-site-reusable.yaml@rel/12.1.0
3737
# Secrets for committing the generated site
3838
secrets:
3939
GPG_SECRET_KEY: ${{ secrets.LOGGING_GPG_SECRET_KEY }}
@@ -51,7 +51,7 @@ jobs:
5151

5252
deploy-site-pro:
5353
if: github.repository == 'apache/logging-log4j2' && github.ref_name == 'main-site-pro'
54-
uses: apache/logging-parent/.github/workflows/deploy-site-reusable.yaml@rel/12.0.0
54+
uses: apache/logging-parent/.github/workflows/deploy-site-reusable.yaml@rel/12.1.0
5555
# Secrets for committing the generated site
5656
secrets:
5757
GPG_SECRET_KEY: ${{ secrets.LOGGING_GPG_SECRET_KEY }}
@@ -81,7 +81,7 @@ jobs:
8181
8282
deploy-site-rel:
8383
needs: export-version
84-
uses: apache/logging-parent/.github/workflows/deploy-site-reusable.yaml@rel/12.0.0
84+
uses: apache/logging-parent/.github/workflows/deploy-site-reusable.yaml@rel/12.1.0
8585
# Secrets for committing the generated site
8686
secrets:
8787
GPG_SECRET_KEY: ${{ secrets.LOGGING_GPG_SECRET_KEY }}

.github/workflows/merge-dependabot.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030

3131
build:
3232
if: github.repository == 'apache/logging-log4j2' && github.event_name == 'pull_request_target' && github.actor == 'dependabot[bot]'
33-
uses: apache/logging-parent/.github/workflows/build-reusable.yaml@rel/12.0.0
33+
uses: apache/logging-parent/.github/workflows/build-reusable.yaml@rel/12.1.0
3434
secrets:
3535
DV_ACCESS_TOKEN: ${{ secrets.GE_ACCESS_TOKEN }}
3636
with:
@@ -39,7 +39,7 @@ jobs:
3939

4040
merge-dependabot:
4141
needs: build
42-
uses: apache/logging-parent/.github/workflows/merge-dependabot-reusable.yaml@rel/12.0.0
42+
uses: apache/logging-parent/.github/workflows/merge-dependabot-reusable.yaml@rel/12.1.0
4343
permissions:
4444
contents: write # to push changelog commits
4545
pull-requests: write # to close the PR

log4j-async-logger/src/main/java/org/apache/logging/log4j/async/logger/AsyncLoggerConfig.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ public void initialize() {
120120
}
121121

122122
@Override
123+
@SuppressWarnings("BoxedPrimitiveEquality")
123124
protected void log(final LogEvent event, final Predicate<LoggerConfig> predicate) {
124125
// See LOG4J2-2301
125126
if (predicate == null

log4j-core/src/main/java/org/apache/logging/log4j/core/filter/MutableThreadContextMapFilter.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -401,16 +401,16 @@ public void run() {
401401
break;
402402
}
403403
switch (result.status) {
404-
// These results cause changes in the filter
405-
// We call the listeners
404+
// These results cause changes in the filter
405+
// We call the listeners
406406
case SUCCESS:
407407
case NOT_FOUND:
408408
case EMPTY:
409409
for (FilterConfigUpdateListener listener : listeners) {
410410
listener.onEvent();
411411
}
412412
break;
413-
// These results do no cause changes in the filter
413+
// These results do no cause changes in the filter
414414
case ERROR:
415415
case NOT_MODIFIED:
416416
break;

log4j-core/src/main/java/org/apache/logging/log4j/core/lookup/MainMapLookup.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
*/
1717
package org.apache.logging.log4j.core.lookup;
1818

19+
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
1920
import java.util.Map;
2021
import org.apache.logging.log4j.core.LogEvent;
2122
import org.apache.logging.log4j.plugins.Plugin;
@@ -75,6 +76,9 @@ public MainMapLookup(final Map<String, String> map) {
7576
* @param args
7677
* An application's {@code public static main(String[])} arguments.
7778
*/
79+
@SuppressFBWarnings(
80+
value = "HSM_HIDING_METHOD",
81+
justification = "The MapLookup.setMainArguments() method hidden by this one is deprecated.")
7882
public static void setMainArguments(final String... args) {
7983
if (args == null) {
8084
return;

log4j-core/src/main/java/org/apache/logging/log4j/core/time/ClockFactory.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,10 @@ public Clock clock(final PropertyEnvironment environment) {
7878
}
7979
return switch (configuration.clock()) {
8080
case "SystemMillisClock" -> logSupportedPrecision(new SystemMillisClock());
81-
case "CachedClock", "org.apache.logging.log4j.core.time.internal.CachedClock" -> logSupportedPrecision(
82-
CachedClock.instance());
83-
case "CoarseCachedClock",
84-
"org.apache.logging.log4j.core.time.internal.CoarseCachedClock" -> logSupportedPrecision(
85-
CoarseCachedClock.instance());
81+
case "CachedClock", "org.apache.logging.log4j.core.time.internal.CachedClock" ->
82+
logSupportedPrecision(CachedClock.instance());
83+
case "CoarseCachedClock", "org.apache.logging.log4j.core.time.internal.CoarseCachedClock" ->
84+
logSupportedPrecision(CoarseCachedClock.instance());
8685
default -> logSupportedPrecision(new SystemClock());
8786
};
8887
}

log4j-core/src/main/java/org/apache/logging/log4j/core/util/internal/instant/InstantPatternDynamicFormatter.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ public void formatTo(final StringBuilder buffer, final Instant instant) {
189189

190190
switch (formatters.size()) {
191191

192-
// If found an empty pattern, return an empty formatter
192+
// If found an empty pattern, return an empty formatter
193193
case 0:
194194
return new AbstractFormatter(pattern, locale, timeZone, ChronoUnit.FOREVER) {
195195
@Override
@@ -198,11 +198,11 @@ public void formatTo(final StringBuilder buffer, final Instant instant) {
198198
}
199199
};
200200

201-
// If extracted a single formatter, return it as is
201+
// If extracted a single formatter, return it as is
202202
case 1:
203203
return formatters.get(0);
204204

205-
// Combine all extracted formatters into one
205+
// Combine all extracted formatters into one
206206
default:
207207
final ChronoUnit precision = new CompositePatternSequence(sequences).precision;
208208
return new AbstractFormatter(pattern, locale, timeZone, precision) {

log4j-core/src/main/java/org/apache/logging/log4j/core/util/internal/instant/InstantPatternFormatter.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,16 +117,16 @@ public InstantPatternFormatter build() {
117117
// Wrap the formatter with caching, if necessary
118118
switch (formatter.getPrecision()) {
119119

120-
// It is not worth caching when a precision equal to or higher than microsecond is requested
120+
// It is not worth caching when a precision equal to or higher than microsecond is requested
121121
case NANOS:
122122
case MICROS:
123123
return formatter;
124124

125-
// Millisecond precision cache
125+
// Millisecond precision cache
126126
case MILLIS:
127127
return InstantPatternThreadLocalCachedFormatter.ofMilliPrecision(formatter);
128128

129-
// Cache everything else with second precision
129+
// Cache everything else with second precision
130130
default:
131131
return InstantPatternThreadLocalCachedFormatter.ofSecondPrecision(formatter);
132132
}

0 commit comments

Comments
 (0)