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

Method addAll

java/org/apache/catalina/util/NetMaskSet.java:130–147  ·  view source on GitHub ↗

Adds a NetMask list from a string input containing a comma-separated list of (hopefully valid) NetMasks. @param input The input string @return a list of processing error messages (empty when no errors)

(String input)

Source from the content-addressed store, hash-verified

128 * @return a list of processing error messages (empty when no errors)
129 */
130 public List<String> addAll(String input) {
131
132 if (input == null || input.isEmpty()) {
133 return Collections.emptyList();
134 }
135
136 List<String> errMessages = new ArrayList<>();
137
138 for (String s : StringUtils.splitCommaSeparated(input)) {
139 try {
140 this.add(s);
141 } catch (IllegalArgumentException e) {
142 errMessages.add(s + ": " + e.getMessage());
143 }
144 }
145
146 return Collections.unmodifiableList(errMessages);
147 }
148
149 /**
150 * Provides a string representation of this NetMaskSet. The format of the String is not guaranteed to remain fixed.

Callers 15

testNetMaskSetMethod · 0.95
parseMethod · 0.95
doTestWriterMethod · 0.45
decodeMethod · 0.45
executeOpenSSLCommandMethod · 0.45
testAuthenticationMethod · 0.45
findJspPropertyMethod · 0.45

Calls 5

splitCommaSeparatedMethod · 0.95
addMethod · 0.95
addMethod · 0.65
getMessageMethod · 0.65
isEmptyMethod · 0.45

Tested by 10

testNetMaskSetMethod · 0.76
doTestWriterMethod · 0.36
decodeMethod · 0.36
executeOpenSSLCommandMethod · 0.36
testAuthenticationMethod · 0.36