langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Utils.java
equal
deleted
inserted
replaced
347 first = false; |
347 first = false; |
348 } |
348 } |
349 } |
349 } |
350 |
350 |
351 protected Location getLocationForPackage(PackageElement pd) { |
351 protected Location getLocationForPackage(PackageElement pd) { |
352 return getLocationForModule(configuration.docEnv.getElementUtils().getModuleOf(pd)); |
352 ModuleElement mdle = configuration.docEnv.getElementUtils().getModuleOf(pd); |
|
353 |
|
354 if (mdle == null) |
|
355 return defaultLocation(); |
|
356 |
|
357 return getLocationForModule(mdle); |
353 } |
358 } |
354 |
359 |
355 protected Location getLocationForModule(ModuleElement mdle) { |
360 protected Location getLocationForModule(ModuleElement mdle) { |
356 Location loc = configuration.workArounds.getLocationForModule(mdle); |
361 Location loc = configuration.workArounds.getLocationForModule(mdle); |
357 if (loc != null) |
362 if (loc != null) |
358 return loc; |
363 return loc; |
359 |
364 |
|
365 return defaultLocation(); |
|
366 } |
|
367 |
|
368 private Location defaultLocation() { |
360 JavaFileManager fm = configuration.docEnv.getJavaFileManager(); |
369 JavaFileManager fm = configuration.docEnv.getJavaFileManager(); |
361 return fm.hasLocation(StandardLocation.SOURCE_PATH) |
370 return fm.hasLocation(StandardLocation.SOURCE_PATH) |
362 ? StandardLocation.SOURCE_PATH |
371 ? StandardLocation.SOURCE_PATH |
363 : StandardLocation.CLASS_PATH; |
372 : StandardLocation.CLASS_PATH; |
364 } |
373 } |