bowenliang123 commented on code in PR #5645:
URL: https://github.com/apache/kyuubi/pull/5645#discussion_r1385805838
##########
extensions/spark/kyuubi-spark-authz/src/main/scala/org/apache/kyuubi/plugin/spark/authz/serde/uriExtractors.scala:
##########
@@ -33,7 +33,11 @@ object URIExtractor {
*/
class StringURIExtractor extends URIExtractor {
override def apply(v1: AnyRef): Seq[Uri] = {
- Seq(Uri(v1.asInstanceOf[String]))
+ v1 match {
+ case str: String => Seq(Uri(str))
+ case Some(str: String) => Seq(Uri(str))
Review Comment:
```suggestion
case uriPath: String => Seq(Uri(uriPath))
case Some(uriPath: String) => Seq(Uri(uriPath))
```
Avoid using the data type name as the variable name.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]