changeset 10739:60fe681c30bc jdk9-b33

Merge
author lana
date Thu, 25 Sep 2014 16:20:38 -0700
parents ffc1e07c7478 d8854afaf0a7
children 77acc40ec6db be06cff7d585
files make/gensrc/Gensrc-jdk.attach.gmk make/gensrc/GensrcJDWP.gmk make/gensrc/GensrcProviders.gmk src/java.desktop/macosx/native/libawt_lwawt/sun/awt/AWTEvent.h src/java.desktop/macosx/native/libawt_lwawt/sun/awt/AWTEvent.m src/java.desktop/macosx/native/libawt_lwawt/sun/awt/AWTSurfaceLayers.h src/java.desktop/macosx/native/libawt_lwawt/sun/awt/AWTSurfaceLayers.m src/java.desktop/macosx/native/libawt_lwawt/sun/awt/AWTView.h src/java.desktop/macosx/native/libawt_lwawt/sun/awt/AWTView.m src/java.desktop/macosx/native/libawt_lwawt/sun/awt/AWTWindow.h src/java.desktop/macosx/native/libawt_lwawt/sun/awt/AWTWindow.m src/java.desktop/macosx/native/libawt_lwawt/sun/awt/ApplicationDelegate.h src/java.desktop/macosx/native/libawt_lwawt/sun/awt/ApplicationDelegate.m src/java.desktop/macosx/native/libawt_lwawt/sun/awt/CClipboard.m src/java.desktop/macosx/native/libawt_lwawt/sun/awt/CCursorManager.m src/java.desktop/macosx/native/libawt_lwawt/sun/awt/CDataTransferer.h src/java.desktop/macosx/native/libawt_lwawt/sun/awt/CDataTransferer.m src/java.desktop/macosx/native/libawt_lwawt/sun/awt/CDesktopPeer.m src/java.desktop/macosx/native/libawt_lwawt/sun/awt/CDragSource.h src/java.desktop/macosx/native/libawt_lwawt/sun/awt/CDragSource.m src/java.desktop/macosx/native/libawt_lwawt/sun/awt/CDragSourceContextPeer.m src/java.desktop/macosx/native/libawt_lwawt/sun/awt/CDropTarget.h src/java.desktop/macosx/native/libawt_lwawt/sun/awt/CDropTarget.m src/java.desktop/macosx/native/libawt_lwawt/sun/awt/CDropTargetContextPeer.m src/java.desktop/macosx/native/libawt_lwawt/sun/awt/CFRetainedResource.m src/java.desktop/macosx/native/libawt_lwawt/sun/awt/CFileDialog.h src/java.desktop/macosx/native/libawt_lwawt/sun/awt/CFileDialog.m src/java.desktop/macosx/native/libawt_lwawt/sun/awt/CGraphicsConfig.m src/java.desktop/macosx/native/libawt_lwawt/sun/awt/CGraphicsDevice.m src/java.desktop/macosx/native/libawt_lwawt/sun/awt/CGraphicsEnv.m src/java.desktop/macosx/native/libawt_lwawt/sun/awt/CImage.m src/java.desktop/macosx/native/libawt_lwawt/sun/awt/CInputMethod.m src/java.desktop/macosx/native/libawt_lwawt/sun/awt/CMenu.h src/java.desktop/macosx/native/libawt_lwawt/sun/awt/CMenu.m src/java.desktop/macosx/native/libawt_lwawt/sun/awt/CMenuBar.h src/java.desktop/macosx/native/libawt_lwawt/sun/awt/CMenuBar.m src/java.desktop/macosx/native/libawt_lwawt/sun/awt/CMenuComponent.h src/java.desktop/macosx/native/libawt_lwawt/sun/awt/CMenuComponent.m src/java.desktop/macosx/native/libawt_lwawt/sun/awt/CMenuItem.h src/java.desktop/macosx/native/libawt_lwawt/sun/awt/CMenuItem.m src/java.desktop/macosx/native/libawt_lwawt/sun/awt/CPopupMenu.h src/java.desktop/macosx/native/libawt_lwawt/sun/awt/CPopupMenu.m src/java.desktop/macosx/native/libawt_lwawt/sun/awt/CPrinterJob.m src/java.desktop/macosx/native/libawt_lwawt/sun/awt/CRobot.m src/java.desktop/macosx/native/libawt_lwawt/sun/awt/CSystemColors.h src/java.desktop/macosx/native/libawt_lwawt/sun/awt/CSystemColors.m src/java.desktop/macosx/native/libawt_lwawt/sun/awt/CTextPipe.m src/java.desktop/macosx/native/libawt_lwawt/sun/awt/CTrayIcon.h src/java.desktop/macosx/native/libawt_lwawt/sun/awt/CTrayIcon.m src/java.desktop/macosx/native/libawt_lwawt/sun/awt/CWrapper.m src/java.desktop/macosx/native/libawt_lwawt/sun/awt/DnDUtilities.h src/java.desktop/macosx/native/libawt_lwawt/sun/awt/DnDUtilities.m src/java.desktop/macosx/native/libawt_lwawt/sun/awt/GeomUtilities.h src/java.desktop/macosx/native/libawt_lwawt/sun/awt/GeomUtilities.m src/java.desktop/macosx/native/libawt_lwawt/sun/awt/ImageSurfaceData.h src/java.desktop/macosx/native/libawt_lwawt/sun/awt/ImageSurfaceData.m src/java.desktop/macosx/native/libawt_lwawt/sun/awt/InitIDs.h src/java.desktop/macosx/native/libawt_lwawt/sun/awt/InitIDs.m src/java.desktop/macosx/native/libawt_lwawt/sun/awt/JavaAccessibilityAction.h src/java.desktop/macosx/native/libawt_lwawt/sun/awt/JavaAccessibilityAction.m src/java.desktop/macosx/native/libawt_lwawt/sun/awt/JavaAccessibilityUtilities.h src/java.desktop/macosx/native/libawt_lwawt/sun/awt/JavaAccessibilityUtilities.m src/java.desktop/macosx/native/libawt_lwawt/sun/awt/JavaComponentAccessibility.h src/java.desktop/macosx/native/libawt_lwawt/sun/awt/JavaComponentAccessibility.m src/java.desktop/macosx/native/libawt_lwawt/sun/awt/JavaTextAccessibility.h src/java.desktop/macosx/native/libawt_lwawt/sun/awt/JavaTextAccessibility.m src/java.desktop/macosx/native/libawt_lwawt/sun/awt/LWCToolkit.h src/java.desktop/macosx/native/libawt_lwawt/sun/awt/LWCToolkit.m src/java.desktop/macosx/native/libawt_lwawt/sun/awt/OSVersion.h src/java.desktop/macosx/native/libawt_lwawt/sun/awt/OSVersion.m src/java.desktop/macosx/native/libawt_lwawt/sun/awt/PrintModel.h src/java.desktop/macosx/native/libawt_lwawt/sun/awt/PrintModel.m src/java.desktop/macosx/native/libawt_lwawt/sun/awt/PrinterSurfaceData.h src/java.desktop/macosx/native/libawt_lwawt/sun/awt/PrinterSurfaceData.m src/java.desktop/macosx/native/libawt_lwawt/sun/awt/PrinterView.h src/java.desktop/macosx/native/libawt_lwawt/sun/awt/PrinterView.m src/java.desktop/macosx/native/libawt_lwawt/sun/awt/QuartzRenderer.m src/java.desktop/macosx/native/libawt_lwawt/sun/awt/QuartzSurfaceData.h src/java.desktop/macosx/native/libawt_lwawt/sun/awt/QuartzSurfaceData.m src/java.desktop/macosx/native/libawt_lwawt/sun/awt/awt_DrawingSurface.m src/java.desktop/macosx/native/libawt_lwawt/sun/font/AWTFont.h src/java.desktop/macosx/native/libawt_lwawt/sun/font/AWTFont.m src/java.desktop/macosx/native/libawt_lwawt/sun/font/AWTStrike.h src/java.desktop/macosx/native/libawt_lwawt/sun/font/AWTStrike.m src/java.desktop/macosx/native/libawt_lwawt/sun/font/CCharToGlyphMapper.m src/java.desktop/macosx/native/libawt_lwawt/sun/font/CGGlyphImages.h src/java.desktop/macosx/native/libawt_lwawt/sun/font/CGGlyphImages.m src/java.desktop/macosx/native/libawt_lwawt/sun/font/CGGlyphOutlines.h src/java.desktop/macosx/native/libawt_lwawt/sun/font/CGGlyphOutlines.m src/java.desktop/macosx/native/libawt_lwawt/sun/font/CoreTextSupport.h src/java.desktop/macosx/native/libawt_lwawt/sun/font/CoreTextSupport.m src/java.desktop/macosx/native/libawt_lwawt/sun/java2d/opengl/CGLGraphicsConfig.h src/java.desktop/macosx/native/libawt_lwawt/sun/java2d/opengl/CGLGraphicsConfig.m src/java.desktop/macosx/native/libawt_lwawt/sun/java2d/opengl/CGLLayer.h src/java.desktop/macosx/native/libawt_lwawt/sun/java2d/opengl/CGLLayer.m src/java.desktop/macosx/native/libawt_lwawt/sun/java2d/opengl/CGLSurfaceData.h src/java.desktop/macosx/native/libawt_lwawt/sun/java2d/opengl/CGLSurfaceData.m src/java.desktop/macosx/native/libawt_lwawt/sun/java2d/opengl/J2D_GL/cglext.h src/java.desktop/macosx/native/libawt_lwawt/sun/java2d/opengl/OGLFuncs_md.h src/java.desktop/share/native/common/sun/awt/debug/debug_assert.c src/java.desktop/share/native/common/sun/awt/debug/debug_assert.h src/java.desktop/share/native/common/sun/awt/debug/debug_mem.c src/java.desktop/share/native/common/sun/awt/debug/debug_mem.h src/java.desktop/share/native/common/sun/awt/debug/debug_trace.c src/java.desktop/share/native/common/sun/awt/debug/debug_trace.h src/java.desktop/share/native/common/sun/awt/debug/debug_util.c src/java.desktop/share/native/common/sun/awt/debug/debug_util.h src/java.desktop/share/native/common/sun/awt/medialib/mlib_ImageCopy_Bit.c src/java.desktop/share/native/common/sun/awt/medialib/mlib_ImageCreate.c src/java.desktop/share/native/common/sun/awt/medialib/mlib_sys.c src/java.desktop/share/native/common/sun/awt/utility/rect.c src/java.desktop/share/native/common/sun/font/AccelGlyphCache.c src/java.desktop/share/native/common/sun/font/AccelGlyphCache.h src/java.desktop/share/native/common/sun/font/fontscalerdefs.h src/java.desktop/share/native/common/sun/font/sunfontids.h src/java.desktop/share/native/common/sun/java2d/opengl/J2D_GL/gl.h src/java.desktop/share/native/common/sun/java2d/opengl/J2D_GL/glext.h src/java.desktop/share/native/common/sun/java2d/opengl/OGLBlitLoops.c src/java.desktop/share/native/common/sun/java2d/opengl/OGLBlitLoops.h src/java.desktop/share/native/common/sun/java2d/opengl/OGLBufImgOps.c src/java.desktop/share/native/common/sun/java2d/opengl/OGLBufImgOps.h src/java.desktop/share/native/common/sun/java2d/opengl/OGLContext.c src/java.desktop/share/native/common/sun/java2d/opengl/OGLContext.h src/java.desktop/share/native/common/sun/java2d/opengl/OGLFuncMacros.h src/java.desktop/share/native/common/sun/java2d/opengl/OGLFuncs.c src/java.desktop/share/native/common/sun/java2d/opengl/OGLFuncs.h src/java.desktop/share/native/common/sun/java2d/opengl/OGLMaskBlit.c src/java.desktop/share/native/common/sun/java2d/opengl/OGLMaskBlit.h src/java.desktop/share/native/common/sun/java2d/opengl/OGLMaskFill.c src/java.desktop/share/native/common/sun/java2d/opengl/OGLMaskFill.h src/java.desktop/share/native/common/sun/java2d/opengl/OGLPaints.c src/java.desktop/share/native/common/sun/java2d/opengl/OGLPaints.h src/java.desktop/share/native/common/sun/java2d/opengl/OGLRenderQueue.c src/java.desktop/share/native/common/sun/java2d/opengl/OGLRenderQueue.h src/java.desktop/share/native/common/sun/java2d/opengl/OGLRenderer.c src/java.desktop/share/native/common/sun/java2d/opengl/OGLRenderer.h src/java.desktop/share/native/common/sun/java2d/opengl/OGLSurfaceData.c src/java.desktop/share/native/common/sun/java2d/opengl/OGLSurfaceData.h src/java.desktop/share/native/common/sun/java2d/opengl/OGLTextRenderer.c src/java.desktop/share/native/common/sun/java2d/opengl/OGLTextRenderer.h src/java.desktop/share/native/common/sun/java2d/opengl/OGLVertexCache.c src/java.desktop/share/native/common/sun/java2d/opengl/OGLVertexCache.h src/java.desktop/share/native/libawt/sun/awt/image/BufImgSurfaceData.c src/java.desktop/share/native/libawt/sun/awt/image/BufImgSurfaceData.h src/java.desktop/share/native/libawt/sun/awt/image/DataBufferNative.c src/java.desktop/share/native/libawt/sun/awt/image/awt_ImageRep.c src/java.desktop/share/native/libawt/sun/awt/image/awt_parseImage.c src/java.desktop/share/native/libawt/sun/awt/image/awt_parseImage.h src/java.desktop/share/native/libawt/sun/awt/image/cvutils/README src/java.desktop/share/native/libawt/sun/awt/image/cvutils/img_alpha.h src/java.desktop/share/native/libawt/sun/awt/image/cvutils/img_anycm.h src/java.desktop/share/native/libawt/sun/awt/image/cvutils/img_colors.c src/java.desktop/share/native/libawt/sun/awt/image/cvutils/img_colors.h src/java.desktop/share/native/libawt/sun/awt/image/cvutils/img_dcm.h src/java.desktop/share/native/libawt/sun/awt/image/cvutils/img_dcm8.h src/java.desktop/share/native/libawt/sun/awt/image/cvutils/img_dir8dither.h src/java.desktop/share/native/libawt/sun/awt/image/cvutils/img_dirdither.h src/java.desktop/share/native/libawt/sun/awt/image/cvutils/img_fscolor.h src/java.desktop/share/native/libawt/sun/awt/image/cvutils/img_fsdither.h src/java.desktop/share/native/libawt/sun/awt/image/cvutils/img_fsgray.h src/java.desktop/share/native/libawt/sun/awt/image/cvutils/img_fsutil.h src/java.desktop/share/native/libawt/sun/awt/image/cvutils/img_globals.c src/java.desktop/share/native/libawt/sun/awt/image/cvutils/img_globals.h src/java.desktop/share/native/libawt/sun/awt/image/cvutils/img_icm.h src/java.desktop/share/native/libawt/sun/awt/image/cvutils/img_input32.h src/java.desktop/share/native/libawt/sun/awt/image/cvutils/img_input8.h src/java.desktop/share/native/libawt/sun/awt/image/cvutils/img_input8_32.h src/java.desktop/share/native/libawt/sun/awt/image/cvutils/img_nodither.h src/java.desktop/share/native/libawt/sun/awt/image/cvutils/img_noscale.h src/java.desktop/share/native/libawt/sun/awt/image/cvutils/img_opaque.h src/java.desktop/share/native/libawt/sun/awt/image/cvutils/img_ordclrsgn.h src/java.desktop/share/native/libawt/sun/awt/image/cvutils/img_ordclruns.h src/java.desktop/share/native/libawt/sun/awt/image/cvutils/img_orddither.h src/java.desktop/share/native/libawt/sun/awt/image/cvutils/img_ordgray.h src/java.desktop/share/native/libawt/sun/awt/image/cvutils/img_output16.h src/java.desktop/share/native/libawt/sun/awt/image/cvutils/img_output16_32.h src/java.desktop/share/native/libawt/sun/awt/image/cvutils/img_output24.h src/java.desktop/share/native/libawt/sun/awt/image/cvutils/img_output32.h src/java.desktop/share/native/libawt/sun/awt/image/cvutils/img_output8.h src/java.desktop/share/native/libawt/sun/awt/image/cvutils/img_output8_16_24.h src/java.desktop/share/native/libawt/sun/awt/image/cvutils/img_output8_16_32.h src/java.desktop/share/native/libawt/sun/awt/image/cvutils/img_output8_32.h src/java.desktop/share/native/libawt/sun/awt/image/cvutils/img_replscale.h src/java.desktop/share/native/libawt/sun/awt/image/cvutils/img_scaleloop.h src/java.desktop/share/native/libawt/sun/awt/image/cvutils/img_util.h src/java.desktop/share/native/libawt/sun/awt/image/dither.c src/java.desktop/share/native/libawt/sun/awt/image/dither.h src/java.desktop/share/native/libawt/sun/awt/image/gif/gifdecoder.c src/java.desktop/share/native/libawt/sun/awt/image/imageInitIDs.c src/java.desktop/share/native/libawt/sun/awt/image/imageInitIDs.h src/java.desktop/share/native/libawt/sun/awt/medialib/awt_ImagingLib.c src/java.desktop/share/native/libawt/sun/awt/medialib/awt_ImagingLib.h src/java.desktop/share/native/libawt/sun/java2d/Disposer.c src/java.desktop/share/native/libawt/sun/java2d/Disposer.h src/java.desktop/share/native/libawt/sun/java2d/ShaderList.c src/java.desktop/share/native/libawt/sun/java2d/ShaderList.h src/java.desktop/share/native/libawt/sun/java2d/SurfaceData.c src/java.desktop/share/native/libawt/sun/java2d/SurfaceData.h src/java.desktop/share/native/libawt/sun/java2d/Trace.c src/java.desktop/share/native/libawt/sun/java2d/Trace.h src/java.desktop/share/native/libawt/sun/java2d/loops/AlphaMacros.c src/java.desktop/share/native/libawt/sun/java2d/loops/AlphaMacros.h src/java.desktop/share/native/libawt/sun/java2d/loops/AlphaMath.c src/java.desktop/share/native/libawt/sun/java2d/loops/AlphaMath.h src/java.desktop/share/native/libawt/sun/java2d/loops/Any3Byte.c src/java.desktop/share/native/libawt/sun/java2d/loops/Any3Byte.h src/java.desktop/share/native/libawt/sun/java2d/loops/Any4Byte.c src/java.desktop/share/native/libawt/sun/java2d/loops/Any4Byte.h src/java.desktop/share/native/libawt/sun/java2d/loops/AnyByte.c src/java.desktop/share/native/libawt/sun/java2d/loops/AnyByte.h src/java.desktop/share/native/libawt/sun/java2d/loops/AnyByteBinary.h src/java.desktop/share/native/libawt/sun/java2d/loops/AnyInt.c src/java.desktop/share/native/libawt/sun/java2d/loops/AnyInt.h src/java.desktop/share/native/libawt/sun/java2d/loops/AnyShort.c src/java.desktop/share/native/libawt/sun/java2d/loops/AnyShort.h src/java.desktop/share/native/libawt/sun/java2d/loops/Blit.c src/java.desktop/share/native/libawt/sun/java2d/loops/BlitBg.c src/java.desktop/share/native/libawt/sun/java2d/loops/ByteBinary1Bit.c src/java.desktop/share/native/libawt/sun/java2d/loops/ByteBinary1Bit.h src/java.desktop/share/native/libawt/sun/java2d/loops/ByteBinary2Bit.c src/java.desktop/share/native/libawt/sun/java2d/loops/ByteBinary2Bit.h src/java.desktop/share/native/libawt/sun/java2d/loops/ByteBinary4Bit.c src/java.desktop/share/native/libawt/sun/java2d/loops/ByteBinary4Bit.h src/java.desktop/share/native/libawt/sun/java2d/loops/ByteGray.c src/java.desktop/share/native/libawt/sun/java2d/loops/ByteGray.h src/java.desktop/share/native/libawt/sun/java2d/loops/ByteIndexed.c src/java.desktop/share/native/libawt/sun/java2d/loops/ByteIndexed.h src/java.desktop/share/native/libawt/sun/java2d/loops/DrawLine.c src/java.desktop/share/native/libawt/sun/java2d/loops/DrawParallelogram.c src/java.desktop/share/native/libawt/sun/java2d/loops/DrawPath.c src/java.desktop/share/native/libawt/sun/java2d/loops/DrawPath.h src/java.desktop/share/native/libawt/sun/java2d/loops/DrawPolygons.c src/java.desktop/share/native/libawt/sun/java2d/loops/DrawRect.c src/java.desktop/share/native/libawt/sun/java2d/loops/FillParallelogram.c src/java.desktop/share/native/libawt/sun/java2d/loops/FillPath.c src/java.desktop/share/native/libawt/sun/java2d/loops/FillRect.c src/java.desktop/share/native/libawt/sun/java2d/loops/FillSpans.c src/java.desktop/share/native/libawt/sun/java2d/loops/FourByteAbgr.c src/java.desktop/share/native/libawt/sun/java2d/loops/FourByteAbgr.h src/java.desktop/share/native/libawt/sun/java2d/loops/FourByteAbgrPre.c src/java.desktop/share/native/libawt/sun/java2d/loops/FourByteAbgrPre.h src/java.desktop/share/native/libawt/sun/java2d/loops/GlyphImageRef.h src/java.desktop/share/native/libawt/sun/java2d/loops/GraphicsPrimitiveMgr.c src/java.desktop/share/native/libawt/sun/java2d/loops/GraphicsPrimitiveMgr.h src/java.desktop/share/native/libawt/sun/java2d/loops/ImageData.h src/java.desktop/share/native/libawt/sun/java2d/loops/Index12Gray.c src/java.desktop/share/native/libawt/sun/java2d/loops/Index12Gray.h src/java.desktop/share/native/libawt/sun/java2d/loops/Index8Gray.c src/java.desktop/share/native/libawt/sun/java2d/loops/Index8Gray.h src/java.desktop/share/native/libawt/sun/java2d/loops/IntArgb.c src/java.desktop/share/native/libawt/sun/java2d/loops/IntArgb.h src/java.desktop/share/native/libawt/sun/java2d/loops/IntArgbBm.c src/java.desktop/share/native/libawt/sun/java2d/loops/IntArgbBm.h src/java.desktop/share/native/libawt/sun/java2d/loops/IntArgbPre.c src/java.desktop/share/native/libawt/sun/java2d/loops/IntArgbPre.h src/java.desktop/share/native/libawt/sun/java2d/loops/IntBgr.c src/java.desktop/share/native/libawt/sun/java2d/loops/IntBgr.h src/java.desktop/share/native/libawt/sun/java2d/loops/IntDcm.h src/java.desktop/share/native/libawt/sun/java2d/loops/IntRgb.c src/java.desktop/share/native/libawt/sun/java2d/loops/IntRgb.h src/java.desktop/share/native/libawt/sun/java2d/loops/IntRgbx.c src/java.desktop/share/native/libawt/sun/java2d/loops/IntRgbx.h src/java.desktop/share/native/libawt/sun/java2d/loops/LineUtils.h src/java.desktop/share/native/libawt/sun/java2d/loops/LoopMacros.h src/java.desktop/share/native/libawt/sun/java2d/loops/MapAccelFunc.c src/java.desktop/share/native/libawt/sun/java2d/loops/MaskBlit.c src/java.desktop/share/native/libawt/sun/java2d/loops/MaskFill.c src/java.desktop/share/native/libawt/sun/java2d/loops/ParallelogramUtils.h src/java.desktop/share/native/libawt/sun/java2d/loops/ProcessPath.c src/java.desktop/share/native/libawt/sun/java2d/loops/ProcessPath.h src/java.desktop/share/native/libawt/sun/java2d/loops/ScaledBlit.c src/java.desktop/share/native/libawt/sun/java2d/loops/ThreeByteBgr.c src/java.desktop/share/native/libawt/sun/java2d/loops/ThreeByteBgr.h src/java.desktop/share/native/libawt/sun/java2d/loops/TransformHelper.c src/java.desktop/share/native/libawt/sun/java2d/loops/Ushort4444Argb.c src/java.desktop/share/native/libawt/sun/java2d/loops/Ushort4444Argb.h src/java.desktop/share/native/libawt/sun/java2d/loops/Ushort555Rgb.c src/java.desktop/share/native/libawt/sun/java2d/loops/Ushort555Rgb.h src/java.desktop/share/native/libawt/sun/java2d/loops/Ushort555Rgbx.c src/java.desktop/share/native/libawt/sun/java2d/loops/Ushort555Rgbx.h src/java.desktop/share/native/libawt/sun/java2d/loops/Ushort565Rgb.c src/java.desktop/share/native/libawt/sun/java2d/loops/Ushort565Rgb.h src/java.desktop/share/native/libawt/sun/java2d/loops/UshortGray.c src/java.desktop/share/native/libawt/sun/java2d/loops/UshortGray.h src/java.desktop/share/native/libawt/sun/java2d/loops/UshortIndexed.c src/java.desktop/share/native/libawt/sun/java2d/loops/UshortIndexed.h src/java.desktop/share/native/libawt/sun/java2d/pipe/BufferedMaskBlit.c src/java.desktop/share/native/libawt/sun/java2d/pipe/BufferedRenderPipe.c src/java.desktop/share/native/libawt/sun/java2d/pipe/PathConsumer2D.h src/java.desktop/share/native/libawt/sun/java2d/pipe/Region.c src/java.desktop/share/native/libawt/sun/java2d/pipe/Region.h src/java.desktop/share/native/libawt/sun/java2d/pipe/ShapeSpanIterator.c src/java.desktop/share/native/libawt/sun/java2d/pipe/SpanClipRenderer.c src/java.desktop/share/native/libawt/sun/java2d/pipe/SpanIterator.h src/java.desktop/unix/native/common/sun/awt/CUPSfuncs.c src/java.desktop/unix/native/common/sun/awt/X11Color.c src/java.desktop/unix/native/common/sun/awt/awt.h src/java.desktop/unix/native/common/sun/awt/awt_Component.h src/java.desktop/unix/native/common/sun/awt/awt_DrawingSurface.h src/java.desktop/unix/native/common/sun/awt/awt_Font.c src/java.desktop/unix/native/common/sun/awt/awt_Font.h src/java.desktop/unix/native/common/sun/awt/awt_GraphicsEnv.h src/java.desktop/unix/native/common/sun/awt/awt_Mlib.h src/java.desktop/unix/native/common/sun/awt/awt_p.h src/java.desktop/unix/native/common/sun/awt/awt_util.h src/java.desktop/unix/native/common/sun/awt/color.h src/java.desktop/unix/native/common/sun/awt/colordata.h src/java.desktop/unix/native/common/sun/awt/extutil.h src/java.desktop/unix/native/common/sun/awt/fontconfig.h src/java.desktop/unix/native/common/sun/awt/fontpath.c src/java.desktop/unix/native/common/sun/awt/img_util_md.h src/java.desktop/unix/native/common/sun/awt/initIDs.c src/java.desktop/unix/native/common/sun/awt/medialib/mlib_v_ImageCopy_f.c src/java.desktop/unix/native/common/sun/awt/medialib/mlib_v_ImageCopy_f.h src/java.desktop/unix/native/common/sun/awt/medialib/vis_proto.h src/java.desktop/unix/native/common/sun/awt/utility/rect.h src/java.desktop/unix/native/common/sun/font/X11FontScaler.h src/java.desktop/unix/native/common/sun/java2d/opengl/GLXGraphicsConfig.c src/java.desktop/unix/native/common/sun/java2d/opengl/GLXGraphicsConfig.h src/java.desktop/unix/native/common/sun/java2d/opengl/GLXSurfaceData.c src/java.desktop/unix/native/common/sun/java2d/opengl/GLXSurfaceData.h src/java.desktop/unix/native/common/sun/java2d/opengl/J2D_GL/glx.h src/java.desktop/unix/native/common/sun/java2d/opengl/J2D_GL/glxext.h src/java.desktop/unix/native/common/sun/java2d/opengl/OGLFuncs_md.h src/java.desktop/unix/native/common/sun/java2d/x11/X11FontScaler_md.c src/java.desktop/unix/native/common/sun/java2d/x11/X11PMBlitLoops.c src/java.desktop/unix/native/common/sun/java2d/x11/X11Renderer.c src/java.desktop/unix/native/common/sun/java2d/x11/X11SurfaceData.c src/java.desktop/unix/native/common/sun/java2d/x11/X11SurfaceData.h src/java.desktop/unix/native/common/sun/java2d/x11/X11TextRenderer_md.c src/java.desktop/unix/native/libawt/sun/awt/awt_LoadLibrary.c src/java.desktop/unix/native/libawt/sun/awt/awt_Mlib.c src/java.desktop/unix/native/libawt/sun/awt/medialib/mlib_v_ImageCopy.c src/java.desktop/unix/native/libawt/sun/awt/medialib/mlib_v_ImageCopy_blk.s src/java.desktop/unix/native/libawt/sun/awt/medialib/vis_asi.h src/java.desktop/unix/native/libawt/sun/java2d/j2d_md.h src/java.desktop/unix/native/libawt/sun/java2d/loops/java2d_Mlib.c src/java.desktop/unix/native/libawt/sun/java2d/loops/java2d_Mlib.h src/java.desktop/unix/native/libawt/sun/java2d/loops/mlib_ImageCopy.h src/java.desktop/unix/native/libawt/sun/java2d/loops/mlib_ImageLogic_proto.h src/java.desktop/unix/native/libawt/sun/java2d/loops/mlib_ImageZoom.h src/java.desktop/unix/native/libawt/sun/java2d/loops/mlib_ImageZoom_NN.c src/java.desktop/unix/native/libawt/sun/java2d/loops/mlib_v_ImageClear.c src/java.desktop/unix/native/libawt/sun/java2d/loops/mlib_v_ImageClear_f.c src/java.desktop/unix/native/libawt/sun/java2d/loops/mlib_v_ImageClear_f.h src/java.desktop/unix/native/libawt/sun/java2d/loops/mlib_v_ImageConstLogic.h src/java.desktop/unix/native/libawt/sun/java2d/loops/mlib_v_ImageConstXor.c src/java.desktop/unix/native/libawt/sun/java2d/loops/mlib_v_ImageLogic.h src/java.desktop/unix/native/libawt/sun/java2d/loops/mlib_v_ImageLogic_proto.h src/java.desktop/unix/native/libawt/sun/java2d/loops/mlib_v_ImageXor.c src/java.desktop/unix/native/libawt/sun/java2d/loops/mlib_v_ImageZoom_NN_f.c src/java.desktop/unix/native/libawt/sun/java2d/loops/vis_AlphaMacros.c src/java.desktop/unix/native/libawt/sun/java2d/loops/vis_AlphaMacros.h src/java.desktop/unix/native/libawt/sun/java2d/loops/vis_AlphaMaskBlit.c src/java.desktop/unix/native/libawt/sun/java2d/loops/vis_AlphaMaskFill.c src/java.desktop/unix/native/libawt/sun/java2d/loops/vis_ByteGray.c src/java.desktop/unix/native/libawt/sun/java2d/loops/vis_ByteGray_FromRgb.c src/java.desktop/unix/native/libawt/sun/java2d/loops/vis_ByteGray_Mask.c src/java.desktop/unix/native/libawt/sun/java2d/loops/vis_ByteIndexed.c src/java.desktop/unix/native/libawt/sun/java2d/loops/vis_DrawLine.c src/java.desktop/unix/native/libawt/sun/java2d/loops/vis_FourByteAbgr.c src/java.desktop/unix/native/libawt/sun/java2d/loops/vis_FourByteAbgrPre.c src/java.desktop/unix/native/libawt/sun/java2d/loops/vis_FuncArray.c src/java.desktop/unix/native/libawt/sun/java2d/loops/vis_GlyphList.c src/java.desktop/unix/native/libawt/sun/java2d/loops/vis_GlyphListXor.c src/java.desktop/unix/native/libawt/sun/java2d/loops/vis_IntArgb.c src/java.desktop/unix/native/libawt/sun/java2d/loops/vis_IntArgbBm.c src/java.desktop/unix/native/libawt/sun/java2d/loops/vis_IntArgbPre.c src/java.desktop/unix/native/libawt/sun/java2d/loops/vis_IntArgbPre_Mask.c src/java.desktop/unix/native/libawt/sun/java2d/loops/vis_IntBgr.c src/java.desktop/unix/native/libawt/sun/java2d/loops/vis_IntRgb.c src/java.desktop/unix/native/libawt/sun/java2d/loops/vis_IntRgbx.c src/java.desktop/unix/native/libawt/sun/java2d/loops/vis_Interp.c src/java.desktop/unix/native/libawt/sun/java2d/loops/vis_SrcMaskFill.c src/java.desktop/unix/native/libawt/sun/java2d/loops/vis_SrcOverMaskBlit.c src/java.desktop/unix/native/libawt/sun/java2d/loops/vis_SrcOverMaskFill.c src/java.desktop/unix/native/libawt/sun/java2d/loops/vis_ThreeByteBgr.c src/java.desktop/unix/native/libawt/sun/java2d/loops/vis_UshortGray.c src/java.desktop/unix/native/libawt/sun/java2d/loops/vis_UshortGray_FromRgb.c src/java.desktop/unix/native/libawt/sun/java2d/loops/vis_XorBlit.c src/java.desktop/unix/native/libawt_headless/sun/awt/HeadlessToolkit.c src/java.desktop/unix/native/libawt_headless/sun/awt/VDrawingArea.c src/java.desktop/unix/native/libawt_headless/sun/awt/VDrawingArea.h src/java.desktop/unix/native/libawt_headless/sun/awt/VDrawingAreaP.h src/java.desktop/unix/native/libawt_xawt/sun/awt/HPkeysym.h src/java.desktop/unix/native/libawt_xawt/sun/awt/Xrandr.h src/java.desktop/unix/native/libawt_xawt/sun/awt/awt_AWTEvent.c src/java.desktop/unix/native/libawt_xawt/sun/awt/awt_AWTEvent.h src/java.desktop/unix/native/libawt_xawt/sun/awt/awt_DrawingSurface.c src/java.desktop/unix/native/libawt_xawt/sun/awt/awt_Event.c src/java.desktop/unix/native/libawt_xawt/sun/awt/awt_Event.h src/java.desktop/unix/native/libawt_xawt/sun/awt/awt_GraphicsEnv.c src/java.desktop/unix/native/libawt_xawt/sun/awt/awt_InputMethod.c src/java.desktop/unix/native/libawt_xawt/sun/awt/awt_Insets.c src/java.desktop/unix/native/libawt_xawt/sun/awt/awt_Insets.h src/java.desktop/unix/native/libawt_xawt/sun/awt/awt_MenuComponent.h src/java.desktop/unix/native/libawt_xawt/sun/awt/awt_Robot.c src/java.desktop/unix/native/libawt_xawt/sun/awt/awt_UNIXToolkit.c src/java.desktop/unix/native/libawt_xawt/sun/awt/awt_util.c src/java.desktop/unix/native/libawt_xawt/sun/awt/canvas.h src/java.desktop/unix/native/libawt_xawt/sun/awt/gtk2_interface.c src/java.desktop/unix/native/libawt_xawt/sun/awt/gtk2_interface.h src/java.desktop/unix/native/libawt_xawt/sun/awt/list.c src/java.desktop/unix/native/libawt_xawt/sun/awt/list.h src/java.desktop/unix/native/libawt_xawt/sun/awt/multiVis.c src/java.desktop/unix/native/libawt_xawt/sun/awt/multiVis.h src/java.desktop/unix/native/libawt_xawt/sun/awt/multi_font.c src/java.desktop/unix/native/libawt_xawt/sun/awt/multi_font.h src/java.desktop/unix/native/libawt_xawt/sun/awt/randr.h src/java.desktop/unix/native/libawt_xawt/sun/awt/robot_common.c src/java.desktop/unix/native/libawt_xawt/sun/awt/robot_common.h src/java.desktop/unix/native/libawt_xawt/sun/awt/sun_awt_X11_GtkFileDialogPeer.c src/java.desktop/unix/native/libawt_xawt/sun/awt/swing_GTKEngine.c src/java.desktop/unix/native/libawt_xawt/sun/awt/swing_GTKStyle.c src/java.desktop/unix/native/libawt_xawt/sun/awt/wsutils.h src/java.desktop/unix/native/libawt_xawt/sun/java2d/x11/XRBackendNative.c src/java.desktop/unix/native/libawt_xawt/sun/java2d/x11/XRSurfaceData.c src/java.desktop/unix/native/libawt_xawt/sun/xawt/XToolkit.c src/java.desktop/unix/native/libawt_xawt/sun/xawt/XWindow.c src/java.desktop/unix/native/libawt_xawt/sun/xawt/XlibWrapper.c src/java.desktop/unix/native/libawt_xawt/sun/xawt/awt_Desktop.c src/java.desktop/unix/native/libawt_xawt/sun/xawt/gnome_interface.c src/java.desktop/unix/native/libawt_xawt/sun/xawt/gnome_interface.h src/java.desktop/windows/native/common/sun/awt/utility/rect.h src/java.desktop/windows/native/libawt/sun/java2d/d3d/D3DBadHardware.h src/java.desktop/windows/native/libawt/sun/java2d/d3d/D3DBlitLoops.cpp src/java.desktop/windows/native/libawt/sun/java2d/d3d/D3DBlitLoops.h src/java.desktop/windows/native/libawt/sun/java2d/d3d/D3DBufImgOps.cpp src/java.desktop/windows/native/libawt/sun/java2d/d3d/D3DBufImgOps.h src/java.desktop/windows/native/libawt/sun/java2d/d3d/D3DContext.cpp src/java.desktop/windows/native/libawt/sun/java2d/d3d/D3DContext.h src/java.desktop/windows/native/libawt/sun/java2d/d3d/D3DGlyphCache.cpp src/java.desktop/windows/native/libawt/sun/java2d/d3d/D3DGlyphCache.h src/java.desktop/windows/native/libawt/sun/java2d/d3d/D3DGraphicsDevice.cpp src/java.desktop/windows/native/libawt/sun/java2d/d3d/D3DGraphicsDevice.h src/java.desktop/windows/native/libawt/sun/java2d/d3d/D3DMaskBlit.cpp src/java.desktop/windows/native/libawt/sun/java2d/d3d/D3DMaskBlit.h src/java.desktop/windows/native/libawt/sun/java2d/d3d/D3DMaskCache.cpp src/java.desktop/windows/native/libawt/sun/java2d/d3d/D3DMaskCache.h src/java.desktop/windows/native/libawt/sun/java2d/d3d/D3DMaskFill.cpp src/java.desktop/windows/native/libawt/sun/java2d/d3d/D3DMaskFill.h src/java.desktop/windows/native/libawt/sun/java2d/d3d/D3DPaints.cpp src/java.desktop/windows/native/libawt/sun/java2d/d3d/D3DPaints.h src/java.desktop/windows/native/libawt/sun/java2d/d3d/D3DPipeline.h src/java.desktop/windows/native/libawt/sun/java2d/d3d/D3DPipelineManager.cpp src/java.desktop/windows/native/libawt/sun/java2d/d3d/D3DPipelineManager.h src/java.desktop/windows/native/libawt/sun/java2d/d3d/D3DRenderQueue.cpp src/java.desktop/windows/native/libawt/sun/java2d/d3d/D3DRenderQueue.h src/java.desktop/windows/native/libawt/sun/java2d/d3d/D3DRenderer.cpp src/java.desktop/windows/native/libawt/sun/java2d/d3d/D3DRenderer.h src/java.desktop/windows/native/libawt/sun/java2d/d3d/D3DResourceManager.cpp src/java.desktop/windows/native/libawt/sun/java2d/d3d/D3DResourceManager.h src/java.desktop/windows/native/libawt/sun/java2d/d3d/D3DShaderGen.c src/java.desktop/windows/native/libawt/sun/java2d/d3d/D3DShaders.h src/java.desktop/windows/native/libawt/sun/java2d/d3d/D3DSurfaceData.cpp src/java.desktop/windows/native/libawt/sun/java2d/d3d/D3DSurfaceData.h src/java.desktop/windows/native/libawt/sun/java2d/d3d/D3DTextRenderer.cpp src/java.desktop/windows/native/libawt/sun/java2d/d3d/D3DTextRenderer.h src/java.desktop/windows/native/libawt/sun/java2d/d3d/D3DVertexCacher.cpp src/java.desktop/windows/native/libawt/sun/java2d/d3d/D3DVertexCacher.h src/java.desktop/windows/native/libawt/sun/java2d/j2d_md.h src/java.desktop/windows/native/libawt/sun/java2d/opengl/J2D_GL/wglext.h src/java.desktop/windows/native/libawt/sun/java2d/opengl/OGLFuncs_md.h src/java.desktop/windows/native/libawt/sun/java2d/opengl/WGLGraphicsConfig.c src/java.desktop/windows/native/libawt/sun/java2d/opengl/WGLGraphicsConfig.h src/java.desktop/windows/native/libawt/sun/java2d/opengl/WGLSurfaceData.c src/java.desktop/windows/native/libawt/sun/java2d/opengl/WGLSurfaceData.h src/java.desktop/windows/native/libawt/sun/java2d/windows/GDIBlitLoops.cpp src/java.desktop/windows/native/libawt/sun/java2d/windows/GDIRenderer.cpp src/java.desktop/windows/native/libawt/sun/java2d/windows/GDIWindowSurfaceData.cpp src/java.desktop/windows/native/libawt/sun/java2d/windows/GDIWindowSurfaceData.h src/java.desktop/windows/native/libawt/sun/java2d/windows/WindowsFlags.cpp src/java.desktop/windows/native/libawt/sun/java2d/windows/WindowsFlags.h src/java.desktop/windows/native/libawt/sun/windows/CmdIDList.cpp src/java.desktop/windows/native/libawt/sun/windows/CmdIDList.h src/java.desktop/windows/native/libawt/sun/windows/ComCtl32Util.cpp src/java.desktop/windows/native/libawt/sun/windows/ComCtl32Util.h src/java.desktop/windows/native/libawt/sun/windows/Devices.cpp src/java.desktop/windows/native/libawt/sun/windows/Devices.h src/java.desktop/windows/native/libawt/sun/windows/DllUtil.cpp src/java.desktop/windows/native/libawt/sun/windows/DllUtil.h src/java.desktop/windows/native/libawt/sun/windows/GDIHashtable.cpp src/java.desktop/windows/native/libawt/sun/windows/GDIHashtable.h src/java.desktop/windows/native/libawt/sun/windows/Hashtable.cpp src/java.desktop/windows/native/libawt/sun/windows/Hashtable.h src/java.desktop/windows/native/libawt/sun/windows/MouseInfo.cpp src/java.desktop/windows/native/libawt/sun/windows/ObjectList.cpp src/java.desktop/windows/native/libawt/sun/windows/ObjectList.h src/java.desktop/windows/native/libawt/sun/windows/README.JNI src/java.desktop/windows/native/libawt/sun/windows/ShellFolder2.cpp src/java.desktop/windows/native/libawt/sun/windows/ThemeReader.cpp src/java.desktop/windows/native/libawt/sun/windows/WPrinterJob.cpp src/java.desktop/windows/native/libawt/sun/windows/alloc.h src/java.desktop/windows/native/libawt/sun/windows/awt.h src/java.desktop/windows/native/libawt/sun/windows/awt.rc src/java.desktop/windows/native/libawt/sun/windows/awt_AWTEvent.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_AWTEvent.h src/java.desktop/windows/native/libawt/sun/windows/awt_BitmapUtil.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_BitmapUtil.h src/java.desktop/windows/native/libawt/sun/windows/awt_Brush.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_Brush.h src/java.desktop/windows/native/libawt/sun/windows/awt_Button.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_Button.h src/java.desktop/windows/native/libawt/sun/windows/awt_Canvas.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_Canvas.h src/java.desktop/windows/native/libawt/sun/windows/awt_Checkbox.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_Checkbox.h src/java.desktop/windows/native/libawt/sun/windows/awt_Choice.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_Choice.h src/java.desktop/windows/native/libawt/sun/windows/awt_Clipboard.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_Clipboard.h src/java.desktop/windows/native/libawt/sun/windows/awt_Color.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_Color.h src/java.desktop/windows/native/libawt/sun/windows/awt_Component.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_Component.h src/java.desktop/windows/native/libawt/sun/windows/awt_Container.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_Container.h src/java.desktop/windows/native/libawt/sun/windows/awt_Cursor.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_Cursor.h src/java.desktop/windows/native/libawt/sun/windows/awt_CustomPaletteDef.h src/java.desktop/windows/native/libawt/sun/windows/awt_DCHolder.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_DCHolder.h src/java.desktop/windows/native/libawt/sun/windows/awt_DataTransferer.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_DataTransferer.h src/java.desktop/windows/native/libawt/sun/windows/awt_Debug.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_Debug.h src/java.desktop/windows/native/libawt/sun/windows/awt_Desktop.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_DesktopProperties.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_DesktopProperties.h src/java.desktop/windows/native/libawt/sun/windows/awt_Dialog.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_Dialog.h src/java.desktop/windows/native/libawt/sun/windows/awt_Dimension.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_Dimension.h src/java.desktop/windows/native/libawt/sun/windows/awt_DnDDS.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_DnDDS.h src/java.desktop/windows/native/libawt/sun/windows/awt_DnDDT.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_DnDDT.h src/java.desktop/windows/native/libawt/sun/windows/awt_DrawingSurface.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_DrawingSurface.h src/java.desktop/windows/native/libawt/sun/windows/awt_Event.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_Event.h src/java.desktop/windows/native/libawt/sun/windows/awt_FileDialog.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_FileDialog.h src/java.desktop/windows/native/libawt/sun/windows/awt_Font.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_Font.h src/java.desktop/windows/native/libawt/sun/windows/awt_Frame.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_Frame.h src/java.desktop/windows/native/libawt/sun/windows/awt_GDIObject.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_GDIObject.h src/java.desktop/windows/native/libawt/sun/windows/awt_IconCursor.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_IconCursor.h src/java.desktop/windows/native/libawt/sun/windows/awt_InputEvent.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_InputEvent.h src/java.desktop/windows/native/libawt/sun/windows/awt_InputMethod.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_InputTextInfor.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_InputTextInfor.h src/java.desktop/windows/native/libawt/sun/windows/awt_Insets.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_Insets.h src/java.desktop/windows/native/libawt/sun/windows/awt_KeyEvent.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_KeyEvent.h src/java.desktop/windows/native/libawt/sun/windows/awt_KeyboardFocusManager.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_Label.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_Label.h src/java.desktop/windows/native/libawt/sun/windows/awt_List.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_List.h src/java.desktop/windows/native/libawt/sun/windows/awt_Menu.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_Menu.h src/java.desktop/windows/native/libawt/sun/windows/awt_MenuBar.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_MenuBar.h src/java.desktop/windows/native/libawt/sun/windows/awt_MenuItem.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_MenuItem.h src/java.desktop/windows/native/libawt/sun/windows/awt_Mlib.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_Mlib.h src/java.desktop/windows/native/libawt/sun/windows/awt_MouseEvent.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_MouseEvent.h src/java.desktop/windows/native/libawt/sun/windows/awt_Object.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_Object.h src/java.desktop/windows/native/libawt/sun/windows/awt_Palette.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_Palette.h src/java.desktop/windows/native/libawt/sun/windows/awt_Panel.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_Panel.h src/java.desktop/windows/native/libawt/sun/windows/awt_Pen.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_Pen.h src/java.desktop/windows/native/libawt/sun/windows/awt_PopupMenu.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_PopupMenu.h src/java.desktop/windows/native/libawt/sun/windows/awt_PrintControl.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_PrintControl.h src/java.desktop/windows/native/libawt/sun/windows/awt_PrintDialog.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_PrintDialog.h src/java.desktop/windows/native/libawt/sun/windows/awt_PrintJob.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_Rectangle.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_Rectangle.h src/java.desktop/windows/native/libawt/sun/windows/awt_Robot.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_Robot.h src/java.desktop/windows/native/libawt/sun/windows/awt_ScrollPane.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_ScrollPane.h src/java.desktop/windows/native/libawt/sun/windows/awt_Scrollbar.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_Scrollbar.h src/java.desktop/windows/native/libawt/sun/windows/awt_TextArea.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_TextArea.h src/java.desktop/windows/native/libawt/sun/windows/awt_TextComponent.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_TextComponent.h src/java.desktop/windows/native/libawt/sun/windows/awt_TextField.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_TextField.h src/java.desktop/windows/native/libawt/sun/windows/awt_Toolkit.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_Toolkit.h src/java.desktop/windows/native/libawt/sun/windows/awt_TrayIcon.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_TrayIcon.h src/java.desktop/windows/native/libawt/sun/windows/awt_Win32GraphicsConfig.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_Win32GraphicsConfig.h src/java.desktop/windows/native/libawt/sun/windows/awt_Win32GraphicsDevice.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_Win32GraphicsDevice.h src/java.desktop/windows/native/libawt/sun/windows/awt_Win32GraphicsEnv.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_Window.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_Window.h src/java.desktop/windows/native/libawt/sun/windows/awt_new.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_new.h src/java.desktop/windows/native/libawt/sun/windows/awt_ole.cpp src/java.desktop/windows/native/libawt/sun/windows/awt_ole.h src/java.desktop/windows/native/libawt/sun/windows/awtmsg.h src/java.desktop/windows/native/libawt/sun/windows/check.bmp src/java.desktop/windows/native/libawt/sun/windows/colordata.h src/java.desktop/windows/native/libawt/sun/windows/hand.cur src/java.desktop/windows/native/libawt/sun/windows/img_util_md.h src/java.desktop/windows/native/libawt/sun/windows/initIDs.cpp src/java.desktop/windows/native/libawt/sun/windows/mlib_types_md.h src/java.desktop/windows/native/libawt/sun/windows/security_warning.ico src/java.desktop/windows/native/libawt/sun/windows/security_warning_bw.ico src/java.desktop/windows/native/libawt/sun/windows/security_warning_int.ico src/java.desktop/windows/native/libawt/sun/windows/stdhdrs.h
diffstat 1431 files changed, 243193 insertions(+), 241739 deletions(-) [+]
line wrap: on
line diff
--- a/make/copy/Copy-java.base.gmk	Thu Sep 25 12:40:26 2014 -0700
+++ b/make/copy/Copy-java.base.gmk	Thu Sep 25 16:20:38 2014 -0700
@@ -172,14 +172,8 @@
   POLICY_SRC_LIST += $(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/conf/security/java.policy
 endif
 ifndef OPENJDK
-  ifeq ($(OPENJDK_TARGET_OS), windows)
-    ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
-      POLICY_SRC_LIST += $(JDK_TOPDIR)/src/closed/java.base/$(OPENJDK_TARGET_OS)/conf/security/java.policy-win32
-    else
-      POLICY_SRC_LIST += $(JDK_TOPDIR)/src/closed/java.base/$(OPENJDK_TARGET_OS)/conf/security/java.policy-win64
-    endif
-  endif
-  ifeq ($(OPENJDK_TARGET_OS), solaris)
+  # if $(OPENJDK_TARGET_OS) is windows or solaris
+  ifneq ($(findstring $(OPENJDK_TARGET_OS), windows solaris), )
     POLICY_SRC_LIST += $(JDK_TOPDIR)/src/closed/java.base/$(OPENJDK_TARGET_OS)/conf/security/java.policy
   endif
 endif
--- a/make/copy/Copy-java.desktop.gmk	Thu Sep 25 12:40:26 2014 -0700
+++ b/make/copy/Copy-java.desktop.gmk	Thu Sep 25 16:20:38 2014 -0700
@@ -68,7 +68,7 @@
   endif
 
   $(FREETYPE_TARGET_LIB): $(FREETYPE_BUNDLE_LIB_PATH)/$(call SHARED_LIBRARY,freetype)
-	$(CP) $(FREETYPE_BUNDLE_LIB_PATH)/$(call SHARED_LIBRARY,freetype) $@
+	$(install-file)
         ifeq ($(OPENJDK_BUILD_OS), windows)
 	  $(CHMOD) +rx $@
         endif
--- a/make/gensrc/Gensrc-jdk.attach.gmk	Thu Sep 25 12:40:26 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-#
-# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-include GensrcCommon.gmk
-
-include GensrcProviders.gmk
-
-jdk.attach: $(GENSRC_JDK_ATTACH)
-
-all: jdk.attach
-
-.PHONY: all jdk.attach
--- a/make/gensrc/Gensrc-jdk.charsets.gmk	Thu Sep 25 12:40:26 2014 -0700
+++ b/make/gensrc/Gensrc-jdk.charsets.gmk	Thu Sep 25 16:20:38 2014 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -25,10 +25,60 @@
 
 include GensrcCommon.gmk
 
-include GensrcCharsetMapping.gmk
+################################################################################
+#
+# Generate files using the charsetmapping tool
+#
+CHARSET_DATA_DIR := $(JDK_TOPDIR)/make/data/charsetmapping
+CHARSET_GENSRC_JAVA_DIR_CS := $(JDK_OUTPUTDIR)/gensrc/jdk.charsets/sun/nio/cs/ext
+CHARSET_DONE_CS := $(CHARSET_GENSRC_JAVA_DIR_CS)/_the.charsetmapping
+CHARSET_COPYRIGHT_HEADER := $(JDK_TOPDIR)/make/src/classes/build/tools/charsetmapping
+CHARSET_TEMPLATES := \
+    $(CHARSET_DATA_DIR)/SingleByte-X.java.template \
+    $(CHARSET_DATA_DIR)/DoubleByte-X.java.template
+
+$(CHARSET_DONE_CS)-extsbcs: $(CHARSET_DATA_DIR)/extsbcs  \
+    $(CHARSET_TEMPLATES) $(BUILD_TOOLS_JDK)
+	$(MKDIR) -p $(@D)
+	$(TOOL_CHARSETMAPPING) $(CHARSET_DATA_DIR) $(CHARSET_GENSRC_JAVA_DIR_CS) extsbcs
+	$(TOUCH) '$@'
+
+$(CHARSET_DONE_CS)-dbcs: $(CHARSET_DATA_DIR)/dbcs \
+    $(CHARSET_TEMPLATES) $(BUILD_TOOLS_JDK)
+	$(MKDIR) -p $(@D)
+	$(TOOL_CHARSETMAPPING) $(CHARSET_DATA_DIR) $(CHARSET_GENSRC_JAVA_DIR_CS) dbcs
+	$(TOUCH) '$@'
+
+$(CHARSET_DONE_CS)-hkscs: $(CHARSET_COPYRIGHT_HEADER)/HKSCS.java \
+    $(BUILD_TOOLS_JDK)
+	$(MKDIR) -p $(@D)
+	$(TOOL_CHARSETMAPPING) $(CHARSET_DATA_DIR) $(CHARSET_GENSRC_JAVA_DIR_CS) hkscs '$<'
+	$(TOUCH) '$@'
+
+$(CHARSET_DONE_CS)-euctw: $(CHARSET_COPYRIGHT_HEADER)/EUC_TW.java \
+    $(BUILD_TOOLS_JDK)
+	$(MKDIR) -p $(@D)
+	$(TOOL_CHARSETMAPPING) $(CHARSET_DATA_DIR) $(CHARSET_GENSRC_JAVA_DIR_CS) euctw '$<'
+	$(TOUCH) '$@'
+
+$(CHARSET_GENSRC_JAVA_DIR_CS)/sjis0213.dat: $(CHARSET_DATA_DIR)/sjis0213.map \
+    $(BUILD_TOOLS_JDK)
+	$(MKDIR) -p $(@D)
+	$(TOOL_CHARSETMAPPING) '$<' '$@' sjis0213
+
+GENSRC_JDK_CHARSETS += \
+    $(CHARSET_DONE_CS)-extsbcs \
+    $(CHARSET_DONE_CS)-dbcs \
+    $(CHARSET_DONE_CS)-hkscs \
+    $(CHARSET_DONE_CS)-euctw \
+    $(CHARSET_GENSRC_JAVA_DIR_CS)/sjis0213.dat \
+    #
+
+################################################################################
 
 jdk.charsets: $(GENSRC_JDK_CHARSETS)
 
 all: jdk.charsets
 
 .PHONY: all jdk.charsets
+
--- a/make/gensrc/Gensrc-jdk.jdi.gmk	Thu Sep 25 12:40:26 2014 -0700
+++ b/make/gensrc/Gensrc-jdk.jdi.gmk	Thu Sep 25 16:20:38 2014 -0700
@@ -25,8 +25,49 @@
 
 include GensrcCommon.gmk
 
-include GensrcJDWP.gmk
-include GensrcProviders.gmk
+################################################################################
+# Translate the Java debugger wire protocol (jdwp.spec) file into a JDWP.java file
+# and a JDWPCommands.h C-header file.
+
+JDWP_SPEC_FILE := $(JDK_TOPDIR)/make/data/jdwp/jdwp.spec
+
+$(JDK_OUTPUTDIR)/gensrc_jdwp_headers/JDWPCommands.h: $(JDWP_SPEC_FILE)
+
+$(JDK_OUTPUTDIR)/gensrc/jdk.jdi/com/sun/tools/jdi/JDWP.java: \
+    $(JDWP_SPEC_FILE) $(BUILD_TOOLS_JDK)
+	$(MKDIR) -p $(@D)
+	$(MKDIR) -p $(JDK_OUTPUTDIR)/gensrc_jdwp_headers
+	$(RM) $@ $(JDK_OUTPUTDIR)/gensrc_jdwp_headers/JDWPCommands.h
+	$(ECHO) $(LOG_INFO) Creating JDWP.java and JDWPCommands.h from jdwp.spec
+	$(TOOL_JDWPGEN) $< -jdi $@ -include $(JDK_OUTPUTDIR)/gensrc_jdwp_headers/JDWPCommands.h
+
+$(JDK_OUTPUTDIR)/gensrc_jdwp_doc/jdwp-protocol.html: $(JDWP_SPEC_FILE) \
+    $(BUILD_TOOLS_JDK)
+	$(MKDIR) -p $(@D)
+	$(RM) $@
+	$(ECHO) $(LOG_INFO) Creating $(@F) from jdwp.spec
+	$(TOOL_JDWPGEN) $< -doc $@
+
+GENSRC_JDWP := $(JDK_OUTPUTDIR)/gensrc/jdk.jdi/com/sun/tools/jdi/JDWP.java \
+    $(JDK_OUTPUTDIR)/gensrc_jdwp_headers/JDWPCommands.h \
+    $(JDK_OUTPUTDIR)/gensrc_jdwp_doc/jdwp-protocol.html
+GENSRC_JDK_JDI += $(GENSRC_JDWP)
+
+################################################################################
+
+define process-provider
+	$(MKDIR) -p $(@D)
+	$(CAT) $^ | $(SED) -e "s/^#\[$(OPENJDK_TARGET_OS)\]//" > $@
+endef
+
+# Filter com.sun.jdi.connect.Connector
+$(JDK_OUTPUTDIR)/gensrc/jdk.jdi/META-INF/services/com.sun.jdi.connect.Connector: \
+    $(JDK_TOPDIR)/src/jdk.jdi/share/classes/META-INF/services/com.sun.jdi.connect.Connector
+	$(process-provider)
+
+GENSRC_JDK_JDI += $(JDK_OUTPUTDIR)/gensrc/jdk.jdi/META-INF/services/com.sun.jdi.connect.Connector
+
+################################################################################
 
 jdk.jdi: $(GENSRC_JDK_JDI)
 
--- a/make/gensrc/GensrcCharsetMapping.gmk	Thu Sep 25 12:40:26 2014 -0700
+++ b/make/gensrc/GensrcCharsetMapping.gmk	Thu Sep 25 16:20:38 2014 -0700
@@ -23,71 +23,29 @@
 # questions.
 #
 
-GENSRC_CHARSETMAPPING :=
-
+################################################################################
+#
+# Generate files using the charsetmapping tool
+#
 CHARSET_DATA_DIR := $(JDK_TOPDIR)/make/data/charsetmapping
-
-###
-### Generate files using the charsetmapping tool
-###
-
-CHARSET_GENSRC_JAVA_DIR_CS := $(JDK_OUTPUTDIR)/gensrc/jdk.charsets/sun/nio/cs/ext
 CHARSET_GENSRC_JAVA_DIR_BASE := $(JDK_OUTPUTDIR)/gensrc/java.base/sun/nio/cs
-CHARSET_DONE_CS := $(CHARSET_GENSRC_JAVA_DIR_CS)/_the.charsetmapping
 CHARSET_DONE_BASE := $(CHARSET_GENSRC_JAVA_DIR_BASE)/_the.charsetmapping
-CHARSET_COPYRIGHT_HEADER_BASE := $(JDK_TOPDIR)/make/src/classes/build/tools/charsetmapping
 CHARSET_TEMPLATES := \
     $(CHARSET_DATA_DIR)/SingleByte-X.java.template \
     $(CHARSET_DATA_DIR)/DoubleByte-X.java.template
 
-# This target should be referenced using the order-only operator (|)
-$(CHARSET_GENSRC_JAVA_DIR_CS):
-	$(ECHO)	"Generating charset mappings"
-	$(MKDIR) -p $(CHARSET_GENSRC_JAVA_DIR_CS)
-	$(MKDIR) -p $(CHARSET_GENSRC_JAVA_DIR_BASE)
-
 $(CHARSET_DONE_BASE)-sbcs: $(CHARSET_DATA_DIR)/sbcs \
-    $(CHARSET_TEMPLATES) $(BUILD_TOOLS_JDK) | $(CHARSET_GENSRC_JAVA_DIR_CS)
+    $(CHARSET_TEMPLATES) $(BUILD_TOOLS_JDK)
+	$(MKDIR) -p $(@D)
 	$(TOOL_CHARSETMAPPING) $(CHARSET_DATA_DIR) $(CHARSET_GENSRC_JAVA_DIR_BASE) sbcs
 	$(TOUCH) '$@'
 
-$(CHARSET_DONE_CS)-extsbcs: $(CHARSET_DATA_DIR)/extsbcs  \
-    $(CHARSET_DONE_BASE)-sbcs $(CHARSET_TEMPLATES) $(BUILD_TOOLS_JDK) 
-	$(TOOL_CHARSETMAPPING) $(CHARSET_DATA_DIR) $(CHARSET_GENSRC_JAVA_DIR_CS) extsbcs
-	$(TOUCH) '$@'
+GENSRC_JAVA_BASE += $(CHARSET_DONE_BASE)-sbcs
 
-$(CHARSET_DONE_CS)-dbcs: $(CHARSET_DATA_DIR)/dbcs \
-    $(CHARSET_DONE_BASE)-sbcs $(CHARSET_TEMPLATES) $(BUILD_TOOLS_JDK) 
-	$(TOOL_CHARSETMAPPING) $(CHARSET_DATA_DIR) $(CHARSET_GENSRC_JAVA_DIR_CS) dbcs
-	$(TOUCH) '$@'
-
-$(CHARSET_DONE_CS)-hkscs: $(CHARSET_COPYRIGHT_HEADER_BASE)/HKSCS.java \
-    $(CHARSET_DONE_BASE)-sbcs $(BUILD_TOOLS_JDK)
-	$(TOOL_CHARSETMAPPING) $(CHARSET_DATA_DIR) $(CHARSET_GENSRC_JAVA_DIR_CS) hkscs '$<'
-	$(TOUCH) '$@'
-
-$(CHARSET_DONE_CS)-euctw: $(CHARSET_COPYRIGHT_HEADER_BASE)/EUC_TW.java \
-    $(CHARSET_DONE_BASE)-sbcs $(BUILD_TOOLS_JDK)
-	$(TOOL_CHARSETMAPPING) $(CHARSET_DATA_DIR) $(CHARSET_GENSRC_JAVA_DIR_CS) euctw '$<'
-	$(TOUCH) '$@'
-
-$(CHARSET_GENSRC_JAVA_DIR_CS)/sjis0213.dat: $(CHARSET_DATA_DIR)/sjis0213.map \
-    $(CHARSET_DONE_BASE)-sbcs $(BUILD_TOOLS_JDK)
-	$(TOOL_CHARSETMAPPING) '$<' '$@' sjis0213
-
-GENSRC_JAVA_BASE += $(CHARSET_DONE_BASE)-sbcs
-GENSRC_JDK_CHARSETS += \
-    $(CHARSET_DONE_CS)-extsbcs \
-    $(CHARSET_DONE_CS)-dbcs \
-    $(CHARSET_DONE_CS)-hkscs \
-    $(CHARSET_DONE_CS)-euctw \
-    $(CHARSET_GENSRC_JAVA_DIR_CS)/sjis0213.dat \
-    #
-
-###
-### Generate the sun/nio/cs/StandardCharsets.java file
-###
-
+################################################################################
+#
+# Generate the sun/nio/cs/StandardCharsets.java file
+#
 CHARSET_STANDARD_GENSRC_DIR := $(JDK_OUTPUTDIR)/gensrc/standardcharsets
 CHARSET_STANDARD_DATA := $(CHARSET_DATA_DIR)/standard-charsets
 CHARSET_STANDARD_JAVA :=  sun/nio/cs/StandardCharsets.java
--- a/make/gensrc/GensrcJDWP.gmk	Thu Sep 25 12:40:26 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-#
-# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Translate the Java debugger wire protocol (jdwp.spec) file into a JDWP.java file
-# and a JDWPCommands.h C-header file.
-
-JDWP_SPEC_FILE := $(JDK_TOPDIR)/make/data/jdwp/jdwp.spec
-
-$(JDK_OUTPUTDIR)/gensrc_jdwp_headers/JDWPCommands.h: $(JDWP_SPEC_FILE)
-
-$(JDK_OUTPUTDIR)/gensrc/jdk.jdi/com/sun/tools/jdi/JDWP.java: \
-    $(JDWP_SPEC_FILE) $(BUILD_TOOLS_JDK)
-	$(MKDIR) -p $(@D)
-	$(MKDIR) -p $(JDK_OUTPUTDIR)/gensrc_jdwp_headers
-	$(RM) $@ $(JDK_OUTPUTDIR)/gensrc_jdwp_headers/JDWPCommands.h
-	$(ECHO) $(LOG_INFO) Creating JDWP.java and JDWPCommands.h from jdwp.spec
-	$(TOOL_JDWPGEN) $< -jdi $@ -include $(JDK_OUTPUTDIR)/gensrc_jdwp_headers/JDWPCommands.h
-
-$(JDK_OUTPUTDIR)/gensrc_jdwp_doc/jdwp-protocol.html: $(JDWP_SPEC_FILE) \
-    $(BUILD_TOOLS_JDK)
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(ECHO) $(LOG_INFO) Creating $(@F) from jdwp.spec
-	$(TOOL_JDWPGEN) $< -doc $@
-
-GENSRC_JDWP := $(JDK_OUTPUTDIR)/gensrc/jdk.jdi/com/sun/tools/jdi/JDWP.java \
-    $(JDK_OUTPUTDIR)/gensrc_jdwp_headers/JDWPCommands.h \
-    $(JDK_OUTPUTDIR)/gensrc_jdwp_doc/jdwp-protocol.html
-GENSRC_JDK_JDI += $(GENSRC_JDWP)
--- a/make/gensrc/GensrcProviders.gmk	Thu Sep 25 12:40:26 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-#
-# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-################################################################################
-
-define process-provider
-	$(MKDIR) -p $(@D)
-	$(CAT) $^ | $(SED) -e "s/^#\[$(OPENJDK_TARGET_OS)\]//" > $@
-endef
-
-################################################################################
-
-# Filter com.sun.jdi.connect.Connector
-$(JDK_OUTPUTDIR)/gensrc/jdk.jdi/META-INF/services/com.sun.jdi.connect.Connector: \
-    $(JDK_TOPDIR)/src/jdk.jdi/share/classes/META-INF/services/com.sun.jdi.connect.Connector
-	$(process-provider)
-
-GENSRC_JDK_JDI += $(JDK_OUTPUTDIR)/gensrc/jdk.jdi/META-INF/services/com.sun.jdi.connect.Connector
-
-################################################################################
--- a/make/gensrc/GensrcX11Wrappers.gmk	Thu Sep 25 12:40:26 2014 -0700
+++ b/make/gensrc/GensrcX11Wrappers.gmk	Thu Sep 25 16:20:38 2014 -0700
@@ -96,9 +96,9 @@
       -I$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_EXPORT_DIR)/native/include \
       -I$(JDK_TOPDIR)/src/java.base/share/native/libjava \
       -I$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_API_DIR)/native/libjava \
