@Test public void testConvertToNewFormatNull() { List<GenericKafkaListener> newListners = ListenersConvertor.convertToNewFormat(null); assertThat(newListners, is(notNullValue())); assertThat(newListners.size(), is(0)); }
@SuppressWarnings("deprecation") public static List<GenericKafkaListener> convertToNewFormat(KafkaListeners oldListeners) { List<GenericKafkaListener> newListeners = new ArrayList<>(3); if (oldListeners != null) { if (oldListeners.getPlain() != null) { newListeners.add(convertPlainListener(oldListeners.getPlain())); } if (oldListeners.getTls() != null) { newListeners.add(convertTlsListener(oldListeners.getTls())); } if (oldListeners.getExternal() != null) { newListeners.add(convertExternalListener(oldListeners.getExternal())); } } return newListeners; }
ListenersConvertor { @SuppressWarnings("deprecation") public static List<GenericKafkaListener> convertToNewFormat(KafkaListeners oldListeners) { List<GenericKafkaListener> newListeners = new ArrayList<>(3); if (oldListeners != null) { if (oldListeners.getPlain() != null) { newListeners.add(convertPlainListener(oldListeners.getPlain())); } if (oldListeners.getTls() != null) { newListeners.add(convertTlsListener(oldListeners.getTls())); } if (oldListeners.getExternal() != null) { newListeners.add(convertExternalListener(oldListeners.getExternal())); } } return newListeners; } }
ListenersConvertor { @SuppressWarnings("deprecation") public static List<GenericKafkaListener> convertToNewFormat(KafkaListeners oldListeners) { List<GenericKafkaListener> newListeners = new ArrayList<>(3); if (oldListeners != null) { if (oldListeners.getPlain() != null) { newListeners.add(convertPlainListener(oldListeners.getPlain())); } if (oldListeners.getTls() != null) { newListeners.add(convertTlsListener(oldListeners.getTls())); } if (oldListeners.getExternal() != null) { newListeners.add(convertExternalListener(oldListeners.getExternal())); } } return newListeners; }  }
ListenersConvertor { @SuppressWarnings("deprecation") public static List<GenericKafkaListener> convertToNewFormat(KafkaListeners oldListeners) { List<GenericKafkaListener> newListeners = new ArrayList<>(3); if (oldListeners != null) { if (oldListeners.getPlain() != null) { newListeners.add(convertPlainListener(oldListeners.getPlain())); } if (oldListeners.getTls() != null) { newListeners.add(convertTlsListener(oldListeners.getTls())); } if (oldListeners.getExternal() != null) { newListeners.add(convertExternalListener(oldListeners.getExternal())); } } return newListeners; }  @SuppressWarnings("deprecation") static List<GenericKafkaListener> convertToNewFormat(KafkaListeners oldListeners); }
ListenersConvertor { @SuppressWarnings("deprecation") public static List<GenericKafkaListener> convertToNewFormat(KafkaListeners oldListeners) { List<GenericKafkaListener> newListeners = new ArrayList<>(3); if (oldListeners != null) { if (oldListeners.getPlain() != null) { newListeners.add(convertPlainListener(oldListeners.getPlain())); } if (oldListeners.getTls() != null) { newListeners.add(convertTlsListener(oldListeners.getTls())); } if (oldListeners.getExternal() != null) { newListeners.add(convertExternalListener(oldListeners.getExternal())); } } return newListeners; }  @SuppressWarnings("deprecation") static List<GenericKafkaListener> convertToNewFormat(KafkaListeners oldListeners);  }