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

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

    XMLWordPrintable

Details

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

    Description

      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;
      } 

      Attachments

        Activity

          People

            Unassigned Unassigned
            xmzhou00 xianming zhou
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: