java-user-agent-detection
java-user-agent-detection copied to clipboard
[Performance] Using a default instance (like EMPTY) on to reduce object creation of UserAgentDetectionResult
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.