Skip to content

Commit

Permalink
Improved: Remove unnecessary ‘throws’ declarations
Browse files Browse the repository at this point in the history
(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 7093974
Showing 1 changed file with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 {
Expand All @@ -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;
Expand Down Expand Up @@ -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)) {
Expand All @@ -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<>();
Expand Down

0 comments on commit 7093974

Please sign in to comment.