You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: log4j-core/src/main/java/org/apache/logging/log4j/core/util/internal/instant/InstantPatternDynamicFormatter.java
+24Lines changed: 24 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -408,6 +408,30 @@ abstract static class PatternSequence {
408
408
/**
409
409
* Tries to merge two pattern sequences.
410
410
*
411
+
* <p>
412
+
* If not {@link null}, the pattern sequence returned by this method must:
413
+
* </p>
414
+
* <ol>
415
+
* <li>Have a {@link #precision}, which is the minimum of the precisions of the two merged sequences.</li>
416
+
* <li>
417
+
* Create formatters that are equivalent to the concatenation of the formatters produced by the
418
+
* two merged sequences.
419
+
* </li>
420
+
* </ol>
421
+
* <p>
422
+
* The returned pattern sequence should try to achieve these two goals:
423
+
* </p>
424
+
* <ol>
425
+
* <li>
426
+
* Create formatters which are faster than the concatenation of the formatters produced by the
427
+
* two merged sequences.
428
+
* </li>
429
+
* <li>
430
+
* It should be {@link null} if one of the pattern sequences is effectively constant over
431
+
* {@code thresholdPrecision}, but the other one is not.
432
+
* </li>
433
+
* </ol>
434
+
*
411
435
* @param other A pattern sequence.
412
436
* @param thresholdPrecision A precision threshold to determine effectively constant sequences.
413
437
* This prevents merging effectively constant and dynamic pattern sequences.
0 commit comments