Skip to content

Commit 8083a12

Browse files
committed
to increase code converage
1 parent c7e51a2 commit 8083a12

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

kyuubi-ctl/src/main/java/org/apache/kyuubi/ctl/KyuubiCtlOptionParser.java

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import java.util.regex.Matcher;
2222
import java.util.regex.Pattern;
2323

24-
class KyuubiCtlOptionParser {
24+
abstract class KyuubiCtlOptionParser {
2525
protected final String ZK_ADDRESS = "--zkAddress";
2626
protected final String NAMESPACE = "--namespace";
2727
protected final String USER = "--user";
@@ -62,9 +62,7 @@ class KyuubiCtlOptionParser {
6262
*
6363
* @return offset of remaining arguments.
6464
*/
65-
protected int parseActionAndService(List<String> args) {
66-
throw new UnsupportedOperationException();
67-
}
65+
protected abstract int parseActionAndService(List<String> args);
6866

6967
/**
7068
* Parse a list of kyuubi-ctl command line options.
@@ -124,19 +122,15 @@ protected final void parse(List<String> args) {
124122
* @param value The value. This will be <i>null</i> if the option does not take a value.
125123
* @return Whether to continue parsing the argument list.
126124
*/
127-
protected boolean handle(String opt, String value) {
128-
throw new UnsupportedOperationException();
129-
}
125+
protected abstract boolean handle(String opt, String value);
130126

131127
/**
132128
* Callback for when an unrecognized option is parsed.
133129
*
134130
* @param opt Unrecognized option from the command line.
135131
* @return Whether to continue parsing the argument list.
136132
*/
137-
protected boolean handleUnknown(String opt) {
138-
throw new UnsupportedOperationException();
139-
}
133+
protected abstract boolean handleUnknown(String opt);
140134

141135
private String findCliOption(String name, String[][] available) {
142136
for (String[] candidates : available) {

0 commit comments

Comments
 (0)