This is an automated email from the ASF dual-hosted git repository.

benjobs pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampark.git


The following commit(s) were added to refs/heads/dev by this push:
     new 3448cf086 [Improve]Trivial improvements (#3723)
3448cf086 is described below

commit 3448cf086dc2f05dd32e5e62634a7d5a1d3ff656
Author: yaolei <[email protected]>
AuthorDate: Mon May 27 11:54:01 2024 +0800

    [Improve]Trivial improvements (#3723)
    
    * [Improve]Trivial improvements
    
    * Code optimization
---
 .../src/main/scala/org/apache/streampark/common/util/Utils.scala     | 5 ++++-
 .../streampark/console/core/service/impl/ResourceServiceImpl.java    | 3 ++-
 .../streampark-console-webapp/src/locales/lang/en/layout.ts          | 4 ++--
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git 
a/streampark-common/src/main/scala/org/apache/streampark/common/util/Utils.scala
 
b/streampark-common/src/main/scala/org/apache/streampark/common/util/Utils.scala
index ed27537a8..ae47f66f2 100644
--- 
a/streampark-common/src/main/scala/org/apache/streampark/common/util/Utils.scala
+++ 
b/streampark-common/src/main/scala/org/apache/streampark/common/util/Utils.scala
@@ -16,6 +16,8 @@
  */
 package org.apache.streampark.common.util
 
+import org.apache.streampark.common.util.ImplicitsUtils.AutoCloseImplicits
+
 import org.apache.commons.lang3.StringUtils
 
 import java.io._
@@ -71,7 +73,8 @@ object Utils extends Logger {
 
   def getJarManifest(jarFile: File): jar.Manifest = {
     requireCheckJarFile(jarFile.toURL)
-    new JarInputStream(new BufferedInputStream(new 
FileInputStream(jarFile))).getManifest
+    new JarInputStream(new BufferedInputStream(new FileInputStream(jarFile)))
+      .autoClose(_.getManifest)
   }
 
   def getJarManClass(jarFile: File): String = {
diff --git 
a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ResourceServiceImpl.java
 
b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ResourceServiceImpl.java
index 193eec6d3..f62bcf997 100644
--- 
a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ResourceServiceImpl.java
+++ 
b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ResourceServiceImpl.java
@@ -348,7 +348,8 @@ public class ResourceServiceImpl extends 
ServiceImpl<ResourceMapper, Resource>
       // get jarFile error
       return buildExceptResponse(e, 1);
     }
-    ApiAlertException.throwIfTrue(jarFile == null, "flink app jar must 
exist.");
+    ApiAlertException.throwIfTrue(
+        jarFile == null || !jarFile.exists(), "flink app jar must exist.");
     Map<String, Serializable> resp = new HashMap<>(0);
     resp.put(STATE, 0);
     if (jarFile.getName().endsWith(Constant.PYTHON_SUFFIX)) {
diff --git 
a/streampark-console/streampark-console-webapp/src/locales/lang/en/layout.ts 
b/streampark-console/streampark-console-webapp/src/locales/lang/en/layout.ts
index 0c8394b0b..cb53751ba 100644
--- a/streampark-console/streampark-console-webapp/src/locales/lang/en/layout.ts
+++ b/streampark-console/streampark-console-webapp/src/locales/lang/en/layout.ts
@@ -20,7 +20,7 @@ export default {
     version: 'Version',
     // user dropdown
     dropdownItemDoc: 'Document',
-    ChangePassword: 'ChangePassword',
+    ChangePassword: 'Change Password',
     dropdownItemLoginOut: 'Login Out',
 
     tooltipErrorLog: 'Error log',
@@ -105,7 +105,7 @@ export default {
     tabDetail: 'Tab Detail',
     tabsQuickBtn: 'Tabs quick button',
     tabsRedoBtn: 'Tabs redo button',
-    tabsFoldBtn: 'Tabs flod button',
+    tabsFoldBtn: 'Tabs fold button',
     sidebar: 'Sidebar',
     header: 'Header',
     footer: 'Footer',

Reply via email to