This is an automated email from the ASF dual-hosted git repository.
hansva pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/hop.git
The following commit(s) were added to refs/heads/main by this push:
new a07fdd645f Some random fixes, fixes #7172 (#7177)
a07fdd645f is described below
commit a07fdd645fcb513b4b84f8d593ca10f72a4823bd
Author: Hans Van Akelyen <[email protected]>
AuthorDate: Tue May 26 13:34:15 2026 +0200
Some random fixes, fixes #7172 (#7177)
* NPE saving a text file editor to the right, fixes #7172
Included some other general fixes
* spotless
---
engine/pom.xml | 14 ++++++++++++++
lib/pom.xml | 1 -
.../ActionDeleteResultFilenames.java | 2 +-
.../pgpdecryptfiles/ActionPGPDecryptFiles.java | 2 +-
.../workflow/actions/pgpverify/ActionPGPVerify.java | 2 +-
.../org/apache/hop/vfs/minio/MinioFileObject.java | 14 +++++++++++++-
pom.xml | 2 +-
.../hop/ui/hopgui/ContentEditorTm4eSupport.java | 19 ++++++++-----------
.../perspective/explorer/ExplorerPerspective.java | 20 ++++++++++++++++++--
9 files changed, 57 insertions(+), 19 deletions(-)
diff --git a/engine/pom.xml b/engine/pom.xml
index 821e281bd4..8560c02bfe 100644
--- a/engine/pom.xml
+++ b/engine/pom.xml
@@ -208,6 +208,20 @@
<dependency>
<groupId>org.mozilla</groupId>
<artifactId>rhino-all</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>org.mozilla</groupId>
+ <artifactId>rhino</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.mozilla</groupId>
+ <artifactId>rhino-tools</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.mozilla</groupId>
+ <artifactId>rhino-xml</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.xerial.snappy</groupId>
diff --git a/lib/pom.xml b/lib/pom.xml
index 5ab16b5746..2ce605c284 100644
--- a/lib/pom.xml
+++ b/lib/pom.xml
@@ -120,7 +120,6 @@
<ognl.version>3.3.4</ognl.version>
<okhttp.version>4.12.0</okhttp.version>
<okio.version>3.16.4</okio.version>
- <opentelemetry.version>1.62.0</opentelemetry.version>
<paho.version>1.2.1</paho.version>
<paranamer.version>2.8</paranamer.version>
<perfmark.version>0.26.0</perfmark.version>
diff --git
a/plugins/actions/deleteresultfilenames/src/main/java/org/apache/hop/workflow/actions/deleteresultfilenames/ActionDeleteResultFilenames.java
b/plugins/actions/deleteresultfilenames/src/main/java/org/apache/hop/workflow/actions/deleteresultfilenames/ActionDeleteResultFilenames.java
index 00a420e735..c01dddcfc7 100644
---
a/plugins/actions/deleteresultfilenames/src/main/java/org/apache/hop/workflow/actions/deleteresultfilenames/ActionDeleteResultFilenames.java
+++
b/plugins/actions/deleteresultfilenames/src/main/java/org/apache/hop/workflow/actions/deleteresultfilenames/ActionDeleteResultFilenames.java
@@ -87,7 +87,7 @@ public class ActionDeleteResultFilenames extends ActionBase
implements Cloneable
@Override
public Object clone() {
- return new ActionDeleteResultFilenames();
+ return new ActionDeleteResultFilenames(this);
}
@Override
diff --git
a/plugins/actions/pgpfiles/src/main/java/org/apache/hop/workflow/actions/pgpdecryptfiles/ActionPGPDecryptFiles.java
b/plugins/actions/pgpfiles/src/main/java/org/apache/hop/workflow/actions/pgpdecryptfiles/ActionPGPDecryptFiles.java
index 165375b0e1..084472e471 100644
---
a/plugins/actions/pgpfiles/src/main/java/org/apache/hop/workflow/actions/pgpdecryptfiles/ActionPGPDecryptFiles.java
+++
b/plugins/actions/pgpfiles/src/main/java/org/apache/hop/workflow/actions/pgpdecryptfiles/ActionPGPDecryptFiles.java
@@ -219,7 +219,7 @@ public class ActionPGPDecryptFiles extends ActionBase
implements Cloneable, IAct
@Override
public Object clone() {
- return new ActionPGPDecryptFiles();
+ return new ActionPGPDecryptFiles(this);
}
@Override
diff --git
a/plugins/actions/pgpfiles/src/main/java/org/apache/hop/workflow/actions/pgpverify/ActionPGPVerify.java
b/plugins/actions/pgpfiles/src/main/java/org/apache/hop/workflow/actions/pgpverify/ActionPGPVerify.java
index 062ce90d24..18a85ff757 100644
---
a/plugins/actions/pgpfiles/src/main/java/org/apache/hop/workflow/actions/pgpverify/ActionPGPVerify.java
+++
b/plugins/actions/pgpfiles/src/main/java/org/apache/hop/workflow/actions/pgpverify/ActionPGPVerify.java
@@ -93,7 +93,7 @@ public class ActionPGPVerify extends ActionBase implements
Cloneable, IAction {
@Override
public Object clone() {
- return new ActionPGPVerify();
+ return new ActionPGPVerify(this);
}
@Override
diff --git
a/plugins/tech/minio/src/main/java/org/apache/hop/vfs/minio/MinioFileObject.java
b/plugins/tech/minio/src/main/java/org/apache/hop/vfs/minio/MinioFileObject.java
index 3d739ae948..2496a728b6 100644
---
a/plugins/tech/minio/src/main/java/org/apache/hop/vfs/minio/MinioFileObject.java
+++
b/plugins/tech/minio/src/main/java/org/apache/hop/vfs/minio/MinioFileObject.java
@@ -198,7 +198,19 @@ public class MinioFileObject extends
AbstractFileObject<MinioFileSystem> {
injectType(FileType.IMAGINARY);
if (StringUtils.isEmpty(key)) {
- injectType(FileType.FOLDER);
+ if (isRootBucket()) {
+ injectType(FileType.FOLDER);
+ } else {
+ try {
+ BucketExistsArgs existsArgs =
BucketExistsArgs.builder().bucket(bucketName).build();
+ if (fileSystem.getClient().bucketExists(existsArgs)) {
+ injectType(FileType.FOLDER);
+ }
+ } catch (Exception e) {
+ LogChannel.GENERAL.logDebug(
+ "Unable to verify existence of bucket {0}: {1}", bucketName,
e.getMessage());
+ }
+ }
return;
}
diff --git a/pom.xml b/pom.xml
index abb0a1fd90..d016712b12 100644
--- a/pom.xml
+++ b/pom.xml
@@ -155,7 +155,7 @@
<mockito-core.version>5.22.0</mockito-core.version>
<netty.version>4.2.13.Final</netty.version>
<objenesis.version>3.5</objenesis.version>
- <opentelemetry.version>1.56.0</opentelemetry.version>
+ <opentelemetry.version>1.62.0</opentelemetry.version>
<org.eclipse.platform.version>3.132.0</org.eclipse.platform.version>
<project.build.outputTimestamp>1770029303</project.build.outputTimestamp>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
diff --git
a/rcp/app/src/main/java/org/apache/hop/ui/hopgui/ContentEditorTm4eSupport.java
b/rcp/app/src/main/java/org/apache/hop/ui/hopgui/ContentEditorTm4eSupport.java
index 2bde7f8f32..d80f68d1d0 100644
---
a/rcp/app/src/main/java/org/apache/hop/ui/hopgui/ContentEditorTm4eSupport.java
+++
b/rcp/app/src/main/java/org/apache/hop/ui/hopgui/ContentEditorTm4eSupport.java
@@ -337,17 +337,9 @@ final class ContentEditorTm4eSupport {
} catch (Exception e) {
return Collections.emptyList();
}
- text = normalizeLineEndings(text);
return tokenizeLines(text, rangeOffset, rangeLength);
}
- private static String normalizeLineEndings(String text) {
- if (text == null || text.isEmpty()) return text;
- if (!text.contains("\r")) return text;
- return text.replace("\r\n", "\n").replace("\r", "\n");
- }
-
- /** Tokenize using a string with normalized line endings (\\n only). */
private java.util.List<ColoredToken> tokenizeLines(
String text, int rangeOffset, int rangeLength) {
java.util.List<ColoredToken> result = new java.util.ArrayList<>();
@@ -361,14 +353,19 @@ final class ContentEditorTm4eSupport {
for (int lineIndex = 0; lineIndex < lines.length; lineIndex++) {
if (lineIndex >= MAX_LINES_TO_TOKENIZE) break;
- String line = lines[lineIndex];
+ String raw = lines[lineIndex];
+ int rawLen = raw.length();
+ String line = raw;
+ if (rawLen > 0 && raw.charAt(rawLen - 1) == '\r') {
+ line = raw.substring(0, rawLen - 1);
+ }
int lineLen = line.length();
if (lineLen > MAX_LINE_LENGTH) {
- lineStart += lineLen + 1L;
+ lineStart += rawLen + 1L;
continue;
}
- long lineEnd = lineStart + lineLen;
+ long lineEnd = lineStart + rawLen;
if (lineEnd <= rangeOffset) {
ITokenizeLineResult<org.eclipse.tm4e.core.grammar.IToken[]> res =
grammar.tokenizeLine(line, state, null);
diff --git
a/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/explorer/ExplorerPerspective.java
b/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/explorer/ExplorerPerspective.java
index 0416e43058..b1b40498f7 100644
---
a/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/explorer/ExplorerPerspective.java
+++
b/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/explorer/ExplorerPerspective.java
@@ -1908,6 +1908,16 @@ public class ExplorerPerspective implements
IHopPerspective, TabClosable, IFileD
return null;
}
+ private CTabItem currentTabItemFor(IHopFileTypeHandler typeHandler) {
+ for (TabItemHandler item : items) {
+ if (item.getTypeHandler() == typeHandler) {
+ CTabItem t = item.getTabItem();
+ return (t == null || t.isDisposed()) ? null : t;
+ }
+ }
+ return null;
+ }
+
/**
* Close tabs for the given filenames (e.g. after files are deleted by
revert or external delete).
* Only tabs whose handler filename exactly matches one of the given
filenames are closed.
@@ -2124,12 +2134,18 @@ public class ExplorerPerspective implements
IHopPerspective, TabClosable, IFileD
new IContentChangedListener() {
@Override
public void contentChanged(Object parentObject) {
- tabItem.setFont(GuiResource.getInstance().getFontBold());
+ CTabItem current = currentTabItemFor(fileTypeHandler);
+ if (current != null) {
+ current.setFont(GuiResource.getInstance().getFontBold());
+ }
}
@Override
public void contentSafe(Object parentObject) {
- tabItem.setFont(tabItem.getParent().getFont());
+ CTabItem current = currentTabItemFor(fileTypeHandler);
+ if (current != null && current.getParent() != null) {
+ current.setFont(current.getParent().getFont());
+ }
}
});