You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2015/11/10 08:44:07 UTC
[2/2] camel git commit: CAMEL-9224: ContextInfo command should extend
the correct base class that is about a context like the others. Thanks to
Evgeny Minkevich for spotting this.
CAMEL-9224: ContextInfo command should extend the correct base class that is about a context like the others. Thanks to Evgeny Minkevich for spotting this.
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/5a464ef7
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/5a464ef7
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/5a464ef7
Branch: refs/heads/master
Commit: 5a464ef7097c717a9ade67a8e943ff8b268874cc
Parents: 610107f
Author: Claus Ibsen <da...@apache.org>
Authored: Tue Nov 10 08:46:54 2015 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Tue Nov 10 08:46:54 2015 +0100
----------------------------------------------------------------------
.../java/org/apache/camel/commands/ContextInfoCommand.java | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/5a464ef7/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/ContextInfoCommand.java
----------------------------------------------------------------------
diff --git a/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/ContextInfoCommand.java b/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/ContextInfoCommand.java
index 698e809..9ca57b1 100644
--- a/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/ContextInfoCommand.java
+++ b/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/ContextInfoCommand.java
@@ -31,12 +31,11 @@ import static org.apache.camel.util.ObjectHelper.isEmpty;
/**
* Command to display detailed information about a given {@link org.apache.camel.CamelContext}.
*/
-public class ContextInfoCommand extends AbstractCamelCommand {
+public class ContextInfoCommand extends AbstractContextCommand {
public static final String XML_TIMESTAMP_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSSZ";
public static final String OUTPUT_TIMESTAMP_FORMAT = "yyyy-MM-dd HH:mm:ss";
private StringEscape stringEscape;
- private String context;
private boolean verbose;
/**
@@ -44,7 +43,7 @@ public class ContextInfoCommand extends AbstractCamelCommand {
* @param verbose Whether to output verbose
*/
public ContextInfoCommand(String context, boolean verbose) {
- this.context = context;
+ super(context);
this.verbose = verbose;
}
@@ -56,7 +55,7 @@ public class ContextInfoCommand extends AbstractCamelCommand {
}
@Override
- public Object execute(CamelController camelController, PrintStream out, PrintStream err) throws Exception {
+ protected Object performContextCommand(CamelController camelController, String contextName, PrintStream out, PrintStream err) throws Exception {
Map<String, Object> row = camelController.getCamelContextInformation(context);
if (row == null || row.isEmpty()) {
err.println("Camel context " + context + " not found.");