This is an automated email from the ASF dual-hosted git repository. sanjeevrk pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/master by this push: new e8cce5c Ignore the current class while going over variables (#2970) e8cce5c is described below commit e8cce5ca75316886f79a5e47ffd204aff3803a4b Author: Sanjeev Kulkarni <sanjee...@gmail.com> AuthorDate: Sat Nov 10 10:00:45 2018 -0800 Ignore the current class while going over variables (#2970) * Ignore the current class while going over variables * Took feedback into account * More feedback --- .../src/main/java/org/apache/pulsar/admin/cli/CmdFunctions.java | 2 +- .../src/main/java/org/apache/pulsar/admin/cli/CmdSinks.java | 1 + .../src/main/java/org/apache/pulsar/admin/cli/CmdSources.java | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdFunctions.java b/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdFunctions.java index f3dbdef..0524a65 100644 --- a/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdFunctions.java +++ b/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdFunctions.java @@ -584,7 +584,7 @@ public class CmdFunctions extends CmdBase { localRunArgs.add(new Gson().toJson(functionConfig)); for (Field field : this.getClass().getDeclaredFields()) { if (field.getName().startsWith("DEPRECATED")) continue; - if(field.getName().startsWith("this$0")) continue; + if(field.getName().contains("$")) continue; Object value = field.get(this); if (value != null) { localRunArgs.add("--" + field.getName()); diff --git a/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdSinks.java b/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdSinks.java index 699ba7e..594aa1b 100644 --- a/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdSinks.java +++ b/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdSinks.java @@ -168,6 +168,7 @@ public class CmdSinks extends CmdBase { localRunArgs.add(new Gson().toJson(sinkConfig)); for (Field field : this.getClass().getDeclaredFields()) { if (field.getName().startsWith("DEPRECATED")) continue; + if(field.getName().contains("$")) continue; Object value = field.get(this); if (value != null) { localRunArgs.add("--" + field.getName()); diff --git a/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdSources.java b/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdSources.java index f3ac0b3..92b4f6c 100644 --- a/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdSources.java +++ b/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdSources.java @@ -172,6 +172,7 @@ public class CmdSources extends CmdBase { localRunArgs.add(new Gson().toJson(sourceConfig)); for (Field field : this.getClass().getDeclaredFields()) { if (field.getName().startsWith("DEPRECATED")) continue; + if(field.getName().contains("$")) continue; Object value = field.get(this); if (value != null) { localRunArgs.add("--" + field.getName());