MCPcopy Index your code
hub / github.com/apache/tomcat / find

Method find

java/org/apache/tomcat/util/buf/StringCache.java:546–556  ·  view source on GitHub ↗

Find an entry given its name in the cache and return the associated String. @param name The name to find @param malformedInputAction Action to take if a malformed input is encountered @param unmappableCharacterAction Action to take if an unmappable character is encountered

(ByteChunk name, CodingErrorAction malformedInputAction,
            CodingErrorAction unmappableCharacterAction)

Source from the content-addressed store, hash-verified

544 * @return the corresponding value
545 */
546 protected static String find(ByteChunk name, CodingErrorAction malformedInputAction,
547 CodingErrorAction unmappableCharacterAction) {
548 int pos = findClosest(name, bcCache, bcCache.length);
549 if ((pos < 0) || (compare(name, bcCache[pos].name) != 0) || !(name.getCharset().equals(bcCache[pos].charset)) ||
550 !malformedInputAction.equals(bcCache[pos].malformedInputAction) ||
551 !unmappableCharacterAction.equals(bcCache[pos].unmappableCharacterAction)) {
552 return null;
553 } else {
554 return bcCache[pos].value;
555 }
556 }
557
558
559 /**

Callers 7

toStringMethod · 0.95
initMethod · 0.45
testFileNameFilteringMethod · 0.45
checkPackageClassListMethod · 0.45
findOrThrowMethod · 0.45

Calls 4

findClosestMethod · 0.95
compareMethod · 0.95
equalsMethod · 0.65
getCharsetMethod · 0.65

Tested by 4

initMethod · 0.36
testFileNameFilteringMethod · 0.36
checkPackageClassListMethod · 0.36