Skip to content

Commit 0ebddbe

Browse files
committed
Replace host with logging of the mapping data
1 parent 9f6075b commit 0ebddbe

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

java/org/apache/catalina/mapper/LocalStrings.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ mapper.addHost.sameHost=Duplicate registration of the same host [{0}]. Ignored.
1919
mapper.addHost.success=Registered host [{0}]
2020
mapper.addHostAlias.sameHost=Duplicate registration of alias [{0}] for the same host [{1}]. Ignored.
2121
mapper.addHostAlias.success=Registered alias [{0}] for host [{1}]
22-
mapper.alreadyDone=Mapping was already done on this request on host [{0}]
22+
mapper.alreadyDone=Mapping was already done on this request on [{0}]
2323
mapper.duplicateHost=Duplicate Host [{0}]. The name is already used by Host [{1}]. This Host will be ignored.
2424
mapper.duplicateHostAlias=Duplicate host Alias [{0}] in Host [{1}]. The name is already used by Host [{2}]. This Alias will be ignored.
2525
mapper.findContext.noContext=No context found [{0}]

java/org/apache/catalina/mapper/Mapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ private void internalMap(CharChunk host, CharChunk uri, String version, MappingD
710710
// skipped all mapping work in this case. That behaviour has a risk
711711
// of returning an inconsistent result.
712712
// I do not see a valid use case for it.
713-
throw new IllegalStateException(sm.getString("mapper.alreadyDone", mappingData.host));
713+
throw new IllegalStateException(sm.getString("mapper.alreadyDone", mappingData));
714714
}
715715

716716
// Virtual host mapping

java/org/apache/catalina/mapper/MappingData.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,10 @@ public void recycle() {
5757
redirectPath.recycle();
5858
matchType = null;
5959
}
60+
61+
@Override
62+
public final String toString() {
63+
return "MappingData[" + host + ":" + context + ":" + wrapper + "]";
64+
}
65+
6066
}

0 commit comments

Comments
 (0)