This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 8bed33b936e CAMEL-19928: Fix windows issue due to recent change.
Thanks to Aurelien for reporting this.
8bed33b936e is described below
commit 8bed33b936e2e25208d2da72fd2d534924ffb254
Author: Claus Ibsen <[email protected]>
AuthorDate: Thu Sep 28 13:47:50 2023 +0200
CAMEL-19928: Fix windows issue due to recent change. Thanks to Aurelien for
reporting this.
---
.../apache/camel/component/file/FileConstants.java | 3 +++
.../apache/camel/component/file/FileEndpoint.java | 4 +--
.../file/strategy/FileProcessStrategyFactory.java | 4 +--
.../camel/impl/engine/DefaultRoutesLoader.java | 6 +++--
.../support/component/AbstractApiComponent.java | 31 +++++++++++++---------
5 files changed, 29 insertions(+), 19 deletions(-)
diff --git
a/components/camel-file/src/main/java/org/apache/camel/component/file/FileConstants.java
b/components/camel-file/src/main/java/org/apache/camel/component/file/FileConstants.java
index d22823abd36..53cb13dba98 100644
---
a/components/camel-file/src/main/java/org/apache/camel/component/file/FileConstants.java
+++
b/components/camel-file/src/main/java/org/apache/camel/component/file/FileConstants.java
@@ -81,6 +81,9 @@ public final class FileConstants {
@Metadata(label = "consumer", description = "A `long` value containing the
initial offset.", javaType = "long")
public static final String INITIAL_OFFSET = "CamelFileInitialOffset";
+ /**
+ * Sub folder used by camel-file as default sub-folder for moving
processing file when they are done.
+ */
public static final String DEFAULT_SUB_FOLDER = ".camel";
private FileConstants() {
diff --git
a/components/camel-file/src/main/java/org/apache/camel/component/file/FileEndpoint.java
b/components/camel-file/src/main/java/org/apache/camel/component/file/FileEndpoint.java
index bba364fb404..93536b5b8b8 100644
---
a/components/camel-file/src/main/java/org/apache/camel/component/file/FileEndpoint.java
+++
b/components/camel-file/src/main/java/org/apache/camel/component/file/FileEndpoint.java
@@ -312,8 +312,8 @@ public class FileEndpoint extends GenericFileEndpoint<File>
{
}
/**
- * Whether to accept hidden directories. Directories which names starts
with dot is regarded as a hidden directory, and
- * by default not included. Set this option to true to include hidden
directories in the file consumer.
+ * Whether to accept hidden directories. Directories which names starts
with dot is regarded as a hidden directory,
+ * and by default not included. Set this option to true to include hidden
directories in the file consumer.
*/
public void setIncludeHiddenDirs(boolean includeHiddenDirs) {
this.includeHiddenDirs = includeHiddenDirs;
diff --git
a/components/camel-file/src/main/java/org/apache/camel/component/file/strategy/FileProcessStrategyFactory.java
b/components/camel-file/src/main/java/org/apache/camel/component/file/strategy/FileProcessStrategyFactory.java
index b3bb98a38ec..df916396d87 100644
---
a/components/camel-file/src/main/java/org/apache/camel/component/file/strategy/FileProcessStrategyFactory.java
+++
b/components/camel-file/src/main/java/org/apache/camel/component/file/strategy/FileProcessStrategyFactory.java
@@ -17,7 +17,6 @@
package org.apache.camel.component.file.strategy;
import java.io.File;
-import java.nio.file.Paths;
import java.util.Map;
import java.util.concurrent.ScheduledExecutorService;
@@ -98,7 +97,8 @@ public final class FileProcessStrategyFactory implements
GenericFileProcessStrat
private static GenericFileExpressionRenamer<File>
getDefaultCommitRenamer(CamelContext context) {
// use context to lookup language to let it be loose coupled
Language language = context.resolveLanguage("file");
- Expression expression =
language.createExpression(Paths.get("${file:parent}",
FileConstants.DEFAULT_SUB_FOLDER, "${file:onlyname}").toString());
+ Expression expression
+ = language.createExpression("${file:parent}/" +
FileConstants.DEFAULT_SUB_FOLDER + "/${file:onlyname}");
return new GenericFileExpressionRenamer<>(expression);
}
diff --git
a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultRoutesLoader.java
b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultRoutesLoader.java
index 71b366cd684..560e0db7346 100644
---
a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultRoutesLoader.java
+++
b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultRoutesLoader.java
@@ -163,7 +163,8 @@ public class DefaultRoutesLoader extends ServiceSupport
implements RoutesLoader,
loader.preParseRoute(resource);
} catch (Exception e) {
if (isIgnoreLoadingError()) {
- LOG.warn("Loading resources error: {} due to: {}.
This exception is ignored.", resource, e.getMessage());
+ LOG.warn("Loading resources error: {} due to: {}.
This exception is ignored.", resource,
+ e.getMessage());
} else {
throw e;
}
@@ -200,7 +201,8 @@ public class DefaultRoutesLoader extends ServiceSupport
implements RoutesLoader,
}
} catch (Exception e) {
if (isIgnoreLoadingError()) {
- LOG.warn("Loading resources error: {} due to: {}.
This exception is ignored.", resource, e.getMessage());
+ LOG.warn("Loading resources error: {} due to: {}.
This exception is ignored.", resource,
+ e.getMessage());
} else {
throw e;
}
diff --git
a/core/camel-support/src/main/java/org/apache/camel/support/component/AbstractApiComponent.java
b/core/camel-support/src/main/java/org/apache/camel/support/component/AbstractApiComponent.java
index f3305844793..5dbc1721f1f 100644
---
a/core/camel-support/src/main/java/org/apache/camel/support/component/AbstractApiComponent.java
+++
b/core/camel-support/src/main/java/org/apache/camel/support/component/AbstractApiComponent.java
@@ -48,10 +48,10 @@ public abstract class AbstractApiComponent<E extends
Enum<E> & ApiName, T, S ext
/**
* Deprecated constructor for AbstractApiComponent.
*
- * @deprecated Use {@link AbstractApiComponent#AbstractApiComponent(Class,
ApiCollection)}
- * @param endpointClass This is deprecated. Do not use
- * @param apiNameClass The API name class
- * @param collection The collection of API methods
+ * @deprecated Use {@link
AbstractApiComponent#AbstractApiComponent(Class, ApiCollection)}
+ * @param endpointClass This is deprecated. Do not use
+ * @param apiNameClass The API name class
+ * @param collection The collection of API methods
*/
@Deprecated
public AbstractApiComponent(Class<? extends Endpoint> endpointClass,
Class<E> apiNameClass, S collection) {
@@ -61,21 +61,25 @@ public abstract class AbstractApiComponent<E extends
Enum<E> & ApiName, T, S ext
/**
* Deprecated constructor for AbstractApiComponent.
*
- * @deprecated Use {@link
AbstractApiComponent#AbstractApiComponent(CamelContext, Class, ApiCollection)}
instead
- * @param context The CamelContext
- * @param endpointClass This is deprecated. Do not use
- * @param apiNameClass The API name class
- * @param collection The collection of API methods
+ * @deprecated Use
+ * {@link
AbstractApiComponent#AbstractApiComponent(CamelContext, Class, ApiCollection)}
+ * instead
+ * @param context The CamelContext
+ * @param endpointClass This is deprecated. Do not use
+ * @param apiNameClass The API name class
+ * @param collection The collection of API methods
*/
@Deprecated
- public AbstractApiComponent(CamelContext context, Class<? extends
Endpoint> endpointClass, Class<E> apiNameClass, S collection) {
+ public AbstractApiComponent(CamelContext context, Class<? extends
Endpoint> endpointClass, Class<E> apiNameClass,
+ S collection) {
this(context, apiNameClass, collection);
}
/**
* Creates a new AbstractApiComponent
+ *
* @param apiNameClass The API name class
- * @param collection The collection of API methods
+ * @param collection The collection of API methods
*/
protected AbstractApiComponent(Class<E> apiNameClass, S collection) {
this.collection = collection;
@@ -84,9 +88,10 @@ public abstract class AbstractApiComponent<E extends Enum<E>
& ApiName, T, S ext
/**
* Creates a new AbstractApiComponent
- * @param context The CamelContext
+ *
+ * @param context The CamelContext
* @param apiNameClass The API name class
- * @param collection The collection of API methods
+ * @param collection The collection of API methods
*/
protected AbstractApiComponent(CamelContext context, Class<E>
apiNameClass, S collection) {
super(context);