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

Method keys

java/org/apache/catalina/session/FileStore.java:170–193  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

168
169
170 @Override
171 public String[] keys() throws IOException {
172 // Acquire the list of files in our storage directory
173 File dir = directory();
174 if (dir == null) {
175 return new String[0];
176 }
177 String[] files = dir.list();
178
179 // Bugzilla 32130
180 if (files == null || files.length < 1) {
181 return new String[0];
182 }
183
184 // Build and return the list of session identifiers
185 List<String> list = new ArrayList<>();
186 int n = FILE_EXT.length();
187 for (String file : files) {
188 if (file.endsWith(FILE_EXT)) {
189 list.add(file.substring(0, file.length() - n));
190 }
191 }
192 return list.toArray(new String[0]);
193 }
194
195
196 @Override

Callers 2

testFileStoreMethod · 0.95
clearMethod · 0.95

Calls 6

directoryMethod · 0.95
lengthMethod · 0.80
endsWithMethod · 0.80
listMethod · 0.65
addMethod · 0.65
toArrayMethod · 0.45

Tested by 1

testFileStoreMethod · 0.76