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 16f106350c9 camel-hbase: fix deprecation warnings (#7936)
16f106350c9 is described below

commit 16f106350c994a11ab3f1307ef566c45309634f5
Author: Alexandre Gallice <aldettin...@gmail.com>
AuthorDate: Wed Jun 29 18:26:38 2022 +0200

    camel-hbase: fix deprecation warnings (#7936)
---
 .../src/main/java/org/apache/camel/component/hbase/HBaseProducer.java | 4 ++--
 .../camel/component/hbase/mapping/CellMappingStrategyFactory.java     | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/components/camel-hbase/src/main/java/org/apache/camel/component/hbase/HBaseProducer.java
 
b/components/camel-hbase/src/main/java/org/apache/camel/component/hbase/HBaseProducer.java
index 5a7a6bdd128..962ee4fa567 100644
--- 
a/components/camel-hbase/src/main/java/org/apache/camel/component/hbase/HBaseProducer.java
+++ 
b/components/camel-hbase/src/main/java/org/apache/camel/component/hbase/HBaseProducer.java
@@ -93,9 +93,9 @@ public class HBaseProducer extends DefaultProducer {
             } else if (!deleteOperations.isEmpty()) {
                 table.delete(deleteOperations);
             } else if (!getOperationResult.isEmpty()) {
-                mappingStrategy.applyGetResults(exchange.getOut(), new 
HBaseData(getOperationResult));
+                mappingStrategy.applyGetResults(exchange.getMessage(), new 
HBaseData(getOperationResult));
             } else if (!scanOperationResult.isEmpty()) {
-                mappingStrategy.applyScanResults(exchange.getOut(), new 
HBaseData(scanOperationResult));
+                mappingStrategy.applyScanResults(exchange.getMessage(), new 
HBaseData(scanOperationResult));
             }
         }
     }
diff --git 
a/components/camel-hbase/src/main/java/org/apache/camel/component/hbase/mapping/CellMappingStrategyFactory.java
 
b/components/camel-hbase/src/main/java/org/apache/camel/component/hbase/mapping/CellMappingStrategyFactory.java
index 212ce2554ea..579d8feddc1 100644
--- 
a/components/camel-hbase/src/main/java/org/apache/camel/component/hbase/mapping/CellMappingStrategyFactory.java
+++ 
b/components/camel-hbase/src/main/java/org/apache/camel/component/hbase/mapping/CellMappingStrategyFactory.java
@@ -63,7 +63,7 @@ public class CellMappingStrategyFactory {
         if (classLoader != null) {
             try {
                 Class<?> clazz = classLoader.loadClass(strategyClassName);
-                return (CellMappingStrategy) clazz.newInstance();
+                return (CellMappingStrategy) 
clazz.getDeclaredConstructor().newInstance();
             } catch (Throwable e) {
                 LOG.warn("Failed to load HBase cell mapping strategy from 
class {}.", strategyClassName);
             }

Reply via email to