Skip to content

[Performance] Using a default instance (like EMPTY) on to reduce object creation of UserAgentDetectionResult #29

@trinhnx

Description

@trinhnx

When UserAgentDetector.parseUserAgent() with null or short header, it returns an empty result which has default value.
IMHO, this value could be served as a Static instance to reduce the creation.
Moreover, the Device, Bot, Locale, OS or Browser also have the empty instance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions