Browse Source

HOTFIX: Handle Connector version returning 'null' during plugin loading.

Author: Konstantine Karantasis <konstantine@confluent.io>

Reviewers: Ewen Cheslack-Postava <ewen@confluent.io>

Closes #3321 from kkonstantine/HOTFIX-Handle-null-version-returned-from-Connector-interface-during-plugin-loading
pull/3313/merge
Konstantine Karantasis 8 years ago committed by Ewen Cheslack-Postava
parent
commit
4b4102884c
  1. 4
      connect/runtime/src/main/java/org/apache/kafka/connect/runtime/isolation/PluginDesc.java

4
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/isolation/PluginDesc.java

@ -33,8 +33,8 @@ public class PluginDesc<T> implements Comparable<PluginDesc<T>> {
public PluginDesc(Class<? extends T> klass, String version, ClassLoader loader) { public PluginDesc(Class<? extends T> klass, String version, ClassLoader loader) {
this.klass = klass; this.klass = klass;
this.name = klass.getName(); this.name = klass.getName();
this.version = version; this.version = version != null ? version : "null";
this.encodedVersion = new DefaultArtifactVersion(version); this.encodedVersion = new DefaultArtifactVersion(this.version);
this.type = PluginType.from(klass); this.type = PluginType.from(klass);
this.typeName = type.toString(); this.typeName = type.toString();
this.location = loader instanceof PluginClassLoader this.location = loader instanceof PluginClassLoader

Loading…
Cancel
Save