-      -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/common/sun/awt \
-      -I$(JDK_TOPDIR)/src/java.desktop/share/native/common/sun/awt/debug \
-      -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/sun/awt/image/cvutils \
+      -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/common/awt \
+      -I$(JDK_TOPDIR)/src/java.desktop/share/native/common/awt/debug \
+      -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/awt/image/cvutils \
       #
 
   # Compile the C code into an executable.
--- a/make/lib/Awt2dLibraries.gmk	Thu Sep 25 12:40:26 2014 -0700
+++ b/make/lib/Awt2dLibraries.gmk	Thu Sep 25 16:20:38 2014 -0700
@@ -28,7 +28,7 @@
 ################################################################################
 
 BUILD_LIBMLIB_SRC := $(JDK_TOPDIR)/src/java.desktop/share/native/libmlib_image \
-    $(JDK_TOPDIR)/src/java.desktop/share/native/common/sun/awt/medialib
+    $(JDK_TOPDIR)/src/java.desktop/share/native/common/awt/medialib
 BUILD_LIBMLIB_CFLAGS := -D__USE_J2D_NAMES -D__MEDIALIB_OLD_NAMES \
     $(addprefix -I, $(BUILD_LIBMLIB_SRC)) \
     -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/libmlib_image
@@ -79,8 +79,8 @@
 
   LIBMLIB_IMAGE_V_SRC := $(JDK_TOPDIR)/src/java.desktop/share/native/libmlib_image \
       $(JDK_TOPDIR)/src/java.desktop/unix/native/libmlib_image \
-      $(JDK_TOPDIR)/src/java.desktop/share/native/common/sun/awt/medialib \
-      $(JDK_TOPDIR)/src/java.desktop/unix/native/common/sun/awt/medialib \
+      $(JDK_TOPDIR)/src/java.desktop/share/native/common/awt/medialib \
+      $(JDK_TOPDIR)/src/java.desktop/unix/native/common/awt/medialib \
       #
   LIBMLIB_IMAGE_V_CFLAGS := $(JDK_TOPDIR)/src/java.desktop/unix/native/libmlib_image/vis_$(OPENJDK_TARGET_CPU_BITS).il \
       $(addprefix -I, $(LIBMLIB_IMAGE_V_SRC)) \
@@ -145,8 +145,8 @@
 
 LIBAWT_DIRS := $(JDK_TOPDIR)/src/java.desktop/share/native/libawt \
     $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/libawt \
-    $(JDK_TOPDIR)/src/java.desktop/share/native/common/sun/awt/debug \
-    $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/common/sun/awt \
+    $(JDK_TOPDIR)/src/java.desktop/share/native/common/awt/debug \
+    $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/common/awt \
     #
 
 ifeq ($(OPENJDK_TARGET_OS), aix)
@@ -154,9 +154,9 @@
 endif
 
 ifeq ($(OPENJDK_TARGET_OS), windows)
-  LIBAWT_DIRS += $(JDK_TOPDIR)/src/java.desktop/share/native/common/sun/awt/utility
+  LIBAWT_DIRS += $(JDK_TOPDIR)/src/java.desktop/share/native/common/awt/utility
 else
-  LIBAWT_EXFILES := sun/java2d/ShaderList.c
+  LIBAWT_EXFILES := java2d/ShaderList.c
 endif
 
 ifneq ($(filter $(OPENJDK_TARGET_OS), solaris linux macosx aix), )
@@ -164,7 +164,7 @@
 endif
 
 ifeq ($(OPENJDK_TARGET_OS), macosx)
-  LIBAWT_EXFILES += initIDs.c sun/awt/image/cvutils/img_colors.c
+  LIBAWT_EXFILES += initIDs.c awt/image/cvutils/img_colors.c
 endif
 
 LIBAWT_CFLAGS += -I$(JDK_OUTPUTDIR)/gensrc_headers/java.desktop \
@@ -183,8 +183,8 @@
   LIBAWT_CFLAGS += -xarch=sparcvis
 
   LIBAWT_CFLAGS += $(JDK_TOPDIR)/src/java.desktop/unix/native/libmlib_image/vis_$(OPENJDK_TARGET_CPU_BITS).il
-  LIBAWT_DIRS += $(JDK_TOPDIR)/src/java.desktop/share/native/common/sun/awt/medialib
-  LIBAWT_EXFILES += sun/java2d/loops/MapAccelFunc.c
+  LIBAWT_DIRS += $(JDK_TOPDIR)/src/java.desktop/share/native/common/awt/medialib
+  LIBAWT_EXFILES += java2d/loops/MapAccelFunc.c
 
   ifeq ($(OPENJDK_TARGET_CPU), sparcv9)
     LIBAWT_ASFLAGS = -P -xarch=v9a
@@ -193,9 +193,9 @@
   endif
 else
   LIBAWT_EXCLUDES += \
-      $(JDK_TOPDIR)/src/java.desktop/unix/native/libawt/sun/awt/medialib \
-      $(JDK_TOPDIR)/src/java.desktop/unix/native/libawt/sun/java2d/loops \
-      $(JDK_TOPDIR)/src/java.desktop/unix/native/common/sun/awt/medialib \
+      $(JDK_TOPDIR)/src/java.desktop/unix/native/libawt/awt/medialib \
+      $(JDK_TOPDIR)/src/java.desktop/unix/native/libawt/java2d/loops \
+      $(JDK_TOPDIR)/src/java.desktop/unix/native/common/awt/medialib \
       #
 endif
 
@@ -206,19 +206,19 @@
 LIBAWT_LANG := C
 
 ifeq ($(OPENJDK_TARGET_OS), windows)
-  LIBAWT_DIRS += $(JDK_TOPDIR)/src/java.desktop/share/native/common/sun/font \
-      $(JDK_TOPDIR)/src/java.desktop/share/native/common/sun/java2d/opengl \
+  LIBAWT_DIRS += $(JDK_TOPDIR)/src/java.desktop/share/native/common/font \
+      $(JDK_TOPDIR)/src/java.desktop/share/native/common/java2d/opengl \
   # Why does libawt need java.base headers?
-  LIBAWT_CFLAGS += -I$(JDK_TOPDIR)/src/java.desktop/share/native/common/sun/font \
-      -I$(JDK_TOPDIR)/src/java.desktop/share/native/common/sun/java2d/opengl \
-      -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/common/sun/java2d/opengl \
+  LIBAWT_CFLAGS += -I$(JDK_TOPDIR)/src/java.desktop/share/native/common/font \
+      -I$(JDK_TOPDIR)/src/java.desktop/share/native/common/java2d/opengl \
+      -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/common/java2d/opengl \
       -I$(JDK_TOPDIR)/src/java.desktop/windows/native/include \
       -I$(JDK_TOPDIR)/src/java.desktop/share/native/include \
       -I$(JDK_OUTPUTDIR)/gensrc_headers/java.base \
       #
   LIBAWT_EXFILES += \
-      sun/java2d/d3d/D3DShaderGen.c \
-      sun/awt/image/cvutils/img_colors.c \
+      java2d/d3d/D3DShaderGen.c \
+      awt/image/cvutils/img_colors.c \
       #
 
   LIBAWT_LANG := C++
@@ -232,7 +232,7 @@
   else
     LIBAWT_RC_FLAGS := -i "$(JDK_TOPDIR)/src/closed/java.base/windows/native/launcher/icons"
   endif
-  LIBAWT_VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/java.desktop/windows/native/libawt/sun/windows/awt.rc
+  LIBAWT_VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/java.desktop/windows/native/libawt/windows/awt.rc
 endif
 
 ifeq ($(MILESTONE), internal)
@@ -300,13 +300,13 @@
     LIBAWT_XAWT_DIRS := \
         $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/libawt_xawt \
         $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/libjawt \
-        $(JDK_TOPDIR)/src/java.desktop/share/native/common/sun/awt/debug \
-        $(JDK_TOPDIR)/src/java.desktop/share/native/common/sun/awt/utility \
-        $(JDK_TOPDIR)/src/java.desktop/share/native/common/sun/font \
-        $(JDK_TOPDIR)/src/java.desktop/share/native/common/sun/java2d/opengl \
-        $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/common/sun/java2d/opengl \
-        $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/common/sun/java2d/x11 \
-        $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/common/sun/awt \
+        $(JDK_TOPDIR)/src/java.desktop/share/native/common/awt/debug \
+        $(JDK_TOPDIR)/src/java.desktop/share/native/common/awt/utility \
+        $(JDK_TOPDIR)/src/java.desktop/share/native/common/font \
+        $(JDK_TOPDIR)/src/java.desktop/share/native/common/java2d/opengl \
+        $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/common/java2d/opengl \
+        $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/common/java2d/x11 \
+        $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/common/awt \
         #
 
     LIBAWT_XAWT_EXCLUDES := medialib
@@ -316,14 +316,14 @@
         -I$(JDK_TOPDIR)/src/java.desktop/share/native/include \
         -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS)/native/include \
         -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/include \
-        -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/sun/java2d \
-        -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/libawt/sun/java2d \
-        -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/sun/java2d/loops \
-        -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/sun/java2d/pipe \
-        -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/sun/awt/image/cvutils \
-        -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/sun/awt/image \
+        -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/java2d \
+        -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/libawt/java2d \
+        -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/java2d/loops \
+        -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/java2d/pipe \
+        -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/awt/image/cvutils \
+        -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/awt/image \
         -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/libsunwjdga \
-        -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/common/sun/font \
+        -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/common/font \
         $(LIBJAVA_HEADER_FLAGS)
         #
 
@@ -388,8 +388,8 @@
 
 LIBLCMS_SRC := $(JDK_TOPDIR)/src/java.desktop/share/native/liblcms
 LIBLCMS_CPPFLAGS += -I$(JDK_OUTPUTDIR)/gensrc_headers/java.desktop \
-    -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/sun/java2d \
-    -I$(JDK_TOPDIR)/src/java.desktop/share/native/common/sun/awt/debug \
+    -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/java2d \
+    -I$(JDK_TOPDIR)/src/java.desktop/share/native/common/awt/debug \
     $(LIBJAVA_HEADER_FLAGS) \
     #
 
@@ -542,7 +542,7 @@
   LIBFONTMANAGER_EXCLUDE_FILES += X11FontScaler.c \
       X11TextRenderer.c
   LIBFONTMANAGER_OPTIMIZATION := HIGHEST
-  LIBFONTMANAGER_CFLAGS += -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/libawt/sun/windows
+  LIBFONTMANAGER_CFLAGS += -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/libawt/windows
 else ifeq ($(OPENJDK_TARGET_OS), macosx)
   LIBFONTMANAGER_EXCLUDE_FILES += X11FontScaler.c \
       X11TextRenderer.c \
@@ -607,11 +607,11 @@
 
 ifeq ($(OPENJDK_TARGET_OS), windows)
   LIBJAWT_SRC := $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/libjawt
-  LIBJAWT_CFLAGS := -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/libawt/sun/windows \
-      -I$(JDK_TOPDIR)/src/java.desktop/share/native/common/sun/awt/debug \
-      -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/sun/java2d \
-      -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/sun/awt/image/cvutils \
-      -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/libawt/sun/java2d/windows \
+  LIBJAWT_CFLAGS := -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/libawt/windows \
+      -I$(JDK_TOPDIR)/src/java.desktop/share/native/common/awt/debug \
+      -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/java2d \
+      -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/awt/image/cvutils \
+      -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/libawt/java2d/windows \
       -I$(JDK_OUTPUTDIR)/gensrc_headers/java.desktop \
       -I$(JDK_TOPDIR)/src/java.desktop/windows/native/include \
       -I$(JDK_TOPDIR)/src/java.desktop/share/native/include \
@@ -658,7 +658,7 @@
     LIBJAWT_SRC := $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/libjawt
   endif
   LIBJAWT_CFLAGS := \
-      -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/common/sun/awt \
+      -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/common/awt \
       -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS)/native/include \
       -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/include \
       -I$(JDK_TOPDIR)/src/java.desktop/share/native/include \
@@ -723,30 +723,29 @@
   # Mac and Windows only use the native AWT lib, do not build libawt_headless
   ifeq ($(findstring $(OPENJDK_TARGET_OS), windows macosx),)
 
-    LIBAWT_HEADLESS_DIRS := $(JDK_TOPDIR)/src/java.desktop/unix/native/libawt_headless/sun/awt \
-        $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/common/sun/awt \
-        $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/common/sun/java2d/opengl \
-        $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/common/sun/java2d/x11 \
-        $(JDK_TOPDIR)/src/java.desktop/share/native/common/sun/java2d/opengl \
-        $(JDK_TOPDIR)/src/java.desktop/share/native/common/sun/font \
+    LIBAWT_HEADLESS_DIRS := $(JDK_TOPDIR)/src/java.desktop/unix/native/libawt_headless/awt \
+        $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/common/awt \
+        $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/common/java2d/opengl \
+        $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/common/java2d/x11 \
+        $(JDK_TOPDIR)/src/java.desktop/share/native/common/java2d/opengl \
+        $(JDK_TOPDIR)/src/java.desktop/share/native/common/font \
         #
 
     LIBAWT_HEADLESS_EXCLUDES := medialib
     LIBAWT_HEADLESS_CFLAGS := -I$(JDK_OUTPUTDIR)/gensrc_headers/java.desktop \
         $(addprefix -I, $(LIBAWT_HEADLESS_DIRS)) \
-        -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/sun/java2d \
-        -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/sun/java2d/loops \
-        -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/sun/awt/image/cvutils \
-        -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/sun/java2d/pipe \
-        -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/sun/awt/image \
-        -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/libawt/sun/java2d \
-        -I$(JDK_TOPDIR)/src/java.desktop/share/native/common/sun/font \
-        -I$(JDK_TOPDIR)/src/java.desktop/share/native/common/sun/awt/debug \
-        -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/common/sun/font \
+        -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/java2d \
+        -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/java2d/loops \
+        -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/awt/image/cvutils \
+        -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/java2d/pipe \
+        -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/awt/image \
+        -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/libawt/java2d \
+        -I$(JDK_TOPDIR)/src/java.desktop/share/native/common/font \
+        -I$(JDK_TOPDIR)/src/java.desktop/share/native/common/awt/debug \
+        -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/common/font \
         -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/libsunwjdga/ \
         $(LIBJAVA_HEADER_FLAGS) \
         #
-    LIBAWT_HEADLESS_EXFILES := initIDs.c
 
     LIBAWT_HEADLESS_REORDER :=
     ifeq ($(OPENJDK_TARGET_OS), solaris)
@@ -759,7 +758,6 @@
         LIBRARY := awt_headless, \
         OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
         SRC := $(LIBAWT_HEADLESS_DIRS), \
-        EXCLUDE_FILES := $(LIBAWT_HEADLESS_EXFILES), \
         EXCLUDES := $(LIBAWT_HEADLESS_EXCLUDES), \
         LANG := C, \
         OPTIMIZATION := LOW, \
@@ -904,9 +902,9 @@
 
   LIBAWT_LWAWT_DIRS := \
       $(JDK_TOPDIR)/src/java.desktop/macosx/native/libawt_lwawt \
-      $(JDK_TOPDIR)/src/java.desktop/unix/native/common/sun/awt \
-      $(JDK_TOPDIR)/src/java.desktop/share/native/common/sun/font \
-      $(JDK_TOPDIR)/src/java.desktop/share/native/common/sun/java2d/opengl \
+      $(JDK_TOPDIR)/src/java.desktop/unix/native/common/awt \
+      $(JDK_TOPDIR)/src/java.desktop/share/native/common/font \
+      $(JDK_TOPDIR)/src/java.desktop/share/native/common/java2d/opengl \
       #
 
   LIBAWT_LWAWT_CFLAGS := \
@@ -914,24 +912,24 @@
       -I$(JDK_OUTPUTDIR)/gensrc_headers/java.desktop \
       -I$(JDK_TOPDIR)/src/java.desktop/macosx/native/include \
       -I$(JDK_TOPDIR)/src/java.desktop/share/native/include \
-      -I$(JDK_TOPDIR)/src/java.desktop/macosx/native/libawt_lwawt/sun/java2d/opengl \
-      -I$(JDK_TOPDIR)/src/java.desktop/macosx/native/libawt_lwawt/sun/awt \
-      -I$(JDK_TOPDIR)/src/java.desktop/unix/native/libawt_xawt/sun/awt \
-      -I$(JDK_TOPDIR)/src/java.desktop/macosx/native/libawt_lwawt/sun/font \
-      -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/sun/awt/image \
-      -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/sun/java2d \
-      -I$(JDK_TOPDIR)/src/java.desktop/unix/native/libawt/sun/java2d \
+      -I$(JDK_TOPDIR)/src/java.desktop/macosx/native/libawt_lwawt/java2d/opengl \
+      -I$(JDK_TOPDIR)/src/java.desktop/macosx/native/libawt_lwawt/awt \
+      -I$(JDK_TOPDIR)/src/java.desktop/unix/native/libawt_xawt/awt \
+      -I$(JDK_TOPDIR)/src/java.desktop/macosx/native/libawt_lwawt/font \
+      -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/awt/image \
+      -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/java2d \
+      -I$(JDK_TOPDIR)/src/java.desktop/unix/native/libawt/java2d \
       -I$(JDK_TOPDIR)/src/java.desktop/share/native/libmlib_image/ \
-      -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/sun/awt/image/cvutils \
-      -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/sun/java2d/loops \
-      -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/sun/java2d/pipe \
-      -I$(JDK_TOPDIR)/src/java.desktop/share/native/common/sun/awt/debug \
+      -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/awt/image/cvutils \
+      -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/java2d/loops \
+      -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/java2d/pipe \
+      -I$(JDK_TOPDIR)/src/java.desktop/share/native/common/awt/debug \
       -I$(JDK_TOPDIR)/src/java.desktop/macosx/native/libosxapp \
       $(LIBJAVA_HEADER_FLAGS) \
       #
 
-  LIBAWT_LWAWT_EXFILES := fontpath.c awt_Font.c X11Color.c initIDs.c
-  LIBAWT_LWAWT_EXCLUDES := $(JDK_TOPDIR)/src/java.desktop/unix/native/common/sun/awt/medialib
+  LIBAWT_LWAWT_EXFILES := fontpath.c awt_Font.c X11Color.c
+  LIBAWT_LWAWT_EXCLUDES := $(JDK_TOPDIR)/src/java.desktop/unix/native/common/awt/medialib
 
   $(eval $(call SetupNativeCompilation,BUILD_LIBAWT_LWAWT, \
       LIBRARY := awt_lwawt, \
@@ -987,7 +985,7 @@
       OPTIMIZATION := LOW, \
       CFLAGS := $(CFLAGS_JDKLIB) \
           -I$(JDK_TOPDIR)/src/java.desktop/macosx/native/libosxui \
-          -I$(JDK_TOPDIR)/src/java.desktop/macosx/native/libawt_lwawt/sun/awt \
+          -I$(JDK_TOPDIR)/src/java.desktop/macosx/native/libawt_lwawt/awt \
           -I$(JDK_TOPDIR)/src/java.desktop/macosx/native/libosxapp \
           -I$(JDK_TOPDIR)/src/java.base/share/native/libjava \
           -I$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_API_DIR)/native/libjava \
--- a/src/demo/share/README	Thu Sep 25 12:40:26 2014 -0700
+++ b/src/demo/share/README	Thu Sep 25 16:20:38 2014 -0700
@@ -4,3 +4,12 @@
 production-quality application, such as security checks, input
 validation, and proper error handling, might not be present in the
 sample code.
+
+In some cases, the default security settings may block an execution
+of demo applets in a browser. To adjust the security settings, please
+refer to the following resource:
+
+http://java.com/en/download/help/java_blocked.xml
+
+Some demo applets need to be accessed through the HTTP or HTTPS
+protocols to enable access to the required resources.
--- a/src/java.base/share/classes/java/lang/Math.java	Thu Sep 25 12:40:26 2014 -0700
+++ b/src/java.base/share/classes/java/lang/Math.java	Thu Sep 25 16:20:38 2014 -0700
@@ -123,6 +123,18 @@
     public static final double PI = 3.14159265358979323846;
 
     /**
+     * Constant by which to multiply an angular value in degrees to obtain an
+     * angular value in radians.
+     */
+    private static final double DEGREES_TO_RADIANS = 0.017453292519943295;
+
+    /**
+     * Constant by which to multiply an angular value in radians to obtain an
+     * angular value in degrees.
+     */
+    private static final double RADIANS_TO_DEGREES = 57.29577951308232;
+
+    /**
      * Returns the trigonometric sine of an angle.  Special cases:
      * <ul><li>If the argument is NaN or an infinity, then the
      * result is NaN.
@@ -233,7 +245,7 @@
      * @since   1.2
      */
     public static double toRadians(double angdeg) {
-        return angdeg / 180.0 * PI;
+        return angdeg * DEGREES_TO_RADIANS;
     }
 
     /**
@@ -249,7 +261,7 @@
      * @since   1.2
      */
     public static double toDegrees(double angrad) {
-        return angrad * 180.0 / PI;
+        return angrad * RADIANS_TO_DEGREES;
     }
 
     /**
--- a/src/java.base/share/classes/java/lang/StrictMath.java	Thu Sep 25 12:40:26 2014 -0700
+++ b/src/java.base/share/classes/java/lang/StrictMath.java	Thu Sep 25 16:20:38 2014 -0700
@@ -98,6 +98,19 @@
     public static final double PI = 3.14159265358979323846;
 
     /**
+     * Constant by which to multiply an angular value in degrees to obtain an
+     * angular value in radians.
+     */
+    private static final double DEGREES_TO_RADIANS = 0.017453292519943295;
+
+    /**
+     * Constant by which to multiply an angular value in radians to obtain an
+     * angular value in degrees.
+     */
+
+    private static final double RADIANS_TO_DEGREES = 57.29577951308232;
+
+    /**
      * Returns the trigonometric sine of an angle. Special cases:
      * <ul><li>If the argument is NaN or an infinity, then the
      * result is NaN.
@@ -179,7 +192,7 @@
     public static strictfp double toRadians(double angdeg) {
         // Do not delegate to Math.toRadians(angdeg) because
         // this method has the strictfp modifier.
-        return angdeg / 180.0 * PI;
+        return angdeg * DEGREES_TO_RADIANS;
     }
 
     /**
@@ -196,7 +209,7 @@
     public static strictfp double toDegrees(double angrad) {
         // Do not delegate to Math.toDegrees(angrad) because
         // this method has the strictfp modifier.
-        return angrad * 180.0 / PI;
+        return angrad * RADIANS_TO_DEGREES;
     }
 
     /**
--- a/src/java.base/share/classes/java/lang/String.java	Thu Sep 25 12:40:26 2014 -0700
+++ b/src/java.base/share/classes/java/lang/String.java	Thu Sep 25 16:20:38 2014 -0700
@@ -1451,11 +1451,9 @@
      */
     public int hashCode() {
         int h = hash;
-        if (h == 0 && value.length > 0) {
-            char val[] = value;
-
-            for (int i = 0; i < value.length; i++) {
-                h = 31 * h + val[i];
+        if (h == 0) {
+            for (char v : value) {
+                h = 31 * h + v;
             }
             hash = h;
         }
--- a/src/java.base/share/classes/java/net/CookieManager.java	Thu Sep 25 12:40:26 2014 -0700
+++ b/src/java.base/share/classes/java/net/CookieManager.java	Thu Sep 25 16:20:38 2014 -0700
@@ -368,7 +368,7 @@
         int val = -1;
         while (i > 0) {
             try {
-                val = Integer.parseInt(lst.substring(0, i));
+                val = Integer.parseInt(lst, 0, i, 10);
                 if (val == port) {
                     return true;
                 }
--- a/src/java.base/share/classes/java/net/URI.java	Thu Sep 25 12:40:26 2014 -0700
+++ b/src/java.base/share/classes/java/net/URI.java	Thu Sep 25 16:20:38 2014 -0700
@@ -3250,7 +3250,7 @@
                 if (q > p) {
                     checkChars(p, q, L_DIGIT, H_DIGIT, "port number");
                     try {
-                        port = Integer.parseInt(substring(p, q));
+                        port = Integer.parseInt(input, p, q, 10);
                     } catch (NumberFormatException x) {
                         fail("Malformed port number", p);
                     }
@@ -3271,7 +3271,7 @@
             int p = start;
             int q = scan(p, n, L_DIGIT, H_DIGIT);
             if (q <= p) return q;
-            if (Integer.parseInt(substring(p, q)) > 255) return p;
+            if (Integer.parseInt(input, p, q, 10) > 255) return p;
             return q;
         }
 
--- a/src/java.base/share/classes/java/net/URLDecoder.java	Thu Sep 25 12:40:26 2014 -0700
+++ b/src/java.base/share/classes/java/net/URLDecoder.java	Thu Sep 25 16:20:38 2014 -0700
@@ -171,7 +171,7 @@
 
                     while ( ((i+2) < numChars) &&
                             (c=='%')) {
-                        int v = Integer.parseInt(s.substring(i+1,i+3),16);
+                        int v = Integer.parseInt(s, i + 1, i + 3, 16);
                         if (v < 0)
                             throw new IllegalArgumentException("URLDecoder: Illegal hex characters in escape (%) pattern - negative value");
                         bytes[pos++] = (byte) v;
--- a/src/java.base/share/classes/java/net/URLStreamHandler.java	Thu Sep 25 12:40:26 2014 -0700
+++ b/src/java.base/share/classes/java/net/URLStreamHandler.java	Thu Sep 25 16:20:38 2014 -0700
@@ -196,7 +196,8 @@
                                 ++ind ;
                                 // port can be null according to RFC2396
                                 if (nhost.length() > (ind + 1)) {
-                                    port = Integer.parseInt(nhost.substring(ind+1));
+                                    port = Integer.parseInt(nhost, ind + 1,
+                                        nhost.length(), 10);
                                 }
                             } else {
                                 throw new IllegalArgumentException(
@@ -213,7 +214,8 @@
                     if (ind >= 0) {
                         // port can be null according to RFC2396
                         if (host.length() > (ind + 1)) {
-                            port = Integer.parseInt(host.substring(ind + 1));
+                            port = Integer.parseInt(host, ind + 1,
+                                    host.length(), 10);
                         }
                         host = host.substring(0, ind);
                     }
--- a/src/java.base/share/classes/java/security/KeyPairGenerator.java	Thu Sep 25 12:40:26 2014 -0700
+++ b/src/java.base/share/classes/java/security/KeyPairGenerator.java	Thu Sep 25 16:20:38 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,6 +33,7 @@
 
 import sun.security.jca.*;
 import sun.security.jca.GetInstance.Instance;
+import sun.security.util.Debug;
 
 /**
  * The KeyPairGenerator class is used to generate pairs of
@@ -126,6 +127,11 @@
 
 public abstract class KeyPairGenerator extends KeyPairGeneratorSpi {
 
+    private static final Debug pdebug =
+                        Debug.getInstance("provider", "Provider");
+    private static final boolean skipDebug =
+        Debug.isOn("engine=") && !Debug.isOn("keypairgenerator");
+
     private final String algorithm;
 
     // The provider
@@ -167,6 +173,12 @@
             kpg = new Delegate(spi, algorithm);
         }
         kpg.provider = instance.provider;
+
+        if (!skipDebug && pdebug != null) {
+            pdebug.println("KeyPairGenerator." + algorithm +
+                " algorithm from: " + kpg.provider.getName());
+        }
+
         return kpg;
     }
 
@@ -557,6 +569,11 @@
             provider = instance.provider;
             this.serviceIterator = serviceIterator;
             initType = I_NONE;
+
+            if (!skipDebug && pdebug != null) {
+                pdebug.println("KeyPairGenerator." + algorithm +
+                    " algorithm from: " + provider.getName());
+            }
         }
 
         /**
--- a/src/java.base/share/classes/java/security/KeyStore.java	Thu Sep 25 12:40:26 2014 -0700
+++ b/src/java.base/share/classes/java/security/KeyStore.java	Thu Sep 25 16:20:38 2014 -0700
@@ -37,6 +37,8 @@
 import javax.security.auth.DestroyFailedException;
 import javax.security.auth.callback.*;
 
+import sun.security.util.Debug;
+
 /**
  * This class represents a storage facility for cryptographic
  * keys and certificates.
@@ -177,6 +179,11 @@
 
 public class KeyStore {
 
+    private static final Debug pdebug =
+                        Debug.getInstance("provider", "Provider");
+    private static final boolean skipDebug =
+        Debug.isOn("engine=") && !Debug.isOn("keystore");
+
     /*
      * Constant to lookup in the Security properties file to determine
      * the default keystore type.
@@ -801,6 +808,11 @@
         this.keyStoreSpi = keyStoreSpi;
         this.provider = provider;
         this.type = type;
+
+        if (!skipDebug && pdebug != null) {
+            pdebug.println("KeyStore." + type.toUpperCase() + " type from: " +
+                this.provider.getName());
+        }
     }
 
     /**
--- a/src/java.base/share/classes/java/security/MessageDigest.java	Thu Sep 25 12:40:26 2014 -0700
+++ b/src/java.base/share/classes/java/security/MessageDigest.java	Thu Sep 25 16:20:38 2014 -0700
@@ -35,6 +35,8 @@
 
 import java.nio.ByteBuffer;
 
+import sun.security.util.Debug;
+
 /**
  * This MessageDigest class provides applications the functionality of a
  * message digest algorithm, such as SHA-1 or SHA-256.
@@ -103,6 +105,11 @@
 
 public abstract class MessageDigest extends MessageDigestSpi {
 
+    private static final Debug pdebug =
+                        Debug.getInstance("provider", "Provider");
+    private static final boolean skipDebug =
+        Debug.isOn("engine=") && !Debug.isOn("messagedigest");
+
     private String algorithm;
 
     // The state of this digest
@@ -156,18 +163,23 @@
     public static MessageDigest getInstance(String algorithm)
     throws NoSuchAlgorithmException {
         try {
+            MessageDigest md;
             Object[] objs = Security.getImpl(algorithm, "MessageDigest",
                                              (String)null);
             if (objs[0] instanceof MessageDigest) {
-                MessageDigest md = (MessageDigest)objs[0];
-                md.provider = (Provider)objs[1];
-                return md;
+                md = (MessageDigest)objs[0];
             } else {
-                MessageDigest delegate =
-                    new Delegate((MessageDigestSpi)objs[0], algorithm);
-                delegate.provider = (Provider)objs[1];
-                return delegate;
+                md = new Delegate((MessageDigestSpi)objs[0], algorithm);
             }
+            md.provider = (Provider)objs[1];
+
+            if (!skipDebug && pdebug != null) {
+                pdebug.println("MessageDigest." + algorithm +
+                    " algorithm from: " + md.provider.getName());
+            }
+
+            return md;
+
         } catch(NoSuchProviderException e) {
             throw new NoSuchAlgorithmException(algorithm + " not found");
         }
--- a/src/java.base/share/classes/java/security/SecureRandom.java	Thu Sep 25 12:40:26 2014 -0700
+++ b/src/java.base/share/classes/java/security/SecureRandom.java	Thu Sep 25 16:20:38 2014 -0700
@@ -32,6 +32,7 @@
 
 import sun.security.jca.*;
 import sun.security.jca.GetInstance.Instance;
+import sun.security.util.Debug;
 
 /**
  * This class provides a cryptographically strong random number
@@ -93,6 +94,11 @@
 
 public class SecureRandom extends java.util.Random {
 
+    private static final Debug pdebug =
+                        Debug.getInstance("provider", "Provider");
+    private static final boolean skipDebug =
+        Debug.isOn("engine=") && !Debug.isOn("securerandom");
+
     /**
      * The provider.
      *
@@ -235,6 +241,11 @@
         this.secureRandomSpi = secureRandomSpi;
         this.provider = provider;
         this.algorithm = algorithm;
+
+        if (!skipDebug && pdebug != null) {
+            pdebug.println("SecureRandom." + algorithm +
+                " algorithm from: " + this.provider.getName());
+        }
     }
 
     /**
--- a/src/java.base/share/classes/java/security/Signature.java	Thu Sep 25 12:40:26 2014 -0700
+++ b/src/java.base/share/classes/java/security/Signature.java	Thu Sep 25 16:20:38 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -121,6 +121,11 @@
     private static final Debug debug =
                         Debug.getInstance("jca", "Signature");
 
+    private static final Debug pdebug =
+                        Debug.getInstance("provider", "Provider");
+    private static final boolean skipDebug =
+        Debug.isOn("engine=") && !Debug.isOn("signature");
+
     /*
      * The algorithm for this signature object.
      * This value is used to map an OID to the particular algorithm.
@@ -451,6 +456,11 @@
             throws InvalidKeyException {
         engineInitVerify(publicKey);
         state = VERIFY;
+
+        if (!skipDebug && pdebug != null) {
+            pdebug.println("Signature." + algorithm +
+                " verification algorithm from: " + this.provider.getName());
+        }
     }
 
     /**
@@ -495,6 +505,11 @@
         PublicKey publicKey = certificate.getPublicKey();
         engineInitVerify(publicKey);
         state = VERIFY;
+
+        if (!skipDebug && pdebug != null) {
+            pdebug.println("Signature." + algorithm +
+                " verification algorithm from: " + this.provider.getName());
+        }
     }
 
     /**
@@ -511,6 +526,11 @@
             throws InvalidKeyException {
         engineInitSign(privateKey);
         state = SIGN;
+
+        if (!skipDebug && pdebug != null) {
+            pdebug.println("Signature." + algorithm +
+                " signing algorithm from: " + this.provider.getName());
+        }
     }
 
     /**
@@ -529,6 +549,11 @@
             throws InvalidKeyException {
         engineInitSign(privateKey, random);
         state = SIGN;
+
+        if (!skipDebug && pdebug != null) {
+            pdebug.println("Signature." + algorithm +
+                " signing algorithm from: " + this.provider.getName());
+        }
     }
 
     /**
--- a/src/java.base/share/classes/java/security/spec/EncodedKeySpec.java	Thu Sep 25 12:40:26 2014 -0700
+++ b/src/java.base/share/classes/java/security/spec/EncodedKeySpec.java	Thu Sep 25 16:20:38 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -43,13 +43,14 @@
 public abstract class EncodedKeySpec implements KeySpec {
 
     private byte[] encodedKey;
+    private String algorithmName;
 
     /**
-     * Creates a new EncodedKeySpec with the given encoded key.
+     * Creates a new {@code EncodedKeySpec} with the given encoded key.
      *
      * @param encodedKey the encoded key. The contents of the
      * array are copied to protect against subsequent modification.
-     * @exception NullPointerException if {@code encodedKey}
+     * @throws NullPointerException if {@code encodedKey}
      * is null.
      */
     public EncodedKeySpec(byte[] encodedKey) {
@@ -57,6 +58,48 @@
     }
 
     /**
+     * Creates a new {@code EncodedKeySpec} with the given encoded key.
+     * This constructor is useful when subsequent callers of the
+     * {@code EncodedKeySpec} object might not know the algorithm
+     * of the key.
+     *
+     * @param encodedKey the encoded key. The contents of the
+     * array are copied to protect against subsequent modification.
+     * @param algorithm the algorithm name of the encoded key
+     * See the KeyFactory section in the <a href=
+     * "{@docRoot}/../technotes/guides/security/StandardNames.html#KeyFactory">
+     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * for information about standard algorithm names.
+     * @throws NullPointerException if {@code encodedKey}
+     * or {@code algorithm} is null.
+     * @throws IllegalArgumentException if {@code algorithm} is
+     * the empty string {@code ""}
+     * @since 1.9
+     */
+    protected EncodedKeySpec(byte[] encodedKey, String algorithm) {
+        if (algorithm == null) {
+            throw new NullPointerException("algorithm name may not be null");
+        }
+        if (algorithm.isEmpty()) {
+            throw new IllegalArgumentException("algorithm name "
+                                             + "may not be empty");
+        }
+        this.encodedKey = encodedKey.clone();
+        this.algorithmName = algorithm;
+
+    }
+
+    /**
+     * Returns the name of the algorithm of the encoded key.
+     *
+     * @return the name of the algorithm, or null if not specified
+     * @since 1.9
+     */
+    public String getAlgorithm() {
+        return algorithmName;
+    }
+
+    /**
      * Returns the encoded key.
      *
      * @return the encoded key. Returns a new array each time
--- a/src/java.base/share/classes/java/security/spec/PKCS8EncodedKeySpec.java	Thu Sep 25 12:40:26 2014 -0700
+++ b/src/java.base/share/classes/java/security/spec/PKCS8EncodedKeySpec.java	Thu Sep 25 16:20:38 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -62,12 +62,12 @@
 public class PKCS8EncodedKeySpec extends EncodedKeySpec {
 
     /**
-     * Creates a new PKCS8EncodedKeySpec with the given encoded key.
+     * Creates a new {@code PKCS8EncodedKeySpec} with the given encoded key.
      *
      * @param encodedKey the key, which is assumed to be
      * encoded according to the PKCS #8 standard. The contents of
      * the array are copied to protect against subsequent modification.
-     * @exception NullPointerException if {@code encodedKey}
+     * @throws NullPointerException if {@code encodedKey}
      * is null.
      */
     public PKCS8EncodedKeySpec(byte[] encodedKey) {
@@ -75,6 +75,30 @@
     }
 
     /**
+     * Creates a new {@code PKCS8EncodedKeySpec} with the given encoded key and
+     * algorithm. This constructor is useful when subsequent callers of
+     * the {@code PKCS8EncodedKeySpec} object might not know the
+     * algorithm of the private key.
+     *
+     * @param encodedKey the key, which is assumed to be
+     * encoded according to the PKCS #8 standard. The contents of
+     * the array are copied to protect against subsequent modification.
+     * @param algorithm the algorithm name of the encoded private key
+     * See the KeyFactory section in the <a href=
+     * "{@docRoot}/../technotes/guides/security/StandardNames.html#KeyFactory">
+     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * for information about standard algorithm names.
+     * @throws NullPointerException if {@code encodedKey}
+     * or {@algorithm} is null.
+     * @throws IllegalArgumentException if {@code algorithm} is
+     * the empty string {@code ""}
+     * @since 1.9
+     */
+    public PKCS8EncodedKeySpec(byte[] encodedKey, String algorithm) {
+        super(encodedKey, algorithm);
+    }
+
+    /**
      * Returns the key bytes, encoded according to the PKCS #8 standard.
      *
      * @return the PKCS #8 encoding of the key. Returns a new array
--- a/src/java.base/share/classes/java/security/spec/X509EncodedKeySpec.java	Thu Sep 25 12:40:26 2014 -0700
+++ b/src/java.base/share/classes/java/security/spec/X509EncodedKeySpec.java	Thu Sep 25 16:20:38 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -52,12 +52,12 @@
 public class X509EncodedKeySpec extends EncodedKeySpec {
 
     /**
-     * Creates a new X509EncodedKeySpec with the given encoded key.
+     * Creates a new {@code X509EncodedKeySpec} with the given encoded key.
      *
      * @param encodedKey the key, which is assumed to be
      * encoded according to the X.509 standard. The contents of the
      * array are copied to protect against subsequent modification.
-     * @exception NullPointerException if {@code encodedKey}
+     * @throws NullPointerException if {@code encodedKey}
      * is null.
      */
     public X509EncodedKeySpec(byte[] encodedKey) {
@@ -65,6 +65,30 @@
     }
 
     /**
+     * Creates a new {@code X509EncodedKeySpec} with the given encoded key.
+     * This constructor is useful when subsequent callers of the
+     * {@code X509EncodedKeySpec} object might not know the algorithm
+     * of the key.
+     *
+     * @param encodedKey the key, which is assumed to be
+     * encoded according to the X.509 standard. The contents of the
+     * array are copied to protect against subsequent modification.
+     * @param algorithm the algorithm name of the encoded public key
+     * See the KeyFactory section in the <a href=
+     * "{@docRoot}/../technotes/guides/security/StandardNames.html#KeyFactory">
+     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * for information about standard algorithm names.
+     * @throws NullPointerException if {@code encodedKey}
+     * or {@code algorithm} is null.
+     * @throws IllegalArgumentException if {@code algorithm} is
+     * the empty string {@code ""}
+     * @since 1.9
+     */
+    public X509EncodedKeySpec(byte[] encodedKey, String algorithm) {
+        super(encodedKey, algorithm);
+    }
+
+    /**
      * Returns the key bytes, encoded according to the X.509 standard.
      *
      * @return the X.509 encoding of the key. Returns a new array
--- a/src/java.base/share/classes/java/util/Formatter.java	Thu Sep 25 12:40:26 2014 -0700
+++ b/src/java.base/share/classes/java/util/Formatter.java	Thu Sep 25 16:20:38 2014 -0700
@@ -2498,7 +2498,7 @@
         // last ordinary index
         int lasto = -1;
 
-        FormatString[] fsa = parse(format);
+        List<FormatString> fsa = parse(format);
         for (FormatString fs : fsa) {
             int index = fs.index();
             try {
@@ -2541,7 +2541,7 @@
     /**
      * Finds format specifiers in the format string.
      */
-    private FormatString[] parse(String s) {
+    private List<FormatString> parse(String s) {
         ArrayList<FormatString> al = new ArrayList<>();
         Matcher m = fsPattern.matcher(s);
         for (int i = 0, len = s.length(); i < len; ) {
@@ -2553,21 +2553,21 @@
                     // Make sure we didn't miss any invalid format specifiers
                     checkText(s, i, m.start());
                     // Assume previous characters were fixed text
-                    al.add(new FixedString(s.substring(i, m.start())));
+                    al.add(new FixedString(s, i, m.start()));
                 }
 
-                al.add(new FormatSpecifier(m));
+                al.add(new FormatSpecifier(s, m));
                 i = m.end();
             } else {
                 // No more valid format specifiers.  Check for possible invalid
                 // format specifiers.
                 checkText(s, i, len);
                 // The rest of the string is fixed text
-                al.add(new FixedString(s.substring(i)));
+                al.add(new FixedString(s, i, s.length()));
                 break;
             }
         }
-        return al.toArray(new FormatString[al.size()]);
+        return al;
     }
 
     private static void checkText(String s, int start, int end) {
@@ -2588,11 +2588,17 @@
 
     private class FixedString implements FormatString {
         private String s;
-        FixedString(String s) { this.s = s; }
+        private int start;
+        private int end;
+        FixedString(String s, int start, int end) {
+            this.s = s;
+            this.start = start;
+            this.end = end;
+        }
         public int index() { return -2; }
         public void print(Object arg, Locale l)
-            throws IOException { a.append(s); }
-        public String toString() { return s; }
+            throws IOException { a.append(s, start, end); }
+        public String toString() { return s.substring(start, end); }
     }
 
     /**
@@ -2635,17 +2641,13 @@
             return index;
         }
 
-        private Flags flags(String s) {
-            f = Flags.parse(s);
+        private Flags flags(String s, int start, int end) {
+            f = Flags.parse(s, start, end);
             if (f.contains(Flags.PREVIOUS))
                 index = -1;
             return f;
         }
 
-        Flags flags() {
-            return f;
-        }
-
         private int width(String s) {
             width = -1;
             if (s != null) {
@@ -2660,10 +2662,6 @@
             return width;
         }
 
-        int width() {
-            return width;
-        }
-
         private int precision(String s) {
             precision = -1;
             if (s != null) {
@@ -2679,44 +2677,41 @@
             return precision;
         }
 
-        int precision() {
-            return precision;
-        }
-
-        private char conversion(String s) {
-            c = s.charAt(0);
+        private char conversion(char conv) {
+            c = conv;
             if (!dt) {
-                if (!Conversion.isValid(c))
+                if (!Conversion.isValid(c)) {
                     throw new UnknownFormatConversionException(String.valueOf(c));
-                if (Character.isUpperCase(c))
+                }
+                if (Character.isUpperCase(c)) {
                     f.add(Flags.UPPERCASE);
-                c = Character.toLowerCase(c);
-                if (Conversion.isText(c))
+                    c = Character.toLowerCase(c);
+                }
+                if (Conversion.isText(c)) {
                     index = -2;
+                }
             }
             return c;
         }
 
-        private char conversion() {
-            return c;
-        }
-
-        FormatSpecifier(Matcher m) {
+        FormatSpecifier(String s, Matcher m) {
             int idx = 1;
 
             index(m.group(idx++));
-            flags(m.group(idx++));
+            flags(s, m.start(idx), m.end(idx++));
             width(m.group(idx++));
             precision(m.group(idx++));
 
-            String tT = m.group(idx++);
-            if (tT != null) {
+            int tTStart = m.start(idx);
+            int tTEnd = m.end(idx++);
+            if (tTStart != -1 && tTEnd != -1) {
                 dt = true;
-                if (tT.equals("T"))
+                if (tTStart == tTEnd - 1 && s.charAt(tTStart) == 'T') {
                     f.add(Flags.UPPERCASE);
+                }
             }
 
-            conversion(m.group(idx));
+            conversion(s.charAt(m.start(idx)));
 
             if (dt)
                 checkDateTime();
@@ -2909,21 +2904,25 @@
                 s = s.substring(0, precision);
             if (f.contains(Flags.UPPERCASE))
                 s = s.toUpperCase();
-            a.append(justify(s));
+            appendJustified(a, s);
         }
 
-        private String justify(String s) {
-            if (width == -1)
-                return s;
-            StringBuilder sb = new StringBuilder();
-            boolean pad = f.contains(Flags.LEFT_JUSTIFY);
-            int sp = width - s.length();
-            if (!pad)
-                for (int i = 0; i < sp; i++) sb.append(' ');
-            sb.append(s);
-            if (pad)
-                for (int i = 0; i < sp; i++) sb.append(' ');
-            return sb.toString();
+        private Appendable appendJustified(Appendable a, CharSequence cs) throws IOException {
+             if (width == -1) {
+                 return a.append(cs);
+             }
+             boolean padRight = f.contains(Flags.LEFT_JUSTIFY);
+             int sp = width - cs.length();
+             if (padRight) {
+                 a.append(cs);
+             }
+             for (int i = 0; i < sp; i++) {
+                 a.append(' ');
+             }
+             if (!padRight) {
+                 a.append(cs);
+             }
+             return a;
         }
 
         public String toString() {
@@ -3088,17 +3087,13 @@
 
             if (c == Conversion.DECIMAL_INTEGER) {
                 boolean neg = value < 0;
-                char[] va;
-                if (value < 0)
-                    va = Long.toString(value, 10).substring(1).toCharArray();
-                else
-                    va = Long.toString(value, 10).toCharArray();
+                String valueStr = Long.toString(value, 10);
 
                 // leading sign indicator
                 leadingSign(sb, neg);
 
                 // the value
-                localizedMagnitude(sb, va, f, adjustWidth(width, f, neg), l);
+                localizedMagnitude(sb, valueStr, neg ? 1 : 0, f, adjustWidth(width, f, neg), l);
 
                 // trailing sign indicator
                 trailingSign(sb, neg);
@@ -3113,8 +3108,9 @@
                 // apply ALTERNATE (radix indicator for octal) before ZERO_PAD
                 if (f.contains(Flags.ALTERNATE))
                     sb.append('0');
-                if (f.contains(Flags.ZERO_PAD))
-                    for (int i = 0; i < width - len; i++) sb.append('0');
+                if (f.contains(Flags.ZERO_PAD)) {
+                    trailingZeros(sb, width - len);
+                }
                 sb.append(s);
             } else if (c == Conversion.HEXADECIMAL_INTEGER) {
                 checkBadFlags(Flags.PARENTHESES, Flags.LEADING_SPACE,
@@ -3127,15 +3123,16 @@
                 // apply ALTERNATE (radix indicator for hex) before ZERO_PAD
                 if (f.contains(Flags.ALTERNATE))
                     sb.append(f.contains(Flags.UPPERCASE) ? "0X" : "0x");
-                if (f.contains(Flags.ZERO_PAD))
-                    for (int i = 0; i < width - len; i++) sb.append('0');
+                if (f.contains(Flags.ZERO_PAD)) {
+                    trailingZeros(sb, width - len);
+                }
                 if (f.contains(Flags.UPPERCASE))
                     s = s.toUpperCase();
                 sb.append(s);
             }
 
             // justify based on width
-            a.append(justify(sb.toString()));
+            appendJustified(a, sb);
         }
 
         // neg := val < 0
@@ -3172,8 +3169,7 @@
 
             // the value
             if (c == Conversion.DECIMAL_INTEGER) {
-                char[] va = v.toString().toCharArray();
-                localizedMagnitude(sb, va, f, adjustWidth(width, f, neg), l);
+                localizedMagnitude(sb, v.toString(), 0, f, adjustWidth(width, f, neg), l);
             } else if (c == Conversion.OCTAL_INTEGER) {
                 String s = v.toString(8);
 
@@ -3187,8 +3183,7 @@
                     sb.append('0');
                 }
                 if (f.contains(Flags.ZERO_PAD)) {
-                    for (int i = 0; i < width - len; i++)
-                        sb.append('0');
+                    trailingZeros(sb, width - len);
                 }
                 sb.append(s);
             } else if (c == Conversion.HEXADECIMAL_INTEGER) {
@@ -3203,9 +3198,9 @@
                     len += 2;
                     sb.append(f.contains(Flags.UPPERCASE) ? "0X" : "0x");
                 }
-                if (f.contains(Flags.ZERO_PAD))
-                    for (int i = 0; i < width - len; i++)
-                        sb.append('0');
+                if (f.contains(Flags.ZERO_PAD)) {
+                    trailingZeros(sb, width - len);
+                }
                 if (f.contains(Flags.UPPERCASE))
                     s = s.toUpperCase();
                 sb.append(s);
@@ -3215,7 +3210,7 @@
             trailingSign(sb, (value.signum() == -1));
 
             // justify based on width
-            a.append(justify(sb.toString()));
+            appendJustified(a, sb);
         }
 
         private void print(float value, Locale l) throws IOException {
@@ -3246,7 +3241,7 @@
             }
 
             // justify based on width
-            a.append(justify(sb.toString()));
+            appendJustified(a, sb);
         }
 
         // !Double.isInfinite(value) && !Double.isNaN(value)
@@ -3263,31 +3258,31 @@
                         = FormattedFloatingDecimal.valueOf(value, prec,
                           FormattedFloatingDecimal.Form.SCIENTIFIC);
 
-                char[] mant = addZeros(fd.getMantissa(), prec);
+                StringBuilder mant = new StringBuilder().append(fd.getMantissa());
+                addZeros(mant, prec);
 
                 // If the precision is zero and the '#' flag is set, add the
                 // requested decimal point.
-                if (f.contains(Flags.ALTERNATE) && (prec == 0))
-                    mant = addDot(mant);
+                if (f.contains(Flags.ALTERNATE) && (prec == 0)) {
+                    mant.append('.');
+                }
 
                 char[] exp = (value == 0.0)
                     ? new char[] {'+','0','0'} : fd.getExponent();
 
                 int newW = width;
-                if (width != -1)
+                if (width != -1) {
                     newW = adjustWidth(width - exp.length - 1, f, neg);
-                localizedMagnitude(sb, mant, f, newW, l);
+                }
+                localizedMagnitude(sb, mant, 0, f, newW, l);
 
                 sb.append(f.contains(Flags.UPPERCASE) ? 'E' : 'e');
 
-                Flags flags = f.dup().remove(Flags.GROUP);
                 char sign = exp[0];
                 assert(sign == '+' || sign == '-');
                 sb.append(sign);
 
-                char[] tmp = new char[exp.length - 1];
-                System.arraycopy(exp, 1, tmp, 0, exp.length - 1);
-                sb.append(localizedMagnitude(null, tmp, flags, -1, l));
+                localizedMagnitudeExp(sb, exp, 1, l);
             } else if (c == Conversion.DECIMAL_FLOAT) {
                 // Create a new FormattedFloatingDecimal with the desired
                 // precision.
@@ -3297,17 +3292,18 @@
                         = FormattedFloatingDecimal.valueOf(value, prec,
                           FormattedFloatingDecimal.Form.DECIMAL_FLOAT);
 
-                char[] mant = addZeros(fd.getMantissa(), prec);
+                StringBuilder mant = new StringBuilder().append(fd.getMantissa());
+                addZeros(mant, prec);
 
                 // If the precision is zero and the '#' flag is set, add the
                 // requested decimal point.
                 if (f.contains(Flags.ALTERNATE) && (prec == 0))
-                    mant = addDot(mant);
+                    mant.append('.');
 
                 int newW = width;
                 if (width != -1)
                     newW = adjustWidth(width, f, neg);
-                localizedMagnitude(sb, mant, f, newW, l);
+                localizedMagnitude(sb, mant, 0, f, newW, l);
             } else if (c == Conversion.GENERAL) {
                 int prec = precision;
                 if (precision == -1)
@@ -3316,18 +3312,18 @@
                     prec = 1;
 
                 char[] exp;
-                char[] mant;
+                StringBuilder mant = new StringBuilder();
                 int expRounded;
                 if (value == 0.0) {
                     exp = null;
-                    mant = new char[] {'0'};
+                    mant.append('0');
                     expRounded = 0;
                 } else {
                     FormattedFloatingDecimal fd
                         = FormattedFloatingDecimal.valueOf(value, prec,
                           FormattedFloatingDecimal.Form.GENERAL);
                     exp = fd.getExponent();
-                    mant = fd.getMantissa();
+                    mant.append(fd.getMantissa());
                     expRounded = fd.getExponentRounded();
                 }
 
@@ -3337,11 +3333,12 @@
                     prec -= expRounded + 1;
                 }
 
-                mant = addZeros(mant, prec);
+                addZeros(mant, prec);
                 // If the precision is zero and the '#' flag is set, add the
                 // requested decimal point.
-                if (f.contains(Flags.ALTERNATE) && (prec == 0))
-                    mant = addDot(mant);
+                if (f.contains(Flags.ALTERNATE) && (prec == 0)) {
+                    mant.append('.');
+                }
 
                 int newW = width;
                 if (width != -1) {
@@ -3350,19 +3347,16 @@
                     else
                         newW = adjustWidth(width, f, neg);
                 }
-                localizedMagnitude(sb, mant, f, newW, l);
+                localizedMagnitude(sb, mant, 0, f, newW, l);
 
                 if (exp != null) {
                     sb.append(f.contains(Flags.UPPERCASE) ? 'E' : 'e');
 
-                    Flags flags = f.dup().remove(Flags.GROUP);
                     char sign = exp[0];
                     assert(sign == '+' || sign == '-');
                     sb.append(sign);
 
-                    char[] tmp = new char[exp.length - 1];
-                    System.arraycopy(exp, 1, tmp, 0, exp.length - 1);
-                    sb.append(localizedMagnitude(null, tmp, flags, -1, l));
+                    localizedMagnitudeExp(sb, exp, 1, l);
                 }
             } else if (c == Conversion.HEXADECIMAL_FLOAT) {
                 int prec = precision;
@@ -3374,74 +3368,71 @@
 
                 String s = hexDouble(value, prec);
 
-                char[] va;
+                StringBuilder va = new StringBuilder();
                 boolean upper = f.contains(Flags.UPPERCASE);
                 sb.append(upper ? "0X" : "0x");
 
-                if (f.contains(Flags.ZERO_PAD))
-                    for (int i = 0; i < width - s.length() - 2; i++)
-                        sb.append('0');
+                if (f.contains(Flags.ZERO_PAD)) {
+                    trailingZeros(sb, width - s.length() - 2);
+                }
 
                 int idx = s.indexOf('p');
-                va = s.substring(0, idx).toCharArray();
                 if (upper) {
-                    String tmp = new String(va);
+                    String tmp = s.substring(0, idx);
                     // don't localize hex
                     tmp = tmp.toUpperCase(Locale.US);
-                    va = tmp.toCharArray();
+                    va.append(tmp);
+                } else {
+                    va.append(s, 0, idx);
                 }
-                sb.append(prec != 0 ? addZeros(va, prec) : va);
+                if (prec != 0) {
+                    addZeros(va, prec);
+                }
+                sb.append(va);
                 sb.append(upper ? 'P' : 'p');
-                sb.append(s.substring(idx+1));
+                sb.append(s, idx+1, s.length());
             }
         }
 
         // Add zeros to the requested precision.
-        private char[] addZeros(char[] v, int prec) {
+        private void addZeros(StringBuilder sb, int prec) {
             // Look for the dot.  If we don't find one, the we'll need to add
             // it before we add the zeros.
+            int len = sb.length();
             int i;
-            for (i = 0; i < v.length; i++) {
-                if (v[i] == '.')
+            for (i = 0; i < len; i++) {
+                if (sb.charAt(i) == '.') {
                     break;
+                }
             }
             boolean needDot = false;
-            if (i == v.length) {
+            if (i == len) {
                 needDot = true;
             }
 
             // Determine existing precision.
-            int outPrec = v.length - i - (needDot ? 0 : 1);
+            int outPrec = len - i - (needDot ? 0 : 1);
             assert (outPrec <= prec);
-            if (outPrec == prec)
-                return v;
-
-            // Create new array with existing contents.
-            char[] tmp
-                = new char[v.length + prec - outPrec + (needDot ? 1 : 0)];
-            System.arraycopy(v, 0, tmp, 0, v.length);
+            if (outPrec == prec) {
+                return;
+            }
 
             // Add dot if previously determined to be necessary.
-            int start = v.length;
             if (needDot) {
-                tmp[v.length] = '.';
-                start++;
+                sb.append('.');
             }
 
             // Add zeros.
-            for (int j = start; j < tmp.length; j++)
-                tmp[j] = '0';
-
-            return tmp;
+            trailingZeros(sb, prec - outPrec);
         }
 
         // Method assumes that d > 0.
         private String hexDouble(double d, int prec) {
             // Let Double.toHexString handle simple cases
-            if(!Double.isFinite(d) || d == 0.0 || prec == 0 || prec >= 13)
+            if (!Double.isFinite(d) || d == 0.0 || prec == 0 || prec >= 13) {
                 // remove "0x"
                 return Double.toHexString(d).substring(2);
-            else {
+            } else {
                 assert(prec >= 1 && prec <= 12);
 
                 int exponent  = Math.getExponent(d);
@@ -3534,7 +3525,7 @@
             trailingSign(sb, neg);
 
             // justify based on width
-            a.append(justify(sb.toString()));
+            appendJustified(a, sb);
         }
 
         // value > 0
@@ -3565,7 +3556,7 @@
                     = new BigDecimalLayout(v.unscaledValue(), v.scale(),
                                            BigDecimalLayoutForm.SCIENTIFIC);
 
-                char[] mant = bdl.mantissa();
+                StringBuilder mant = bdl.mantissa();
 
                 // Add a decimal point if necessary.  The mantissa may not
                 // contain a decimal point if the scale is zero (the internal
@@ -3573,29 +3564,29 @@
                 // precision is one. Append a decimal point if '#' is set or if
                 // we require zero padding to get to the requested precision.
                 if ((origPrec == 1 || !bdl.hasDot())
-                    && (nzeros > 0 || (f.contains(Flags.ALTERNATE))))
-                    mant = addDot(mant);
+                        && (nzeros > 0 || (f.contains(Flags.ALTERNATE)))) {
+                    mant.append('.');
+                }
 
                 // Add trailing zeros in the case precision is greater than
                 // the number of available digits after the decimal separator.
-                mant = trailingZeros(mant, nzeros);
-
-                char[] exp = bdl.exponent();
+                trailingZeros(mant, nzeros);
+
+                StringBuilder exp = bdl.exponent();
                 int newW = width;
-                if (width != -1)
-                    newW = adjustWidth(width - exp.length - 1, f, neg);
-                localizedMagnitude(sb, mant, f, newW, l);
+                if (width != -1) {
+                    newW = adjustWidth(width - exp.length() - 1, f, neg);
+                }
+                localizedMagnitude(sb, mant, 0, f, newW, l);
 
                 sb.append(f.contains(Flags.UPPERCASE) ? 'E' : 'e');
 
                 Flags flags = f.dup().remove(Flags.GROUP);
-                char sign = exp[0];
+                char sign = exp.charAt(0);
                 assert(sign == '+' || sign == '-');
-                sb.append(exp[0]);
-
-                char[] tmp = new char[exp.length - 1];
-                System.arraycopy(exp, 1, tmp, 0, exp.length - 1);
-                sb.append(localizedMagnitude(null, tmp, flags, -1, l));
+                sb.append(sign);
+
+                sb.append(localizedMagnitude(null, exp, 1, flags, -1, l));
             } else if (c == Conversion.DECIMAL_FLOAT) {
                 // Create a new BigDecimal with the desired precision.
                 int prec = (precision == -1 ? 6 : precision);
@@ -3619,7 +3610,7 @@
                                            value.scale(),
                                            BigDecimalLayoutForm.DECIMAL_FLOAT);
 
-                char mant[] = bdl.mantissa();
+                StringBuilder mant = bdl.mantissa();
                 int nzeros = (bdl.scale() < prec ? prec - bdl.scale() : 0);
 
                 // Add a decimal point if necessary.  The mantissa may not
@@ -3627,14 +3618,16 @@
                 // representation has no fractional part).  Append a decimal
                 // point if '#' is set or we require zero padding to get to the
                 // requested precision.
-                if (bdl.scale() == 0 && (f.contains(Flags.ALTERNATE) || nzeros > 0))
-                    mant = addDot(bdl.mantissa());
+                if (bdl.scale() == 0 && (f.contains(Flags.ALTERNATE)
+                        || nzeros > 0)) {
+                    mant.append('.');
+                }
 
                 // Add trailing zeros if the precision is greater than the
                 // number of available digits after the decimal separator.
-                mant = trailingZeros(mant, nzeros);
-
-                localizedMagnitude(sb, mant, f, adjustWidth(width, f, neg), l);
+                trailingZeros(mant, nzeros);
+
+                localizedMagnitude(sb, mant, 0, f, adjustWidth(width, f, neg), l);
             } else if (c == Conversion.GENERAL) {
                 int prec = precision;
                 if (precision == -1)
@@ -3693,36 +3686,18 @@
                 return scale;
             }
 
-            // char[] with canonical string representation
-            public char[] layoutChars() {
-                StringBuilder sb = new StringBuilder(mant);
-                if (exp != null) {
-                    sb.append('E');
-                    sb.append(exp);
-                }
-                return toCharArray(sb);
-            }
-
-            public char[] mantissa() {
-                return toCharArray(mant);
+            public StringBuilder mantissa() {
+                return mant;
             }
 
             // The exponent will be formatted as a sign ('+' or '-') followed
             // by the exponent zero-padded to include at least two digits.
-            public char[] exponent() {
-                return toCharArray(exp);
+            public StringBuilder exponent() {
+                return exp;
             }
 
-            private char[] toCharArray(StringBuilder sb) {
-                if (sb == null)
-                    return null;
-                char[] result = new char[sb.length()];
-                sb.getChars(0, result.length, result, 0);
-                return result;
-            }
-
             private void layout(BigInteger intVal, int scale, BigDecimalLayoutForm form) {
-                char coeff[] = intVal.toString().toCharArray();
+                String coeff = intVal.toString();
                 this.scale = scale;
 
                 // Construct a buffer, with sufficient capacity for all cases.
@@ -3730,71 +3705,73 @@
                 // if '.' needed, +2 for "E+", + up to 10 for adjusted
                 // exponent.  Otherwise it could have +1 if negative, plus
                 // leading "0.00000"
-                mant = new StringBuilder(coeff.length + 14);
+                int len = coeff.length();
+                mant = new StringBuilder(len + 14);
 
                 if (scale == 0) {
-                    int len = coeff.length;
                     if (len > 1) {
-                        mant.append(coeff[0]);
+                        mant.append(coeff.charAt(0));
                         if (form == BigDecimalLayoutForm.SCIENTIFIC) {
                             mant.append('.');
                             dot = true;
-                            mant.append(coeff, 1, len - 1);
+                            mant.append(coeff, 1, len);
                             exp = new StringBuilder("+");
-                            if (len < 10)
-                                exp.append("0").append(len - 1);
-                            else
+                            if (len < 10) {
+                                exp.append('0').append(len - 1);
+                            } else {
                                 exp.append(len - 1);
+                            }
                         } else {
-                            mant.append(coeff, 1, len - 1);
+                            mant.append(coeff, 1, len);
                         }
                     } else {
                         mant.append(coeff);
-                        if (form == BigDecimalLayoutForm.SCIENTIFIC)
+                        if (form == BigDecimalLayoutForm.SCIENTIFIC) {
                             exp = new StringBuilder("+00");
+                        }
                     }
                     return;
                 }
-                long adjusted = -(long) scale + (coeff.length - 1);
+                long adjusted = -(long) scale + (len - 1);
                 if (form == BigDecimalLayoutForm.DECIMAL_FLOAT) {
                     // count of padding zeros
-                    int pad = scale - coeff.length;
+                    int pad = scale - len;
                     if (pad >= 0) {
                         // 0.xxx form
                         mant.append("0.");
                         dot = true;
-                        for (; pad > 0 ; pad--) mant.append('0');
+                        trailingZeros(mant, pad);
                         mant.append(coeff);
                     } else {
-                        if (-pad < coeff.length) {
+                        if (-pad < len) {
                             // xx.xx form
                             mant.append(coeff, 0, -pad);
                             mant.append('.');
                             dot = true;
-                            mant.append(coeff, -pad, scale);
+                            mant.append(coeff, -pad, -pad + scale);
                         } else {
                             // xx form
-                            mant.append(coeff, 0, coeff.length);
-                            for (int i = 0; i < -scale; i++)
-                                mant.append('0');
+                            mant.append(coeff, 0, len);
+                            trailingZeros(mant, -scale);
                             this.scale = 0;
                         }
                     }
                 } else {
                     // x.xxx form
-                    mant.append(coeff[0]);
-                    if (coeff.length > 1) {
+                    mant.append(coeff.charAt(0));
+                    if (len > 1) {
                         mant.append('.');
                         dot = true;
-                        mant.append(coeff, 1, coeff.length-1);
+                        mant.append(coeff, 1, len);
                     }
                     exp = new StringBuilder();
                     if (adjusted != 0) {
                         long abs = Math.abs(adjusted);
                         // require sign
                         exp.append(adjusted < 0 ? '-' : '+');
-                        if (abs < 10)
+                        if (abs < 10) {
                             exp.append('0');
+                        }
                         exp.append(abs);
                     } else {
                         exp.append("+00");
@@ -3810,45 +3787,27 @@
             return newW;
         }
 
-        // Add a '.' to th mantissa if required
-        private char[] addDot(char[] mant) {
-            char[] tmp = mant;
-            tmp = new char[mant.length + 1];
-            System.arraycopy(mant, 0, tmp, 0, mant.length);
-            tmp[tmp.length - 1] = '.';
-            return tmp;
+        // Add trailing zeros
+        private void trailingZeros(StringBuilder sb, int nzeros) {
+            for (int i = 0; i < nzeros; i++) {
+                sb.append('0');
+            }
         }
 
-        // Add trailing zeros in the case precision is greater than the number
-        // of available digits after the decimal separator.
-        private char[] trailingZeros(char[] mant, int nzeros) {
-            char[] tmp = mant;
-            if (nzeros > 0) {
-                tmp = new char[mant.length + nzeros];
-                System.arraycopy(mant, 0, tmp, 0, mant.length);
-                for (int i = mant.length; i < tmp.length; i++)
-                    tmp[i] = '0';
-            }
-            return tmp;
-        }
-
-        private void print(Calendar t, char c, Locale l)  throws IOException
-        {
+        private void print(Calendar t, char c, Locale l)  throws IOException {
             StringBuilder sb = new StringBuilder();
             print(sb, t, c, l);
 
             // justify based on width
-            String s = justify(sb.toString());
-            if (f.contains(Flags.UPPERCASE))
-                s = s.toUpperCase();
-
-            a.append(s);
+            if (f.contains(Flags.UPPERCASE)) {
+                appendJustified(a, sb.toString().toUpperCase());
+            } else {
+                appendJustified(a, sb);
+            }
         }
 
-        private Appendable print(StringBuilder sb, Calendar t, char c,
-                                 Locale l)
-            throws IOException
-        {
+        private Appendable print(StringBuilder sb, Calendar t, char c, Locale l)
+                throws IOException {
             if (sb == null)
                 sb = new StringBuilder();
             switch (c) {
@@ -4021,6 +3980,7 @@
                 // this may be in wrong place for some locales
                 StringBuilder tsb = new StringBuilder();
                 print(tsb, t, DateTime.AM_PM, l);
+
                 sb.append(tsb.toString().toUpperCase(l != null ? l : Locale.US));
                 break;
             }
@@ -4058,10 +4018,11 @@
             StringBuilder sb = new StringBuilder();
             print(sb, t, c, l);
             // justify based on width
-            String s = justify(sb.toString());
-            if (f.contains(Flags.UPPERCASE))
-                s = s.toUpperCase();
-            a.append(s);
+            if (f.contains(Flags.UPPERCASE)) {
+                appendJustified(a, sb.toString().toUpperCase());
+            } else {
+                appendJustified(a, sb);
+            }
         }
 
         private Appendable print(StringBuilder sb, TemporalAccessor t, char c,
@@ -4309,20 +4270,17 @@
             return zero;
         }
 
-        private StringBuilder
-            localizedMagnitude(StringBuilder sb, long value, Flags f,
-                               int width, Locale l)
-        {
-            char[] va = Long.toString(value, 10).toCharArray();
-            return localizedMagnitude(sb, va, f, width, l);
+        private StringBuilder localizedMagnitude(StringBuilder sb,
+                long value, Flags f, int width, Locale l) {
+            return localizedMagnitude(sb, Long.toString(value, 10), 0, f, width, l);
         }
 
-        private StringBuilder
-            localizedMagnitude(StringBuilder sb, char[] value, Flags f,
-                               int width, Locale l)
-        {
-            if (sb == null)
+        private StringBuilder localizedMagnitude(StringBuilder sb,
+                CharSequence value, final int offset, Flags f, int width,
+                Locale l) {
+            if (sb == null) {
                 sb = new StringBuilder();
+            }
             int begin = sb.length();
 
             char zero = getZero(l);
@@ -4332,10 +4290,10 @@
             int  grpSize = -1;
             char decSep = '\0';
 
-            int len = value.length;
+            int len = value.length();
             int dot = len;
-            for (int j = 0; j < len; j++) {
-                if (value[j] == '.') {
+            for (int j = offset; j < len; j++) {
+                if (value.charAt(j) == '.') {
                     dot = j;
                     break;
                 }
@@ -4363,7 +4321,7 @@
             }
 
             // localize the digits inserting group separators as necessary
-            for (int j = 0; j < len; j++) {
+            for (int j = offset; j < len; j++) {
                 if (j == dot) {
                     sb.append(decSep);
                     // no more group separators after the decimal separator
@@ -4371,19 +4329,35 @@
                     continue;
                 }
 
+                char c = value.charAt(j);
+                sb.append((char) ((c - '0') + zero));
+                if (grpSep != '\0' && j != dot - 1 && ((dot - j) % grpSize == 1)) {
+                    sb.append(grpSep);
+                }
+            }
+
+            // apply zero padding
+            if (width != -1 && f.contains(Flags.ZERO_PAD)) {
+                for (int k = sb.length(); k < width; k++) {
+                    sb.insert(begin, zero);
+                }
+            }
+
+            return sb;
+        }
+
+        // Specialized localization of exponents, where the source value can only
+        // contain characters '0' through '9', starting at index offset, and no
+        // group separators is added for any locale.
+        private void localizedMagnitudeExp(StringBuilder sb, char[] value,
+                final int offset, Locale l) {
+            char zero = getZero(l);
+
+            int len = value.length;
+            for (int j = offset; j < len; j++) {
                 char c = value[j];
                 sb.append((char) ((c - '0') + zero));
-                if (grpSep != '\0' && j != dot - 1 && ((dot - j) % grpSize == 1))
-                    sb.append(grpSep);
             }
-
-            // apply zero padding
-            len = sb.length();
-            if (width != -1 && f.contains(Flags.ZERO_PAD))
-                for (int k = 0; k < width - len; k++)
-                    sb.insert(begin, zero);
-
-            return sb;
         }
     }
 
@@ -4433,10 +4407,10 @@
             return this;
         }
 
-        public static Flags parse(String s) {
-            char[] ca = s.toCharArray();
+        public static Flags parse(String s, int start, int end) {
             Flags f = new Flags(0);
-            for (char c : ca) {
+            for (int i = start; i < end; i++) {
+                char c = s.charAt(i);
                 Flags v = parse(c);
                 if (f.contains(v))
                     throw new DuplicateFormatFlagsException(v.toString());
--- a/src/java.base/share/classes/java/util/TimerTask.java	Thu Sep 25 12:40:26 2014 -0700
+++ b/src/java.base/share/classes/java/util/TimerTask.java	Thu Sep 25 16:20:38 2014 -0700
@@ -26,10 +26,14 @@
 package java.util;
 
 /**
- * A task that can be scheduled for one-time or repeated execution by a Timer.
+ * A task that can be scheduled for one-time or repeated execution by a
+ * {@link Timer}.
+ *
+ * <p>A timer task is <em>not</em> reusable.  Once a task has been scheduled
+ * for execution on a {@code Timer} or cancelled, subsequent attempts to
+ * schedule it for execution will throw {@code IllegalStateException}.
  *
  * @author  Josh Bloch
- * @see     Timer
  * @since   1.3
  */
 
--- a/src/java.base/share/classes/javax/crypto/Cipher.java	Thu Sep 25 12:40:26 2014 -0700
+++ b/src/java.base/share/classes/javax/crypto/Cipher.java	Thu Sep 25 16:20:38 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -167,6 +167,11 @@
     private static final Debug debug =
                         Debug.getInstance("jca", "Cipher");
 
+    private static final Debug pdebug =
+                        Debug.getInstance("provider", "Provider");
+    private static final boolean skipDebug =
+        Debug.isOn("engine=") && !Debug.isOn("cipher");
+
     /**
      * Constant used to initialize cipher to encryption mode.
      */
@@ -1110,6 +1115,21 @@
         }
     }
 
+    private static String getOpmodeString(int opmode) {
+        switch (opmode) {
+            case ENCRYPT_MODE:
+                return "encryption";
+            case DECRYPT_MODE:
+                return "decryption";
+            case WRAP_MODE:
+                return "key wrapping";
+            case UNWRAP_MODE:
+                return "key unwrapping";
+            default:
+                return "";
+        }
+    }
+
     /**
      * Initializes this cipher with a key.
      *
@@ -1235,6 +1255,12 @@
 
         initialized = true;
         this.opmode = opmode;
+
+        if (!skipDebug && pdebug != null) {
+            pdebug.println("Cipher." + transformation + " " +
+                getOpmodeString(opmode) + " algorithm from: " +
+                this.provider.getName());
+        }
     }
 
     /**
@@ -1372,6 +1398,12 @@
 
         initialized = true;
         this.opmode = opmode;
+
+        if (!skipDebug && pdebug != null) {
+            pdebug.println("Cipher." + transformation + " " +
+                getOpmodeString(opmode) + " algorithm from: " +
+                this.provider.getName());
+        }
     }
 
     /**
@@ -1509,6 +1541,12 @@
 
         initialized = true;
         this.opmode = opmode;
+
+        if (!skipDebug && pdebug != null) {
+            pdebug.println("Cipher." + transformation + " " +
+                getOpmodeString(opmode) + " algorithm from: " +
+                this.provider.getName());
+        }
     }
 
     /**
@@ -1693,6 +1731,12 @@
 
         initialized = true;
         this.opmode = opmode;
+
+        if (!skipDebug && pdebug != null) {
+            pdebug.println("Cipher." + transformation + " " +
+                getOpmodeString(opmode) + " algorithm from: " +
+                this.provider.getName());
+        }
     }
 
     /**
--- a/src/java.base/share/classes/javax/crypto/EncryptedPrivateKeyInfo.java	Thu Sep 25 12:40:26 2014 -0700
+++ b/src/java.base/share/classes/javax/crypto/EncryptedPrivateKeyInfo.java	Thu Sep 25 16:20:38 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -60,6 +60,9 @@
     // the "encryptionAlgorithm" field
     private AlgorithmId algid;
 
+    // the algorithm name of the encrypted private key
+    private String keyAlg;
+
     // the "encryptedData" field
     private byte[] encryptedData;
 
@@ -255,7 +258,7 @@
             throw new InvalidKeySpecException(
                     "Cannot retrieve the PKCS8EncodedKeySpec", ex);
         }
-        return new PKCS8EncodedKeySpec(encoded);
+        return new PKCS8EncodedKeySpec(encoded, keyAlg);
     }
 
     private PKCS8EncodedKeySpec getKeySpecImpl(Key decryptKey,
@@ -280,7 +283,7 @@
             throw new InvalidKeyException(
                     "Cannot retrieve the PKCS8EncodedKeySpec", ex);
         }
-        return new PKCS8EncodedKeySpec(encoded);
+        return new PKCS8EncodedKeySpec(encoded, keyAlg);
     }
 
     /**
@@ -405,7 +408,7 @@
     }
 
     @SuppressWarnings("fallthrough")
-    private static void checkPKCS8Encoding(byte[] encodedKey)
+    private void checkPKCS8Encoding(byte[] encodedKey)
         throws IOException {
         DerInputStream in = new DerInputStream(encodedKey);
         DerValue[] values = in.getSequence(3);
@@ -416,11 +419,7 @@
             /* fall through */
         case 3:
             checkTag(values[0], DerValue.tag_Integer, "version");
-            DerInputStream algid = values[1].toDerInputStream();
-            algid.getOID();
-            if (algid.available() != 0) {
-                algid.getDerValue();
-            }
+            keyAlg = AlgorithmId.parse(values[1]).getName();
             checkTag(values[2], DerValue.tag_OctetString, "privateKey");
             break;
         default:
--- a/src/java.base/share/classes/javax/crypto/KeyAgreement.java	Thu Sep 25 12:40:26 2014 -0700
+++ b/src/java.base/share/classes/javax/crypto/KeyAgreement.java	Thu Sep 25 16:20:38 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -78,6 +78,11 @@
     private static final Debug debug =
                         Debug.getInstance("jca", "KeyAgreement");
 
+    private static final Debug pdebug =
+                        Debug.getInstance("provider", "Provider");
+    private static final boolean skipDebug =
+        Debug.isOn("engine=") && !Debug.isOn("keyagreement");
+
     // The provider
     private Provider provider;
 
@@ -468,6 +473,11 @@
                 throw new InvalidKeyException(e);
             }
         }
+
+        if (!skipDebug && pdebug != null) {
+            pdebug.println("KeyAgreement." + algorithm + " algorithm from: " +
+                this.provider.getName());
+        }
     }
 
     /**
@@ -524,6 +534,11 @@
         } else {
             chooseProvider(I_PARAMS, key, params, random);
         }
+
+        if (!skipDebug && pdebug != null) {
+            pdebug.println("KeyAgreement." + algorithm + " algorithm from: " +
+                this.provider.getName());
+        }
     }
 
     /**
--- a/src/java.base/share/classes/javax/crypto/KeyGenerator.java	Thu Sep 25 12:40:26 2014 -0700
+++ b/src/java.base/share/classes/javax/crypto/KeyGenerator.java	Thu Sep 25 16:20:38 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,6 +33,7 @@
 
 import sun.security.jca.*;
 import sun.security.jca.GetInstance.Instance;
+import sun.security.util.Debug;
 
 /**
  * This class provides the functionality of a secret (symmetric) key generator.
@@ -108,6 +109,11 @@
 
 public class KeyGenerator {
 
+    private static final Debug pdebug =
+                        Debug.getInstance("provider", "Provider");
+    private static final boolean skipDebug =
+        Debug.isOn("engine=") && !Debug.isOn("keygenerator");
+
     // see java.security.KeyPairGenerator for failover notes
 
     private final static int I_NONE   = 1;
@@ -145,6 +151,11 @@
         this.spi = keyGenSpi;
         this.provider = provider;
         this.algorithm = algorithm;
+
+        if (!skipDebug && pdebug != null) {
+            pdebug.println("KeyGenerator." + algorithm + " algorithm from: " +
+                this.provider.getName());
+        }
     }
 
     private KeyGenerator(String algorithm) throws NoSuchAlgorithmException {
@@ -158,6 +169,11 @@
             throw new NoSuchAlgorithmException
                 (algorithm + " KeyGenerator not available");
         }
+
+        if (!skipDebug && pdebug != null) {
+            pdebug.println("KeyGenerator." + algorithm + " algorithm from: " +
+                this.provider.getName());
+        }
     }
 
     /**
--- a/src/java.base/share/classes/javax/crypto/Mac.java	Thu Sep 25 12:40:26 2014 -0700
+++ b/src/java.base/share/classes/javax/crypto/Mac.java	Thu Sep 25 16:20:38 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -77,6 +77,11 @@
     private static final Debug debug =
                         Debug.getInstance("jca", "Mac");
 
+    private static final Debug pdebug =
+                        Debug.getInstance("provider", "Provider");
+    private static final boolean skipDebug =
+        Debug.isOn("engine=") && !Debug.isOn("mac");
+
     // The provider
     private Provider provider;
 
@@ -413,6 +418,11 @@
             throw new InvalidKeyException("init() failed", e);
         }
         initialized = true;
+
+        if (!skipDebug && pdebug != null) {
+            pdebug.println("Mac." + algorithm + " algorithm from: " +
+                this.provider.getName());
+        }
     }
 
     /**
@@ -435,6 +445,11 @@
             chooseProvider(key, params);
         }
         initialized = true;
+
+        if (!skipDebug && pdebug != null) {
+            pdebug.println("Mac." + algorithm + " algorithm from: " +
+                this.provider.getName());
+        }
     }
 
     /**
--- a/src/java.base/share/classes/sun/misc/FloatingDecimal.java	Thu Sep 25 12:40:26 2014 -0700
+++ b/src/java.base/share/classes/sun/misc/FloatingDecimal.java	Thu Sep 25 16:20:38 2014 -0700
@@ -1992,21 +1992,32 @@
                         break expLoop; // stop parsing exponent.
                     }
                 }
-                int expLimit = BIG_DECIMAL_EXPONENT+nDigits+nTrailZero;
-                if ( expOverflow || ( expVal > expLimit ) ){
-                    //
-                    // The intent here is to end up with
-                    // infinity or zero, as appropriate.
-                    // The reason for yielding such a small decExponent,
-                    // rather than something intuitive such as
-                    // expSign*Integer.MAX_VALUE, is that this value
-                    // is subject to further manipulation in
-                    // doubleValue() and floatValue(), and I don't want
-                    // it to be able to cause overflow there!
-                    // (The only way we can get into trouble here is for
-                    // really outrageous nDigits+nTrailZero, such as 2 billion. )
-                    //
-                    decExp = expSign*expLimit;
+                int expLimit = BIG_DECIMAL_EXPONENT + nDigits + nTrailZero;
+                if (expOverflow || (expVal > expLimit)) {
+                    // There is still a chance that the exponent will be safe to
+                    // use: if it would eventually decrease due to a negative
+                    // decExp, and that number is below the limit.  We check for
+                    // that here.
+                    if (!expOverflow && (expSign == 1 && decExp < 0)
+                            && (expVal + decExp) < expLimit) {
+                        // Cannot overflow: adding a positive and negative number.
+                        decExp += expVal;
+                    } else {
+                        //
+                        // The intent here is to end up with
+                        // infinity or zero, as appropriate.
+                        // The reason for yielding such a small decExponent,
+                        // rather than something intuitive such as
+                        // expSign*Integer.MAX_VALUE, is that this value
+                        // is subject to further manipulation in
+                        // doubleValue() and floatValue(), and I don't want
+                        // it to be able to cause overflow there!
+                        // (The only way we can get into trouble here is for
+                        // really outrageous nDigits+nTrailZero, such as 2
+                        // billion.)
+                        //
+                        decExp = expSign * expLimit;
+                    }
                 } else {
                     // this should not overflow, since we tested
                     // for expVal > (MAX+N), where N >= abs(decExp)
--- a/src/java.base/share/classes/sun/net/TransferProtocolClient.java	Thu Sep 25 12:40:26 2014 -0700
+++ b/src/java.base/share/classes/sun/net/TransferProtocolClient.java	Thu Sep 25 16:20:38 2014 -0700
@@ -80,7 +80,7 @@
                 code = -1;
             } else {
                 try {
-                    code = Integer.parseInt(response.substring(0, 3));
+                    code = Integer.parseInt(response, 0, 3, 10);
                 } catch (NumberFormatException e) {
                     code = -1;
                 } catch (StringIndexOutOfBoundsException e) {
--- a/src/java.base/share/classes/sun/net/ftp/impl/FtpClient.java	Thu Sep 25 12:40:26 2014 -0700
+++ b/src/java.base/share/classes/sun/net/ftp/impl/FtpClient.java	Thu Sep 25 16:20:38 2014 -0700
@@ -260,8 +260,8 @@
                 if (d != null && time != null) {
                     int c = time.indexOf(':');
                     now.setTime(d);
-                    now.set(Calendar.HOUR, Integer.parseInt(time.substring(0, c)));
-                    now.set(Calendar.MINUTE, Integer.parseInt(time.substring(c + 1)));
+                    now.set(Calendar.HOUR, Integer.parseInt(time, 0, c, 10));
+                    now.set(Calendar.MINUTE, Integer.parseInt(time, c + 1, time.length(), 10));
                     d = now.getTime();
                 }
                 // see if it's a symbolic link, i.e. the name if followed
@@ -437,7 +437,7 @@
                 code = -1;
             } else {
                 try {
-                    code = Integer.parseInt(response.substring(0, 3));
+                    code = Integer.parseInt(response, 0, 3, 10);
                 } catch (NumberFormatException e) {
                     code = -1;
                 } catch (StringIndexOutOfBoundsException e) {
--- a/src/java.base/share/classes/sun/net/www/ParseUtil.java	Thu Sep 25 12:40:26 2014 -0700
+++ b/src/java.base/share/classes/sun/net/www/ParseUtil.java	Thu Sep 25 16:20:38 2014 -0700
@@ -161,7 +161,7 @@
      * Un-escape and return the character at position i in string s.
      */
     private static byte unescape(String s, int i) {
-        return (byte) Integer.parseInt(s.substring(i+1,i+3),16);
+        return (byte) Integer.parseInt(s, i + 1, i + 3, 16);
     }
 
 
--- a/src/java.base/share/classes/sun/net/www/http/ChunkedInputStream.java	Thu Sep 25 12:40:26 2014 -0700
+++ b/src/java.base/share/classes/sun/net/www/http/ChunkedInputStream.java	Thu Sep 25 16:20:38 2014 -0700
@@ -313,7 +313,7 @@
                             break;
                     }
                     try {
-                        chunkSize = Integer.parseInt(header.substring(0, i), 16);
+                        chunkSize = Integer.parseInt(header, 0, i, 16);
                     } catch (NumberFormatException e) {
                         error = true;
                         throw new IOException("Bogus chunk size");
--- a/src/java.base/share/classes/sun/net/www/http/HttpClient.java	Thu Sep 25 12:40:26 2014 -0700
+++ b/src/java.base/share/classes/sun/net/www/http/HttpClient.java	Thu Sep 25 16:20:38 2014 -0700
@@ -808,7 +808,7 @@
             ind = resp.indexOf(' ');
             while(resp.charAt(ind) == ' ')
                 ind++;
-            code = Integer.parseInt(resp.substring(ind, ind + 3));
+            code = Integer.parseInt(resp, ind, ind + 3, 10);
         } catch (Exception e) {}
 
         if (code == HTTP_CONTINUE && ignoreContinue) {
--- a/src/java.base/share/classes/sun/security/util/Debug.java	Thu Sep 25 12:40:26 2014 -0700
+++ b/src/java.base/share/classes/sun/security/util/Debug.java	Thu Sep 25 16:20:38 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -104,7 +104,15 @@
         System.err.println("codebase=<URL>");
         System.err.println("              only dump output if specified codebase");
         System.err.println("              is being checked");
-
+        System.err.println();
+        System.err.println("The following can be used with provider:");
+        System.err.println();
+        System.err.println("engine=<engines>");
+        System.err.println("              only dump output for the specified list");
+        System.err.println("              of JCA engines. Supported values:");
+        System.err.println("              Cipher, KeyAgreement, KeyGenerator,");
+        System.err.println("              KeyPairGenerator, KeyStore, Mac,");
+        System.err.println("              MessageDigest, SecureRandom, Signature.");
         System.err.println();
         System.err.println("Note: Separate multiple options with a comma");
         System.exit(0);
--- a/src/java.base/unix/classes/sun/net/sdp/SdpProvider.java	Thu Sep 25 12:40:26 2014 -0700
+++ b/src/java.base/unix/classes/sun/net/sdp/SdpProvider.java	Thu Sep 25 16:20:38 2014 -0700
@@ -257,7 +257,8 @@
                             .getByName(s[1].substring(0, pos));
                         int prefix = -1;
                         try {
-                            prefix = Integer.parseInt(s[1].substring(pos+1));
+                            prefix = Integer.parseInt(s[1], pos + 1,
+                                s[1].length(), 10);
                             if (address instanceof Inet4Address) {
                                 // must be 1-31
                                 if (prefix < 0 || prefix > 32) prefix = -1;
--- a/src/java.base/windows/native/libnio/ch/FileChannelImpl.c	Thu Sep 25 12:40:26 2014 -0700
+++ b/src/java.base/windows/native/libnio/ch/FileChannelImpl.c	Thu Sep 25 16:20:38 2014 -0700
@@ -140,24 +140,25 @@
 Java_sun_nio_ch_FileChannelImpl_position0(JNIEnv *env, jobject this,
                                           jobject fdo, jlong offset)
 {
-    DWORD lowPos = 0;
-    long highPos = 0;
+    BOOL result = 0;
     HANDLE h = (HANDLE)(handleval(env, fdo));
+    LARGE_INTEGER where;
+    DWORD whence;
 
     if (offset < 0) {
-        lowPos = SetFilePointer(h, 0, &highPos, FILE_CURRENT);
+        where.QuadPart = 0;
+        whence = FILE_CURRENT;
     } else {
-        lowPos = (DWORD)offset;
-        highPos = (long)(offset >> 32);
-        lowPos = SetFilePointer(h, lowPos, &highPos, FILE_BEGIN);
+        where.QuadPart = offset;
+        whence = FILE_BEGIN;
     }
-    if (lowPos == ((DWORD)-1)) {
-        if (GetLastError() != ERROR_SUCCESS) {
-            JNU_ThrowIOExceptionWithLastError(env, "Seek failed");
-            return IOS_THROWN;
-        }
+
+    result = SetFilePointerEx(h, where, &where, whence);
+    if (result == 0) {
+        JNU_ThrowIOExceptionWithLastError(env, "Seek failed");
+        return IOS_THROWN;
     }
-    return (((jlong)highPos) << 32) | lowPos;
+    return (jlong)where.QuadPart;
 }
 
 JNIEXPORT void JNICALL
--- a/src/java.base/windows/native/libnio/ch/FileDispatcherImpl.c	Thu Sep 25 12:40:26 2014 -0700
+++ b/src/java.base/windows/native/libnio/ch/FileDispatcherImpl.c	Thu Sep 25 16:20:38 2014 -0700
@@ -126,39 +126,30 @@
     DWORD read = 0;
     BOOL result = 0;
     HANDLE h = (HANDLE)(handleval(env, fdo));
-    DWORD lowPos = 0;
-    long highPos = 0;
-    DWORD lowOffset = 0;
-    long highOffset = 0;
+    LARGE_INTEGER currPos;
+    OVERLAPPED ov;
 
     if (h == INVALID_HANDLE_VALUE) {
         JNU_ThrowIOExceptionWithLastError(env, "Invalid handle");
         return IOS_THROWN;
     }
 
-    lowPos = SetFilePointer(h, 0, &highPos, FILE_CURRENT);
-    if (lowPos == ((DWORD)-1)) {
-        if (GetLastError() != ERROR_SUCCESS) {
-            JNU_ThrowIOExceptionWithLastError(env, "Seek failed");
-            return IOS_THROWN;
-        }
+    currPos.QuadPart = 0;
+    result = SetFilePointerEx(h, currPos, &currPos, FILE_CURRENT);
+    if (result == 0) {
+        JNU_ThrowIOExceptionWithLastError(env, "Seek failed");
+        return IOS_THROWN;
     }
 
-    lowOffset = (DWORD)offset;
-    highOffset = (DWORD)(offset >> 32);
-    lowOffset = SetFilePointer(h, lowOffset, &highOffset, FILE_BEGIN);
-    if (lowOffset == ((DWORD)-1)) {
-        if (GetLastError() != ERROR_SUCCESS) {
-            JNU_ThrowIOExceptionWithLastError(env, "Seek failed");
-            return IOS_THROWN;
-        }
-    }
+    ZeroMemory(&ov, sizeof(ov));
+    ov.Offset = (DWORD)offset;
+    ov.OffsetHigh = (DWORD)(offset >> 32);
 
     result = ReadFile(h,                /* File handle to read */
                       (LPVOID)address,  /* address to put data */
                       len,              /* number of bytes to read */
                       &read,            /* number of bytes read */
-                      NULL);              /* struct with offset */
+                      &ov);             /* position to read from */
 
     if (result == 0) {
         int error = GetLastError();
@@ -168,17 +159,18 @@
         if (error == ERROR_NO_DATA) {
             return IOS_UNAVAILABLE;
         }
-        JNU_ThrowIOExceptionWithLastError(env, "Read failed");
+        if (error != ERROR_HANDLE_EOF) {
+            JNU_ThrowIOExceptionWithLastError(env, "Read failed");
+            return IOS_THROWN;
+        }
+    }
+
+    result = SetFilePointerEx(h, currPos, NULL, FILE_BEGIN);
+    if (result == 0) {
+        JNU_ThrowIOExceptionWithLastError(env, "Seek failed");
         return IOS_THROWN;
     }
 
-    lowPos = SetFilePointer(h, lowPos, &highPos, FILE_BEGIN);
-    if (lowPos == ((DWORD)-1)) {
-        if (GetLastError() != ERROR_SUCCESS) {
-            JNU_ThrowIOExceptionWithLastError(env, "Seek failed");
-            return IOS_THROWN;
-        }
-    }
     return convertReturnVal(env, (jint)read, JNI_TRUE);
 }
 
@@ -194,18 +186,18 @@
         OVERLAPPED ov;
         LPOVERLAPPED lpOv;
         if (append == JNI_TRUE) {
+            ZeroMemory(&ov, sizeof(ov));
             ov.Offset = (DWORD)0xFFFFFFFF;
             ov.OffsetHigh = (DWORD)0xFFFFFFFF;
-            ov.hEvent = NULL;
             lpOv = &ov;
         } else {
             lpOv = NULL;
         }
-        result = WriteFile(h,           /* File handle to write */
-                      (LPCVOID)address, /* pointers to the buffers */
-                      len,              /* number of bytes to write */
-                      &written,         /* receives number of bytes written */
-                      lpOv);            /* overlapped struct */
+        result = WriteFile(h,                /* File handle to write */
+                           (LPCVOID)address, /* pointer to the buffer */
+                           len,              /* number of bytes to write */
+                           &written,         /* receives number of bytes written */
+                           lpOv);            /* overlapped struct */
     }
 
     if ((h == INVALID_HANDLE_VALUE) || (result == 0)) {
@@ -232,9 +224,9 @@
         OVERLAPPED ov;
         LPOVERLAPPED lpOv;
         if (append == JNI_TRUE) {
+            ZeroMemory(&ov, sizeof(ov));
             ov.Offset = (DWORD)0xFFFFFFFF;
             ov.OffsetHigh = (DWORD)0xFFFFFFFF;
-            ov.hEvent = NULL;
             lpOv = &ov;
         } else {
             lpOv = NULL;
@@ -270,46 +262,35 @@
     BOOL result = 0;
     DWORD written = 0;
     HANDLE h = (HANDLE)(handleval(env, fdo));
-    DWORD lowPos = 0;
-    long highPos = 0;
-    DWORD lowOffset = 0;
-    long highOffset = 0;
+    LARGE_INTEGER currPos;
+    OVERLAPPED ov;
 
-    lowPos = SetFilePointer(h, 0, &highPos, FILE_CURRENT);
-    if (lowPos == ((DWORD)-1)) {
-        if (GetLastError() != ERROR_SUCCESS) {
-            JNU_ThrowIOExceptionWithLastError(env, "Seek failed");
-            return IOS_THROWN;
-        }
+    currPos.QuadPart = 0;
+    result = SetFilePointerEx(h, currPos, &currPos, FILE_CURRENT);
+    if (result == 0) {
+        JNU_ThrowIOExceptionWithLastError(env, "Seek failed");
+        return IOS_THROWN;
     }
 
-    lowOffset = (DWORD)offset;
-    highOffset = (DWORD)(offset >> 32);
-    lowOffset = SetFilePointer(h, lowOffset, &highOffset, FILE_BEGIN);
-    if (lowOffset == ((DWORD)-1)) {
-        if (GetLastError() != ERROR_SUCCESS) {
-            JNU_ThrowIOExceptionWithLastError(env, "Seek failed");
-            return IOS_THROWN;
-        }
-    }
+    ZeroMemory(&ov, sizeof(ov));
+    ov.Offset = (DWORD)offset;
+    ov.OffsetHigh = (DWORD)(offset >> 32);
 
-    result = WriteFile(h,               /* File handle to write */
-                      (LPCVOID)address, /* pointers to the buffers */
-                      len,              /* number of bytes to write */
-                      &written,         /* receives number of bytes written */
-                      NULL);            /* no overlapped struct */
+    result = WriteFile(h,                /* File handle to write */
+                       (LPCVOID)address, /* pointer to the buffer */
+                       len,              /* number of bytes to write */
+                       &written,         /* receives number of bytes written */
+                       &ov);             /* position to write at */
 
     if ((h == INVALID_HANDLE_VALUE) || (result == 0)) {
         JNU_ThrowIOExceptionWithLastError(env, "Write failed");
         return IOS_THROWN;
     }
 
-    lowPos = SetFilePointer(h, lowPos, &highPos, FILE_BEGIN);
-    if (lowPos == ((DWORD)-1)) {
-        if (GetLastError() != ERROR_SUCCESS) {
-            JNU_ThrowIOExceptionWithLastError(env, "Seek failed");
-            return IOS_THROWN;
-        }
+    result = SetFilePointerEx(h, currPos, NULL, FILE_BEGIN);
+    if (result == 0) {
+        JNU_ThrowIOExceptionWithLastError(env, "Seek failed");
+        return IOS_THROWN;
     }
 
     return convertReturnVal(env, (jint)written, JNI_FALSE);
@@ -342,20 +323,17 @@
 Java_sun_nio_ch_FileDispatcherImpl_truncate0(JNIEnv *env, jobject this,
                                              jobject fdo, jlong size)
 {
-    DWORD lowPos = 0;
-    long highPos = 0;
     BOOL result = 0;
     HANDLE h = (HANDLE)(handleval(env, fdo));
+    LARGE_INTEGER offset;
 
-    lowPos = (DWORD)size;
-    highPos = (long)(size >> 32);
-    lowPos = SetFilePointer(h, lowPos, &highPos, FILE_BEGIN);
-    if (lowPos == ((DWORD)-1)) {
-        if (GetLastError() != ERROR_SUCCESS) {
-            JNU_ThrowIOExceptionWithLastError(env, "Truncation failed");
-            return IOS_THROWN;
-        }
+    offset.QuadPart = size;
+    result = SetFilePointerEx(h, offset, NULL, FILE_BEGIN);
+    if (result == 0) {
+        JNU_ThrowIOExceptionWithLastError(env, "Truncation failed");
+        return IOS_THROWN;
     }
+
     result = SetEndOfFile(h);
     if (result == 0) {
         JNU_ThrowIOExceptionWithLastError(env, "Truncation failed");
@@ -367,18 +345,16 @@
 JNIEXPORT jlong JNICALL
 Java_sun_nio_ch_FileDispatcherImpl_size0(JNIEnv *env, jobject this, jobject fdo)
 {
-    DWORD sizeLow = 0;
-    DWORD sizeHigh = 0;
+    BOOL result = 0;
     HANDLE h = (HANDLE)(handleval(env, fdo));
+    LARGE_INTEGER size;
 
-    sizeLow = GetFileSize(h, &sizeHigh);
-    if (sizeLow == ((DWORD)-1)) {
-        if (GetLastError() != ERROR_SUCCESS) {
-            JNU_ThrowIOExceptionWithLastError(env, "Size failed");
-            return IOS_THROWN;
-        }
+    result = GetFileSizeEx(h, &size);
+    if (result == 0) {
+        JNU_ThrowIOExceptionWithLastError(env, "Size failed");
+        return IOS_THROWN;
     }
-    return (((jlong)sizeHigh) << 32) | sizeLow;
+    return (jlong)size.QuadPart;
 }
 
 JNIEXPORT jint JNICALL
@@ -407,7 +383,7 @@
     if (result == 0) {
         int error = GetLastError();
         if (error == ERROR_IO_PENDING) {
-            LPDWORD dwBytes;
+            DWORD dwBytes;
             result = GetOverlappedResult(h, &o, &dwBytes, TRUE);
             if (result != 0) {
                 return sun_nio_ch_FileDispatcherImpl_LOCKED;
@@ -442,8 +418,19 @@
     o.Offset = lowPos;
     o.OffsetHigh = highPos;
     result = UnlockFileEx(h, 0, lowNumBytes, highNumBytes, &o);
-    if (result == 0 && GetLastError() != ERROR_NOT_LOCKED) {
-        JNU_ThrowIOExceptionWithLastError(env, "Release failed");
+    if (result == 0) {
+        int error = GetLastError();
+        if (error == ERROR_IO_PENDING) {
+            DWORD dwBytes;
+            result = GetOverlappedResult(h, &o, &dwBytes, TRUE);
+            if (result == 0) {
+                return;
+            }
+            error = GetLastError();
+        }
+        if (error != ERROR_NOT_LOCKED) {
+            JNU_ThrowIOExceptionWithLastError(env, "Release failed");
+        }
     }
 }
 
@@ -464,8 +451,7 @@
 }
 
 JNIEXPORT void JNICALL
-Java_sun_nio_ch_FileDispatcherImpl_closeByHandle(JNIEnv *env, jclass clazz,
-                                             jlong fd)
+Java_sun_nio_ch_FileDispatcherImpl_closeByHandle(JNIEnv *env, jclass clazz, jlong fd)
 {
     closeFile(env, fd);
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTEvent.h	Thu Sep 25 16:20:38 2014 -0700
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+#ifndef __AWTEVENT_H
+#define __AWTEVENT_H
+
+#import "LWCToolkit.h"
+
+jlong UTC(NSEvent *event);
+void DeliverJavaKeyEvent(JNIEnv *env, NSEvent *event, jobject peer);
+void DeliverJavaMouseEvent(JNIEnv *env, NSEvent *event, jobject peer);
+void SendAdditionalJavaEvents(JNIEnv *env, NSEvent *nsEvent, jobject peer);
+jint GetJavaMouseModifiers(NSInteger button, NSUInteger modifierFlags);
+jint NsKeyModifiersToJavaModifiers(NSUInteger nsFlags, BOOL isExtMods);
+NSUInteger JavaModifiersToNsKeyModifiers(jint javaModifiers, BOOL isExtMods);
+unichar NsCharToJavaChar(unichar nsChar, NSUInteger modifiers);
+
+#endif /* __AWTEVENT_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTEvent.m	Thu Sep 25 16:20:38 2014 -0700
@@ -0,0 +1,776 @@
+/*
+ * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+#import <JavaNativeFoundation/JavaNativeFoundation.h>
+#import <JavaRuntimeSupport/JavaRuntimeSupport.h>
+#import <sys/time.h>
+#include <Carbon/Carbon.h>
+
+#import "jni_util.h" 
+#import "LWCToolkit.h"
+#import "ThreadUtilities.h"
+
+#import "java_awt_event_InputEvent.h"
+#import "java_awt_event_KeyEvent.h"
+#import "java_awt_event_MouseEvent.h"
+
+/*
+ * Table to map typed characters to their Java virtual key equivalent and back.
+ * We use the incoming unichar (ignoring all modifiers) and try to figure out
+ * which virtual key code is appropriate. A lot of them just have direct
+ * mappings (the function keys, arrow keys, etc.) so they aren't a problem.
+ * We had to do something a little funky to catch the keys on the numeric
+ * key pad (i.e. using event mask to distinguish between period on regular
+ * keyboard and decimal on keypad). We also have to do something incredibly
+ * hokey with regards to the shifted punctuation characters. For examples,
+ * consider '&' which is usually Shift-7.  For the Java key typed events,
+ * that's no problem, we just say pass the unichar. But for the
+ * KeyPressed/Released events, we need to identify the virtual key code
+ * (which roughly correspond to hardware keys) which means we are supposed
+ * to say the virtual 7 key was pressed.  But how are we supposed to know
+ * when we get a punctuation char what was the real hardware key was that
+ * was pressed?  Although '&' often comes from Shift-7 the keyboard can be
+ * remapped!  I don't think there really is a good answer, and hopefully
+ * all good applets are only interested in logical key typed events not
+ * press/release.  Meanwhile, we are hard-coding the shifted punctuation
+ * to trigger the virtual keys that are the expected ones under a standard
+ * keymapping. Looking at Windows & Mac, they don't actually do this, the
+ * Mac seems to just put the ascii code in for the shifted punctuation
+ * (which means they actually end up with bogus key codes on the Java side),
+ * Windows I can't even figure out what it's doing.
+ */
+#define KL_STANDARD java_awt_event_KeyEvent_KEY_LOCATION_STANDARD
+#define KL_NUMPAD   java_awt_event_KeyEvent_KEY_LOCATION_NUMPAD
+#define KL_UNKNOWN  java_awt_event_KeyEvent_KEY_LOCATION_UNKNOWN
+static struct _key
+{
+    unsigned short keyCode;
+    BOOL postsTyped;
+    jint javaKeyLocation;
+    jint javaKeyCode;
+}
+const keyTable[] =
+{
+    {0x00, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_A},
+    {0x01, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_S},
+    {0x02, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_D},
+    {0x03, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_F},
+    {0x04, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_H},
+    {0x05, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_G},
+    {0x06, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_Z},
+    {0x07, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_X},
+    {0x08, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_C},
+    {0x09, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_V},
+    {0x0A, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_BACK_QUOTE},
+    {0x0B, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_B},
+    {0x0C, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_Q},
+    {0x0D, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_W},
+    {0x0E, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_E},
+    {0x0F, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_R},
+    {0x10, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_Y},
+    {0x11, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_T},
+    {0x12, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_1},
+    {0x13, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_2},
+    {0x14, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_3},
+    {0x15, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_4},
+    {0x16, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_6},
+    {0x17, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_5},
+    {0x18, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_EQUALS},
+    {0x19, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_9},
+    {0x1A, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_7},
+    {0x1B, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_MINUS},
+    {0x1C, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_8},
+    {0x1D, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_0},
+    {0x1E, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_CLOSE_BRACKET},
+    {0x1F, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_O},
+    {0x20, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_U},
+    {0x21, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_OPEN_BRACKET},
+    {0x22, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_I},
+    {0x23, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_P},
+    {0x24, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_ENTER},
+    {0x25, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_L},
+    {0x26, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_J},
+    {0x27, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_QUOTE},
+    {0x28, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_K},
+    {0x29, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_SEMICOLON},
+    {0x2A, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_BACK_SLASH},
+    {0x2B, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_COMMA},
+    {0x2C, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_SLASH},
+    {0x2D, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_N},
+    {0x2E, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_M},
+    {0x2F, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_PERIOD},
+    {0x30, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_TAB},
+    {0x31, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_SPACE},
+    {0x32, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_BACK_QUOTE},
+    {0x33, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_BACK_SPACE},
+    {0x34, YES, KL_NUMPAD,   java_awt_event_KeyEvent_VK_ENTER},
+    {0x35, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_ESCAPE},
+    {0x36, NO,  KL_UNKNOWN,  java_awt_event_KeyEvent_VK_UNDEFINED},
+    {0x37, NO,  KL_UNKNOWN,  java_awt_event_KeyEvent_VK_META},      // ****
+    {0x38, NO,  KL_UNKNOWN,  java_awt_event_KeyEvent_VK_SHIFT},     // ****
+    {0x39, NO,  KL_STANDARD, java_awt_event_KeyEvent_VK_CAPS_LOCK},
+    {0x3A, NO,  KL_UNKNOWN,  java_awt_event_KeyEvent_VK_ALT},       // ****
+    {0x3B, NO,  KL_UNKNOWN,  java_awt_event_KeyEvent_VK_CONTROL},   // ****
+    {0x3C, NO,  KL_UNKNOWN,  java_awt_event_KeyEvent_VK_UNDEFINED},
+    {0x3D, NO,  KL_UNKNOWN,  java_awt_event_KeyEvent_VK_UNDEFINED},
+    {0x3E, NO,  KL_UNKNOWN,  java_awt_event_KeyEvent_VK_UNDEFINED},
+    {0x3F, NO,  KL_UNKNOWN,  java_awt_event_KeyEvent_VK_UNDEFINED}, // the 'fn' key on PowerBooks
+    {0x40, NO,  KL_UNKNOWN,  java_awt_event_KeyEvent_VK_UNDEFINED},
+    {0x41, YES, KL_NUMPAD,   java_awt_event_KeyEvent_VK_DECIMAL},
+    {0x42, NO,  KL_UNKNOWN,  java_awt_event_KeyEvent_VK_UNDEFINED},
+    {0x43, YES, KL_NUMPAD,   java_awt_event_KeyEvent_VK_MULTIPLY},
+    {0x44, NO,  KL_UNKNOWN,  java_awt_event_KeyEvent_VK_UNDEFINED},
+    {0x45, YES, KL_NUMPAD,   java_awt_event_KeyEvent_VK_ADD},
+    {0x46, NO,  KL_UNKNOWN,  java_awt_event_KeyEvent_VK_UNDEFINED},
+    {0x47, NO,  KL_NUMPAD,   java_awt_event_KeyEvent_VK_CLEAR},
+    {0x48, NO,  KL_UNKNOWN,  java_awt_event_KeyEvent_VK_UNDEFINED},
+    {0x49, NO,  KL_UNKNOWN,  java_awt_event_KeyEvent_VK_UNDEFINED},
+    {0x4A, NO,  KL_UNKNOWN,  java_awt_event_KeyEvent_VK_UNDEFINED},
+    {0x4B, YES, KL_NUMPAD,   java_awt_event_KeyEvent_VK_DIVIDE},
+    {0x4C, YES, KL_NUMPAD,   java_awt_event_KeyEvent_VK_ENTER},
+    {0x4D, NO,  KL_UNKNOWN,  java_awt_event_KeyEvent_VK_UNDEFINED},
+    {0x4E, YES, KL_NUMPAD,   java_awt_event_KeyEvent_VK_SUBTRACT},
+    {0x4F, NO,  KL_UNKNOWN,  java_awt_event_KeyEvent_VK_UNDEFINED},
+    {0x50, NO,  KL_UNKNOWN,  java_awt_event_KeyEvent_VK_UNDEFINED},
+    {0x51, YES, KL_NUMPAD,   java_awt_event_KeyEvent_VK_EQUALS},
+    {0x52, YES, KL_NUMPAD,   java_awt_event_KeyEvent_VK_NUMPAD0},
+    {0x53, YES, KL_NUMPAD,   java_awt_event_KeyEvent_VK_NUMPAD1},
+    {0x54, YES, KL_NUMPAD,   java_awt_event_KeyEvent_VK_NUMPAD2},
+    {0x55, YES, KL_NUMPAD,   java_awt_event_KeyEvent_VK_NUMPAD3},
+    {0x56, YES, KL_NUMPAD,   java_awt_event_KeyEvent_VK_NUMPAD4},
+    {0x57, YES, KL_NUMPAD,   java_awt_event_KeyEvent_VK_NUMPAD5},
+    {0x58, YES, KL_NUMPAD,   java_awt_event_KeyEvent_VK_NUMPAD6},
+    {0x59, YES, KL_NUMPAD,   java_awt_event_KeyEvent_VK_NUMPAD7},
+    {0x5A, NO,  KL_UNKNOWN,  java_awt_event_KeyEvent_VK_UNDEFINED},
+    {0x5B, YES, KL_NUMPAD,   java_awt_event_KeyEvent_VK_NUMPAD8},
+    {0x5C, YES, KL_NUMPAD,   java_awt_event_KeyEvent_VK_NUMPAD9},
+    {0x5D, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_BACK_SLASH}, // This is a combo yen/backslash on JIS keyboards.
+    {0x5E, YES, KL_NUMPAD,   java_awt_event_KeyEvent_VK_UNDERSCORE},
+    {0x5F, YES, KL_NUMPAD,   java_awt_event_KeyEvent_VK_COMMA},
+    {0x60, NO,  KL_STANDARD, java_awt_event_KeyEvent_VK_F5},
+    {0x61, NO,  KL_STANDARD, java_awt_event_KeyEvent_VK_F6},
+    {0x62, NO,  KL_STANDARD, java_awt_event_KeyEvent_VK_F7},
+    {0x63, NO,  KL_STANDARD, java_awt_event_KeyEvent_VK_F3},
+    {0x64, NO,  KL_STANDARD, java_awt_event_KeyEvent_VK_F8},
+    {0x65, NO,  KL_STANDARD, java_awt_event_KeyEvent_VK_F9},
+    {0x66, NO,  KL_STANDARD, java_awt_event_KeyEvent_VK_ALPHANUMERIC},
+    {0x67, NO,  KL_STANDARD, java_awt_event_KeyEvent_VK_F11},
+    {0x68, NO,  KL_STANDARD, java_awt_event_KeyEvent_VK_KATAKANA},
+    {0x69, NO,  KL_STANDARD, java_awt_event_KeyEvent_VK_F13},
+    {0x6A, NO,  KL_STANDARD, java_awt_event_KeyEvent_VK_F16},
+    {0x6B, NO,  KL_STANDARD, java_awt_event_KeyEvent_VK_F14},
+    {0x6C, NO,  KL_UNKNOWN,  java_awt_event_KeyEvent_VK_UNDEFINED},
+    {0x6D, NO,  KL_STANDARD, java_awt_event_KeyEvent_VK_F10},
+    {0x6E, NO,  KL_UNKNOWN,  java_awt_event_KeyEvent_VK_UNDEFINED},
+    {0x6F, NO,  KL_STANDARD, java_awt_event_KeyEvent_VK_F12},
+    {0x70, NO,  KL_UNKNOWN,  java_awt_event_KeyEvent_VK_UNDEFINED},
+    {0x71, NO,  KL_STANDARD, java_awt_event_KeyEvent_VK_F15},
+    {0x72, NO,  KL_STANDARD, java_awt_event_KeyEvent_VK_HELP},
+    {0x73, NO,  KL_STANDARD, java_awt_event_KeyEvent_VK_HOME},
+    {0x74, NO,  KL_STANDARD, java_awt_event_KeyEvent_VK_PAGE_UP},
+    {0x75, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_DELETE},
+    {0x76, NO,  KL_STANDARD, java_awt_event_KeyEvent_VK_F4},
+    {0x77, NO,  KL_STANDARD, java_awt_event_KeyEvent_VK_END},
+    {0x78, NO,  KL_STANDARD, java_awt_event_KeyEvent_VK_F2},
+    {0x79, NO,  KL_STANDARD, java_awt_event_KeyEvent_VK_PAGE_DOWN},
+    {0x7A, NO,  KL_STANDARD, java_awt_event_KeyEvent_VK_F1},
+    {0x7B, NO,  KL_STANDARD, java_awt_event_KeyEvent_VK_LEFT},
+    {0x7C, NO,  KL_STANDARD, java_awt_event_KeyEvent_VK_RIGHT},
+    {0x7D, NO,  KL_STANDARD, java_awt_event_KeyEvent_VK_DOWN},
+    {0x7E, NO,  KL_STANDARD, java_awt_event_KeyEvent_VK_UP},
+    {0x7F, NO,  KL_UNKNOWN,  java_awt_event_KeyEvent_VK_UNDEFINED},
+};
+
+/*
+ * This table was stolen from the Windows implementation for mapping
+ * Unicode values to VK codes for dead keys.  On Windows, some layouts
+ * return ASCII punctuation for dead accents, while some return spacing
+ * accent chars, so both should be listed.  However, in all of the
+ * keyboard layouts I tried only the Unicode values are used.
+ */
+struct CharToVKEntry {
+    UniChar c;
+    jint javaKey;
+};
+static const struct CharToVKEntry charToDeadVKTable[] = {
+    {0x0060, java_awt_event_KeyEvent_VK_DEAD_GRAVE},
+    {0x00B4, java_awt_event_KeyEvent_VK_DEAD_ACUTE},
+    {0x0384, java_awt_event_KeyEvent_VK_DEAD_ACUTE}, // Unicode "GREEK TONOS" -- Greek keyboard, semicolon key
+    {0x005E, java_awt_event_KeyEvent_VK_DEAD_CIRCUMFLEX},
+    {0x007E, java_awt_event_KeyEvent_VK_DEAD_TILDE},
+    {0x02DC, java_awt_event_KeyEvent_VK_DEAD_TILDE}, // Unicode "SMALL TILDE"
+    {0x00AF, java_awt_event_KeyEvent_VK_DEAD_MACRON},
+    {0x02D8, java_awt_event_KeyEvent_VK_DEAD_BREVE},
+    {0x02D9, java_awt_event_KeyEvent_VK_DEAD_ABOVEDOT},
+    {0x00A8, java_awt_event_KeyEvent_VK_DEAD_DIAERESIS},
+    {0x02DA, java_awt_event_KeyEvent_VK_DEAD_ABOVERING},
+    {0x02DD, java_awt_event_KeyEvent_VK_DEAD_DOUBLEACUTE},
+    {0x02C7, java_awt_event_KeyEvent_VK_DEAD_CARON},
+    {0x00B8, java_awt_event_KeyEvent_VK_DEAD_CEDILLA},
+    {0x02DB, java_awt_event_KeyEvent_VK_DEAD_OGONEK},
+    {0x037A, java_awt_event_KeyEvent_VK_DEAD_IOTA},
+    {0x309B, java_awt_event_KeyEvent_VK_DEAD_VOICED_SOUND},
+    {0x309C, java_awt_event_KeyEvent_VK_DEAD_SEMIVOICED_SOUND},
+    {0,0}
+};
+
+// TODO: some constants below are part of CGS (private interfaces)...
+// for now we will look at the raw key code to determine left/right status
+// but not sure this is foolproof...
+static struct _nsKeyToJavaModifier
+{
+    NSUInteger nsMask;
+    //NSUInteger cgsLeftMask;
+    //NSUInteger cgsRightMask;
+    unsigned short leftKeyCode;
+    unsigned short rightKeyCode;
+    jint javaExtMask;
+    jint javaMask;
+    jint javaKey;
+}
+const nsKeyToJavaModifierTable[] =
+{
+    {
+        NSAlphaShiftKeyMask,
+        0,
+        0,
+        0, // no Java equivalent
+        0, // no Java equivalent
+        java_awt_event_KeyEvent_VK_CAPS_LOCK
+    },
+    {
+        NSShiftKeyMask,
+        //kCGSFlagsMaskAppleShiftKey,
+        //kCGSFlagsMaskAppleRightShiftKey,
+        56,
+        60,
+        java_awt_event_InputEvent_SHIFT_DOWN_MASK,
+        java_awt_event_InputEvent_SHIFT_MASK,
+        java_awt_event_KeyEvent_VK_SHIFT
+    },
+    {
+        NSControlKeyMask,
+        //kCGSFlagsMaskAppleControlKey,
+        //kCGSFlagsMaskAppleRightControlKey,
+        59,
+        62,
+        java_awt_event_InputEvent_CTRL_DOWN_MASK,
+        java_awt_event_InputEvent_CTRL_MASK,
+        java_awt_event_KeyEvent_VK_CONTROL
+    },
+    {
+        NSAlternateKeyMask,
+        //kCGSFlagsMaskAppleLeftAlternateKey,
+        //kCGSFlagsMaskAppleRightAlternateKey,
+        58,
+        61,
+        java_awt_event_InputEvent_ALT_DOWN_MASK,
+        java_awt_event_InputEvent_ALT_MASK,
+        java_awt_event_KeyEvent_VK_ALT
+    },
+    {
+        NSCommandKeyMask,
+        //kCGSFlagsMaskAppleLeftCommandKey,
+        //kCGSFlagsMaskAppleRightCommandKey,
+        55,
+        54,
+        java_awt_event_InputEvent_META_DOWN_MASK,
+        java_awt_event_InputEvent_META_MASK,
+        java_awt_event_KeyEvent_VK_META
+    },
+    // NSNumericPadKeyMask
+    {
+        NSHelpKeyMask,
+        0,
+        0,
+        0, // no Java equivalent
+        0, // no Java equivalent
+        java_awt_event_KeyEvent_VK_HELP
+    },
+    // NSFunctionKeyMask
+    {0, 0, 0, 0, 0, 0}
+};
+
+/*
+ * Almost all unicode characters just go from NS to Java with no translation.
+ *  For the few exceptions, we handle it here with this small table.
+ */
+#define ALL_NS_KEY_MODIFIERS_MASK \
+    (NSShiftKeyMask | NSControlKeyMask | NSAlternateKeyMask | NSCommandKeyMask)
+
+static struct _char {
+    NSUInteger modifier;
+    unichar nsChar;
+    unichar javaChar;
+}
+const charTable[] = {
+    // map enter on keypad to same as return key
+    {0,                         NSEnterCharacter,          NSNewlineCharacter},
+
+    // [3134616] return newline instead of carriage return
+    {0,                         NSCarriageReturnCharacter, NSNewlineCharacter},
+
+    // "delete" means backspace in Java
+    {ALL_NS_KEY_MODIFIERS_MASK, NSDeleteCharacter,         NSBackspaceCharacter},
+    {ALL_NS_KEY_MODIFIERS_MASK, NSDeleteFunctionKey,       NSDeleteCharacter},
+
+    // back-tab is only differentiated from tab by Shift flag
+    {NSShiftKeyMask,            NSBackTabCharacter,        NSTabCharacter},
+
+    {0, 0, 0}
+};
+
+unichar NsCharToJavaChar(unichar nsChar, NSUInteger modifiers)
+{
+    const struct _char *cur;
+    // Mask off just the keyboard modifiers from the event modifier mask.
+    NSUInteger testableFlags = (modifiers & ALL_NS_KEY_MODIFIERS_MASK);
+
+    // walk through table & find the match
+    for (cur = charTable; cur->nsChar != 0 ; cur++) {
+        // <rdar://Problem/3476426> Need to determine if we are looking at
+        // a plain keypress or a modified keypress.  Don't adjust the
+        // character of a keypress with a modifier.
+        if (cur->nsChar == nsChar) {
+            if (cur->modifier == 0 && testableFlags == 0) {
+                // If the modifier field is 0, that means to transform
+                // this character if no additional keyboard modifiers are set.
+                // This lets ctrl-C be reported as ctrl-C and not transformed
+                // into Newline.
+                return cur->javaChar;
+            } else if (cur->modifier != 0 &&
+                       (testableFlags & cur->modifier) == testableFlags)
+            {
+                // Likewise, if the modifier field is nonzero, that means
+                // transform this character if only these modifiers are
+                // set in the testable flags.
+                return cur->javaChar;
+            }
+        }
+    }
+
+    if (nsChar >= NSUpArrowFunctionKey && nsChar <= NSModeSwitchFunctionKey) {
+        return java_awt_event_KeyEvent_CHAR_UNDEFINED;
+    }
+
+    // otherwise return character unchanged
+    return nsChar;
+}
+
+static unichar NsGetDeadKeyChar(unsigned short keyCode)
+{
+    TISInputSourceRef currentKeyboard = TISCopyCurrentKeyboardInputSource();
+    CFDataRef uchr = (CFDataRef)TISGetInputSourceProperty(currentKeyboard, kTISPropertyUnicodeKeyLayoutData);
+    if (uchr == nil) { return 0; }
+    const UCKeyboardLayout *keyboardLayout = (const UCKeyboardLayout*)CFDataGetBytePtr(uchr);
+    // Carbon modifiers should be used instead of NSEvent modifiers
+    UInt32 modifierKeyState = (GetCurrentEventKeyModifiers() >> 8) & 0xFF;
+
+    if (keyboardLayout) {
+        UInt32 deadKeyState = 0;
+        UniCharCount maxStringLength = 255;
+        UniCharCount actualStringLength = 0;
+        UniChar unicodeString[maxStringLength];
+
+        // get the deadKeyState
+        OSStatus status = UCKeyTranslate(keyboardLayout,
+                                         keyCode, kUCKeyActionDown, modifierKeyState,
+                                         LMGetKbdType(), kUCKeyTranslateNoDeadKeysBit,
+                                         &deadKeyState,
+                                         maxStringLength,
+                                         &actualStringLength, unicodeString);
+
+        if (status == noErr && deadKeyState != 0) {
+            // Press SPACE to get the dead key char
+            status = UCKeyTranslate(keyboardLayout,
+                                    kVK_Space, kUCKeyActionDown, 0,
+                                    LMGetKbdType(), 0,
+                                    &deadKeyState,
+                                    maxStringLength,
+                                    &actualStringLength, unicodeString);
+
+            if (status == noErr && actualStringLength > 0) {
+                return unicodeString[0];
+            }
+        }
+    }
+    return 0;
+}
+
+/*
+ * This is the function that uses the table above to take incoming
+ * NSEvent keyCodes and translate to the Java virtual key code.
+ */
+static void
+NsCharToJavaVirtualKeyCode(unichar ch, BOOL isDeadChar,
+                           NSUInteger flags, unsigned short key,
+                           jint *keyCode, jint *keyLocation, BOOL *postsTyped, unichar *deadChar)
+{
+    static size_t size = sizeof(keyTable) / sizeof(struct _key);
+    NSInteger offset;
+
+    if (isDeadChar) {
+        unichar testDeadChar = NsGetDeadKeyChar(key);
+        const struct CharToVKEntry *map;
+        for (map = charToDeadVKTable; map->c != 0; ++map) {
+            if (testDeadChar == map->c) {
+                *keyCode = map->javaKey;
+                *postsTyped = NO;
+                // TODO: use UNKNOWN here?
+                *keyLocation = java_awt_event_KeyEvent_KEY_LOCATION_UNKNOWN;
+                *deadChar = testDeadChar;
+                return;
+            }
+        }
+        // If we got here, we keep looking for a normal key.
+    }
+
+    if ([[NSCharacterSet letterCharacterSet] characterIsMember:ch]) {
+        // key is an alphabetic character
+        unichar lower;
+        lower = tolower(ch);
+        offset = lower - 'a';
+        if (offset >= 0 && offset <= 25) {
+            // some chars in letter set are NOT actually A-Z characters?!
+            // skip them...
+            *postsTyped = YES;
+            // do quick conversion
+            *keyCode = java_awt_event_KeyEvent_VK_A + offset;
+            *keyLocation = java_awt_event_KeyEvent_KEY_LOCATION_STANDARD;
+            return;
+        }
+    }
+
+    if ([[NSCharacterSet decimalDigitCharacterSet] characterIsMember:ch]) {
+        // key is a digit
+        offset = ch - '0';
+        // make sure in range for decimal digits
+        if (offset >= 0 && offset <= 9)    {
+            jboolean numpad = (flags & NSNumericPadKeyMask) != 0;
+            *postsTyped = YES;
+            if (numpad) {
+                *keyCode = offset + java_awt_event_KeyEvent_VK_NUMPAD0;
+                *keyLocation = java_awt_event_KeyEvent_KEY_LOCATION_NUMPAD;
+            } else {
+                *keyCode = offset + java_awt_event_KeyEvent_VK_0;
+                *keyLocation = java_awt_event_KeyEvent_KEY_LOCATION_STANDARD;
+            }
+            return;
+        }
+    }
+
+    if (key < size) {
+        *postsTyped = keyTable[key].postsTyped;
+        *keyCode = keyTable[key].javaKeyCode;
+        *keyLocation = keyTable[key].javaKeyLocation;
+    } else {
+        // Should we report this? This means we've got a keyboard
+        // we don't know about...
+        *postsTyped = NO;
+        *keyCode = java_awt_event_KeyEvent_VK_UNDEFINED;
+        *keyLocation = java_awt_event_KeyEvent_KEY_LOCATION_UNKNOWN;
+    }
+}
+
+/*
+ * This returns the java key data for the key NSEvent modifiers
+ * (after NSFlagChanged).
+ */
+static void
+NsKeyModifiersToJavaKeyInfo(NSUInteger nsFlags, unsigned short eventKeyCode,
+                            jint *javaKeyCode,
+                            jint *javaKeyLocation,
+                            jint *javaKeyType)
+{
+    static NSUInteger sPreviousNSFlags = 0;
+
+    const struct _nsKeyToJavaModifier* cur;
+    NSUInteger oldNSFlags = sPreviousNSFlags;
+    NSUInteger changedNSFlags = oldNSFlags ^ nsFlags;
+    sPreviousNSFlags = nsFlags;
+
+    *javaKeyCode = java_awt_event_KeyEvent_VK_UNDEFINED;
+    *javaKeyLocation = java_awt_event_KeyEvent_KEY_LOCATION_UNKNOWN;
+    *javaKeyType = java_awt_event_KeyEvent_KEY_PRESSED;
+
+    for (cur = nsKeyToJavaModifierTable; cur->nsMask != 0; ++cur) {
+        if (changedNSFlags & cur->nsMask) {
+            *javaKeyCode = cur->javaKey;
+            *javaKeyLocation = java_awt_event_KeyEvent_KEY_LOCATION_STANDARD;
+            // TODO: uses SPI...
+            //if (changedNSFlags & cur->cgsLeftMask) {
+            //    *javaKeyLocation = java_awt_event_KeyEvent_KEY_LOCATION_LEFT;
+            //} else if (changedNSFlags & cur->cgsRightMask) {
+            //    *javaKeyLocation = java_awt_event_KeyEvent_KEY_LOCATION_RIGHT;
+            //}
+            if (eventKeyCode == cur->leftKeyCode) {
+                *javaKeyLocation = java_awt_event_KeyEvent_KEY_LOCATION_LEFT;
+            } else if (eventKeyCode == cur->rightKeyCode) {
+                *javaKeyLocation = java_awt_event_KeyEvent_KEY_LOCATION_RIGHT;
+            }
+            *javaKeyType = (cur->nsMask & nsFlags) ?
+                java_awt_event_KeyEvent_KEY_PRESSED :
+                java_awt_event_KeyEvent_KEY_RELEASED;
+            break;
+        }
+    }
+}
+
+/*
+ * This returns the java modifiers for a key NSEvent.
+ */
+jint NsKeyModifiersToJavaModifiers(NSUInteger nsFlags, BOOL isExtMods)
+{
+    jint javaModifiers = 0;
+    const struct _nsKeyToJavaModifier* cur;
+
+    for (cur = nsKeyToJavaModifierTable; cur->nsMask != 0; ++cur) {
+        if ((cur->nsMask & nsFlags) != 0) {
+            javaModifiers |= isExtMods? cur->javaExtMask : cur->javaMask;
+        }
+    }
+
+    return javaModifiers;
+}
+
+/*
+ * This returns the NSEvent flags for java key modifiers.
+ */
+NSUInteger JavaModifiersToNsKeyModifiers(jint javaModifiers, BOOL isExtMods)
+{
+    NSUInteger nsFlags = 0;
+    const struct _nsKeyToJavaModifier* cur;
+
+    for (cur = nsKeyToJavaModifierTable; cur->nsMask != 0; ++cur) {
+        jint mask = isExtMods? cur->javaExtMask : cur->javaMask;
+        if ((mask & javaModifiers) != 0) {
+            nsFlags |= cur->nsMask;
+        }
+    }
+
+    // special case
+    jint mask = isExtMods? java_awt_event_InputEvent_ALT_GRAPH_DOWN_MASK :
+                           java_awt_event_InputEvent_ALT_GRAPH_MASK;
+
+    if ((mask & javaModifiers) != 0) {
+        nsFlags |= NSAlternateKeyMask;
+    }
+
+    return nsFlags;
+}
+
+
+jint GetJavaMouseModifiers(NSInteger button, NSUInteger modifierFlags)
+{
+    // Mousing needs the key modifiers
+    jint modifiers = NsKeyModifiersToJavaModifiers(modifierFlags, YES);
+
+
+    /*
+     * Ask Quartz about mouse buttons state
+     */
+
+    if (CGEventSourceButtonState(kCGEventSourceStateCombinedSessionState,
+                                 kCGMouseButtonLeft)) {
+        modifiers |= java_awt_event_InputEvent_BUTTON1_DOWN_MASK;
+    }
+
+    if (CGEventSourceButtonState(kCGEventSourceStateCombinedSessionState,
+                                 kCGMouseButtonRight)) {
+        modifiers |= java_awt_event_InputEvent_BUTTON3_DOWN_MASK;
+    }
+
+    if (CGEventSourceButtonState(kCGEventSourceStateCombinedSessionState,
+                                 kCGMouseButtonCenter)) {
+        modifiers |= java_awt_event_InputEvent_BUTTON2_DOWN_MASK;
+    }
+
+    NSInteger extraButton = 3;
+    for (; extraButton < gNumberOfButtons; extraButton++) {
+        if (CGEventSourceButtonState(kCGEventSourceStateCombinedSessionState,
+                                 extraButton)) {
+            modifiers |= gButtonDownMasks[extraButton];
+        }
+    }
+
+    return modifiers;
+}
+
+jlong UTC(NSEvent *event) {
+    struct timeval tv;
+    if (gettimeofday(&tv, NULL) == 0) {
+        long long sec = (long long)tv.tv_sec;
+        return (sec*1000) + (tv.tv_usec/1000);
+    }
+    return 0;
+}
+
+JNIEXPORT void JNICALL
+Java_java_awt_AWTEvent_nativeSetSource
+    (JNIEnv *env, jobject self, jobject newSource)
+{
+}
+
+/*
+ * Class:     sun_lwawt_macosx_NSEvent
+ * Method:    nsToJavaMouseModifiers
+ * Signature: (II)I
+ */
+JNIEXPORT jint JNICALL
+Java_sun_lwawt_macosx_NSEvent_nsToJavaMouseModifiers
+(JNIEnv *env, jclass cls, jint buttonNumber, jint modifierFlags)
+{
+    jint jmodifiers = 0;
+
+JNF_COCOA_ENTER(env);
+
+    jmodifiers = GetJavaMouseModifiers(buttonNumber, modifierFlags);
+
+JNF_COCOA_EXIT(env);
+
+    return jmodifiers;
+}
+
+/*
+ * Class:     sun_lwawt_macosx_NSEvent
+ * Method:    nsToJavaKeyModifiers
+ * Signature: (I)I
+ */
+JNIEXPORT jint JNICALL
+Java_sun_lwawt_macosx_NSEvent_nsToJavaKeyModifiers
+(JNIEnv *env, jclass cls, jint modifierFlags)
+{
+    jint jmodifiers = 0;
+
+JNF_COCOA_ENTER(env);
+
+    jmodifiers = NsKeyModifiersToJavaModifiers(modifierFlags, YES);
+
+JNF_COCOA_EXIT(env);
+
+    return jmodifiers;
+}
+
+/*
+ * Class:     sun_lwawt_macosx_NSEvent
+ * Method:    nsToJavaKeyInfo
+ * Signature: ([I[I)Z
+ */
+JNIEXPORT jboolean JNICALL
+Java_sun_lwawt_macosx_NSEvent_nsToJavaKeyInfo
+(JNIEnv *env, jclass cls, jintArray inData, jintArray outData)
+{
+    BOOL postsTyped = NO;
+
+JNF_COCOA_ENTER(env);
+
+    jboolean copy = JNI_FALSE;
+    jint *data = (*env)->GetIntArrayElements(env, inData, &copy);
+    CHECK_NULL_RETURN(data, postsTyped);
+
+    // in  = [testChar, testDeadChar, modifierFlags, keyCode]
+    jchar testChar = (jchar)data[0];
+    BOOL isDeadChar = (data[1] != 0);
+    jint modifierFlags = data[2];
+    jshort keyCode = (jshort)data[3];
+
+    jint jkeyCode = java_awt_event_KeyEvent_VK_UNDEFINED;
+    jint jkeyLocation = java_awt_event_KeyEvent_KEY_LOCATION_UNKNOWN;
+    jchar testDeadChar = 0;
+
+    NsCharToJavaVirtualKeyCode((unichar)testChar, isDeadChar,
+                               (NSUInteger)modifierFlags, (unsigned short)keyCode,
+                               &jkeyCode, &jkeyLocation, &postsTyped, &testDeadChar);
+
+    // out = [jkeyCode, jkeyLocation];
+    (*env)->SetIntArrayRegion(env, outData, 0, 1, &jkeyCode);
+    (*env)->SetIntArrayRegion(env, outData, 1, 1, &jkeyLocation);
+    (*env)->SetIntArrayRegion(env, outData, 2, 1, (jint *)&testDeadChar);
+
+    (*env)->ReleaseIntArrayElements(env, inData, data, 0);
+
+JNF_COCOA_EXIT(env);
+
+    return postsTyped;
+}
+
+/*
+ * Class:     sun_lwawt_macosx_NSEvent
+ * Method:    nsKeyModifiersToJavaKeyInfo
+ * Signature: ([I[I)V
+ */
+JNIEXPORT void JNICALL
+Java_sun_lwawt_macosx_NSEvent_nsKeyModifiersToJavaKeyInfo
+(JNIEnv *env, jclass cls, jintArray inData, jintArray outData)
+{
+JNF_COCOA_ENTER(env);
+
+    jboolean copy = JNI_FALSE;
+    jint *data = (*env)->GetIntArrayElements(env, inData, &copy);
+    CHECK_NULL(data);
+
+    // in  = [modifierFlags, keyCode]
+    jint modifierFlags = data[0];
+    jshort keyCode = (jshort)data[1];
+
+    jint jkeyCode = java_awt_event_KeyEvent_VK_UNDEFINED;
+    jint jkeyLocation = java_awt_event_KeyEvent_KEY_LOCATION_UNKNOWN;
+    jint jkeyType = java_awt_event_KeyEvent_KEY_PRESSED;
+
+    NsKeyModifiersToJavaKeyInfo(modifierFlags,
+                                keyCode,
+                                &jkeyCode,
+                                &jkeyLocation,
+                                &jkeyType);
+
+    // out = [jkeyCode, jkeyLocation, jkeyType];
+    (*env)->SetIntArrayRegion(env, outData, 0, 1, &jkeyCode);
+    (*env)->SetIntArrayRegion(env, outData, 1, 1, &jkeyLocation);
+    (*env)->SetIntArrayRegion(env, outData, 2, 1, &jkeyType);
+
+    (*env)->ReleaseIntArrayElements(env, inData, data, 0);
+
+JNF_COCOA_EXIT(env);
+}
+
+/*
+ * Class:     sun_lwawt_macosx_NSEvent
+ * Method:    nsToJavaChar
+ * Signature: (CI)C
+ */
+JNIEXPORT jint JNICALL
+Java_sun_lwawt_macosx_NSEvent_nsToJavaChar
+(JNIEnv *env, jclass cls, jchar nsChar, jint modifierFlags)
+{
+    jchar javaChar = 0;
+
+JNF_COCOA_ENTER(env);
+
+    javaChar = NsCharToJavaChar(nsChar, modifierFlags);
+
+JNF_COCOA_EXIT(env);
+
+    return javaChar;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTSurfaceLayers.h	Thu Sep 25 16:20:38 2014 -0700
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+#import <jawt_md.h>
+
+/*
+ * The CALayer-based rendering model returns an object conforming
+ * to the JAWT_SurfaceLayers protocol
+ *
+ * @protocol JAWT_SurfaceLayers
+ * @property (readwrite, retain) CALayer *layer;
+ * @property (readonly) CALayer *windowLayer;
+ * @end
+ */
+
+@interface AWTSurfaceLayers : NSObject<JAWT_SurfaceLayers> {
+@private
+    CALayer *layer;
+    CALayer *windowLayer;
+}
+
+- (id) initWithWindowLayer: (CALayer *)windowLayer;
+- (void) setBounds: (CGRect)rect;
+
+@end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTSurfaceLayers.m	Thu Sep 25 16:20:38 2014 -0700
@@ -0,0 +1,132 @@
+/*
+ * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+#import "AWTSurfaceLayers.h"
+#import "ThreadUtilities.h"
+#import "LWCToolkit.h"
+
+#import <JavaNativeFoundation/JavaNativeFoundation.h>
+#import <QuartzCore/CATransaction.h>
+
+@implementation AWTSurfaceLayers
+
+@synthesize windowLayer;
+
+- (id) initWithWindowLayer:(CALayer *)aWindowLayer {
+    self = [super init];
+    if (self == nil) return self;
+
+    windowLayer = aWindowLayer;
+
+    return self;
+}
+
+
+- (CALayer *) layer {
+    return layer;
+}
+
+- (void) setLayer:(CALayer *)newLayer {
+    if (layer != newLayer) {
+        if (layer != nil || newLayer == nil) {
+            [layer removeFromSuperlayer];
+            [layer release];
+        }
+
+        if (newLayer != nil) {
+            layer = [newLayer retain];
+            // REMIND: window layer -> container layer
+            [windowLayer addSublayer: layer];
+        }
+    }
+}
+
+// Updates back buffer size of the layer if it's an OpenGL layer
+// including all OpenGL sublayers
++ (void) repaintLayersRecursively:(CALayer*)aLayer {
+    if ([aLayer isKindOfClass:[CAOpenGLLayer class]]) {
+        [aLayer setNeedsDisplay];
+    }
+    for(CALayer *child in aLayer.sublayers) {
+        [AWTSurfaceLayers repaintLayersRecursively: child];
+    }
+}
+
+- (void) setBounds:(CGRect)rect {
+    // translates values to the coordinate system of the "root" layer
+    rect.origin.y = windowLayer.bounds.size.height - rect.origin.y - rect.size.height;
+    [CATransaction begin];
+    [CATransaction setDisableActions:YES];
+    layer.frame = rect;
+    [CATransaction commit];
+    [AWTSurfaceLayers repaintLayersRecursively:layer];
+}
+
+@end
+
+/*
+ * Class:     sun_lwawt_macosx_CPlatformComponent
+ * Method:    nativeCreateLayer
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL
+Java_sun_lwawt_macosx_CPlatformComponent_nativeCreateComponent
+(JNIEnv *env, jobject obj, jlong windowLayerPtr)
+{
+  __block AWTSurfaceLayers *surfaceLayers = nil;
+
+JNF_COCOA_ENTER(env);
+
+    [ThreadUtilities performOnMainThreadWaiting:YES block:^(){
+
+        CALayer *windowLayer = jlong_to_ptr(windowLayerPtr);
+        surfaceLayers = [[AWTSurfaceLayers alloc] initWithWindowLayer: windowLayer];
+    }];
+    
+JNF_COCOA_EXIT(env);
+
+  return ptr_to_jlong(surfaceLayers);
+}
+
+/*
+ * Class:     sun_lwawt_macosx_CPlatformComponent
+ * Method:    nativeSetBounds
+ * Signature: (JIIII)V
+ */
+JNIEXPORT void JNICALL Java_sun_lwawt_macosx_CPlatformComponent_nativeSetBounds
+(JNIEnv *env, jclass clazz, jlong surfaceLayersPtr, jint x, jint y, jint width, jint height)
+{
+JNF_COCOA_ENTER(env);
+
+  AWTSurfaceLayers *surfaceLayers = OBJC(surfaceLayersPtr);
+    
+  [ThreadUtilities performOnMainThreadWaiting:NO block:^(){
+
+      CGRect rect = CGRectMake(x, y, width, height);
+      [surfaceLayers setBounds: rect];
+  }];
+
+JNF_COCOA_EXIT(env);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.h	Thu Sep 25 16:20:38 2014 -0700
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+#import <Cocoa/Cocoa.h>
+#import <JavaNativeFoundation/JavaNativeFoundation.h>
+
+#import "CDragSource.h"
+#import "CDropTarget.h"
+
+@interface AWTView : NSView<NSTextInputClient, CDragSourceHolder, CDropTargetHolder> {
+@private
+    jobject m_cPlatformView;
+
+    // Handler for the tracking area needed for Enter/Exit events management.
+    NSTrackingArea* rolloverTrackingArea;
+
+    // TODO: NSMenu *contextualMenu;
+
+    // dnd support (see AppKit/NSDragging.h, NSDraggingSource/Destination):
+    CDragSource *_dragSource;
+    CDropTarget *_dropTarget;
+
+    // Input method data
+    jobject fInputMethodLOCKABLE;
+    BOOL fKeyEventsNeeded;
+    BOOL fProcessingKeystroke;
+
+    BOOL fEnablePressAndHold;
+    BOOL fInPressAndHold;
+    BOOL fPAHNeedsToSelect;
+
+    id cglLayer; // is a sublayer of view.layer
+
+    BOOL mouseIsOver;
+}
+
+@property (nonatomic, retain) id cglLayer;
+@property (nonatomic) BOOL mouseIsOver;
+
+- (id) initWithRect:(NSRect) rect platformView:(jobject)cPlatformView windowLayer:(CALayer*)windowLayer;
+- (void) deliverJavaMouseEvent: (NSEvent *) event;
+- (jobject) awtComponent:(JNIEnv *)env;
+
+// Input method-related events
+- (void)setInputMethod:(jobject)inputMethod;
+- (void)abandonInput;
+
+@end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m	Thu Sep 25 16:20:38 2014 -0700
@@ -0,0 +1,1407 @@
+/*
+ * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+#import "CGLGraphicsConfig.h"
+
+#import <JavaNativeFoundation/JavaNativeFoundation.h>
+#import <JavaRuntimeSupport/JavaRuntimeSupport.h>
+#import "jni_util.h"
+
+#import "ThreadUtilities.h"
+#import "AWTView.h"
+#import "AWTEvent.h"
+#import "AWTWindow.h"
+#import "LWCToolkit.h"
+#import "JavaComponentAccessibility.h"
+#import "JavaTextAccessibility.h"
+#import "GeomUtilities.h"
+#import "OSVersion.h"
+#import "CGLLayer.h"
+
+@interface AWTView()
+@property (retain) CDropTarget *_dropTarget;
+@property (retain) CDragSource *_dragSource;
+
+-(void) deliverResize: (NSRect) rect;
+-(void) resetTrackingArea;
+-(void) deliverJavaKeyEventHelper: (NSEvent*) event;
+@end
+
+// Uncomment this line to see fprintfs of each InputMethod API being called on this View
+//#define IM_DEBUG TRUE
+//#define EXTRA_DEBUG
+
+static BOOL shouldUsePressAndHold() {
+    static int shouldUsePressAndHold = -1;
+    if (shouldUsePressAndHold != -1) return shouldUsePressAndHold;
+    shouldUsePressAndHold = !isSnowLeopardOrLower();
+    return shouldUsePressAndHold;
+}
+
+@implementation AWTView
+
+@synthesize _dropTarget;
+@synthesize _dragSource;
+@synthesize cglLayer;
+@synthesize mouseIsOver;
+
+// Note: Must be called on main (AppKit) thread only
+- (id) initWithRect: (NSRect) rect
+       platformView: (jobject) cPlatformView
+       windowLayer: (CALayer*) windowLayer
+{
+AWT_ASSERT_APPKIT_THREAD;
+    // Initialize ourselves
+    self = [super initWithFrame: rect];
+    if (self == nil) return self;
+
+    m_cPlatformView = cPlatformView;
+    fInputMethodLOCKABLE = NULL;
+    fKeyEventsNeeded = NO;
+    fProcessingKeystroke = NO;
+
+    fEnablePressAndHold = shouldUsePressAndHold();
+    fInPressAndHold = NO;
+    fPAHNeedsToSelect = NO;
+
+    mouseIsOver = NO;
+    [self resetTrackingArea];
+    [self setAutoresizesSubviews:NO];
+
+    if (windowLayer != nil) {
+        self.cglLayer = windowLayer;
+        //Layer hosting view
+        [self setLayer: cglLayer];
+        [self setWantsLayer: YES];
+        //Layer backed view
+        //[self.layer addSublayer: (CALayer *)cglLayer];
+        //[self setLayerContentsRedrawPolicy: NSViewLayerContentsRedrawDuringViewResize];
+        //[self setLayerContentsPlacement: NSViewLayerContentsPlacementTopLeft];
+        //[self setAutoresizingMask: NSViewHeightSizable | NSViewWidthSizable];
+
+#ifdef REMOTELAYER
+        CGLLayer *parentLayer = (CGLLayer*)self.cglLayer;
+        parentLayer.parentLayer = NULL;
+        parentLayer.remoteLayer = NULL;
+        if (JRSRemotePort != 0 && remoteSocketFD > 0) {
+            CGLLayer *remoteLayer = [[CGLLayer alloc] initWithJavaLayer: parentLayer.javaLayer];
+            remoteLayer.target = GL_TEXTURE_2D;
+            NSLog(@"Creating Parent=%p, Remote=%p", parentLayer, remoteLayer);
+            parentLayer.remoteLayer = remoteLayer;
+            remoteLayer.parentLayer = parentLayer;
+            remoteLayer.remoteLayer = NULL;
+            remoteLayer.jrsRemoteLayer = [remoteLayer createRemoteLayerBoundTo:JRSRemotePort];
+            [remoteLayer retain];  // REMIND
+            remoteLayer.frame = CGRectMake(0, 0, 720, 500); // REMIND
+            [remoteLayer.jrsRemoteLayer retain]; // REMIND
+            int layerID = [remoteLayer.jrsRemoteLayer layerID];
+            NSLog(@"layer id to send = %d", layerID);
+            sendLayerID(layerID);
+        }
+#endif /* REMOTELAYER */
+    }
+
+    return self;
+}
+
+- (void) dealloc {
+AWT_ASSERT_APPKIT_THREAD;
+
+    self.cglLayer = nil;
+
+    JNIEnv *env = [ThreadUtilities getJNIEnvUncached];
+    (*env)->DeleteGlobalRef(env, m_cPlatformView);
+    m_cPlatformView = NULL;
+
+    if (fInputMethodLOCKABLE != NULL)
+    {
+        JNIEnv *env = [ThreadUtilities getJNIEnvUncached];
+
+        JNFDeleteGlobalRef(env, fInputMethodLOCKABLE);
+        fInputMethodLOCKABLE = NULL;
+    }
+
+
+    [super dealloc];
+}
+
+- (void) viewDidMoveToWindow {
+AWT_ASSERT_APPKIT_THREAD;
+
+    [AWTToolkit eventCountPlusPlus];
+
+    [JNFRunLoop performOnMainThreadWaiting:NO withBlock:^() {
+        [[self window] makeFirstResponder: self];
+    }];
+    if ([self window] != NULL) {
+        [self resetTrackingArea];
+    }
+}
+
+- (BOOL) acceptsFirstMouse: (NSEvent *)event {
+    return YES;
+}
+
+- (BOOL) acceptsFirstResponder {
+    return YES;
+}
+
+- (BOOL) becomeFirstResponder {
+    return YES;
+}
+
+- (BOOL) preservesContentDuringLiveResize {
+    return YES;
+}
+
+/*
+ * Automatically triggered functions.
+ */
+
+- (void)resizeWithOldSuperviewSize:(NSSize)oldBoundsSize {
+    [super resizeWithOldSuperviewSize: oldBoundsSize];
+    [self deliverResize: [self frame]];
+}
+
+/*
+ * MouseEvents support
+ */
+
+- (void) mouseDown: (NSEvent *)event {
+    NSInputManager *inputManager = [NSInputManager currentInputManager];
+    if ([inputManager wantsToHandleMouseEvents]) {
+#if IM_DEBUG
+        NSLog(@"-> IM wants to handle event");
+#endif
+        if (![inputManager handleMouseEvent:event]) {
+            [self deliverJavaMouseEvent: event];
+        } else {
+#if IM_DEBUG
+            NSLog(@"-> Event was handled.");
+#endif
+        }
+    } else {
+#if IM_DEBUG
+        NSLog(@"-> IM does not want to handle event");
+#endif
+        [self deliverJavaMouseEvent: event];
+    }
+}
+
+- (void) mouseUp: (NSEvent *)event {
+    [self deliverJavaMouseEvent: event];
+}
+
+- (void) rightMouseDown: (NSEvent *)event {
+    [self deliverJavaMouseEvent: event];
+}
+
+- (void) rightMouseUp: (NSEvent *)event {
+    [self deliverJavaMouseEvent: event];
+}
+
+- (void) otherMouseDown: (NSEvent *)event {
+    [self deliverJavaMouseEvent: event];
+}
+
+- (void) otherMouseUp: (NSEvent *)event {
+    [self deliverJavaMouseEvent: event];
+}
+
+- (void) mouseMoved: (NSEvent *)event {
+    // TODO: better way to redirect move events to the "under" view
+    
+    NSPoint eventLocation = [event locationInWindow];
+    NSPoint localPoint = [self convertPoint: eventLocation fromView: nil];
+
+    if  ([self mouse: localPoint inRect: [self bounds]]) {
+        [self deliverJavaMouseEvent: event];
+    } else {
+        [[self nextResponder] mouseDown:event];
+    }
+}
+
+- (void) mouseDragged: (NSEvent *)event {
+    [self deliverJavaMouseEvent: event];
+}
+
+- (void) rightMouseDragged: (NSEvent *)event {
+    [self deliverJavaMouseEvent: event];
+}
+
+- (void) otherMouseDragged: (NSEvent *)event {
+    [self deliverJavaMouseEvent: event];
+}
+
+- (void) mouseEntered: (NSEvent *)event {
+    [[self window] setAcceptsMouseMovedEvents:YES];
+    //[[self window] makeFirstResponder:self];
+    [self deliverJavaMouseEvent: event];
+}
+
+- (void) mouseExited: (NSEvent *)event {
+    [[self window] setAcceptsMouseMovedEvents:NO];
+    [self deliverJavaMouseEvent: event];
+    //Restore the cursor back.
+    //[CCursorManager _setCursor: [NSCursor arrowCursor]];
+}
+
+- (void) scrollWheel: (NSEvent*) event {
+    [self deliverJavaMouseEvent: event];
+}
+
+/*
+ * KeyEvents support
+ */
+
+- (void) keyDown: (NSEvent *)event {
+    fProcessingKeystroke = YES;
+    fKeyEventsNeeded = YES;
+
+    // Allow TSM to look at the event and potentially send back NSTextInputClient messages.
+    [self interpretKeyEvents:[NSArray arrayWithObject:event]];
+
+    if (fEnablePressAndHold && [event willBeHandledByComplexInputMethod]) {
+        fProcessingKeystroke = NO;
+        if (!fInPressAndHold) {
+            fInPressAndHold = YES;
+            fPAHNeedsToSelect = YES;
+        }
+        return;
+    }
+
+    NSString *eventCharacters = [event characters];
+    BOOL isDeadKey = (eventCharacters != nil && [eventCharacters length] == 0);
+
+    if ((![self hasMarkedText] && fKeyEventsNeeded) || isDeadKey) {
+        [self deliverJavaKeyEventHelper: event];
+    }
+
+    fProcessingKeystroke = NO;
+}
+
+- (void) keyUp: (NSEvent *)event {
+    [self deliverJavaKeyEventHelper: event];
+}
+
+- (void) flagsChanged: (NSEvent *)event {
+    [self deliverJavaKeyEventHelper: event];
+}
+
+- (BOOL) performKeyEquivalent: (NSEvent *) event {
+    [self deliverJavaKeyEventHelper: event];
+
+    // Workaround for 8020209: special case for "Cmd =" and "Cmd ." 
+    // because Cocoa calls performKeyEquivalent twice for these keystrokes  
+    NSUInteger modFlags = [event modifierFlags] & 
+        (NSCommandKeyMask | NSAlternateKeyMask | NSShiftKeyMask | NSControlKeyMask);
+    if (modFlags == NSCommandKeyMask) {
+        NSString *eventChars = [event charactersIgnoringModifiers];
+        if ([eventChars length] == 1) {
+            unichar ch = [eventChars characterAtIndex:0];
+            if (ch == '=' || ch == '.') {
+                [[NSApp mainMenu] performKeyEquivalent: event];
+                return YES;
+            }
+        }
+
+    }
+
+    return NO;
+}
+
+/**
+ * Utility methods and accessors
+ */
+
+-(void) deliverJavaMouseEvent: (NSEvent *) event {
+    BOOL isEnabled = YES;
+    NSWindow* window = [self window];
+    if ([window isKindOfClass: [AWTWindow_Panel class]] || [window isKindOfClass: [AWTWindow_Normal class]]) {
+        isEnabled = [(AWTWindow*)[window delegate] isEnabled];
+    }
+
+    if (!isEnabled) {
+        return;
+    }
+
+    NSEventType type = [event type];
+
+    // check synthesized mouse entered/exited events
+    if ((type == NSMouseEntered && mouseIsOver) || (type == NSMouseExited && !mouseIsOver)) {
+        return;
+    }else if ((type == NSMouseEntered && !mouseIsOver) || (type == NSMouseExited && mouseIsOver)) {
+        mouseIsOver = !mouseIsOver;
+    }
+
+    [AWTToolkit eventCountPlusPlus];
+
+    JNIEnv *env = [ThreadUtilities getJNIEnv];
+
+    NSPoint eventLocation = [event locationInWindow];
+    NSPoint localPoint = [self convertPoint: eventLocation fromView: nil];