Skip to content
Permalink
Browse files

Improved: Remove unnecessary ‘throws’ declarations

(OFBIZ-11264)

Some declared and/or documented exceptions that were not actually
thrown.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1869181 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
mthl committed Oct 30, 2019
1 parent c9788a0 commit 7093974aa714b05cb95bc723dc8a42979d34a186
@@ -119,8 +119,7 @@ private static void loadClassPathForAllComponents(List<Classpath> componentsClas
* @throws IOException when component directory loading fails.
* @throws ComponentException when retrieving component configuration files fails.
*/
private void loadComponent(Path dir, ComponentDef component)
throws IOException, ComponentException {
private void loadComponent(Path dir, ComponentDef component) throws IOException, ComponentException {
Path location = component.location.isAbsolute() ? component.location : dir.resolve(component.location);
switch (component.type) {
case COMPONENT_DIRECTORY:
@@ -141,7 +140,6 @@ private void loadComponent(Path dir, ComponentDef component)
*
* @param directoryName the name of component directory to load
* @throws IOException
* @throws ContainerException
* @throws ComponentException
*/
private void loadComponentDirectory(Path directoryName) throws IOException, ComponentException {
@@ -168,7 +166,6 @@ private void loadComponentDirectory(Path directoryName) throws IOException, Comp
* @param directoryPath the absolute path of the directory
* @param componentLoadFile the name of the load file (i.e. component-load.xml)
* @throws IOException
* @throws ContainerException
*/
private void loadComponentsInDirectoryUsingLoadFile(Path directoryPath, Path componentLoadFile) throws IOException {
URL configUrl = null;
@@ -277,10 +274,9 @@ private static ComponentConfig retrieveComponentConfig(String name, Path locatio
* the list of classpaths to be loaded
*
* @param config the component configuration
* @throws IOException
* @throws ComponentException
*/
private void loadSingleComponent(ComponentConfig config) throws IOException, ComponentException {
private void loadSingleComponent(ComponentConfig config) throws ComponentException {
if (config.enabled()) {
List<DependsOnInfo> dependencyList = checkDependencyForComponent(config);
if (UtilValidate.isEmpty(dependencyList)) {
@@ -297,11 +293,9 @@ private void loadSingleComponent(ComponentConfig config) throws IOException, Com
* from list of unloaded components
*
* @param config the component configuration
* @throws IOException
* @throws ComponentException
*
*/
private List<DependsOnInfo> checkDependencyForComponent(ComponentConfig config) throws IOException, ComponentException {
private List<DependsOnInfo> checkDependencyForComponent(ComponentConfig config) throws ComponentException {
List<DependsOnInfo> dependencyList = new ArrayList<>(config.getDependsOn());
if (UtilValidate.isNotEmpty(dependencyList)) {
Set<DependsOnInfo> resolvedDependencyList = new HashSet<>();

0 comments on commit 7093974

Please sign in to comment.
You can’t perform that action at this time.