MCPcopy Create free account
hub / github.com/apache/tomcat / getAppBaseFile

Method getAppBaseFile

java/org/apache/catalina/core/StandardHost.java:211–240  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

209
210
211 @Override
212 public File getAppBaseFile() {
213
214 if (appBaseFile != null) {
215 return appBaseFile;
216 }
217
218 File file = new File(getAppBase());
219
220 // If not absolute, make it absolute
221 if (!file.isAbsolute()) {
222 file = new File(getCatalinaBase(), file.getPath());
223 }
224
225 // Make it canonical if possible
226 try {
227 file = file.getCanonicalFile();
228 } catch (IOException ioe) {
229 // Ignore
230 }
231
232 Path appBasePath = file.toPath();
233 Path basePath = getCatalinaBase().toPath();
234 if (basePath.startsWith(appBasePath)) {
235 log.warn(sm.getString("standardHost.problematicAppBaseParent", getName()));
236 }
237
238 this.appBaseFile = file;
239 return file;
240 }
241
242
243 @Override

Callers 2

doTestDeploymentMethod · 0.95

Calls 7

getAppBaseMethod · 0.95
getNameMethod · 0.95
getCatalinaBaseMethod · 0.65
getPathMethod · 0.65
warnMethod · 0.65
getStringMethod · 0.65
startsWithMethod · 0.45

Tested by 2

doTestDeploymentMethod · 0.76