From d9167df219f666dc59aab88ba0358bf00cf22e70 Mon Sep 17 00:00:00 2001 From: Denis Sinelnikov Date: Mon, 18 Sep 2023 17:59:11 +0400 Subject: [PATCH] CB-3839. Remove comments, fixed checkstyle --- .../rm/local/LocalResourceController.java | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/model/rm/local/LocalResourceController.java b/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/model/rm/local/LocalResourceController.java index c447a48b77..9d076f065d 100644 --- a/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/model/rm/local/LocalResourceController.java +++ b/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/model/rm/local/LocalResourceController.java @@ -961,25 +961,25 @@ protected T doProjectOperation(String projectId, RMFileOperation operatio protected T doFileReadOperation(String projectId, Path file, RMFileOperation operation) throws DBException { for (RMFileOperationHandler fileHandler : fileHandlers) { -// try { -// fileHandler.beforeFileRead(projectId, file); -// } catch (Exception e) { - if (credentialsProvider.getActiveUserCredentials() != null) { - WebAppUtils.getWebApplication().getEventController().addEvent( - new WSErrorEvent( - WSEventType.SESSION_LOG_MESSAGE_ADDED, - credentialsProvider.getActiveUserCredentials().getSmSessionId(), - credentialsProvider.getActiveUserCredentials().getUserId(), - "123")); //e.getMessage())); - } else { - WebAppUtils.getWebApplication().getEventController().addEvent( - new WSErrorEvent( - WSEventType.SESSION_LOG_MESSAGE_ADDED, - "123")); //e.getMessage())); + try { + fileHandler.beforeFileRead(projectId, file); + } catch (Exception e) { + if (credentialsProvider.getActiveUserCredentials() != null) { + WebAppUtils.getWebApplication().getEventController().addEvent( + new WSErrorEvent( + WSEventType.SESSION_LOG_MESSAGE_ADDED, + credentialsProvider.getActiveUserCredentials().getSmSessionId(), + credentialsProvider.getActiveUserCredentials().getUserId(), + e.getMessage())); + } else { + WebAppUtils.getWebApplication().getEventController().addEvent( + new WSErrorEvent( + WSEventType.SESSION_LOG_MESSAGE_ADDED, + e.getMessage())); + } + log.error("Error before file reading", e); } } -// log.error("Error before file reading", e); -// } return operation.doOperation(); }