Share Integer.MAX_VALUE 95/29095/2
authorRobert Varga <rovarga@cisco.com>
Sun, 1 Nov 2015 13:54:35 +0000 (14:54 +0100)
committerGerrit Code Review <gerrit@opendaylight.org>
Mon, 2 Nov 2015 08:19:03 +0000 (08:19 +0000)
commit705d82b82fe88401d30cd8249e571ee4770e17cc
treea4267e895ead47e7364aeac5f2a58b306b8c20ee
parent6f14ad09b508858a7752eee74a29e14cad9278b3
Share Integer.MAX_VALUE

As it turns out Integer.MAX_VALUE is not usually cached for boxing. Add
an explicit cache to eliminate ~160K Integers wasting 2.5MB on a simple
SchemaContext.

Change-Id: I47b5b00358d5726eddc8baf675bda1f850823362
Signed-off-by: Robert Varga <rovarga@cisco.com>
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/EffectiveConstraintDefinitionImpl.java