mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-09-24 16:04:36 +08:00
dbeaver/pro#7455 Remove redundant errors re-throws (#3885)
This commit is contained in:
+1
-1
@@ -164,7 +164,7 @@ public abstract class WebServiceBindingBase<API_TYPE extends DBWService> impleme
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static WebConnectionInfo getWebConnection(@NotNull WebSession session, @NotNull String projectId, @NotNull String connectionId) throws DBWebException {
|
||||
public static WebConnectionInfo getWebConnection(@NotNull WebSession session, @Nullable String projectId, @NotNull String connectionId) throws DBWebException {
|
||||
return WebDataSourceUtils.getWebConnectionInfo(session, projectId, connectionId);
|
||||
}
|
||||
|
||||
|
||||
-7
@@ -63,7 +63,6 @@ import org.jkiss.utils.ArrayUtils;
|
||||
import org.jkiss.utils.CommonUtils;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
@@ -293,8 +292,6 @@ public class WebSQLProcessor implements WebSessionProvider {
|
||||
sqlOutputLogReaderJob.join();
|
||||
}
|
||||
fillQueryResults(contextInfo, dataContainer, dbStat, hasResultSet, executeInfo, webDataFilter, dataFilter, dataFormat);
|
||||
} catch (DBException e) {
|
||||
throw new InvocationTargetException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -359,8 +356,6 @@ public class WebSQLProcessor implements WebSessionProvider {
|
||||
resultSet.getResultsInfo().setQueryText(statistics.getQueryText());
|
||||
executeInfo.setStatusMessage(resultSet.getRowsWithMetaData().size() + " row(s) fetched");
|
||||
}
|
||||
} catch (DBException e) {
|
||||
throw new InvocationTargetException(e);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -903,8 +898,6 @@ public class WebSQLProcessor implements WebSessionProvider {
|
||||
DBCQueryPlannerConfiguration planConfig = new DBCQueryPlannerConfiguration();
|
||||
planConfig.getParameters().putAll(configuration);
|
||||
dbcPlan[0] = planner.planQueryExecution(session, sql, planConfig);
|
||||
} catch (DBException e) {
|
||||
throw new InvocationTargetException(e);
|
||||
}
|
||||
});
|
||||
} catch (DBException e) {
|
||||
|
||||
+5
-16
@@ -400,21 +400,16 @@ public class WebServiceSQL implements DBWServiceSQL {
|
||||
DBExecUtils.tryExecuteRecover(
|
||||
monitor,
|
||||
contextInfo.getProcessor().getConnection().getDataSource(),
|
||||
monitor1 -> {
|
||||
try {
|
||||
result[0] = contextInfo.getProcessor().updateResultsDataBatch(
|
||||
monitor1, contextInfo, resultsId, updatedRows, deletedRows, addedRows, dataFormat);
|
||||
} catch (Exception e) {
|
||||
throw new InvocationTargetException(e);
|
||||
}
|
||||
}
|
||||
monitor1 ->
|
||||
result[0] = contextInfo.getProcessor().updateResultsDataBatch(
|
||||
monitor1, contextInfo, resultsId, updatedRows, deletedRows, addedRows, dataFormat)
|
||||
);
|
||||
return result[0];
|
||||
}
|
||||
|
||||
@FunctionalInterface
|
||||
private interface ThrowableFunction<T, R> {
|
||||
R apply(T obj) throws Exception;
|
||||
R apply(T obj) throws DBException;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -454,13 +449,7 @@ public class WebServiceSQL implements DBWServiceSQL {
|
||||
DBExecUtils.tryExecuteRecover(
|
||||
processor.getWebSession().getProgressMonitor(),
|
||||
processor.getConnection().getDataSource(),
|
||||
monitor -> {
|
||||
try {
|
||||
result.append(function.apply(monitor));
|
||||
} catch (Exception e) {
|
||||
throw new InvocationTargetException(e);
|
||||
}
|
||||
}
|
||||
monitor -> result.append(function.apply(monitor))
|
||||
);
|
||||
return result.toString();
|
||||
} catch (DBException e) {
|
||||
|
||||
Reference in New Issue
Block a user