1
1
/*
2
- * Copyright 2018-2023 the original author or authors.
2
+ * Copyright 2018-2025 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
18
18
19
19
import java .util .function .Supplier ;
20
20
21
+ import org .jspecify .annotations .Nullable ;
22
+
21
23
import org .springframework .core .log .LogAccessor ;
22
24
import org .springframework .util .Assert ;
23
25
@@ -101,7 +103,7 @@ public void log(Supplier<CharSequence> messageSupplier, Throwable thrown) {
101
103
}
102
104
}
103
105
104
- private void fatal (Supplier <CharSequence > messageSupplier , Throwable thrown ) {
106
+ private void fatal (Supplier <CharSequence > messageSupplier , @ Nullable Throwable thrown ) {
105
107
if (thrown != null ) {
106
108
this .logger .fatal (thrown , messageSupplier );
107
109
}
@@ -110,7 +112,7 @@ private void fatal(Supplier<CharSequence> messageSupplier, Throwable thrown) {
110
112
}
111
113
}
112
114
113
- private void error (Supplier <CharSequence > messageSupplier , Throwable thrown ) {
115
+ private void error (Supplier <CharSequence > messageSupplier , @ Nullable Throwable thrown ) {
114
116
if (thrown != null ) {
115
117
this .logger .error (thrown , messageSupplier );
116
118
}
@@ -119,7 +121,7 @@ private void error(Supplier<CharSequence> messageSupplier, Throwable thrown) {
119
121
}
120
122
}
121
123
122
- private void warn (Supplier <CharSequence > messageSupplier , Throwable thrown ) {
124
+ private void warn (Supplier <CharSequence > messageSupplier , @ Nullable Throwable thrown ) {
123
125
if (thrown != null ) {
124
126
this .logger .warn (thrown , messageSupplier );
125
127
}
@@ -128,7 +130,7 @@ private void warn(Supplier<CharSequence> messageSupplier, Throwable thrown) {
128
130
}
129
131
}
130
132
131
- private void info (Supplier <CharSequence > messageSupplier , Throwable thrown ) {
133
+ private void info (Supplier <CharSequence > messageSupplier , @ Nullable Throwable thrown ) {
132
134
if (thrown != null ) {
133
135
this .logger .info (thrown , messageSupplier );
134
136
}
@@ -137,7 +139,7 @@ private void info(Supplier<CharSequence> messageSupplier, Throwable thrown) {
137
139
}
138
140
}
139
141
140
- private void debug (Supplier <CharSequence > messageSupplier , Throwable thrown ) {
142
+ private void debug (Supplier <CharSequence > messageSupplier , @ Nullable Throwable thrown ) {
141
143
if (thrown != null ) {
142
144
this .logger .debug (thrown , messageSupplier );
143
145
}
@@ -146,7 +148,7 @@ private void debug(Supplier<CharSequence> messageSupplier, Throwable thrown) {
146
148
}
147
149
}
148
150
149
- private void trace (Supplier <CharSequence > messageSupplier , Throwable thrown ) {
151
+ private void trace (Supplier <CharSequence > messageSupplier , @ Nullable Throwable thrown ) {
150
152
if (thrown != null ) {
151
153
this .logger .trace (thrown , messageSupplier );
152
154
}
0 commit comments