Skip to content

Commit

Permalink
#332 Fix Google dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
jemacineiras committed Nov 13, 2023
1 parent d7979ed commit 79b8cc2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.Properties;

import com.sngular.kloadgen.common.SchemaRegistryEnum;
Expand Down Expand Up @@ -32,20 +33,12 @@ private ExtractorFactory() {
public static ExtractorRegistry getExtractor(final String schemaType) {

if (schemaType != null && EnumUtils.isValidEnum(SchemaTypeEnum.class, schemaType.toUpperCase())) {
final ExtractorRegistry response;
switch (SchemaTypeEnum.valueOf(schemaType.toUpperCase())) {
case JSON:
response = JSON_EXTRACTOR;
break;
case AVRO:
response = AVRO_EXTRACTOR;
break;
case PROTOBUF:
response = PROTOBUFF_EXTRACTOR;
break;
default:
throw new KLoadGenException(String.format("Schema type not supported %s", schemaType));
}
final ExtractorRegistry response = switch (SchemaTypeEnum.valueOf(schemaType.toUpperCase())) {
case JSON -> JSON_EXTRACTOR;
case AVRO -> AVRO_EXTRACTOR;
case PROTOBUF -> PROTOBUFF_EXTRACTOR;
default -> throw new KLoadGenException(String.format("Schema type not supported %s", schemaType));
};
return response;
} else {
throw new KLoadGenException(String.format("Schema type not supported %s", schemaType));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,21 @@
import java.util.List;
import java.util.Objects;

import javax.swing.DefaultComboBoxModel;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.filechooser.FileSystemView;

import com.sngular.kloadgen.common.SchemaRegistryEnum;
import com.sngular.kloadgen.common.SchemaTypeEnum;
import com.sngular.kloadgen.extractor.SchemaExtractor;
import com.sngular.kloadgen.extractor.extractors.ExtractorFactory;
import com.sngular.kloadgen.extractor.extractors.ExtractorRegistry;
import com.sngular.kloadgen.model.FieldValueMapping;
import com.sngular.kloadgen.util.AutoCompletion;
import com.sngular.kloadgen.util.PropsKeysHelper;
import com.sngular.kloadgen.util.SchemaRegistryKeyHelper;
import io.confluent.kafka.schemaregistry.ParsedSchema;
import com.sngular.kloadgen.extractor.extractors.ExtractorFactory;
import com.sngular.kloadgen.extractor.extractors.ExtractorRegistry;
import lombok.extern.slf4j.Slf4j;
import org.apache.avro.AvroRuntimeException;
import org.apache.jmeter.gui.ClearGui;
Expand Down

0 comments on commit 79b8cc2

Please sign in to comment.