mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
code cleanup: collapse identical catch clauses in JPS modules
This commit is contained in:
@@ -34,10 +34,7 @@ public class TaskFutureAdapter<T> implements TaskFuture<T> {
|
||||
try {
|
||||
get();
|
||||
}
|
||||
catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
catch (ExecutionException e) {
|
||||
catch (InterruptedException | ExecutionException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
catch (CancellationException ignored) {
|
||||
@@ -49,15 +46,10 @@ public class TaskFutureAdapter<T> implements TaskFuture<T> {
|
||||
try {
|
||||
get(timeout, unit);
|
||||
}
|
||||
catch (InterruptedException e) {
|
||||
catch (InterruptedException | ExecutionException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
catch (ExecutionException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
catch (TimeoutException ignored) {
|
||||
}
|
||||
catch (CancellationException ignored) {
|
||||
catch (TimeoutException | CancellationException ignored) {
|
||||
}
|
||||
return isDone();
|
||||
}
|
||||
|
||||
@@ -1025,10 +1025,7 @@ public class IncProjectBuilder {
|
||||
// }));
|
||||
//}
|
||||
}
|
||||
catch (BuildDataCorruptedException e) {
|
||||
throw e;
|
||||
}
|
||||
catch (ProjectBuildException e) {
|
||||
catch (BuildDataCorruptedException | ProjectBuildException e) {
|
||||
throw e;
|
||||
}
|
||||
catch (Throwable e) {
|
||||
|
||||
@@ -102,13 +102,7 @@ public class FormsParsing {
|
||||
LOG.debug(e);
|
||||
}
|
||||
}
|
||||
catch (ClassNotFoundException e) {
|
||||
LOG.error(e);
|
||||
}
|
||||
catch (InstantiationException e) {
|
||||
LOG.error(e);
|
||||
}
|
||||
catch (IllegalAccessException e) {
|
||||
catch (ClassNotFoundException | IllegalAccessException | InstantiationException e) {
|
||||
LOG.error(e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -248,13 +248,7 @@ public class JavaBuilder extends ModuleLevelBuilder {
|
||||
|
||||
return compile(context, chunk, dirtyFilesHolder, filesToCompile, outputConsumer, compilingTool);
|
||||
}
|
||||
catch (BuildDataCorruptedException e) {
|
||||
throw e;
|
||||
}
|
||||
catch (ProjectBuildException e) {
|
||||
throw e;
|
||||
}
|
||||
catch (PersistentEnumeratorBase.CorruptedException e) {
|
||||
catch (BuildDataCorruptedException | PersistentEnumeratorBase.CorruptedException | ProjectBuildException e) {
|
||||
throw e;
|
||||
}
|
||||
catch (Exception e) {
|
||||
|
||||
@@ -97,10 +97,7 @@ public class ResourcesBuilder extends TargetBuilder<ResourceRootDescriptor, Reso
|
||||
|
||||
context.processMessage(new ProgressMessage(""));
|
||||
}
|
||||
catch(BuildDataCorruptedException e) {
|
||||
throw e;
|
||||
}
|
||||
catch(ProjectBuildException e) {
|
||||
catch(BuildDataCorruptedException | ProjectBuildException e) {
|
||||
throw e;
|
||||
}
|
||||
catch (Exception e) {
|
||||
|
||||
@@ -340,10 +340,7 @@ public abstract class JpsBuildTestCase extends UsefulTestCase {
|
||||
builder.build(scopeBuilder.build(), false);
|
||||
result.storeMappingsDump(descriptor);
|
||||
}
|
||||
catch (RebuildRequestedException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
catch (IOException e) {
|
||||
catch (RebuildRequestedException | IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
return result;
|
||||
|
||||
+1
-4
@@ -65,10 +65,7 @@ public class JpsGlobalElementSaver {
|
||||
try {
|
||||
return JDOMUtil.load(configFile);
|
||||
}
|
||||
catch (JDOMException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
catch (IOException e) {
|
||||
catch (JDOMException | IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-4
@@ -87,10 +87,7 @@ public class JpsPluginSyntheticArtifactProvider extends JpsSyntheticArtifactProv
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (JDOMException e) {
|
||||
LOG.info(e);
|
||||
}
|
||||
catch (IOException e) {
|
||||
catch (JDOMException | IOException e) {
|
||||
LOG.info(e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,10 +68,7 @@ public class EclipseProjectFinder implements EclipseXml {
|
||||
}
|
||||
name = name.replace("\n", " ").trim();
|
||||
}
|
||||
catch (JDOMException e) {
|
||||
return null;
|
||||
}
|
||||
catch (IOException e) {
|
||||
catch (JDOMException | IOException e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-3
@@ -65,9 +65,7 @@ public class ResourceRootFilter {
|
||||
propertiesMap.put("matcher", matcher);
|
||||
}
|
||||
}
|
||||
catch (JsonSyntaxException e) {
|
||||
throw new RuntimeException("Unsupported filter: " + properties , e);
|
||||
} catch (JsonParseException e) {
|
||||
catch (JsonParseException e) {
|
||||
throw new RuntimeException("Unsupported filter: " + properties , e);
|
||||
}
|
||||
if(propertiesMap == null) {
|
||||
|
||||
Reference in New Issue
Block a user