-
Notifications
You must be signed in to change notification settings - Fork 15.1k
MINOR: Update Scala to 2.13.3 #8931
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -68,7 +68,7 @@ object AclAuthorizer { | |
| def find(p: AclEntry => Boolean): Option[AclEntry] = { | ||
| // Lazily iterate through the inner `Seq` elements and stop as soon as we find a match | ||
| val it = seqs.iterator.flatMap(_.find(p)) | ||
| if (it.hasNext) Some(it.next) | ||
| if (it.hasNext) Some(it.next()) | ||
| else None | ||
| } | ||
|
|
||
|
|
@@ -367,7 +367,8 @@ class AclAuthorizer extends Authorizer with Logging { | |
| } else false | ||
| } | ||
|
|
||
| @nowarn("cat=deprecation&cat=optimizer") | ||
| @nowarn("cat=deprecation") | ||
| @nowarn("cat=optimizer") | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The behavior of |
||
| private def matchingAcls(resourceType: ResourceType, resourceName: String): AclSeqs = { | ||
| // this code is performance sensitive, make sure to run AclAuthorizerBenchmark after any changes | ||
|
|
||
|
|
@@ -523,7 +524,7 @@ class AclAuthorizer extends Authorizer with Logging { | |
| } | ||
| } | ||
|
|
||
| if(!writeComplete) | ||
| if (!writeComplete) | ||
| throw new IllegalStateException(s"Failed to update ACLs for $resource after trying a maximum of $maxUpdateRetries times") | ||
|
|
||
| if (newVersionedAcls.acls != currentVersionedAcls.acls) { | ||
|
|
@@ -538,6 +539,7 @@ class AclAuthorizer extends Authorizer with Logging { | |
| } | ||
| } | ||
|
|
||
| @nowarn("cat=optimizer") | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. New warning flagged by the compiler. |
||
| private def getAclsFromCache(resource: ResourcePattern): VersionedAcls = { | ||
| aclCache.getOrElse(resource, throw new IllegalArgumentException(s"ACLs do not exist in the cache for resource $resource")) | ||
| } | ||
|
|
@@ -548,9 +550,9 @@ class AclAuthorizer extends Authorizer with Logging { | |
|
|
||
| private def updateCache(resource: ResourcePattern, versionedAcls: VersionedAcls): Unit = { | ||
| if (versionedAcls.acls.nonEmpty) { | ||
| aclCache = aclCache + (resource -> versionedAcls) | ||
| aclCache = aclCache.updated(resource, versionedAcls) | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This avoids the |
||
| } else { | ||
| aclCache = aclCache - resource | ||
| aclCache -= resource | ||
| } | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New warning flagged by the compiler.