You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2022/08/26 20:31:08 UTC

[commons-lang] branch master updated: Sort members

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git


The following commit(s) were added to refs/heads/master by this push:
     new c90ba2fca Sort members
c90ba2fca is described below

commit c90ba2fca98c3fba3ba097083c5a73abb4fb0079
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Aug 26 16:31:00 2022 -0400

    Sort members
---
 .../commons/lang3/exception/ExceptionContext.java  | 46 +++++++++++-----------
 1 file changed, 23 insertions(+), 23 deletions(-)

diff --git a/src/main/java/org/apache/commons/lang3/exception/ExceptionContext.java b/src/main/java/org/apache/commons/lang3/exception/ExceptionContext.java
index f055d5b80..121f8f466 100644
--- a/src/main/java/org/apache/commons/lang3/exception/ExceptionContext.java
+++ b/src/main/java/org/apache/commons/lang3/exception/ExceptionContext.java
@@ -49,17 +49,18 @@ public interface ExceptionContext {
     ExceptionContext addContextValue(String label, Object value);
 
     /**
-     * Sets a contextual label-value pair into this context.
-     * <p>
-     * The pair will be added normally, but any existing label-value pair with
-     * the same label is removed from the context.
-     * </p>
+     * Retrieves the full list of label-value pairs defined in the contextual data.
      *
-     * @param label  the label of the item to add, {@code null} not recommended
-     * @param value  the value of item to add, may be {@code null}
-     * @return {@code this}, for method chaining, not {@code null}
+     * @return the list of pairs, not {@code null}
      */
-    ExceptionContext setContextValue(String label, Object value);
+    List<Pair<String, Object>> getContextEntries();
+
+    /**
+     * Retrieves the full set of labels defined in the contextual data.
+     *
+     * @return the set of labels, not {@code null}
+     */
+    Set<String> getContextLabels();
 
     /**
      * Retrieves all the contextual data values associated with the label.
@@ -77,20 +78,6 @@ public interface ExceptionContext {
      */
     Object getFirstContextValue(String label);
 
-    /**
-     * Retrieves the full set of labels defined in the contextual data.
-     *
-     * @return the set of labels, not {@code null}
-     */
-    Set<String> getContextLabels();
-
-    /**
-     * Retrieves the full list of label-value pairs defined in the contextual data.
-     *
-     * @return the list of pairs, not {@code null}
-     */
-    List<Pair<String, Object>> getContextEntries();
-
     /**
      * Gets the contextualized error message based on a base message.
      * This will add the context label-value pairs to the message.
@@ -100,4 +87,17 @@ public interface ExceptionContext {
      */
     String getFormattedExceptionMessage(String baseMessage);
 
+    /**
+     * Sets a contextual label-value pair into this context.
+     * <p>
+     * The pair will be added normally, but any existing label-value pair with
+     * the same label is removed from the context.
+     * </p>
+     *
+     * @param label  the label of the item to add, {@code null} not recommended
+     * @param value  the value of item to add, may be {@code null}
+     * @return {@code this}, for method chaining, not {@code null}
+     */
+    ExceptionContext setContextValue(String label, Object value);
+
 }