Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-5043030 (reflect) unnecessary object creation in reflection
  3. JDK-8164412

Release Note: Updates to java.lang.reflect.Field.get(), Field.get{primitive}() and java.lang.reflect.Method.invoke()

XMLWordPrintable

      java.lang.reflect.Field.get(), Field.get{primitive}() and java.lang.reflect.Method.invoke() have been updated to use the primitive wrapper classes' valueOf() (for example Integer.valueOf()) instead of always creating new wrappers with "new" (for example new Integer()) after the reflection libraries have (potentially) optimised the Field/Method instance. This can affect applications that depended on two wrappers being != while still being .equals().

            jfranck Joel Borggrén-Franck (Inactive)
            rcalnan Roger Calnan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: