-
-
Notifications
You must be signed in to change notification settings - Fork 544
Document note re resource shrinking for withContext() API
#1242
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -208,13 +208,15 @@ enum class SpdxLicense( | |||||
| Leptonica("Leptonica License", "Leptonica"), | ||||||
| LGPL_2_0_only("GNU Library General Public License v2 only", "LGPL-2.0-only"), | ||||||
| LGPL_2_0_or_later("GNU Library General Public License v2 or later", "LGPL-2.0-or-later"), | ||||||
| LGPL_2_1_only("GNU Lesser General Public License v2.1 only", "LGPL-2.1-only", | ||||||
| LGPL_2_1_only( | ||||||
| "GNU Lesser General Public License v2.1 only", "LGPL-2.1-only", | ||||||
| customMatcher = { name, _ -> | ||||||
| name.equals("GNU Lesser General Public License (LGPL), Version 2.1", true) | ||||||
| } | ||||||
| ), | ||||||
| LGPL_2_1_or_later("GNU Lesser General Public License v2.1 or later", "LGPL-2.1-or-later"), | ||||||
| LGPL_3_0_only("GNU Lesser General Public License v3.0 only", "LGPL-3.0-only", | ||||||
| LGPL_3_0_only( | ||||||
| "GNU Lesser General Public License v3.0 only", "LGPL-3.0-only", | ||||||
| customMatcher = { name, _ -> | ||||||
| name.equals("GNU General Lesser Public License (LGPL) version 3.0", true) | ||||||
| } | ||||||
|
|
@@ -247,11 +249,12 @@ enum class SpdxLicense( | |||||
| mpich2("mpich2 License", "mpich2"), | ||||||
| MPL_1_0("Mozilla Public License 1.0", "MPL-1.0"), | ||||||
| MPL_1_1("Mozilla Public License 1.1", "MPL-1.1"), | ||||||
| MPL_2_0("Mozilla Public License 2.0", "MPL-2.0", | ||||||
| MPL_2_0( | ||||||
| "Mozilla Public License 2.0", "MPL-2.0", | ||||||
| customMatcher = { name, url -> | ||||||
| name.contains("Mozilla Public License", true) | ||||||
| && url?.contains("mozilla.org", true) == true | ||||||
| && url.contains("MPL/2.0", true) | ||||||
| && url?.contains("mozilla.org", true) == true | ||||||
| && url.contains("MPL/2.0", true) | ||||||
| } | ||||||
| ), | ||||||
| MPL_2_0_no_copyleft_exception( | ||||||
|
|
@@ -474,7 +477,7 @@ enum class SpdxLicense( | |||||
|
|
||||||
| companion object { | ||||||
| internal fun find(key: String): SpdxLicense? { | ||||||
| for (l: SpdxLicense in entries) { | ||||||
| for (l: SpdxLicense in values()) { | ||||||
|
||||||
| if (l.id.equals(key, true) || l.name.equals(key, true) || l.fullName.equals(key, true)) { | ||||||
| return l | ||||||
| } | ||||||
|
|
@@ -483,7 +486,7 @@ enum class SpdxLicense( | |||||
| } | ||||||
|
|
||||||
| internal fun getById(id: String): SpdxLicense { | ||||||
| return entries.first { it.id.equals(id, true) } | ||||||
| return values().first { it.id.equals(id, true) } | ||||||
|
||||||
| return values().first { it.id.equals(id, true) } | |
| return entries.first { it.id.equals(id, true) } |
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.
Using
values()instead ofentriesis correct for older Kotlin versions, but consider thatentriesis the preferred approach in Kotlin 1.8.20+ for better performance and API consistency.