Uploaded image for project: 'Debezium'
  1. Debezium
  2. DBZ-7517

Remove the unused 'connector' parameter in the createSourceTask method in EmbeddedEngine.java

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Trivial Trivial
    • 2.6.0.Beta1
    • None
    • embedded-engine
    • None
    • False
    • None
    • False

      The 'connector' parameter in the createSourceTask method of the EmbeddedEngine class is not used within the method, which could potentially lead to confusion for developers, although it has no impact.

      private SourceTask createSourceTask(final SourceConnector connector, final List<Map<String, String>> taskConfigs, final Class<? extends Task> taskClass)
              throws EmbeddedEngineRuntimeException, NoSuchMethodException, InvocationTargetException {
          if (taskConfigs.isEmpty()) {
              String msg = "Unable to start connector's task class '" + taskClass.getName() + "' with no task configuration";
              failAndThrow(msg, null);
          }
      
          SourceTask task = null;
          try {
              task = (SourceTask) taskClass.getDeclaredConstructor().newInstance();
          }
          catch (IllegalAccessException | InstantiationException t) {
              failAndThrow("Unable to instantiate connector's task class '" + taskClass.getName() + "'", t);
          }
          return task;
      } 

              Unassigned Unassigned
              xmzhou00 xianming zhou (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: