RFR(S): 8164102: MethodHandles.countedLoop/4 works incorrect for start/end = Integer.MAX_VALUE

Michael Haupt michael.haupt at oracle.com
Fri Aug 19 07:55:15 UTC 2016

Dear all,

please review this fix.
Bug: https://bugs.openjdk.java.net/browse/JDK-8164102
Webrev: http://cr.openjdk.java.net/~mhaupt/8164102/webrev.00/

The countedLoop implementation would yield loops with wrong iteration counts if start and end values around the fringes of the int value space were chosen. The fix - passing the decremented counter value to the predicate as well as the body - is temporary, as a larger overhaul of the JEP 274 API is under way as part of the fix to JDK-8151179.




Dr. Michael Haupt | Principal Member of Technical Staff
Phone: +49 331 200 7277 | Fax: +49 331 200 7561
Oracle Java Platform Group | LangTools Team | Nashorn
Oracle Deutschland B.V. & Co. KG | Schiffbauergasse 14 | 14467 Potsdam, Germany

ORACLE Deutschland B.V. & Co. KG | Hauptverwaltung: Riesstraße 25, D-80992 München
Registergericht: Amtsgericht München, HRA 95603

Komplementärin: ORACLE Deutschland Verwaltung B.V. | Hertogswetering 163/167, 3543 AS Utrecht, Niederlande
Handelsregister der Handelskammer Midden-Nederland, Nr. 30143697
Geschäftsführer: Alexander van der Ven, Jan Schultheiss, Val Maher
 <http://www.oracle.com/commitment>	Oracle is committed to developing practices and products that help protect the environment

More information about the core-libs-dev mailing list