Skip to content

[gui] Unnecessary creation of attributes for AttributesStorage #2433

@eybisi

Description

@eybisi

Issue details

Looking at IdentityHashMap objects at heap (with reference to AttributeStorage) , there are some hashmaps where size of the attributes 0. So in some cases empty list of attributes are added and jadx creates empty map object and do not add anything to it.

List of attributes are added via AttributeStorage.add , AttrNode.addAttrs. If attribute map is empty, new IdentityHashMap is created .

Image
Image

Adding size check to AttributeStorage.add , AttrNode.addAttrs can fix this problem

Jadx version

dev

Java version

21.0.5

OS

  • Windows
  • Linux
  • macOS

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions