File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/main/java/datastax/astra/migrate Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 1
1
package datastax .astra .migrate ;
2
2
3
3
import com .datastax .oss .driver .api .core .ConsistencyLevel ;
4
+ import org .apache .commons .lang .StringUtils ;
4
5
import org .apache .spark .SparkConf ;
5
6
6
7
import java .io .BufferedReader ;
7
8
import java .io .FileNotFoundException ;
8
9
import java .io .FileReader ;
9
- import java .util .Locale ;
10
10
import java .util .NoSuchElementException ;
11
11
12
12
public class Util {
@@ -43,8 +43,8 @@ public static BufferedReader getfileReader(String fileName) {
43
43
44
44
public static ConsistencyLevel mapToConsistencyLevel (String level ) {
45
45
ConsistencyLevel retVal = ConsistencyLevel .LOCAL_QUORUM ;
46
- if (null != level ) {
47
- switch (level .toUpperCase (Locale . ROOT )) {
46
+ if (StringUtils . isNotEmpty ( level ) ) {
47
+ switch (level .toUpperCase ()) {
48
48
case "ANY" :
49
49
retVal = ConsistencyLevel .ANY ;
50
50
break ;
You can’t perform that action at this time.
0 commit comments