Skip to content

Commit

Permalink
Merge "Sort jarjar rename keys before using" into main
Browse files Browse the repository at this point in the history
  • Loading branch information
iskim517 authored and Gerrit Code Review committed Feb 29, 2024
2 parents 641bd9d + 3c0c9d7 commit 688f824
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions java/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -2408,7 +2408,8 @@ type JarJarProviderData struct {

func (this JarJarProviderData) GetDebugString() string {
result := ""
for k, v := range this.Rename {
for _, k := range android.SortedKeys(this.Rename) {
v := this.Rename[k]
if strings.Contains(k, "android.companion.virtual.flags.FakeFeatureFlagsImpl") {
result += k + "-->" + v + ";"
}
Expand Down Expand Up @@ -2664,7 +2665,8 @@ func (module *Module) collectJarJarRules(ctx android.ModuleContext) *JarJarProvi
// to "" won't be in this list because they shouldn't be renamed yet.
func getJarJarRuleText(provider *JarJarProviderData) string {
result := ""
for orig, renamed := range provider.Rename {
for _, orig := range android.SortedKeys(provider.Rename) {
renamed := provider.Rename[orig]
if renamed != "" {
result += "rule " + orig + " " + renamed + "\n"
}
Expand Down

0 comments on commit 688f824

Please sign in to comment.