Useless condition: it's known that enterpriseNumber >= 0 at this point.

Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/14414fbf
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/14414fbf
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/14414fbf

Branch: refs/heads/master
Commit: 14414fbfd0f62b528e12b546a7c92f406cf0e1ba
Parents: 66e140e
Author: ggregory <[email protected]>
Authored: Sat Jun 27 00:29:01 2015 -0700
Committer: ggregory <[email protected]>
Committed: Sat Jun 27 00:29:01 2015 -0700

----------------------------------------------------------------------
 .../java/org/apache/logging/log4j/message/StructuredDataId.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/14414fbf/log4j-api/src/main/java/org/apache/logging/log4j/message/StructuredDataId.java
----------------------------------------------------------------------
diff --git 
a/log4j-api/src/main/java/org/apache/logging/log4j/message/StructuredDataId.java
 
b/log4j-api/src/main/java/org/apache/logging/log4j/message/StructuredDataId.java
index 81f48dc..606d16e 100644
--- 
a/log4j-api/src/main/java/org/apache/logging/log4j/message/StructuredDataId.java
+++ 
b/log4j-api/src/main/java/org/apache/logging/log4j/message/StructuredDataId.java
@@ -101,7 +101,7 @@ public class StructuredDataId implements Serializable {
         }
         this.name = name;
         this.enterpriseNumber = enterpriseNumber;
-        final String id = enterpriseNumber < 0 ? name : name + AT_SIGN + 
enterpriseNumber;
+        final String id = name + AT_SIGN + enterpriseNumber;
         if (id.length() > MAX_LENGTH) {
             throw new IllegalArgumentException("Length of id exceeds maximum 
of 32 characters: " + id);
         }

Reply via email to