--- openjdk-6-6b27-1.12.6.orig/debian/compat +++ openjdk-6-6b27-1.12.6/debian/compat @@ -0,0 +1 @@ +5 --- openjdk-6-6b27-1.12.6.orig/debian/generate-debian-orig.sh +++ openjdk-6-6b27-1.12.6/debian/generate-debian-orig.sh @@ -0,0 +1,57 @@ + +tarball=openjdk-6-src-b27-26_oct_2012-dfsg.tar.gz +version=6b27-1.12.6 +hotspot=hotspot-hs20.tar.gz +cacaotb=cacao-0.99.4.tar.bz2 +cacaotb=cacao-68fe50ac34ec.tar.gz +jamvmtb=jamvm-0972452d441544f7dd29c55d64f1ce3a5db90d82.tar.gz +base=openjdk-6 +pkgdir=$base-$version +origtar=${base}_${version}.orig.tar.gz +tarballdir=6b27 + +icedtea_checkout=icedtea6-1.12 +icedtea_checkout=icedtea6-1.12.6 +debian_checkout=openjdk6 + +if [ -d $pkgdir ]; then + echo directory $pkgdir already exists + exit 1 +fi + +if [ -d $pkgdir.orig ]; then + echo directory $pkgdir.orig already exists + exit 1 +fi + +if [ -f $origtar ]; then + tar xf $origtar + if [ -d $pkgdir.orig ]; then + mv $pkgdir.orig $pkgdir + fi + tar -c -f - -C $icedtea_checkout . | tar -x -f - -C $pkgdir + cp -a $debian_checkout $pkgdir/debian +else + rm -rf $pkgdir.orig + mkdir -p $pkgdir.orig + case "$base" in + openjdk*) + #cp -p $hotspot $pkgdir.orig/ + cp -p $tarballdir/$tarball $pkgdir.orig/ + #cp -a $tarballdir/drops $pkgdir.orig/ + #if [ $(lsb_release -is) = Ubuntu ]; then + cp -p $tarballdir/$cacaotb $pkgdir.orig/ + #fi + cp -p $tarballdir/$jamvmtb $pkgdir.orig/ + ;; + esac + tar -c -f - -C $icedtea_checkout . | tar -x -f - -C $pkgdir.orig + ( + cd $pkgdir.orig + sh autogen.sh + rm -rf autom4te.cache + ) + cp -a $pkgdir.orig $pkgdir + rm -rf $pkgdir.orig/.hg + cp -a $debian_checkout $pkgdir/debian +fi --- openjdk-6-6b27-1.12.6.orig/debian/JB-jconsole.desktop.in +++ openjdk-6-6b27-1.12.6/debian/JB-jconsole.desktop.in @@ -0,0 +1,10 @@ +[Desktop Entry] +Name=@vendor@ Java @RELEASE@ Console +Name[fi]=@vendor@ Java @RELEASE@ - konsoli +Comment=@vendor@ Java @RELEASE@ Monitoring & Management Console +Comment[fi]=@vendor@ Java @RELEASE@ - valvonta- ja hallintakonsoli +Exec=/usr/bin/jconsole +Terminal=false +Type=Application +Icon=@basename@ +Categories=Application;System; --- openjdk-6-6b27-1.12.6.orig/debian/JB-fonts.defoma-hints.in +++ openjdk-6-6b27-1.12.6/debian/JB-fonts.defoma-hints.in @@ -0,0 +1,187 @@ +category truetype + +# Sans + +begin /usr/share/fonts/truetype/ttf-lucida/LucidaSansRegular.ttf + Family = LucidaSans + FontName = LucidaSans + Encoding = Unicode + Location = English + Charset = ISO8859-1 ISO8859-2 ISO8859-7 ISO8859-9 ISO8859-15 ISO10646-1 + UniCharset = ISO8859-1 ISO8859-2 ISO8859-7 ISO8859-9 ISO8859-15 + GeneralFamily = SansSerif + Weight = Book + Width = Variable + Shape = NoSerif Upright + Foundry = Lucida + Priority = 15 +end + +begin /usr/share/fonts/truetype/ttf-lucida/LucidaSansDemiBold.ttf + Family = LucidaSans + FontName = LucidaSans-Demibold + Encoding = Unicode + Location = English + Charset = ISO8859-1 ISO8859-2 ISO8859-7 ISO8859-9 ISO8859-15 ISO10646-1 + UniCharset = ISO8859-1 ISO8859-2 ISO8859-7 ISO8859-9 ISO8859-15 + GeneralFamily = SansSerif + Weight = Bold + Width = Variable + Shape = NoSerif Upright + Foundry = Lucida + Priority = 15 +end + +begin /usr/share/fonts/truetype/ttf-lucida/LucidaSansOblique.ttf + Family = LucidaSans + FontName = LucidaSans-Oblique + Encoding = Unicode + Location = English + Charset = ISO8859-1 ISO8859-2 ISO8859-7 ISO8859-9 ISO8859-15 ISO10646-1 + UniCharset = ISO8859-1 ISO8859-2 ISO8859-7 ISO8859-9 ISO8859-15 + GeneralFamily = SansSerif + Weight = Thin + Width = Variable + Shape = NoSerif Oblique + Foundry = Lucida + Priority = 15 +end + +begin /usr/share/fonts/truetype/ttf-lucida/LucidaSansDemiOblique.ttf + Family = LucidaSans + FontName = LucidaSans-Demibold-Oblique + Encoding = Unicode + Location = English + Charset = ISO8859-1 ISO8859-2 ISO8859-7 ISO8859-9 ISO8859-15 ISO10646-1 + UniCharset = ISO8859-1 ISO8859-2 ISO8859-7 ISO8859-9 ISO8859-15 + GeneralFamily = SansSerif + Weight = Bold + Width = Variable + Shape = NoSerif Oblique + Foundry = Lucida + Priority = 15 +end + +# Serif + +begin /usr/share/fonts/truetype/ttf-lucida/LucidaBrightRegular.ttf + Family = LucidaBright + FontName = LucidaBright-Regular + Encoding = Unicode + Location = English + Charset = ISO8859-1 ISO8859-2 ISO8859-7 ISO8859-9 ISO8859-15 ISO10646-1 + UniCharset = ISO8859-1 ISO8859-2 ISO8859-7 ISO8859-9 ISO8859-15 + GeneralFamily = Roman + Weight = Book + Width = Variable + Shape = NoSerif Upright + Foundry = Lucida + Priority = 15 +end + +begin /usr/share/fonts/truetype/ttf-lucida/LucidaBrightItalic.ttf + Family = LucidaBright + FontName = LucidaBright-Italic + Encoding = Unicode + Location = English + Charset = ISO8859-1 ISO8859-2 ISO8859-7 ISO8859-9 ISO8859-15 ISO10646-1 + UniCharset = ISO8859-1 ISO8859-2 ISO8859-7 ISO8859-9 ISO8859-15 + GeneralFamily = Roman + Weight = Book + Width = Variable + Shape = NoSerif Oblique + Foundry = Lucida + Priority = 15 +end + +begin /usr/share/fonts/truetype/ttf-lucida/LucidaBrightDemiBold.ttf + Family = Lucida-Bright + FontName = Lucida-Bright-Demi + Encoding = Unicode + Location = English + Charset = ISO8859-1 ISO8859-2 ISO8859-7 ISO8859-9 ISO8859-15 ISO10646-1 + UniCharset = ISO8859-1 ISO8859-2 ISO8859-7 ISO8859-9 ISO8859-15 + GeneralFamily = Roman + Weight = Bold + Width = Variable + Shape = NoSerif Upright + Foundry = Lucida + Priority = 15 +end + +begin /usr/share/fonts/truetype/ttf-lucida/LucidaBrightDemiItalic.ttf + Family = Lucida-Bright + FontName = Lucida-Bright-DemiItalic + Encoding = Unicode + Location = English + Charset = ISO8859-1 ISO8859-2 ISO8859-7 ISO8859-9 ISO8859-15 ISO10646-1 + UniCharset = ISO8859-1 ISO8859-2 ISO8859-7 ISO8859-9 ISO8859-15 + GeneralFamily = Roman + Weight = Demi + Width = Variable + Shape = NoSerif Oblique + Foundry = Lucida + Priority = 15 +end + +# Mono + +begin /usr/share/fonts/truetype/ttf-lucida/LucidaTypewriterRegular.ttf + Family = LucidaSans-Typewriter + FontName = LucidaSans-Typewriter + Encoding = Unicode + Location = English + Charset = ISO8859-1 ISO8859-2 ISO8859-7 ISO8859-9 ISO8859-15 ISO10646-1 + UniCharset = ISO8859-1 ISO8859-2 ISO8859-7 ISO8859-9 ISO8859-15 + GeneralFamily = Typewriter + Weight = Book + Width = Fixed + Shape = NoSerif Upright + Foundry = Lucida + Priority = 15 +end + +begin /usr/share/fonts/truetype/ttf-lucida/LucidaTypewriterOblique.ttf + Family = LucidaSans-Typewriter + FontName = LucidaSans-Typewriter-Oblique + Encoding = Unicode + Location = English + Charset = ISO8859-1 ISO8859-2 ISO8859-7 ISO8859-9 ISO8859-15 ISO10646-1 + UniCharset = ISO8859-1 ISO8859-2 ISO8859-7 ISO8859-9 ISO8859-15 + GeneralFamily = Typewriter + Weight = Book + Width = Fixed + Shape = NoSerif Oblique + Foundry = Lucida + Priority = 15 +end + +begin /usr/share/fonts/truetype/ttf-lucida/LucidaTypewriterBold.ttf + Family = LucidaSans-Typewriter + FontName = LucidaSans-Typewriter-Bold + Encoding = Unicode + Location = English + Charset = ISO8859-1 ISO8859-2 ISO8859-7 ISO8859-9 ISO8859-15 ISO10646-1 + UniCharset = ISO8859-1 ISO8859-2 ISO8859-7 ISO8859-9 ISO8859-15 + GeneralFamily = Typewriter + Weight = Bold + Width = Fixed + Shape = NoSerif Upright + Foundry = Lucida + Priority = 15 +end + +begin /usr/share/fonts/truetype/ttf-lucida/LucidaTypewriterBoldOblique.ttf + Family = LucidaSans-Typewriter + FontName = LucidaSans-Typewriter-Bold-Oblique + Encoding = Unicode + Location = English + Charset = ISO8859-1 ISO8859-2 ISO8859-7 ISO8859-9 ISO8859-15 ISO10646-1 + UniCharset = ISO8859-1 ISO8859-2 ISO8859-7 ISO8859-9 ISO8859-15 + GeneralFamily = Typewriter + Weight = Bold + Width = Fixed + Shape = NoSerif Oblique + Foundry = Lucida + Priority = 15 +end --- openjdk-6-6b27-1.12.6.orig/debian/JB-jre.prerm.in +++ openjdk-6-6b27-1.12.6/debian/JB-jre.prerm.in @@ -0,0 +1,12 @@ +#!/bin/sh -e + +basedir=/@basedir@ +jre_tools='@jre_tools@' + +if [ "$1" = "remove" ] || [ "$1" = "deconfigure" ]; then + for i in $jre_tools; do + update-alternatives --remove $i $basedir/jre/bin/$i + done +fi + +#DEBHELPER# --- openjdk-6-6b27-1.12.6.orig/debian/buildwatch.sh +++ openjdk-6-6b27-1.12.6/debian/buildwatch.sh @@ -0,0 +1,40 @@ +#! /bin/sh + +builddir=$1 + +echo $$ > buildwatch.pid + +maxwait=$(expr 180 \* 60) +wait=$maxwait +ival=$(expr 30 \* 60) +#ival=3 + +while [ $wait -gt 0 ]; do + sleep $ival + wait=$(expr $wait - $ival) + state= + if ps x | grep -v grep | egrep -qs '/cc1|jar|java|gij'; then + state="compiler/java/jar running ..." + wait=$maxwait + fi + + new_quiet=$(ls -l $builddir/openjdk*/build/*/tmp/rt-orig.jar $builddir/openjdk*/build/*/lib/tools.jar $builddir/openjdk*/build/*/lib/ct.sym 2>&1 | md5sum) + if [ "$old_quiet" != "$new_quiet" ]; then + state="assembling jar file ..." + wait=$maxwait + fi + old_quiet=$new_quiet + + new_noisy=$(ls -l $builddir/mauve-*/mauve_output* jtreg_output-* 2>&1 | md5sum) + if [ "$old_noisy" != "$new_noisy" ]; then + wait=$maxwait + elif [ -n "$state" ]; then + echo $state + fi + old_noisy=$new_noisy + + if [ ! -f buildwatch.pid ]; then + echo "buildwatch exit" + exit 0 + fi +done --- openjdk-6-6b27-1.12.6.orig/debian/control.jamvm-jre +++ openjdk-6-6b27-1.12.6/debian/control.jamvm-jre @@ -0,0 +1,13 @@ + +Package: icedtea-6-jre-jamvm +Architecture: @jamvm_archs@ +Multi-Arch: same +Priority: extra +Pre-Depends: ${dpkg:Depends} +Depends: @basename@-jre-headless (= @pkg_version@), ${shlibs:Depends}, ${misc:Depends} +Description: Alternative JVM for OpenJDK, using JamVM + The package provides an alternative runtime using the JamVM. This is a + somewhat faster alternative than the Zero port on architectures like armel, + mips, mipsel, powerpc. + . + The VM is started with the option `-jamvm'. See the README.Debian for details. --- openjdk-6-6b27-1.12.6.orig/debian/JB-jdk.postinst.in +++ openjdk-6-6b27-1.12.6/debian/JB-jdk.postinst.in @@ -0,0 +1,66 @@ +#!/bin/sh + +set -e + +multiarch=@multiarch@ +priority=@priority@ +basedir=/@basedir@ +mandir=$basedir/man +jdiralias=@jdiralias@ +srcext=1.gz +dstext=1.gz +jdk_tools='@jdk_tools@' + +case "$1" in +configure) + # obsolete tool + if update-alternatives --list apt 2>/dev/null; then + update-alternatives --remove-all apt || true + fi + + if [ -z "$2" ]; then + update_alternatives=y + fi + if [ -n "$multiarch" ] && [ -n "$2" ]; then + for i in $jdk_tools; do + if [ -z "$(update-alternatives --list $i 2>/dev/null | grep ^$basedir/)" ]; then + update_alternatives=y + break + fi + done + fi + + if [ "$update_alternatives" = y ]; then + if [ -n "$multiarch" ] && [ "$DPKG_MAINTSCRIPT_ARCH" != $(dpkg --print-architecture) ]; then + priority=$(expr $priority - 1) + fi + for i in $jdk_tools; do + unset slave1 slave2 || true + if [ -e $mandir/man1/$i.$srcext ]; then + slave1="--slave \ + /usr/share/man/man1/$i.$dstext \ + $i.$dstext \ + $mandir/man1/$i.$srcext" + fi + if false && [ -e $mandir/ja/man1/$i.$srcext ]; then + slave2="--slave \ + /usr/share/man/ja/man1/$i.$dstext \ + ${i}_ja.$dstext \ + $mandir/ja/man1/$i.$srcext" + fi + update-alternatives \ + --install \ + /usr/bin/$i \ + $i \ + $basedir/bin/$i \ + $priority \ + $slave1 $slave2 + done + fi # update alternatives + + ;; +esac + +#DEBHELPER# + +exit 0 --- openjdk-6-6b27-1.12.6.orig/debian/mauve_tests +++ openjdk-6-6b27-1.12.6/debian/mauve_tests @@ -0,0 +1,2570 @@ +javax.xml.xpath.XPath +javax.xml.parsers.DocumentBuilder.PR27864 +javax.xml.parsers.DocumentBuilder.parseSimpleXML +javax.crypto.spec.TestOfPBEKeySpec +javax.crypto.spec.TestOfSecretKeySpec +javax.accessibility.AccessibleContext.getAccessibleRelationSet +javax.imageio.plugins.jpeg.TestJPEGImageReadParam +javax.imageio.plugins.jpeg.TestJPEGHuffmanTable +javax.imageio.plugins.jpeg.TestJPEGQTable +javax.imageio.stream.IIOByteBuffer.setOffset +javax.imageio.stream.IIOByteBuffer.setLength +javax.imageio.stream.IIOByteBuffer.setData +javax.imageio.spi.ServiceRegistry.getServiceProviderByClass +javax.imageio.spi.ServiceRegistry.deregisterAll +javax.imageio.spi.ServiceRegistry.getCategories +javax.imageio.spi.ServiceRegistry.lookupProviders +javax.imageio.spi.ServiceRegistry.registerServiceProvider +javax.imageio.spi.IIOServiceProvider.getVersion +javax.imageio.spi.IIOServiceProvider.getVendorName +javax.imageio.spi.ImageOutputStreamSpi.ImageOutputStreamSpi +javax.imageio.spi.ImageOutputStreamSpi.needsCacheFile +javax.imageio.spi.ImageOutputStreamSpi.canUseCacheFile +javax.imageio.spi.ImageReaderWriterSpi.getNativeImageMetadataFormatName +javax.imageio.spi.ImageReaderWriterSpi.getFileSuffixes +javax.imageio.spi.ImageReaderWriterSpi.getExtraImageMetadataFormatNames +javax.imageio.spi.ImageReaderWriterSpi.getPluginClassName +javax.imageio.spi.ImageReaderWriterSpi.getNativeStreamMetadataFormatName +javax.imageio.spi.ImageReaderWriterSpi.getExtraStreamMetadataFormatNames +javax.imageio.spi.ImageReaderWriterSpi.getMIMETypes +javax.imageio.spi.ImageReaderWriterSpi.isStandardImageMetadataFormatSupported +javax.imageio.spi.ImageReaderWriterSpi.getFormatNames +javax.imageio.spi.ImageReaderWriterSpi.isStandardStreamMetadataFormatSupported +javax.imageio.spi.ImageInputStreamSpi.ImageInputStreamSpi +javax.imageio.spi.ImageInputStreamSpi.needsCacheFile +javax.imageio.spi.ImageInputStreamSpi.canUseCacheFile +javax.imageio.spi.ImageTranscoderSpi.ImageTranscoderSpi +javax.imageio.spi.IIORegistry.getDefaultInstance +javax.naming.CompoundName.simple +javax.naming.directory.BasicAttribute.Enumerate +javax.naming.CompositeName.composite +javax.management.ObjectName.apply +javax.management.ObjectName.Parsing +javax.management.ObjectName.ParsingJDK6 +javax.management.ObjectName.applyJDK6 +javax.management.openmbean.ArrayType.IsValue +javax.management.openmbean.ArrayType.Constructor2 +javax.management.openmbean.ArrayType.Equals +javax.management.openmbean.ArrayType.IsPrimitiveArray +javax.management.openmbean.ArrayType.GetArrayType +javax.management.openmbean.ArrayType.HashCode +javax.management.openmbean.ArrayType.GetPrimitiveArrayType +javax.management.openmbean.ArrayType.Constructor1 +javax.management.openmbean.CompositeDataInvocationHandler.Test +javax.management.MBeanServerPermission.Constructor +javax.security.auth.login.TestOfPR25202 +javax.print.SimpleDoc.constructor +javax.print.SimpleDoc.getStreamForBytes +javax.print.SimpleDoc.getAttributes +javax.print.SimpleDoc.getReaderForText +javax.print.DocFlavor.parseMimeType +javax.print.attribute.TextSyntax.constructors +javax.print.attribute.ResolutionSyntax.simple +javax.print.attribute.EnumSyntax.serialize +javax.print.attribute.EnumSyntax.equals +javax.print.attribute.AttributeSetUtilities.simple +javax.print.attribute.Size2DSyntax.simple +javax.print.attribute.SetOfIntegerSyntax.Simple +javax.print.attribute.HashAttributeSet.populatedSet +javax.print.attribute.HashAttributeSet.nullTests +javax.print.attribute.HashAttributeSet.emptySet +javax.print.attribute.standard.MediaSize.userClass +javax.swing.JWindow.isRootPaneCheckingEnabled +javax.swing.JSplitPane.setComponent +javax.swing.JSplitPane.setResizeWeight +javax.swing.JSplitPane.getDividerLocation +javax.swing.JSplitPane.getInputMap +javax.swing.JSplitPane.getActionMap +javax.swing.JSplitPane.paramString +javax.swing.JSplitPane.Constructor +javax.swing.JOptionPane.getInputMap +javax.swing.JTabbedPane.getInputMap +javax.swing.JTabbedPane.Mnemonic +javax.swing.JTabbedPane.remove +javax.swing.JToggleButton.constructor +javax.swing.JToggleButton.actionEvent +javax.swing.JToggleButton.isFocusable +javax.swing.JToggleButton.uidelegate +javax.swing.JToggleButton.getActionCommand +javax.swing.JToggleButton.model +javax.swing.JToggleButton.click +javax.swing.text.View.getResizeWeight +javax.swing.text.View.getMaximumSpan +javax.swing.text.View.getMinimumSpan +javax.swing.text.View.getAlignment +javax.swing.text.GapContent.getString +javax.swing.text.GapContent.GapContentTest +javax.swing.text.GapContent.length +javax.swing.text.GapContent.constructors +javax.swing.text.GapContent.insertString +javax.swing.text.GapContent.getChars +javax.swing.text.GapContent.PositionTest +javax.swing.text.GapContent.remove +javax.swing.text.ElementIterator.ElementIteratorTest +javax.swing.text.AbstractDocument.BranchElement.getStartOffset +javax.swing.text.AbstractDocument.BranchElement.getElementIndexNullPointer +javax.swing.text.AbstractDocument.BranchElement.BranchElementTest +javax.swing.text.AbstractDocument.BranchElement.getElementIndex +javax.swing.text.AbstractDocument.LeafElement.getStartOffset +javax.swing.text.AbstractDocument.getDocumentProperties +javax.swing.text.AbstractDocument.ElementChange2 +javax.swing.text.AbstractDocument.AbstractDocumentTest +javax.swing.text.AbstractDocument.ElementChange +javax.swing.text.AbstractDocument.filterTest +javax.swing.text.MaskFormatter.MaskFormatterTest +javax.swing.text.DefaultFormatter.getValueClass +javax.swing.text.PlainDocument.getRootElements +javax.swing.text.PlainDocument.getDocumentProperties +javax.swing.text.PlainDocument.removeJoinesLines +javax.swing.text.PlainDocument.multipleLeafs +javax.swing.text.PlainDocument.getText +javax.swing.text.PlainDocument.getLength +javax.swing.text.PlainDocument.createPosition +javax.swing.text.PlainDocument.insertUpdate +javax.swing.text.PlainDocument.insertString +javax.swing.text.PlainDocument.PlainDocumentTest +javax.swing.text.AttributeSet.isEqual +javax.swing.text.Segment.clone +javax.swing.text.Segment.first +javax.swing.text.Segment.setIndex +javax.swing.text.Segment.last +javax.swing.text.Segment.getIndex +javax.swing.text.Segment.current +javax.swing.text.Segment.next +javax.swing.text.Segment.isPartialReturn +javax.swing.text.Segment.getEndIndex +javax.swing.text.Segment.setPartialReturn +javax.swing.text.Segment.getBeginIndex +javax.swing.text.Segment.constructors +javax.swing.text.Segment.toString +javax.swing.text.Segment.previous +javax.swing.text.TextAction.augmentList +javax.swing.text.TabSet.getTab +javax.swing.text.TabSet.constructor +javax.swing.text.TabSet.getTabCount +javax.swing.text.TabSet.getTabIndex +javax.swing.text.TabSet.getTabIndexAfter +javax.swing.text.TabSet.equals +javax.swing.text.TabSet.toString +javax.swing.text.html.HTML.HTML_Test +javax.swing.text.html.HTMLDocument.FindById +javax.swing.text.html.parser.Entity.Entity_Test +javax.swing.text.html.parser.TagElement.TagElement_Test +javax.swing.text.html.parser.AttributeList.AttributeList_test +javax.swing.text.html.parser.Element.Element_Test +javax.swing.text.html.parser.ParserDelegator.Entities +javax.swing.text.html.parser.ParserDelegator.Text4 +javax.swing.text.html.parser.ParserDelegator.randomTables +javax.swing.text.html.parser.ParserDelegator.SimpleParsing +javax.swing.text.html.parser.ParserDelegator.Text3 +javax.swing.text.html.parser.ParserDelegator.Text +javax.swing.text.html.parser.ParserDelegator.eolnNorification +javax.swing.text.html.parser.ParserDelegator.tokenLocations +javax.swing.text.html.parser.DTD.DTD_test +javax.swing.text.BoxView.spans +javax.swing.text.StyleConstants.setTabSet +javax.swing.text.StyleConstants.setUnderline +javax.swing.text.StyleConstants.getLeftIndent +javax.swing.text.StyleConstants.getIcon +javax.swing.text.StyleConstants.setFontFamily +javax.swing.text.StyleConstants.isBold +javax.swing.text.StyleConstants.setLineSpacing +javax.swing.text.StyleConstants.isSubscript +javax.swing.text.StyleConstants.setItalic +javax.swing.text.StyleConstants.getFontSize +javax.swing.text.StyleConstants.setComponent +javax.swing.text.StyleConstants.setBidiLevel +javax.swing.text.StyleConstants.getForeground +javax.swing.text.StyleConstants.setSuperscript +javax.swing.text.StyleConstants.getSpaceAbove +javax.swing.text.StyleConstants.getLineSpacing +javax.swing.text.StyleConstants.setSpaceBelow +javax.swing.text.StyleConstants.setBackground +javax.swing.text.StyleConstants.getRightIndent +javax.swing.text.StyleConstants.getFirstLineIndent +javax.swing.text.StyleConstants.isItalic +javax.swing.text.StyleConstants.getTabSet +javax.swing.text.StyleConstants.setIcon +javax.swing.text.StyleConstants.isUnderline +javax.swing.text.StyleConstants.setBold +javax.swing.text.StyleConstants.setAlignment +javax.swing.text.StyleConstants.setSubscript +javax.swing.text.StyleConstants.setRightIndent +javax.swing.text.StyleConstants.isSuperscript +javax.swing.text.StyleConstants.getSpaceBelow +javax.swing.text.StyleConstants.setFontSize +javax.swing.text.StyleConstants.getFontFamily +javax.swing.text.StyleConstants.constants +javax.swing.text.StyleConstants.setStrikeThrough +javax.swing.text.StyleConstants.setForeground +javax.swing.text.StyleConstants.getAlignment +javax.swing.text.StyleConstants.setLeftIndent +javax.swing.text.StyleConstants.getBackground +javax.swing.text.StyleConstants.getComponent +javax.swing.text.StyleConstants.getBidiLevel +javax.swing.text.StyleConstants.setFirstLineIndent +javax.swing.text.StyleConstants.setSpaceAbove +javax.swing.text.StyleConstants.isStrikeThrough +javax.swing.text.DefaultStyledDocument.ElementBuffer.ElementStructure3 +javax.swing.text.DefaultStyledDocument.ElementBuffer.ElementStructure1 +javax.swing.text.DefaultStyledDocument.ElementBuffer.StyledDocument6 +javax.swing.text.DefaultStyledDocument.ElementBuffer.ElementStructure7 +javax.swing.text.DefaultStyledDocument.ElementBuffer.ElementStructure2 +javax.swing.text.DefaultStyledDocument.ElementBuffer.StyledDocument1 +javax.swing.text.DefaultStyledDocument.ElementBuffer.ElementStructure4 +javax.swing.text.DefaultStyledDocument.ElementBuffer.ElementStructure6 +javax.swing.text.DefaultStyledDocument.ElementBuffer.StyledDocument3 +javax.swing.text.DefaultStyledDocument.ElementBuffer.ElementStructure5 +javax.swing.text.DefaultStyledDocument.ElementBuffer.insert +javax.swing.text.DefaultStyledDocument.ElementBuffer.ElementStructure8 +javax.swing.text.DefaultStyledDocument.ElementBuffer.StyledDocument2 +javax.swing.text.DefaultStyledDocument.ElementBuffer.StyledDocument5 +javax.swing.text.DefaultStyledDocument.ElementBuffer.StyledDocument4 +javax.swing.text.DefaultStyledDocument.Insert +javax.swing.text.DefaultStyledDocument.insertString +javax.swing.text.DefaultStyledDocument.Create +javax.swing.text.SimpleAttributeSet.removeAttributesOnlyIfMatch +javax.swing.text.SimpleAttributeSet.clone +javax.swing.text.SimpleAttributeSet.EMPTY +javax.swing.text.SimpleAttributeSet.containsAttributes +javax.swing.text.SimpleAttributeSet.containsChecksParent +javax.swing.text.SimpleAttributeSet.containsAttribute +javax.swing.text.SimpleAttributeSet.getResolveParent +javax.swing.text.SimpleAttributeSet.removeAttribute +javax.swing.text.SimpleAttributeSet.copyAttributes +javax.swing.text.SimpleAttributeSet.equals +javax.swing.text.SimpleAttributeSet.removeAttributes +javax.swing.text.SimpleAttributeSet.getAttribute +javax.swing.text.SimpleAttributeSet.isEqual +javax.swing.text.SimpleAttributeSet.getAttributeCount +javax.swing.text.SimpleAttributeSet.constructors +javax.swing.text.SimpleAttributeSet.isDefined +javax.swing.text.SimpleAttributeSet.addAttribute +javax.swing.text.SimpleAttributeSet.getAttributeNames +javax.swing.text.SimpleAttributeSet.setResolveParent +javax.swing.text.SimpleAttributeSet.isEmpty +javax.swing.text.SimpleAttributeSet.addAttributes +javax.swing.text.SimpleAttributeSet.nullValue +javax.swing.text.ZoneView.getMaximumZoneSize +javax.swing.text.ZoneView.createZone +javax.swing.text.ZoneView.constructor +javax.swing.text.ZoneView.zoneWasLoaded +javax.swing.text.ZoneView.isZoneLoaded +javax.swing.text.ZoneView.loadChildren +javax.swing.text.ZoneView.setMaxZonesLoaded +javax.swing.text.ZoneView.unloadZone +javax.swing.text.ZoneView.setMaximumZoneSize +javax.swing.text.FlowView.FlowStrategy.adjustRow +javax.swing.text.FlowView.getFlowAxis +javax.swing.text.InternationalFormatter.InternationalFormatterTest +javax.swing.text.Utilities.getNextWord +javax.swing.text.Utilities.getBreakLocation +javax.swing.text.Utilities.getPreviousWord +javax.swing.text.Utilities.getWordStart +javax.swing.text.Utilities.getTabbedTextOffset +javax.swing.text.TabStop.constructors +javax.swing.text.TabStop.toString +javax.swing.text.StringContent.insertUndo +javax.swing.text.StringContent.BadLocationExceptionTest +javax.swing.text.StringContent.stickyPosition +javax.swing.text.StringContent.length +javax.swing.text.StringContent.removeUndo +javax.swing.text.StringContent.constructors +javax.swing.text.StringContent.insertString +javax.swing.text.StringContent.StringContentTest +javax.swing.text.StyledEditorKit.createInputAttributesTest +javax.swing.text.StyleContext.NamedStyleInit +javax.swing.text.StyleContext.NamedStyleSetResolveParent +javax.swing.text.StyleContext.addStyle +javax.swing.text.StyleContext.addAttribute +javax.swing.JScrollBar.getAccessibleContext +javax.swing.JScrollBar.getInputMap +javax.swing.JScrollBar.constructors +javax.swing.JScrollBar.getActionMap +javax.swing.JScrollBar.paramString +javax.swing.plaf.basic.BasicButtonUI.getTextShiftOffset +javax.swing.plaf.basic.BasicButtonUI.getPropertyPrefix +javax.swing.plaf.basic.BasicButtonUI.defaultTextIconGap +javax.swing.plaf.basic.BasicButtonUI.setTextShiftOffset +javax.swing.plaf.basic.BasicButtonUI.defaultTextShiftOffset +javax.swing.plaf.basic.BasicButtonUI.clearTextShiftOffset +javax.swing.plaf.basic.BasicRadioButtonMenuItemUI.getPropertyPrefix +javax.swing.plaf.basic.BasicToggleButtonUI.getPropertyPrefix +javax.swing.plaf.basic.BasicSeparatorUI.getPreferredSize +javax.swing.plaf.basic.BasicSeparatorUI.getMinimumSize +javax.swing.plaf.basic.BasicSeparatorUI.getMaximumSize +javax.swing.plaf.basic.BasicLookAndFeel.initSystemColorDefaults +javax.swing.plaf.basic.BasicCheckBoxMenuItemUI.getPropertyPrefix +javax.swing.plaf.basic.BasicHTML.isHTMLString +javax.swing.plaf.basic.BasicScrollBarUI.layoutContainer +javax.swing.plaf.basic.BasicScrollBarUI.getPreferredSize +javax.swing.plaf.basic.BasicScrollBarUI.constructor +javax.swing.plaf.basic.BasicScrollBarUI.getMinimumSize +javax.swing.plaf.basic.BasicScrollBarUI.createDecreaseButton +javax.swing.plaf.basic.BasicScrollBarUI.getMaximumSize +javax.swing.plaf.basic.BasicScrollBarUI.getMaximumThumbSize +javax.swing.plaf.basic.BasicScrollBarUI.installDefaults +javax.swing.plaf.basic.BasicScrollBarUI.createIncreaseButton +javax.swing.plaf.basic.BasicScrollBarUI.installComponents +javax.swing.plaf.basic.BasicScrollBarUI.getMinimumThumbSize +javax.swing.plaf.basic.BasicInternalFrameTitlePane.MaximizeAction.constructor +javax.swing.plaf.basic.BasicInternalFrameTitlePane.IconifyAction.constructor +javax.swing.plaf.basic.BasicInternalFrameTitlePane.CloseAction.constructor +javax.swing.plaf.basic.BasicInternalFrameTitlePane.RestoreAction.constructor +javax.swing.plaf.basic.BasicInternalFrameTitlePane.MoveAction.constructor +javax.swing.plaf.basic.BasicInternalFrameTitlePane.SizeAction.constructor +javax.swing.plaf.basic.BasicPasswordFieldUI.getPropertyPrefix +javax.swing.plaf.basic.BasicSplitPaneUI.BasicHorizontalLayoutManager.layoutContainer +javax.swing.plaf.basic.BasicSplitPaneUI.getDividerLocation +javax.swing.plaf.basic.BasicArrowButton.getPreferredSize +javax.swing.plaf.basic.BasicArrowButton.isFocusTraversable +javax.swing.plaf.basic.BasicArrowButton.getMinimumSize +javax.swing.plaf.basic.BasicArrowButton.isFocusable +javax.swing.plaf.basic.BasicArrowButton.getMaximumSize +javax.swing.plaf.basic.BasicSliderUI.xPositionForValue +javax.swing.plaf.basic.BasicSliderUI.getPreferredSize +javax.swing.plaf.basic.BasicSliderUI.getMinimumSize +javax.swing.plaf.basic.BasicSliderUI.valueForYPosition +javax.swing.plaf.basic.BasicSliderUI.getMaximumSize +javax.swing.plaf.basic.BasicSliderUI.getThumbSize +javax.swing.plaf.basic.BasicSliderUI.valueForXPosition +javax.swing.plaf.basic.BasicSliderUI.constructors +javax.swing.plaf.basic.BasicSliderUI.yPositionForValue +javax.swing.plaf.basic.BasicTextFieldUI.getPropertyPrefix +javax.swing.plaf.basic.BasicTextPaneUI.getPropertyPrefix +javax.swing.plaf.basic.BasicMenuItemUI.getPropertyPrefix +javax.swing.plaf.basic.BasicFormattedTextFieldUI.getPropertyPrefix +javax.swing.plaf.basic.BasicTextAreaUI.getPropertyPrefix +javax.swing.plaf.basic.BasicComboBoxUI.getDefaultSize +javax.swing.plaf.basic.BasicComboBoxUI.createEditor +javax.swing.plaf.basic.BasicComboBoxUI.getMaximumSize +javax.swing.plaf.basic.BasicListUI.updateLayoutStateNeeded +javax.swing.plaf.basic.BasicMenuUI.getPropertyPrefix +javax.swing.plaf.basic.BasicIconFactory.getCheckBoxMenuItemIcon +javax.swing.plaf.basic.BasicIconFactory.getMenuArrowIcon +javax.swing.plaf.basic.BasicIconFactory.getCheckBoxIcon +javax.swing.plaf.basic.BasicFileChooserUI.getFileName +javax.swing.plaf.basic.BasicFileChooserUI.getApproveButtonText +javax.swing.plaf.basic.BasicFileChooserUI.constructor +javax.swing.plaf.basic.BasicFileChooserUI.getApproveButtonMnemonic +javax.swing.plaf.basic.BasicFileChooserUI.uninstallStrings +javax.swing.plaf.basic.BasicFileChooserUI.getApproveButton +javax.swing.plaf.basic.BasicFileChooserUI.getGoHomeAction +javax.swing.plaf.basic.BasicFileChooserUI.getUpdateAction +javax.swing.plaf.basic.BasicFileChooserUI.getDirectoryName +javax.swing.plaf.basic.BasicFileChooserUI.getApproveSelectionAction +javax.swing.plaf.basic.BasicFileChooserUI.installStrings +javax.swing.plaf.basic.BasicFileChooserUI.getChangeToParentDirectoryAction +javax.swing.plaf.basic.BasicFileChooserUI.getCancelSelectionAction +javax.swing.plaf.basic.BasicFileChooserUI.getFileView +javax.swing.plaf.basic.BasicFileChooserUI.installIcons +javax.swing.plaf.basic.BasicFileChooserUI.getNewFolderAction +javax.swing.plaf.basic.BasicFileChooserUI.getApproveButtonToolTipText +javax.swing.plaf.basic.BasicFileChooserUI.getDialogTitle +javax.swing.plaf.basic.BasicCheckBoxUI.getPropertyPrefix +javax.swing.plaf.basic.BasicComboBoxEditor.removeActionListener +javax.swing.plaf.basic.BasicComboBoxEditor.addActionListener +javax.swing.plaf.basic.BasicComboBoxEditor.constructor +javax.swing.plaf.basic.BasicEditorPaneUI.getPropertyPrefix +javax.swing.plaf.basic.BasicRootPaneUI.installDefaults +javax.swing.plaf.basic.BasicRadioButtonUI.getPropertyPrefix +javax.swing.plaf.ColorUIResource.serialization +javax.swing.plaf.ColorUIResource.equals +javax.swing.plaf.ColorUIResource.constructors +javax.swing.plaf.metal.MetalTheme.MetalThemeTest +javax.swing.plaf.metal.MetalLookAndFeel.getMenuTextFont +javax.swing.plaf.metal.MetalLookAndFeel.getDescription +javax.swing.plaf.metal.MetalLookAndFeel.isNativeLookAndFeel +javax.swing.plaf.metal.MetalLookAndFeel.getSeparatorBackground +javax.swing.plaf.metal.MetalLookAndFeel.getPrimaryControl +javax.swing.plaf.metal.MetalLookAndFeel.getWindowTitleInactiveForeground +javax.swing.plaf.metal.MetalLookAndFeel.getMenuBackground +javax.swing.plaf.metal.MetalLookAndFeel.getMenuForeground +javax.swing.plaf.metal.MetalLookAndFeel.getPrimaryControlShadow +javax.swing.plaf.metal.MetalLookAndFeel.getWindowTitleForeground +javax.swing.plaf.metal.MetalLookAndFeel.getControlTextFont +javax.swing.plaf.metal.MetalLookAndFeel.getControlHighlight +javax.swing.plaf.metal.MetalLookAndFeel.getPrimaryControlHighlight +javax.swing.plaf.metal.MetalLookAndFeel.getControlTextColor +javax.swing.plaf.metal.MetalLookAndFeel.getPrimaryControlDarkShadow +javax.swing.plaf.metal.MetalLookAndFeel.getSeparatorForeground +javax.swing.plaf.metal.MetalLookAndFeel.getSubTextFont +javax.swing.plaf.metal.MetalLookAndFeel.setCurrentTheme +javax.swing.plaf.metal.MetalLookAndFeel.getControlShadow +javax.swing.plaf.metal.MetalLookAndFeel.isSupportedLookAndFeel +javax.swing.plaf.metal.MetalLookAndFeel.getMenuSelectedBackground +javax.swing.plaf.metal.MetalLookAndFeel.getInactiveControlTextColor +javax.swing.plaf.metal.MetalLookAndFeel.getWhite +javax.swing.plaf.metal.MetalLookAndFeel.getUserTextFont +javax.swing.plaf.metal.MetalLookAndFeel.getAcceleratorForeground +javax.swing.plaf.metal.MetalLookAndFeel.getControlDisabled +javax.swing.plaf.metal.MetalLookAndFeel.getID +javax.swing.plaf.metal.MetalLookAndFeel.getWindowTitleBackground +javax.swing.plaf.metal.MetalLookAndFeel.getName +javax.swing.plaf.metal.MetalLookAndFeel.getSystemTextColor +javax.swing.plaf.metal.MetalLookAndFeel.getWindowTitleFont +javax.swing.plaf.metal.MetalLookAndFeel.getInactiveSystemTextColor +javax.swing.plaf.metal.MetalLookAndFeel.getUserTextColor +javax.swing.plaf.metal.MetalLookAndFeel.getWindowBackground +javax.swing.plaf.metal.MetalLookAndFeel.getBlack +javax.swing.plaf.metal.MetalLookAndFeel.getAcceleratorSelectedForeground +javax.swing.plaf.metal.MetalLookAndFeel.getDesktopColor +javax.swing.plaf.metal.MetalLookAndFeel.getSystemTextFont +javax.swing.plaf.metal.MetalLookAndFeel.getControlDarkShadow +javax.swing.plaf.metal.MetalLookAndFeel.getControlInfo +javax.swing.plaf.metal.MetalLookAndFeel.getMenuDisabledForeground +javax.swing.plaf.metal.MetalLookAndFeel.getFocusColor +javax.swing.plaf.metal.MetalLookAndFeel.getMenuSelectedForeground +javax.swing.plaf.metal.MetalLookAndFeel.getHighlightedTextColor +javax.swing.plaf.metal.MetalLookAndFeel.getControl +javax.swing.plaf.metal.MetalLookAndFeel.getWindowTitleInactiveBackground +javax.swing.plaf.metal.MetalLookAndFeel.getTextHighlightColor +javax.swing.plaf.metal.MetalLookAndFeel.getPrimaryControlInfo +javax.swing.plaf.metal.MetalComboBoxIcon.getIconWidth +javax.swing.plaf.metal.MetalComboBoxIcon.getIconHeight +javax.swing.plaf.metal.MetalComboBoxUI.getPreferredSize +javax.swing.plaf.metal.MetalComboBoxUI.createArrowButton +javax.swing.plaf.metal.MetalFileChooserUI.getFileName +javax.swing.plaf.metal.MetalFileChooserUI.createFilterComboBoxModel +javax.swing.plaf.metal.MetalFileChooserUI.getButtonPanel +javax.swing.plaf.metal.MetalFileChooserUI.getPreferredSize +javax.swing.plaf.metal.MetalFileChooserUI.getMinimumSize +javax.swing.plaf.metal.MetalFileChooserUI.getMaximumSize +javax.swing.plaf.metal.MetalFileChooserUI.getApproveButton +javax.swing.plaf.metal.MetalFileChooserUI.setFileName +javax.swing.plaf.metal.MetalFileChooserUI.getBottomPanel +javax.swing.plaf.metal.MetalCheckBoxUI.getPropertyPrefix +javax.swing.plaf.metal.MetalIconFactory.TreeFolderIcon.getAdditionalHeight +javax.swing.plaf.metal.MetalIconFactory.TreeFolderIcon.getShift +javax.swing.plaf.metal.MetalIconFactory.PaletteCloseIcon.getIconWidth +javax.swing.plaf.metal.MetalIconFactory.PaletteCloseIcon.getIconHeight +javax.swing.plaf.metal.MetalIconFactory.TreeLeafIcon.getAdditionalHeight +javax.swing.plaf.metal.MetalIconFactory.TreeLeafIcon.getShift +javax.swing.plaf.metal.MetalIconFactory.getInternalFrameCloseIcon +javax.swing.plaf.metal.MetalIconFactory.getInternalFrameMaximizeIcon +javax.swing.plaf.metal.MetalIconFactory.getMenuItemCheckIcon +javax.swing.plaf.metal.MetalIconFactory.getRadioButtonMenuItemIcon +javax.swing.plaf.metal.MetalIconFactory.getCheckBoxMenuItemIcon +javax.swing.plaf.metal.MetalIconFactory.getTreeHardDriveIcon +javax.swing.plaf.metal.MetalIconFactory.getTreeLeafIcon +javax.swing.plaf.metal.MetalIconFactory.getMenuArrowIcon +javax.swing.plaf.metal.MetalIconFactory.getFileChooserNewFolderIcon +javax.swing.plaf.metal.MetalIconFactory.getTreeControlIcon +javax.swing.plaf.metal.MetalIconFactory.getFileChooserDetailViewIcon +javax.swing.plaf.metal.MetalIconFactory.getTreeFloppyDriveIcon +javax.swing.plaf.metal.MetalIconFactory.getMenuItemArrowIcon +javax.swing.plaf.metal.MetalIconFactory.getFileChooserListViewIcon +javax.swing.plaf.metal.MetalIconFactory.getTreeComputerIcon +javax.swing.plaf.metal.MetalIconFactory.getFileChooserHomeFolderIcon +javax.swing.plaf.metal.MetalIconFactory.getInternalFrameAltMaximizeIcon +javax.swing.plaf.metal.MetalIconFactory.getRadioButtonIcon +javax.swing.plaf.metal.MetalIconFactory.getFileChooserUpFolderIcon +javax.swing.plaf.metal.MetalIconFactory.getInternalFrameDefaultMenuIcon +javax.swing.plaf.metal.MetalIconFactory.getInternalFrameMinimizeIcon +javax.swing.plaf.metal.MetalIconFactory.getCheckBoxIcon +javax.swing.plaf.metal.MetalIconFactory.getTreeFolderIcon +javax.swing.plaf.metal.MetalRadioButtonUI.getSelectColor +javax.swing.plaf.metal.MetalRadioButtonUI.getFocusColor +javax.swing.plaf.metal.MetalRadioButtonUI.getDisabledTextColor +javax.swing.plaf.metal.MetalComboBoxButton.setIconOnly +javax.swing.plaf.metal.MetalComboBoxButton.isFocusTraversable +javax.swing.plaf.metal.MetalComboBoxButton.setEnabled +javax.swing.plaf.metal.MetalComboBoxButton.isIconOnly +javax.swing.plaf.metal.MetalComboBoxButton.getComboBox +javax.swing.plaf.metal.MetalComboBoxButton.getComboIcon +javax.swing.plaf.metal.MetalComboBoxButton.setComboBox +javax.swing.plaf.metal.MetalComboBoxButton.constructors +javax.swing.plaf.metal.MetalComboBoxButton.setComboIcon +javax.swing.plaf.metal.DefaultMetalTheme.getMenuTextFont +javax.swing.plaf.metal.DefaultMetalTheme.DefaultMetalThemeTest +javax.swing.plaf.metal.DefaultMetalTheme.getControlTextFont +javax.swing.plaf.metal.DefaultMetalTheme.getSubTextFont +javax.swing.plaf.metal.DefaultMetalTheme.getUserTextFont +javax.swing.plaf.metal.DefaultMetalTheme.getName +javax.swing.plaf.metal.DefaultMetalTheme.getWindowTitleFont +javax.swing.plaf.metal.DefaultMetalTheme.getSystemTextFont +javax.swing.plaf.metal.MetalComboBoxEditor.constructor +javax.swing.plaf.metal.MetalComboBoxEditor.editorBorderInsets +javax.swing.plaf.metal.MetalToolTipUI.constructor +javax.swing.plaf.metal.MetalToolTipUI.createUI +javax.swing.plaf.metal.OceanTheme.OceanThemeTest +javax.swing.plaf.metal.OceanTheme.addCustomEntriesToTable +javax.swing.plaf.metal.MetalToggleButtonUI.getSelectColor +javax.swing.plaf.metal.MetalToggleButtonUI.getFocusColor +javax.swing.plaf.metal.MetalToggleButtonUI.getDisabledTextColor +javax.swing.plaf.metal.MetalBorders.ToolBarBorder.getBorderInsets +javax.swing.plaf.metal.MetalBorders.MenuItemBorder.borderInsets +javax.swing.plaf.metal.MetalBorders.MenuBarBorder.getBorderInsets +javax.swing.plaf.metal.MetalBorders.MenuBarBorder.borderInsets +javax.swing.plaf.metal.MetalBorders.getToggleButtonBorder +javax.swing.plaf.metal.MetalBorders.getDesktopIconBorder +javax.swing.plaf.metal.MetalBorders.getButtonBorder +javax.swing.plaf.metal.MetalBorders.getTextFieldBorder +javax.swing.plaf.metal.MetalBorders.getTextBorder +javax.swing.plaf.metal.MetalScrollButton.getButtonWidth +javax.swing.plaf.metal.MetalScrollButton.getPreferredSize +javax.swing.plaf.metal.MetalScrollButton.constructor +javax.swing.plaf.metal.MetalScrollButton.getMinimumSize +javax.swing.plaf.metal.MetalScrollButton.isFocusable +javax.swing.plaf.metal.MetalScrollButton.getMaximumSize +javax.swing.plaf.metal.MetalScrollBarUI.layoutContainer +javax.swing.plaf.metal.MetalScrollBarUI.getPreferredSize +javax.swing.plaf.metal.MetalScrollBarUI.constructor +javax.swing.plaf.metal.MetalScrollBarUI.installDefaults +javax.swing.plaf.metal.MetalScrollBarUI.getMinimumThumbSize +javax.swing.plaf.metal.MetalButtonUI.getSelectColor +javax.swing.plaf.metal.MetalButtonUI.getFocusColor +javax.swing.plaf.metal.MetalButtonUI.getDisabledTextColor +javax.swing.plaf.IconUIResource.constructor +javax.swing.JFrame.isRootPaneCheckingEnabled +javax.swing.JFrame.glassPaneLayout +javax.swing.JFrame.constructors +javax.swing.border.TitledBorder.getTitleFont +javax.swing.border.TitledBorder.getTitle +javax.swing.border.TitledBorder.setTitleJustification +javax.swing.border.TitledBorder.getBorder +javax.swing.border.TitledBorder.getBorderInsets +javax.swing.border.TitledBorder.setTitleColor +javax.swing.border.TitledBorder.setTitle +javax.swing.border.TitledBorder.setTitlePosition +javax.swing.border.TitledBorder.getTitleJustification +javax.swing.border.TitledBorder.setBorder +javax.swing.border.TitledBorder.getTitleColor +javax.swing.border.TitledBorder.isBorderOpaque +javax.swing.border.TitledBorder.constructors +javax.swing.border.TitledBorder.setTitleFont +javax.swing.border.TitledBorder.getTitlePosition +javax.swing.border.CompoundBorder.isBorderOpaque +javax.swing.JTable.AccessibleJTable.AccessibleJTableHeaderCell.getAccessibleRole +javax.swing.JTable.AccessibleJTable.AccessibleJTableCell.getAccessibleRole +javax.swing.JTable.AccessibleJTable.getAccessibleColumnHeader +javax.swing.JTable.setRowSelectionAllowed +javax.swing.JTable.getColumn +javax.swing.JTable.getRowHeight +javax.swing.JTable.convertColumnIndexToModel +javax.swing.JTable.createDefaultDataModel +javax.swing.JTable.getCellEditor +javax.swing.JTable.setColumnSelectionAllowed +javax.swing.JTable.setAutoCreateColumnsFromModel +javax.swing.JTable.setRowHeight +javax.swing.JTable.createDefaultSelectionModel +javax.swing.JTable.getAccessibleContext +javax.swing.JTable.convertColumnIndexToView +javax.swing.JTable.isCellEditable +javax.swing.JTable.getInputMap +javax.swing.JTable.getCellRect +javax.swing.JTable.isRowSelected +javax.swing.JTable.getModel +javax.swing.JTable.initializeLocalVars +javax.swing.JTable.createDefaultColumnsFromModel +javax.swing.JTable.getAutoCreateColumnsFromModel +javax.swing.JTable.isColumnSelected +javax.swing.JTable.addColumn +javax.swing.table.AbstractTableModel.getColumnName +javax.swing.table.AbstractTableModel.fireTableDataChanged +javax.swing.table.AbstractTableModel.fireTableStructureChanged +javax.swing.table.AbstractTableModel.fireTableRowsUpdated +javax.swing.table.AbstractTableModel.fireTableRowsDeleted +javax.swing.table.AbstractTableModel.getColumnClass +javax.swing.table.AbstractTableModel.isCellEditable +javax.swing.table.AbstractTableModel.fireTableChanged +javax.swing.table.AbstractTableModel.findColumn +javax.swing.table.AbstractTableModel.fireTableRowsInserted +javax.swing.table.AbstractTableModel.fireTableCellUpdated +javax.swing.table.DefaultTableCellRenderer.getTableCellRendererComponent +javax.swing.table.DefaultTableColumnModel.getListeners +javax.swing.table.DefaultTableColumnModel.getColumn +javax.swing.table.DefaultTableColumnModel.getColumnModelListeners +javax.swing.table.DefaultTableColumnModel.getSelectedColumnCount +javax.swing.table.DefaultTableColumnModel.getSelectionModel +javax.swing.table.DefaultTableColumnModel.getTotalColumnWidth +javax.swing.table.DefaultTableColumnModel.constructor +javax.swing.table.DefaultTableColumnModel.getColumns +javax.swing.table.DefaultTableColumnModel.setColumnSelectionAllowed +javax.swing.table.DefaultTableColumnModel.getColumnSelectionAllowed +javax.swing.table.DefaultTableColumnModel.getColumnCount +javax.swing.table.DefaultTableColumnModel.setSelectionModel +javax.swing.table.DefaultTableColumnModel.setColumnMargin +javax.swing.table.DefaultTableColumnModel.getColumnIndexAtX +javax.swing.table.DefaultTableColumnModel.addColumnModelListener +javax.swing.table.DefaultTableColumnModel.removeColumn +javax.swing.table.DefaultTableColumnModel.moveColumn +javax.swing.table.DefaultTableColumnModel.addColumn +javax.swing.table.DefaultTableColumnModel.getColumnIndex +javax.swing.table.DefaultTableColumnModel.getColumnMargin +javax.swing.table.DefaultTableModel.removeRow +javax.swing.table.DefaultTableModel.getRowCount +javax.swing.table.DefaultTableModel.setColumnCount +javax.swing.table.DefaultTableModel.insertRow +javax.swing.table.DefaultTableModel.getColumnCount +javax.swing.table.DefaultTableModel.convertToVector +javax.swing.table.DefaultTableModel.setColumnIdentifiers +javax.swing.table.DefaultTableModel.isCellEditable +javax.swing.table.DefaultTableModel.setDataVector +javax.swing.table.DefaultTableModel.setValueAt +javax.swing.table.DefaultTableModel.moveRow +javax.swing.table.DefaultTableModel.newDataAvailable +javax.swing.table.DefaultTableModel.addRow +javax.swing.table.DefaultTableModel.constructors +javax.swing.table.DefaultTableModel.getDataVector +javax.swing.table.DefaultTableModel.rowsRemoved +javax.swing.table.DefaultTableModel.addColumn +javax.swing.table.DefaultTableModel.setRowCount +javax.swing.table.DefaultTableModel.getValueAt +javax.swing.table.TableColumn.setCellEditor +javax.swing.table.TableColumn.getHeaderRenderer +javax.swing.table.TableColumn.getIdentifier +javax.swing.table.TableColumn.setPreferredWidth +javax.swing.table.TableColumn.setHeaderValue +javax.swing.table.TableColumn.getCellRenderer +javax.swing.table.TableColumn.sizeWidthToFit +javax.swing.table.TableColumn.setResizable +javax.swing.table.TableColumn.properties +javax.swing.table.TableColumn.removePropertyChangeListener +javax.swing.table.TableColumn.setIdentifier +javax.swing.table.TableColumn.addPropertyChangeListener +javax.swing.table.TableColumn.setMinWidth +javax.swing.table.TableColumn.setModelIndex +javax.swing.table.TableColumn.setCellRenderer +javax.swing.table.TableColumn.getModelIndex +javax.swing.table.TableColumn.setMaxWidth +javax.swing.table.TableColumn.setWidth +javax.swing.table.TableColumn.constants +javax.swing.table.TableColumn.setHeaderRenderer +javax.swing.table.TableColumn.getHeaderValue +javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getLocale +javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.isFocusTraversable +javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.setAccessibleName +javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getAccessibleName +javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getAccessibleDescription +javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getAccessibleIndexInParent +javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getAccessibleContext +javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.isVisible +javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getAccessibleChild +javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getAccessibleRole +javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getAccessibleComponent +javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getAccessibleChildrenCount +javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getAccessibleValue +javax.swing.table.JTableHeader.AccessibleJTableHeader.getAccessibleChild +javax.swing.table.JTableHeader.AccessibleJTableHeader.getAccessibleRole +javax.swing.table.JTableHeader.AccessibleJTableHeader.getAccessibleChildrenCount +javax.swing.table.JTableHeader.getAccessibleContext +javax.swing.event.InternalFrameEvent.constructor +javax.swing.event.InternalFrameEvent.getInternalFrame +javax.swing.event.InternalFrameEvent.paramString +javax.swing.event.ListDataEvent.getIndex0 +javax.swing.event.ListDataEvent.constructor +javax.swing.event.ListDataEvent.getType +javax.swing.event.ListDataEvent.getSource +javax.swing.event.ListDataEvent.getIndex1 +javax.swing.event.ListDataEvent.toString +javax.swing.event.TableModelEvent.constructors +javax.swing.event.SwingPropertyChangeSupport.firePropertyChange +javax.swing.event.SwingPropertyChangeSupport.getPropertyChangeListeners +javax.swing.event.SwingPropertyChangeSupport.constructor +javax.swing.event.SwingPropertyChangeSupport.hasListeners +javax.swing.event.SwingPropertyChangeSupport.removePropertyChangeListener +javax.swing.event.SwingPropertyChangeSupport.addPropertyChangeListener +javax.swing.event.EventListenerList.getListeners +javax.swing.event.EventListenerList.add +javax.swing.event.EventListenerList.getListenerList +javax.swing.event.EventListenerList.getListenerCount +javax.swing.event.EventListenerList.toString +javax.swing.event.EventListenerList.remove +javax.swing.event.TreeSelectionEvent.isAddedPath +javax.swing.event.TreeSelectionEvent.cloneWithSource +javax.swing.event.TreeSelectionEvent.constructors +javax.swing.JDesktopPane.constructor +javax.swing.JRadioButton.isFocusable +javax.swing.JRadioButton.uidelegate +javax.swing.JRadioButton.getActionCommand +javax.swing.JRadioButton.model +javax.swing.JMenuBar.getComponentIndex +javax.swing.JMenuBar.getHelpMenu +javax.swing.JMenuBar.getSubElements +javax.swing.JMenuBar.setMargin +javax.swing.JMenuBar.getInputMap +javax.swing.JMenuBar.setHelpMenu +javax.swing.JMenuBar.getActionMap +javax.swing.JMenuBar.getMenu +javax.swing.JCheckBoxMenuItem.uidelegate +javax.swing.JCheckBoxMenuItem.getActionCommand +javax.swing.JCheckBoxMenuItem.model +javax.swing.JCheckBoxMenuItem.constructors +javax.swing.JComboBox.getPrototypeDisplayValue +javax.swing.JComboBox.MutableTest2 +javax.swing.JComboBox.setEditor +javax.swing.JComboBox.getEditor +javax.swing.JComboBox.addItem +javax.swing.JComboBox.MutableTest1 +javax.swing.JComboBox.removeItem +javax.swing.JComboBox.setModel +javax.swing.JComboBox.setSelectedIndex +javax.swing.JComboBox.model +javax.swing.JComboBox.listenerList +javax.swing.JComboBox.setPrototypeDisplayValue +javax.swing.JComboBox.setEditable +javax.swing.JComboBox.SimpleSelectionTest +javax.swing.OverlayLayout.layoutContainer +javax.swing.OverlayLayout.getLayoutAlignmentY +javax.swing.OverlayLayout.getLayoutAlignmentX +javax.swing.OverlayLayout.preferredLayoutSize +javax.swing.OverlayLayout.minimumLayoutSize +javax.swing.OverlayLayout.maximumLayoutSize +javax.swing.JScrollPane.AccessibleJScrollPane.resetViewport +javax.swing.JScrollPane.createHorizontalScrollBar +javax.swing.JScrollPane.getInputMap +javax.swing.JScrollPane.createVerticalScrollBar +javax.swing.JScrollPane.getActionMap +javax.swing.DefaultListCellRenderer.getListCellRendererComponent +javax.swing.JFileChooser.setFileHidingEnabled +javax.swing.JFileChooser.getControlButtonsAreShown +javax.swing.JFileChooser.setApproveButtonMnemonic +javax.swing.JFileChooser.setFileSystemView +javax.swing.JFileChooser.getApproveButtonText +javax.swing.JFileChooser.setDialogTitle +javax.swing.JFileChooser.setDialogType +javax.swing.JFileChooser.setSelectedFile +javax.swing.JFileChooser.getChoosableFileFilters +javax.swing.JFileChooser.getApproveButtonMnemonic +javax.swing.JFileChooser.setApproveButtonText +javax.swing.JFileChooser.getDialogType +javax.swing.JFileChooser.getFileFilter +javax.swing.JFileChooser.setAccessory +javax.swing.JFileChooser.isAcceptAllFileFilterUsed +javax.swing.JFileChooser.accept +javax.swing.JFileChooser.setControlButtonsAreShown +javax.swing.JFileChooser.setFileView +javax.swing.JFileChooser.setCurrentDirectory +javax.swing.JFileChooser.isFileHidingEnabled +javax.swing.JFileChooser.constructors +javax.swing.JFileChooser.changeToParentDirectory +javax.swing.JFileChooser.getFileView +javax.swing.JFileChooser.getFileSystemView +javax.swing.JFileChooser.setSelectedFiles +javax.swing.JFileChooser.setFileFilter +javax.swing.JFileChooser.getFileSelectionMode +javax.swing.JFileChooser.setFileSelectionMode +javax.swing.JFileChooser.getSelectedFiles +javax.swing.JFileChooser.getAccessory +javax.swing.JFileChooser.setApproveButtonToolTipText +javax.swing.JFileChooser.getApproveButtonToolTipText +javax.swing.JFileChooser.getDialogTitle +javax.swing.SpinnerDateModel.getPreviousValue +javax.swing.SpinnerDateModel.setStart +javax.swing.SpinnerDateModel.setEnd +javax.swing.SpinnerDateModel.setValue +javax.swing.SpinnerDateModel.getNextValue +javax.swing.SpinnerDateModel.constructors +javax.swing.JDialog.isRootPaneCheckingEnabled +javax.swing.JPopupMenu.getInputMap +javax.swing.JSlider.getPaintTrack +javax.swing.JSlider.addChangeListener +javax.swing.JSlider.setMinimum +javax.swing.JSlider.setSnapToTicks +javax.swing.JSlider.setOrientation +javax.swing.JSlider.getMinorTickSpacing +javax.swing.JSlider.setValue +javax.swing.JSlider.setMaximum +javax.swing.JSlider.setExtent +javax.swing.JSlider.setPaintLabels +javax.swing.JSlider.getSnapToTicks +javax.swing.JSlider.setMinorTickSpacing +javax.swing.JSlider.getUIClassID +javax.swing.JSlider.setLabelTable +javax.swing.JSlider.getPaintTicks +javax.swing.JSlider.setModel +javax.swing.JSlider.getMaximum +javax.swing.JSlider.setPaintTicks +javax.swing.JSlider.getPaintLabels +javax.swing.JSlider.getMinimum +javax.swing.JSlider.getModel +javax.swing.JSlider.getInverted +javax.swing.JSlider.setInverted +javax.swing.JSlider.constructors +javax.swing.JSlider.getMajorTickSpacing +javax.swing.JSlider.createStandardLabels +javax.swing.JSlider.setMajorTickSpacing +javax.swing.JSlider.getExtent +javax.swing.JSlider.setPaintTrack +javax.swing.JSlider.getLabelTable +javax.swing.DefaultButtonModel.addActionListener +javax.swing.DefaultButtonModel.setPressed +javax.swing.DefaultButtonModel.setEnabled +javax.swing.DefaultButtonModel.constructor +javax.swing.DefaultButtonModel.setActionCommand +javax.swing.DefaultButtonModel.getSelectedObjects +javax.swing.DefaultButtonModel.setArmed +javax.swing.DefaultButtonModel.setSelected +javax.swing.DefaultButtonModel.constants +javax.swing.DefaultButtonModel.setRollover +javax.swing.DefaultButtonModel.setGroup +javax.swing.JComponent.getListeners +javax.swing.JComponent.setVerifyInputWhenFocusTarget +javax.swing.JComponent.getVetoableChangeListeners +javax.swing.JComponent.setInheritsPopupMenu +javax.swing.JComponent.getPreferredSize +javax.swing.JComponent.setEnabled +javax.swing.JComponent.constructor +javax.swing.JComponent.registerKeyboardAction +javax.swing.JComponent.setUI +javax.swing.JComponent.getActionForKeyStroke +javax.swing.JComponent.setMinimumSize +javax.swing.JComponent.setPreferredSize +javax.swing.JComponent.setDefaultLocale +javax.swing.JComponent.setBackground +javax.swing.JComponent.setBorder +javax.swing.JComponent.getInputMap +javax.swing.JComponent.setVisible +javax.swing.JComponent.setAlignmentX +javax.swing.JComponent.setComponentPopupMenu +javax.swing.JComponent.getFont +javax.swing.JComponent.setAlignmentY +javax.swing.JComponent.setMaximumSize +javax.swing.JComponent.setFont +javax.swing.JComponent.getVerifyInputWhenFocusTarget +javax.swing.JComponent.putClientProperty +javax.swing.JComponent.getAlignmentY +javax.swing.JComponent.getComponentPopupMenu +javax.swing.JComponent.getAlignmentX +javax.swing.JComponent.removeVetoableChangeListener +javax.swing.JComponent.getRegisteredKeyStrokes +javax.swing.JComponent.setForeground +javax.swing.JComponent.paint +javax.swing.JComponent.setOpaque +javax.swing.JComponent.addVetoableChangeListener +javax.swing.JProgressBar.isStringPainted +javax.swing.JProgressBar.setOrientation +javax.swing.JProgressBar.setValue +javax.swing.JProgressBar.setBorderPainted +javax.swing.JProgressBar.setStringPainted +javax.swing.JProgressBar.getAccessibleContext +javax.swing.JProgressBar.getPercentComplete +javax.swing.JProgressBar.paramString +javax.swing.JMenu.uidelegate +javax.swing.JMenu.getInputMap +javax.swing.JMenu.getActionCommand +javax.swing.JMenu.model +javax.swing.JMenu.getPopUpMenu +javax.swing.JMenu.remove +javax.swing.UIManager.LookAndFeelInfo.constructor +javax.swing.UIManager.getPropertyChangeListeners +javax.swing.UIManager.getBoolean +javax.swing.UIManager.addAuxiliaryLookAndFeel +javax.swing.UIManager.getString +javax.swing.UIManager.getBorder +javax.swing.UIManager.getIcon +javax.swing.UIManager.getInsets +javax.swing.UIManager.removeAuxiliaryLookAndFeel +javax.swing.UIManager.setLookAndFeel +javax.swing.UIManager.getFont +javax.swing.UIManager.getDefaults +javax.swing.UIManager.getInt +javax.swing.UIManager.addPropertyChangeListener +javax.swing.UIManager.getUI +javax.swing.UIManager.getDimension +javax.swing.UIManager.getLookAndFeelDefaults +javax.swing.UIManager.getCrossPlatformLookAndFeelClassName +javax.swing.UIManager.getColor +javax.swing.UIManager.getAuxiliaryLookAndFeels +javax.swing.JPanel.setBorder +javax.swing.JPanel.Layouter +javax.swing.JTree.getCellRenderer +javax.swing.JTree.isRowSelected +javax.swing.JTree.setModel +javax.swing.TransferHandler.exportToClipboard +javax.swing.TransferHandler.TransferActionConstructor +javax.swing.TransferHandler.canImport +javax.swing.TransferHandler.importData +javax.swing.TransferHandler.createTransferable +javax.swing.JToolTip.setComponent +javax.swing.JToolTip.setTipText +javax.swing.JToolTip.getAccessibleContext +javax.swing.JToolTip.getUIClassID +javax.swing.JToolTip.getTipText +javax.swing.JToolTip.paramString +javax.swing.JToolTip.getComponent +javax.swing.JToolBar.buttonInsets +javax.swing.JToolBar.getInputMap +javax.swing.JRootPane.RootLayout.layoutContainer +javax.swing.JRootPane.RootLayout.getLayoutAlignmentY +javax.swing.JRootPane.RootLayout.getLayoutAlignmentX +javax.swing.JRootPane.RootLayout.preferredLayoutSize +javax.swing.JRootPane.setLayeredPane +javax.swing.ScrollPaneLayout.minimumLayoutSize +javax.swing.Timer.preparatory +javax.swing.Timer.setDelay +javax.swing.Timer.basic +javax.swing.Timer.test_23918 +javax.swing.Timer.setInitialDelay +javax.swing.ActionMap.newMapKeysNull +javax.swing.InputMap.put +javax.swing.InputMap.constructor +javax.swing.InputMap.keys +javax.swing.InputMap.setParent +javax.swing.InputMap.size +javax.swing.InputMap.newMapKeysNull +javax.swing.InputMap.get +javax.swing.InputMap.getParent +javax.swing.InputMap.remove +javax.swing.InputMap.clear +javax.swing.InputMap.allKeys +javax.swing.filechooser.FileView.getDescription +javax.swing.filechooser.FileView.getIcon +javax.swing.filechooser.FileView.getName +javax.swing.filechooser.FileView.isTraversable +javax.swing.filechooser.FileView.getTypeDescription +javax.swing.filechooser.FileSystemView.getFileSystemView +javax.swing.ViewportLayout.layoutContainer +javax.swing.ViewportLayout.minimumLayoutSize +javax.swing.JList.AccessibleJList.AccessibleJListChild.isFocusTraversable +javax.swing.JList.AccessibleJList.AccessibleJListChild.isEnabled +javax.swing.JList.AccessibleJList.AccessibleJListChild.setEnabled +javax.swing.JList.AccessibleJList.AccessibleJListChild.setCursor +javax.swing.JList.AccessibleJList.AccessibleJListChild.getForeground +javax.swing.JList.AccessibleJList.AccessibleJListChild.setBackground +javax.swing.JList.AccessibleJList.AccessibleJListChild.isVisible +javax.swing.JList.AccessibleJList.AccessibleJListChild.isShowing +javax.swing.JList.AccessibleJList.AccessibleJListChild.getFont +javax.swing.JList.AccessibleJList.AccessibleJListChild.getCursor +javax.swing.JList.AccessibleJList.AccessibleJListChild.getAccessibleRole +javax.swing.JList.AccessibleJList.AccessibleJListChild.setFont +javax.swing.JList.AccessibleJList.AccessibleJListChild.getAccessibleStateSet +javax.swing.JList.AccessibleJList.AccessibleJListChild.setForeground +javax.swing.JList.AccessibleJList.AccessibleJListChild.getBackground +javax.swing.JList.AccessibleJList.valueChanged +javax.swing.JList.AccessibleJList.getAccessibleChild +javax.swing.JList.AccessibleJList.getAccessibleRole +javax.swing.JList.AccessibleJList.intervalAdded +javax.swing.JList.AccessibleJList.intervalRemoved +javax.swing.JList.AccessibleJList.contentsChanged +javax.swing.JList.AccessibleJList.getAccessibleStateSet +javax.swing.JList.setValueIsAdjusting +javax.swing.JList.setVisibleRowCount +javax.swing.JList.setSelectionBackground +javax.swing.JList.setBackground +javax.swing.JList.getSelectionBackground +javax.swing.JList.getInputMap +javax.swing.JList.setModel +javax.swing.JList.getNextMatch +javax.swing.JList.setLayoutOrientation +javax.swing.JList.constructors +javax.swing.JList.getBackground +javax.swing.ToolTipManager.setReshowDelay +javax.swing.ToolTipManager.setInitialDelay +javax.swing.ToolTipManager.setDismissDelay +javax.swing.AbstractButton.constructor +javax.swing.AbstractButton.setRolloverEnabled +javax.swing.AbstractButton.setRolloverSelectedIcon +javax.swing.AbstractButton.init +javax.swing.AbstractButton.setVerticalTextPosition +javax.swing.AbstractButton.setHorizontalAlignment +javax.swing.AbstractButton.setHorizontalTextPosition +javax.swing.AbstractButton.setRolloverIcon +javax.swing.AbstractButton.setVerticalAlignment +javax.swing.AbstractButton.createChangeListener +javax.swing.JLayeredPane.defaultLayoutManager +javax.swing.JLayeredPane.getComponentsInLayer +javax.swing.JLayeredPane.setPosition +javax.swing.JLayeredPane.moveToFront +javax.swing.JLayeredPane.addImpl +javax.swing.DefaultListModel.toArray +javax.swing.DefaultListModel.trimToSize +javax.swing.DefaultListModel.removeAllElements +javax.swing.DefaultListModel.constructor +javax.swing.DefaultListModel.add +javax.swing.DefaultListModel.lastElement +javax.swing.DefaultListModel.copyInto +javax.swing.DefaultListModel.firstElement +javax.swing.DefaultListModel.setElementAt +javax.swing.DefaultListModel.set +javax.swing.DefaultListModel.elementAt +javax.swing.DefaultListModel.ensureCapacity +javax.swing.DefaultListModel.indexOf +javax.swing.DefaultListModel.insertElementAt +javax.swing.DefaultListModel.setSize +javax.swing.DefaultListModel.lastIndexOf +javax.swing.DefaultListModel.elements +javax.swing.DefaultListModel.size +javax.swing.DefaultListModel.getSize +javax.swing.DefaultListModel.capacity +javax.swing.DefaultListModel.removeElementAt +javax.swing.DefaultListModel.get +javax.swing.DefaultListModel.contains +javax.swing.DefaultListModel.getElementAt +javax.swing.DefaultListModel.removeRange +javax.swing.DefaultListModel.addElement +javax.swing.DefaultListModel.removeElement +javax.swing.DefaultListModel.isEmpty +javax.swing.DefaultListModel.remove +javax.swing.DefaultListModel.clear +javax.swing.JFormattedTextField.JFormattedTextFieldTests +javax.swing.AbstractAction.clone +javax.swing.AbstractAction.setEnabled +javax.swing.AbstractAction.getValue +javax.swing.AbstractAction.constructors +javax.swing.AbstractAction.putValue +javax.swing.JTextArea.preferredSize +javax.swing.JTextArea.isValidChecks +javax.swing.JTextArea.text +javax.swing.JTextArea.gettingText +javax.swing.JCheckBox.constructor +javax.swing.JCheckBox.isFocusable +javax.swing.JCheckBox.uidelegate +javax.swing.JCheckBox.getActionCommand +javax.swing.JCheckBox.model +javax.swing.JButton.uidelegate +javax.swing.JButton.getActionCommand +javax.swing.JButton.model +javax.swing.SizeRequirements.calculateAlignedPositions +javax.swing.tree.TreePath.getParentPath +javax.swing.tree.TreePath.serialization +javax.swing.tree.TreePath.getPath +javax.swing.tree.TreePath.getLastPathComponent +javax.swing.tree.TreePath.PR27651 +javax.swing.tree.TreePath.isDescendant +javax.swing.tree.TreePath.equals +javax.swing.tree.TreePath.getPathCount +javax.swing.tree.TreePath.constructors +javax.swing.tree.TreePath.getPathComponent +javax.swing.tree.TreePath.pathByAddingChild +javax.swing.tree.DefaultMutableTreeNode.clone +javax.swing.tree.DefaultMutableTreeNode.getChildAt +javax.swing.tree.DefaultMutableTreeNode.getChildBefore +javax.swing.tree.DefaultMutableTreeNode.getSiblingCount +javax.swing.tree.DefaultMutableTreeNode.isNodeSibling +javax.swing.tree.DefaultMutableTreeNode.getIndex +javax.swing.tree.DefaultMutableTreeNode.isNodeChild +javax.swing.tree.DefaultMutableTreeNode.add +javax.swing.tree.DefaultMutableTreeNode.getFirstChild +javax.swing.tree.DefaultMutableTreeNode.getPath +javax.swing.tree.DefaultMutableTreeNode.removeAllChildren +javax.swing.tree.DefaultMutableTreeNode.getChildCount +javax.swing.tree.DefaultMutableTreeNode.isNodeRelated +javax.swing.tree.DefaultMutableTreeNode.getNextSibling +javax.swing.tree.DefaultMutableTreeNode.getPreviousSibling +javax.swing.tree.DefaultMutableTreeNode.setAllowsChildren +javax.swing.tree.DefaultMutableTreeNode.getPreviousLeaf +javax.swing.tree.DefaultMutableTreeNode.isNodeAncestor +javax.swing.tree.DefaultMutableTreeNode.getNextPreviousNode +javax.swing.tree.DefaultMutableTreeNode.isNodeDescendant +javax.swing.tree.DefaultMutableTreeNode.breadthFirstEnumeration +javax.swing.tree.DefaultMutableTreeNode.getLastLeaf +javax.swing.tree.DefaultMutableTreeNode.children +javax.swing.tree.DefaultMutableTreeNode.getAllowsChildren +javax.swing.tree.DefaultMutableTreeNode.getFirstLeaf +javax.swing.tree.DefaultMutableTreeNode.constructors +javax.swing.tree.DefaultMutableTreeNode.isLeaf +javax.swing.tree.DefaultMutableTreeNode.insert +javax.swing.tree.DefaultMutableTreeNode.DefaultMutableTreeNodeTest +javax.swing.tree.DefaultMutableTreeNode.getParent +javax.swing.tree.DefaultMutableTreeNode.getLastChild +javax.swing.tree.DefaultMutableTreeNode.pathFromAncestorEnumeration +javax.swing.tree.DefaultMutableTreeNode.remove +javax.swing.tree.DefaultMutableTreeNode.getNextLeaf +javax.swing.tree.DefaultMutableTreeNode.getChildAfter +javax.swing.tree.DefaultTreeCellRenderer.getBackgroundSelectionColor +javax.swing.tree.DefaultTreeCellRenderer.getOpenIcon +javax.swing.tree.DefaultTreeCellRenderer.getClosedIcon +javax.swing.tree.DefaultTreeCellRenderer.setOpenIcon +javax.swing.tree.DefaultTreeCellRenderer.constructor +javax.swing.tree.DefaultTreeCellRenderer.getLeafIcon +javax.swing.tree.DefaultTreeCellRenderer.getBorderSelectionColor +javax.swing.tree.DefaultTreeCellRenderer.setLeafIcon +javax.swing.tree.DefaultTreeCellRenderer.getDefaultLeafIcon +javax.swing.tree.DefaultTreeCellRenderer.setBackgroundSelectionColor +javax.swing.tree.DefaultTreeCellRenderer.getDefaultOpenIcon +javax.swing.tree.DefaultTreeCellRenderer.getDefaultClosedIcon +javax.swing.tree.DefaultTreeCellRenderer.setBackgroundNonSelectionColor +javax.swing.tree.DefaultTreeCellRenderer.setBorderSelectionColor +javax.swing.tree.DefaultTreeCellRenderer.getBackgroundNonSelectionColor +javax.swing.tree.DefaultTreeCellRenderer.setClosedIcon +javax.swing.tree.VariableHeightLayoutCache.getBounds +javax.swing.BoxLayout.layoutContainer +javax.swing.BoxLayout.invalidateLayout +javax.swing.BoxLayout.constructor +javax.swing.BoxLayout.simplevertical +javax.swing.BoxLayout.maximumLayoutSize2 +javax.swing.BoxLayout.getLayoutAlignmentY +javax.swing.BoxLayout.horizontal2 +javax.swing.BoxLayout.getLayoutAlignmentX +javax.swing.BoxLayout.simplehorizontal +javax.swing.BoxLayout.constants +javax.swing.BoxLayout.preferredLayoutSize +javax.swing.BoxLayout.minimumLayoutSize +javax.swing.BoxLayout.maximumLayoutSize +javax.swing.JApplet.isRootPaneCheckingEnabled +javax.swing.DefaultBoundedRangeModel.setValueIsAdjusting +javax.swing.DefaultBoundedRangeModel.setMinimum +javax.swing.DefaultBoundedRangeModel.serialization +javax.swing.DefaultBoundedRangeModel.setValue +javax.swing.DefaultBoundedRangeModel.setMaximum +javax.swing.DefaultBoundedRangeModel.setExtent +javax.swing.DefaultBoundedRangeModel.getChangeListeners +javax.swing.DefaultBoundedRangeModel.getValue +javax.swing.DefaultBoundedRangeModel.setRangeProperties +javax.swing.DefaultBoundedRangeModel.getMaximum +javax.swing.DefaultBoundedRangeModel.getValueIsAdjusting +javax.swing.DefaultBoundedRangeModel.getMinimum +javax.swing.DefaultBoundedRangeModel.general +javax.swing.DefaultBoundedRangeModel.toString +javax.swing.DefaultBoundedRangeModel.getExtent +javax.swing.undo.UndoableEditSupport.getUndoableEditListeners +javax.swing.undo.UndoableEditSupport.createCompoundEdit +javax.swing.undo.UndoableEditSupport.toString +javax.swing.undo.UndoableEditSupport.beginUpdate +javax.swing.undo.UndoableEditSupport.UndoableEditSupport +javax.swing.undo.UndoableEditSupport.getUpdateLevel +javax.swing.undo.CompoundEdit.lastEdit +javax.swing.undo.CompoundEdit.addEdit +javax.swing.undo.CompoundEdit.canRedo +javax.swing.undo.CompoundEdit.canUndo +javax.swing.undo.CompoundEdit.isInProgress +javax.swing.undo.AbstractUndoableEdit.getRedoPresentationName +javax.swing.undo.AbstractUndoableEdit.addEdit +javax.swing.undo.AbstractUndoableEdit.canRedo +javax.swing.undo.AbstractUndoableEdit.redo +javax.swing.undo.AbstractUndoableEdit.undo +javax.swing.undo.AbstractUndoableEdit.canUndo +javax.swing.undo.AbstractUndoableEdit.getPresentationName +javax.swing.undo.AbstractUndoableEdit.replaceEdit +javax.swing.undo.AbstractUndoableEdit.isSignificant +javax.swing.undo.AbstractUndoableEdit.getUndoPresentationName +javax.swing.undo.StateEdit.undo +javax.swing.undo.StateEdit.getPresentationName +javax.swing.undo.UndoManager.getRedoPresentationName +javax.swing.undo.UndoManager.getUndoOrRedoPresentationName +javax.swing.undo.UndoManager.addEdit +javax.swing.undo.UndoManager.canRedo +javax.swing.undo.UndoManager.trimEdits +javax.swing.undo.UndoManager.undoTo +javax.swing.undo.UndoManager.editToBeUndone +javax.swing.undo.UndoManager.canUndo +javax.swing.undo.UndoManager.undoableEditHappened +javax.swing.undo.UndoManager.setLimit +javax.swing.undo.UndoManager.discardAllEdits +javax.swing.undo.UndoManager.redoTo +javax.swing.undo.UndoManager.end +javax.swing.undo.UndoManager.toString +javax.swing.undo.UndoManager.getUndoPresentationName +javax.swing.undo.UndoManager.getLimit +javax.swing.undo.UndoManager.editToBeRedone +javax.swing.undo.UndoManager.canUndoOrRedo +javax.swing.JMenuItem.getActionCommand +javax.swing.JMenuItem.constructors +javax.swing.DefaultComboBoxModel.removeAllElements +javax.swing.DefaultComboBoxModel.insertElementAt +javax.swing.DefaultComboBoxModel.getIndexOf +javax.swing.DefaultComboBoxModel.getSize +javax.swing.DefaultComboBoxModel.constructors +javax.swing.DefaultComboBoxModel.removeElementAt +javax.swing.DefaultComboBoxModel.getSelectedItem +javax.swing.DefaultComboBoxModel.getElementAt +javax.swing.DefaultComboBoxModel.addElement +javax.swing.DefaultComboBoxModel.removeElement +javax.swing.SizeSequence.getIndex +javax.swing.SizeSequence.getSizes +javax.swing.SizeSequence.removeEntries +javax.swing.SizeSequence.setSizes +javax.swing.SizeSequence.setSize +javax.swing.SizeSequence.getSize +javax.swing.SizeSequence.constructors +javax.swing.SizeSequence.insertEntries +javax.swing.JTextField.CopyPaste +javax.swing.JTextField.createDefaultModel +javax.swing.JTextField.setDocument +javax.swing.JTextField.fireActionPerformed +javax.swing.UIDefaults.putDefaults +javax.swing.UIDefaults.getBoolean +javax.swing.UIDefaults.remove +javax.swing.RepaintManager.addDirtyRegion +javax.swing.JInternalFrame.AccessibleJInternalFrame.getAccessibleName +javax.swing.JInternalFrame.AccessibleJInternalFrame.getCurrentAccessibleValue +javax.swing.JInternalFrame.AccessibleJInternalFrame.getMaximumAccessibleValue +javax.swing.JInternalFrame.AccessibleJInternalFrame.setCurrentAccessibleValue +javax.swing.JInternalFrame.AccessibleJInternalFrame.getAccessibleRole +javax.swing.JInternalFrame.AccessibleJInternalFrame.getAccessibleValue +javax.swing.JInternalFrame.AccessibleJInternalFrame.getMinimumAccessibleValue +javax.swing.JInternalFrame.getDesktopIcon +javax.swing.JInternalFrame.isRootPaneCheckingEnabled +javax.swing.JInternalFrame.setDefaultCloseOperation +javax.swing.JInternalFrame.isIconifiable +javax.swing.JInternalFrame.setTitle +javax.swing.JInternalFrame.setClosable +javax.swing.JInternalFrame.setResizable +javax.swing.JInternalFrame.setIconifiable +javax.swing.JInternalFrame.setFrameIcon +javax.swing.JInternalFrame.setMaximizable +javax.swing.JInternalFrame.getInputMap +javax.swing.JInternalFrame.setClosed +javax.swing.JInternalFrame.setNormalBounds +javax.swing.JInternalFrame.setSelected2 +javax.swing.JInternalFrame.dispose +javax.swing.JInternalFrame.isResizable +javax.swing.JInternalFrame.constructors +javax.swing.JInternalFrame.paramString +javax.swing.JInternalFrame.setDesktopIcon +javax.swing.JInternalFrame.getNormalBounds +javax.swing.SpinnerListModel.Constructors +javax.swing.SpinnerListModel.Ordering +javax.swing.SpinnerListModel.SetList +javax.swing.SpinnerListModel.ArrayModel +javax.swing.SpinnerListModel.ListModel +javax.swing.JRadioButtonMenuItem.isFocusable +javax.swing.JRadioButtonMenuItem.uidelegate +javax.swing.JRadioButtonMenuItem.getActionCommand +javax.swing.JRadioButtonMenuItem.model +javax.swing.KeyStroke.getKeyStroke +javax.swing.SpinnerNumberModel.getPreviousValue +javax.swing.SpinnerNumberModel.setMinimum +javax.swing.SpinnerNumberModel.setValue +javax.swing.SpinnerNumberModel.setMaximum +javax.swing.SpinnerNumberModel.getNextValue +javax.swing.SpinnerNumberModel.setStepSize +javax.swing.SpinnerNumberModel.constructors +javax.swing.JLabel.AccessibleJLabel.getAccessibleName +javax.swing.JLabel.setDisplayedMnemonicIndex +javax.swing.JLabel.constructor +javax.swing.JLabel.getAccessibleContext +javax.swing.JLabel.Icon +javax.swing.JLabel.getInputMap +javax.swing.JLabel.setHorizontalAlignment +javax.swing.JLabel.setFont +javax.swing.JLabel.setDisplayedMnemonic +javax.swing.JLabel.getActionMap +javax.swing.JLabel.Mnemonic +javax.swing.JLabel.paramString +javax.swing.JLabel.setVerticalAlignment +javax.swing.JEditorPane.ContentType +javax.swing.JEditorPane.ViewType +javax.swing.JEditorPane.setText +javax.swing.JEditorPane.getScrollableTracks +javax.swing.DefaultListSelectionModel.clone +javax.swing.DefaultListSelectionModel.getListeners +javax.swing.DefaultListSelectionModel.setValueIsAdjusting +javax.swing.DefaultListSelectionModel.setAnchorSelectionIndex +javax.swing.DefaultListSelectionModel.removeListSelectionListener +javax.swing.DefaultListSelectionModel.constructor +javax.swing.DefaultListSelectionModel.removeIndexInterval +javax.swing.DefaultListSelectionModel.removeSelectionInterval +javax.swing.DefaultListSelectionModel.getAnchorSelectionIndex +javax.swing.DefaultListSelectionModel.getLeadSelectionIndex +javax.swing.DefaultListSelectionModel.isLeadAnchorNotificationEnabled +javax.swing.DefaultListSelectionModel.setSelectionInterval +javax.swing.DefaultListSelectionModel.getSelectionMode +javax.swing.DefaultListSelectionModel.isSelectedIndex +javax.swing.DefaultListSelectionModel.moveLeadSelectionIndex +javax.swing.DefaultListSelectionModel.leadSelectionIndex +javax.swing.DefaultListSelectionModel.getMaxSelectionIndex +javax.swing.DefaultListSelectionModel.getMinSelectionIndex +javax.swing.DefaultListSelectionModel.getListSelectionListeners +javax.swing.DefaultListSelectionModel.getValueIsAdjusting +javax.swing.DefaultListSelectionModel.isSelectionEmpty +javax.swing.DefaultListSelectionModel.addSelectionInterval +javax.swing.DefaultListSelectionModel.setLeadSelectionIndex +javax.swing.DefaultListSelectionModel.toString +javax.swing.DefaultListSelectionModel.setSelectionMode +javax.swing.DefaultListSelectionModel.clearSelection +javax.swing.DefaultListSelectionModel.insertIndexInterval +javax.swing.DefaultListSelectionModel.addListSelectionListener +javax.swing.SwingUtilities.calculateInnerArea +javax.swing.SwingUtilities.isRectangleContainingRectangle +javax.swing.SwingUtilities.computeIntersection +javax.swing.SwingUtilities.replaceUIActionMap +javax.swing.SwingUtilities.computeUnion +javax.swing.JSpinner.ListEditor.constructor +javax.swing.JSpinner.ListEditor.getModel +javax.swing.JSpinner.NumberEditor.getModel +javax.swing.JSpinner.NumberEditor.constructors +javax.swing.JSpinner.NumberEditor.getFormat +javax.swing.JSpinner.DefaultEditor.constructor +javax.swing.JSpinner.DefaultEditor.stateChanged +javax.swing.JSpinner.DefaultEditor.propertyChange +javax.swing.JSpinner.DefaultEditor.preferredLayoutSize +javax.swing.JSpinner.DefaultEditor.minimumLayoutSize +javax.swing.JSpinner.DateEditor.getModel +javax.swing.JSpinner.getPreviousValue +javax.swing.JSpinner.addChangeListener +javax.swing.JSpinner.createEditor +javax.swing.JSpinner.getChangeListeners +javax.swing.JSpinner.setEditor +javax.swing.JSpinner.getUIClassID +javax.swing.JSpinner.getEditor +javax.swing.JSpinner.setModel +javax.swing.JSpinner.getNextValue +javax.swing.JSpinner.getModel +javax.swing.JSpinner.constructors +javax.swing.JSpinner.removeChangeListener +javax.swing.ButtonGroup.constructor +javax.swing.ButtonGroup.add +javax.swing.ButtonGroup.isSelected +javax.swing.ButtonGroup.getSelection +javax.swing.ButtonGroup.getElements +javax.swing.ButtonGroup.getButtonCount +javax.swing.ButtonGroup.setSelected +javax.swing.ButtonGroup.remove +javax.swing.JViewport.setView +gnu.javax.crypto.jce.TestOfDHKeyAgreement2 +gnu.javax.crypto.jce.TestOfPR27849 +gnu.javax.crypto.jce.TestOfPR27228 +java.rmi.server.Uniqueness +java.lang.Integer.compareTo +java.lang.Integer.decode +java.lang.Integer.new_Integer +java.lang.Integer.IntegerTest +java.lang.Integer.getInteger +java.lang.Integer.parseInt +java.lang.ClassLoader.redefine +java.lang.ClassLoader.security +java.lang.ClassLoader.loadClass +java.lang.ClassLoader.initialize +java.lang.ClassLoader.Resources +java.lang.ClassLoader.BootDefinedPackages +java.lang.Number.NumberTest +java.lang.ProcessBuilder.simple +java.lang.System.getProperty +java.lang.System.arraycopy +java.lang.System.identityHashCode +java.lang.ThreadGroup.enumerate +java.lang.ThreadGroup.insecurity +java.lang.ThreadGroup.security +java.lang.String.substring +java.lang.String.compareTo +java.lang.String.getBytes13 +java.lang.String.hash +java.lang.String.split +java.lang.String.getBytes14 +java.lang.String.startsWith +java.lang.String.equals +java.lang.String.indexOf +java.lang.String.to +java.lang.String.StringTest +java.lang.String.surrogate +java.lang.String.charAt +java.lang.String.new_String +java.lang.String.getBytes +java.lang.String.CASE_INSENSITIVE_ORDER +java.lang.Class.ClassTest +java.lang.Class.serialization +java.lang.Class.reflect +java.lang.Class.security +java.lang.Class.init +java.lang.Class.newInstance +java.lang.Class.reflect2 +java.lang.Cloneable.CloneableTest +java.lang.ref.WeakReference.weakref +java.lang.ref.PhantomReference.phantom +java.lang.Double.compareTo +java.lang.Double.DoubleSetterTest +java.lang.Double.DoubleTest +java.lang.Double.toHexString +java.lang.Double.parseDouble +java.lang.Double.compare +java.lang.Double.valueOf +java.lang.StrictMath.cbrt +java.lang.StrictMath.expm1 +java.lang.StrictMath.cosh +java.lang.StrictMath.sinh +java.lang.StrictMath.tanh +java.lang.Short.hash +java.lang.Short.ShortTest +java.lang.InheritableThreadLocal.simple +java.lang.Math.max +java.lang.Math.ulp +java.lang.Math.sin +java.lang.Math.min +java.lang.Math.cos +java.lang.Math.MathTest +java.lang.Math.rint +java.lang.Boolean.BooleanTest +java.lang.Boolean.equals_Boolean +java.lang.Boolean.new_Boolean +java.lang.Boolean.hashcode_Boolean +java.lang.Boolean.get +java.lang.Boolean.value +java.lang.Float.compareTo +java.lang.Float.toHexString +java.lang.Float.compare +java.lang.Float.parseFloat +java.lang.Float.valueOf +java.lang.Float.FloatTest +java.lang.Float.new_Float +java.lang.reflect.Array.set +java.lang.reflect.Array.newInstance +java.lang.reflect.AccessibleObject.accessible +java.lang.reflect.Field.promotion +java.lang.reflect.Field.access +java.lang.reflect.Field.toString +java.lang.reflect.Modifier.toString12 +java.lang.reflect.Modifier.toString +java.lang.reflect.Constructor.newInstance +java.lang.reflect.Constructor.toString +java.lang.reflect.Proxy.DeclaringClass +java.lang.reflect.Proxy.check13 +java.lang.reflect.Proxy.ExceptionRaising +java.lang.reflect.Proxy.ToString +java.lang.reflect.InvocationTargetException.Chain +java.lang.reflect.Method.equals +java.lang.reflect.Method.toString +java.lang.reflect.Method.invoke +java.lang.reflect.ReflectAccess +java.lang.ThreadLocal.simple +java.lang.Object.clone +java.lang.Object.wait +java.lang.Object.ObjectTest +java.lang.Object.oom +java.lang.Byte.ByteTest +java.lang.Byte.new_Byte +java.lang.StringBuffer.StringBufferTest +java.lang.StringBuffer.plus +java.lang.Long.Tests15 +java.lang.Long.getLong +java.lang.Long.LongTest +java.lang.Long.new_Long +java.lang.Thread.join +java.lang.Thread.isAlive +java.lang.Thread.name +java.lang.Thread.interrupt +java.lang.Thread.contextClassLoader +java.lang.Thread.getThreadGroup +java.lang.Thread.priority +java.lang.Thread.stop +java.lang.Thread.daemon +java.lang.Package.getPackage +java.lang.Character.digit +java.lang.Character.Blocks +java.lang.Character.unicode +java.lang.Character.getNumericValue +java.lang.Character.getType +java.lang.Character.hash +java.lang.Character.classify +java.lang.Character.classify12 +java.lang.Character.to +java.lang.Character.consts +java.lang.Character.forDigit +java.lang.Character.getType12 +java.lang.Character.equals_Character +java.lang.Character.CharacterTest +java.lang.Character.Blocks15 +java.lang.SecurityManager.thread +java.text.StringCharacterIterator.constructor +java.text.StringCharacterIterator.iter +java.text.CollationElementIterator.offset +java.text.CollationElementIterator.jdk11 +java.text.AttributedString.constructors +java.text.AttributedString.addAttribute +java.text.AttributedString.getIterator +java.text.AttributedString.addAttributes +java.text.AttributedString.Test +java.text.DecimalFormat.setCurrency +java.text.DecimalFormat.clone +java.text.DecimalFormat.setDecimalFormatSymbols +java.text.DecimalFormat.getNegativePrefix +java.text.DecimalFormat.applyPattern +java.text.DecimalFormat.formatToCharacterIterator +java.text.DecimalFormat.getNegativeSuffix +java.text.DecimalFormat.setNegativePrefix +java.text.DecimalFormat.applyLocalizedPattern +java.text.DecimalFormat.getDecimalFormatSymbols +java.text.DecimalFormat.toLocalizedPattern +java.text.DecimalFormat.isDecimalSeparatorAlwaysShown +java.text.DecimalFormat.setNegativeSuffix +java.text.DecimalFormat.PR27311 +java.text.DecimalFormat.getPositivePrefix +java.text.DecimalFormat.getCurrency +java.text.DecimalFormat.equals +java.text.DecimalFormat.digits +java.text.DecimalFormat.setDecimalSeparatorAlwaysShown +java.text.DecimalFormat.setPositiveSuffix +java.text.DecimalFormat.parse +java.text.DecimalFormat.setPositivePrefix +java.text.DecimalFormat.toPattern14 +java.text.DecimalFormat.setMultiplier +java.text.DecimalFormat.format +java.text.DecimalFormat.getPositiveSuffix +java.text.DecimalFormat.setGroupingSize +java.text.DecimalFormat.PR23996 +java.text.DecimalFormat.toPattern +java.text.DecimalFormat.constructors +java.text.DecimalFormat.MaximumAndMinimumDigits +java.text.DecimalFormat.formatExp +java.text.DecimalFormat.getGroupingSize +java.text.DecimalFormat.hashCode +java.text.DecimalFormat.position +java.text.DecimalFormat.getMultiplier +java.text.NumberFormat.UK +java.text.CharacterIterator.implement +java.text.ParsePosition.Test +java.text.BreakIterator.chariter +java.text.BreakIterator.patho +java.text.BreakIterator.lineiter +java.text.BreakIterator.sentiter +java.text.BreakIterator.worditer +java.text.Collator.Constants +java.text.Collator.GetSet +java.text.ParseException.Test +java.text.Annotation.Test +java.text.RuleBasedCollator.CollatorTests +java.text.RuleBasedCollator.VeryBasic +java.text.MessageFormat.format14 +java.text.MessageFormat.attribute +java.text.MessageFormat.parse +java.text.MessageFormat.format +java.text.ChoiceFormat.next +java.text.ChoiceFormat.parse +java.text.ChoiceFormat.format +java.text.DateFormatSymbols.setMonths +java.text.DateFormatSymbols.setShortMonths +java.text.DateFormatSymbols.setEras +java.text.DateFormatSymbols.setAmPmStrings +java.text.DateFormatSymbols.setWeekdays +java.text.DateFormatSymbols.setZoneStrings +java.text.DateFormatSymbols.setShortWeekdays +java.text.DateFormatSymbols.Test +java.text.AttributedCharacterIterator.Attribute.toString +java.text.AttributedCharacterIterator.getRunLimit +java.text.AttributedCharacterIterator.implement +java.text.AttributedCharacterIterator.getRunStart +java.text.AttributedCharacterIterator.getAttribute +java.text.DateFormat.equals +java.text.DateFormat.hashCode +java.text.DateFormat.Test +java.text.ACIAttribute.Test +java.text.DecimalFormatSymbols.serial +java.text.DecimalFormatSymbols.GetSet12 +java.text.DecimalFormatSymbols.getCurrency +java.text.DecimalFormatSymbols.DumpDefault11 +java.text.DecimalFormatSymbols.GetSet11 +java.text.DecimalFormatSymbols.DumpDefault12 +java.text.FieldPosition.Test +java.text.SimpleDateFormat.applyPattern +java.text.SimpleDateFormat.Localization +java.text.SimpleDateFormat.applyLocalizedPattern +java.text.SimpleDateFormat.toLocalizedPattern +java.text.SimpleDateFormat.attribute +java.text.SimpleDateFormat.Cloning +java.text.SimpleDateFormat.getDateFormatSymbols +java.text.SimpleDateFormat.parse +java.text.SimpleDateFormat.toPattern +java.text.SimpleDateFormat.constructors +java.text.SimpleDateFormat.setDateFormatSymbols +java.text.SimpleDateFormat.getAndSet2DigitYearStart +java.text.SimpleDateFormat.Test +java.text.Bidi.Basic +java.text.Bidi.reorderVisually +java.math.BigInteger.compareTo +java.math.BigInteger.modInverse +java.math.BigInteger.shift +java.math.BigInteger.serialization +java.math.BigInteger.add +java.math.BigInteger.TestOfPR27372 +java.math.BigInteger.signum +java.math.BigInteger.modPow +java.math.BigInteger.equals +java.math.BigInteger.divide +java.math.BigInteger.setBit +java.math.BigInteger.multiply +java.math.BigInteger.TestOfToByteArray +java.math.BigInteger.toString +java.math.BigInteger.ctor +java.math.BigInteger.abs +java.math.BigInteger.valueOf +java.math.BigDecimal.compareTo +java.math.BigDecimal.divide +java.math.BigDecimal.DiagBigDecimal +java.math.BigDecimal.construct +java.math.BigDecimal.setScale +java.security.MessageDigest.Instance +java.security.AccessController.doPrivileged +java.security.AccessController.contexts +java.security.Security.getAlgorithms +java.security.Security.provider +java.security.Provider.NameVersionInfo +java.security.SecureRandom.SHA1PRNG +java.security.SecureRandom.TestOfPR23899 +java.security.SecureRandom.Instance +java.security.KeyPairGenerator.getInstance14 +java.security.AlgorithmParameters.getInstance14 +java.security.AlgorithmParameterGenerator.getInstance14 +java.security.DigestInputStream.readMD5 +java.security.KeyFactory.getInstance14 +java.security.Signature.getInstance14 +java.security.Signature.Instance +java.security.BasicPermission.newPermission +java.sql.Clob.ClobTest +java.sql.Types.TestJdbc10 +java.sql.Types.TestJdbc20 +java.sql.Array.ArrayTest +java.sql.Blob.BlobTest +java.sql.Connection.TestJdbc +java.sql.Time.TimeTest +java.sql.DriverManager.DriverManagerTest +java.sql.Date.DateTest +java.sql.DatabaseMetaData.TestJdbc +java.sql.Timestamp.TimestampTest +java.io.RandomAccessFile.setLength +java.io.RandomAccessFile.security +java.io.RandomAccessFile.jdk11 +java.io.RandomAccessFile.randomaccessfile +java.io.BufferedWriter.Test +java.io.PipedReaderWriter.Test +java.io.PushbackInputStream.ProtectedVars +java.io.PushbackInputStream.BufferOverflow +java.io.PushbackInputStream.Unread +java.io.FileOutputStream.append +java.io.FileOutputStream.fileoutputstream +java.io.FileOutputStream.security +java.io.FileOutputStream.write +java.io.FileOutputStream.jdk12 +java.io.StringWriter.Test +java.io.FilterOutputStream.write +java.io.ObjectInputStream.security +java.io.ObjectInputStream.readResolve +java.io.ObjectInputStream.ClassLoaderTest +java.io.ObjectOutputStream.security +java.io.ObjectOutputStream.StreamDataTest +java.io.ObjectOutputStream.useProtocolVersion +java.io.InputStream.Test +java.io.Utf8Encoding.ReadReference +java.io.Utf8Encoding.WriteRead +java.io.FilePermission.traversal2 +java.io.FilePermission.simple +java.io.FilePermission.traversal +java.io.FileWriter.jdk11 +java.io.OutputStreamWriter.jdk11 +java.io.Serializable.BreakMe +java.io.Serializable.BreakMeTestSer +java.io.Serializable.ParentReadResolve +java.io.Serializable.readResolve +java.io.Serializable.ParentWriteReplace +java.io.ObjectInputOutput.LoopSerializationTest +java.io.ObjectInputOutput.ExtTest +java.io.ObjectInputOutput.Deserializable +java.io.ObjectInputOutput.ProxySerializationTest +java.io.ObjectInputOutput.Compat1 +java.io.ObjectInputOutput.SerTest +java.io.ObjectInputOutput.HierarchyTest +java.io.ObjectInputOutput.OutputTest +java.io.ObjectInputOutput.InputTest +java.io.PrintWriter.jdk11 +java.io.PrintWriter.checkError +java.io.SequenceInputStream.Test +java.io.StringBufferInputStream.ProtectedVars +java.io.StringBufferInputStream.SimpleRead +java.io.StringBufferInputStream.MarkReset +java.io.LineNumberReader.Test2 +java.io.LineNumberReader.mark +java.io.LineNumberReader.Test +java.io.InputStreamReader.hang +java.io.InputStreamReader.utf8 +java.io.InputStreamReader.jdk11 +java.io.InputStreamReader.except +java.io.InputStreamReader.getEncoding +java.io.DataInputStream.readLine +java.io.DataInputStream.ReadReference +java.io.DataInputStream.ReadReference2 +java.io.FilterWriter.write +java.io.CharArrayWriter.ProtectedVars +java.io.CharArrayWriter.BasicTests +java.io.FileDescriptor.jdk11 +java.io.Reader.Test +java.io.PushbackReader.BufferOverflow +java.io.PushbackReader.Unread +java.io.ByteArrayOutputStream.subclass +java.io.ByteArrayOutputStream.write +java.io.PrintStream.subclass +java.io.PrintStream.encodings +java.io.ObjectStreamClass.ProxyTest +java.io.ObjectStreamClass.Test +java.io.FilterReader.SimpleRead +java.io.FilterReader.MarkReset +java.io.BufferedOutputStream.interrupt +java.io.BufferedOutputStream.Test +java.io.BufferedInputStream.Skip +java.io.BufferedInputStream.BigMark +java.io.BufferedInputStream.ProtectedVars +java.io.BufferedInputStream.ZeroRead +java.io.BufferedInputStream.SimpleRead +java.io.BufferedInputStream.MarkReset +java.io.BufferedReader.mark +java.io.BufferedReader.SimpleRead +java.io.BufferedReader.MarkReset +java.io.BufferedReader.boundary +java.io.DataOutputStream.WriteRead2 +java.io.DataOutputStream.writeUTF +java.io.DataOutputStream.WriteRead +java.io.PipedStream.close +java.io.PipedStream.receive +java.io.PipedStream.Test +java.io.FileInputStream.fileinputstream +java.io.FileInputStream.read +java.io.FileInputStream.security +java.io.Writer.Test +java.io.FilterInputStream.SimpleRead +java.io.FilterInputStream.MarkReset +java.io.FileReader.jdk11 +java.io.StringReader.Test +java.io.ByteArrayInputStream.ProtectedVars +java.io.ByteArrayInputStream.SimpleRead +java.io.ByteArrayInputStream.MarkReset +java.io.File.newFileURI +java.io.File.URI +java.io.File.createFile +java.io.File.security +java.io.File.ReadMethods +java.io.File.ExecuteMethods +java.io.File.list +java.io.File.jdk11 +java.io.File.newFile +java.io.File.WriteMethods +java.io.File.canWrite +java.io.File.listFiles +java.io.File.emptyFile +java.io.File.UnicodeURI +java.io.OutputStream.Test +java.io.StreamTokenizer.WordWhiteChars +java.io.StreamTokenizer.slashstar +java.io.StreamTokenizer.commentchar +java.io.StreamTokenizer.slashslash +java.io.StreamTokenizer.newline +java.io.StreamTokenizer.misc +java.io.StreamTokenizer.Test +java.io.LineNumberInputStream.Test +java.io.CharArrayReader.ProtectedVars +java.io.CharArrayReader.OutOfBounds +java.io.CharArrayReader.SimpleRead +java.io.CharArrayReader.MarkReset +java.util.Stack.AcuniaStackTest +java.util.Arrays.asList +java.util.Arrays.fill +java.util.Arrays.equals +java.util.Arrays.sort +java.util.Arrays.binarySearch +java.util.Properties.getProperty +java.util.Properties.AcuniaPropertiesTest +java.util.Properties.load +java.util.TreeSet.basic +java.util.Observable.observable +java.util.StringTokenizer.hasMoreElements +java.util.StringTokenizer.hasMoreTokens +java.util.StringTokenizer.countTokens +java.util.StringTokenizer.nextToken +java.util.StringTokenizer.constructors +java.util.StringTokenizer.nextElement +java.util.IdentityHashMap.simple +java.util.prefs.PreferenceTest +java.util.Hashtable.HashContains +java.util.Hashtable.AcuniaHashtableTest +java.util.Hashtable.EnumerateAndModify +java.util.Hashtable.basic +java.util.Hashtable.ContainsHash +java.util.Hashtable.NullValue +java.util.TreeMap.serialization +java.util.TimeZone.setDefault +java.util.TimeZone.zdump +java.util.TimeZone.setID +java.util.UUID.TestAll +java.util.Currency.Constructors +java.util.Currency.Germany +java.util.Currency.ReferenceEquality +java.util.Currency.France +java.util.Currency.getInstance +java.util.Currency.Japan +java.util.Currency.UK +java.util.Currency.Korea +java.util.Currency.PRC +java.util.Currency.Canada +java.util.Currency.CanadaFrench +java.util.Currency.China +java.util.Currency.Taiwan +java.util.Currency.Italy +java.util.AbstractCollection.AcuniaAbstractCollectionTest +java.util.AbstractCollection.AcuniaAddCollectionTest +java.util.AbstractCollection.toString +java.util.SimpleTimeZone.clone +java.util.SimpleTimeZone.hasSameRules +java.util.SimpleTimeZone.getRawOffset +java.util.SimpleTimeZone.setRawOffset +java.util.SimpleTimeZone.check14 +java.util.SimpleTimeZone.equals +java.util.SimpleTimeZone.inDaylightTime +java.util.SimpleTimeZone.setStartYear +java.util.SimpleTimeZone.constructors +java.util.SimpleTimeZone.getOffset +java.util.SimpleTimeZone.setDSTSavings +java.util.SimpleTimeZone.hashCode +java.util.SimpleTimeZone.constants +java.util.SimpleTimeZone.getDSTSavings +java.util.AbstractList.AcuniaAbstractListTest +java.util.Collections.nCopies +java.util.Collections.fill +java.util.Collections.max +java.util.Collections.copy +java.util.Collections.rotate +java.util.Collections.unmodifiableList +java.util.Collections.min +java.util.Collections.unmodifiableMap +java.util.Collections.reverse +java.util.Collections.reverseOrder +java.util.Collections.sort +java.util.Collections.binarySearch +java.util.logging.SocketHandler.SocketHandler +java.util.logging.XMLFormatter.getTail +java.util.logging.Handler.isLoggable +java.util.logging.Handler.setEncoding +java.util.logging.Handler.setFilter +java.util.logging.Handler.getErrorManager +java.util.logging.Handler.reportError +java.util.logging.Handler.setLevel +java.util.logging.Handler.setErrorManager +java.util.logging.LogRecord.getThreadID +java.util.logging.LogRecord.setLoggerName +java.util.logging.LogRecord.getMillis +java.util.logging.LogRecord.setThrown +java.util.logging.LogRecord.setThreadID +java.util.logging.LogRecord.setSequenceNumber +java.util.logging.LogRecord.setSourceMethodName +java.util.logging.LogRecord.setResourceBundle +java.util.logging.LogRecord.setMillis +java.util.logging.LogRecord.setMessage +java.util.logging.LogRecord.setParameters +java.util.logging.LogRecord.setSourceClassName +java.util.logging.LogRecord.setLevel +java.util.logging.Level.intValue +java.util.logging.Level.equals +java.util.logging.Level.getName +java.util.logging.Level.parse +java.util.logging.Level.toString +java.util.logging.Level.hashCode +java.util.logging.LogManager.readConfiguration +java.util.logging.LoggingMXBean.Test +java.util.logging.Logger.hierarchyChecks +java.util.logging.Logger.getName +java.util.logging.Logger.getAnonymousLogger +java.util.logging.Logger.securityChecks +java.util.logging.Logger.getParent +java.util.logging.Logger.global +java.util.Iterator.ConcurrentModification +java.util.BitSet.AcuniaBitSetTest +java.util.BitSet.flip +java.util.BitSet.jdk10 +java.util.BitSet.get +java.util.BitSet.clear +java.util.Timer.taskException +java.util.GregorianCalendar.first +java.util.GregorianCalendar.setFirstDayOfWeek +java.util.GregorianCalendar.dayOfWeekInMonth +java.util.GregorianCalendar.setWeekOfMonth +java.util.GregorianCalendar.internal +java.util.GregorianCalendar.equals +java.util.GregorianCalendar.getMinimum +java.util.GregorianCalendar.getMinimalDaysInFirstWeek +java.util.GregorianCalendar.conversion +java.util.GregorianCalendar.weekOfYear +java.util.Random.basic +java.util.AbstractSet.AcuniaAbstractSetTest +java.util.Calendar.TimeZone +java.util.Calendar.ampm +java.util.Calendar.add +java.util.Calendar.minmax +java.util.Calendar.setTime +java.util.Calendar.setTimeZone +java.util.Calendar.getInstance +java.util.Calendar.set +java.util.Calendar.simple +java.util.Calendar.roll +java.util.Calendar.dstOffset +java.util.regex.Matcher.hitEnd +java.util.regex.Pattern.UnicodeSimpleCategory +java.util.regex.Pattern.pcrematches +java.util.regex.Pattern.matches +java.util.regex.PatternSplit +java.util.regex.CharacterClasses +java.util.AbstractSequentialList.AcuniaAbstractSequentialListTest +java.util.LinkedList.subList +java.util.LinkedList.AcuniaLinkedListTest +java.util.LinkedList.SubListTest +java.util.HashMap.AcuniaHashMapTest +java.util.jar.JarInputStream.getNextEntry +java.util.jar.JarFile.TestOfManifest +java.util.jar.JarFile.basic +java.util.Vector.subList +java.util.Vector.copyInto +java.util.Vector.removeAll +java.util.Vector.retainAll +java.util.Vector.VectorSerialization +java.util.zip.ZipEntry.time +java.util.zip.ZipEntry.Size +java.util.zip.ZipEntry.newZipEntry +java.util.zip.ZipEntry.setComment +java.util.zip.ZipInputStream.close +java.util.zip.ZipInputStream.basic +java.util.zip.Deflater.PR27435 +java.util.zip.Adler32.checksum +java.util.zip.GZIPInputStream.PR24461 +java.util.zip.GZIPInputStream.basic +java.util.zip.InflaterInputStream.basic +java.util.zip.ZipFile.DirEntryTest +java.util.zip.ZipFile.NoEntryTest +java.util.zip.ZipFile.newZipFile +java.util.Date.compareTo +java.util.Date.clone +java.util.Date.before +java.util.Date.serialization +java.util.Date.range +java.util.Date.equals +java.util.Date.parse +java.util.Date.after +java.util.Date.getTimezoneOffset +java.util.LinkedHashMap.LinkedHashMapTest +java.util.LinkedHashMap.Regress +java.util.ArrayList.subList +java.util.ArrayList.serial +java.util.ResourceBundle.getBundle +java.util.AbstractMap.AcuniaAbstractMapTest +java.beans.XMLDecoder.jdk14 +java.beans.Expression.check +java.beans.Introspector.getBeanInfo2 +java.beans.Introspector.getBeanInfo4 +java.beans.Introspector.getBeanInfo +java.beans.Introspector.jdk11 +java.beans.Introspector.jdk12 +java.beans.Introspector.getBeanInfo2_2 +java.beans.DesignMode.constants +java.beans.PropertyEditorSupport.setValue +java.beans.PropertyEditorSupport.getSource +java.beans.SimpleBeanInfo.getIcon +java.beans.SimpleBeanInfo.getDefaultPropertyIndex +java.beans.SimpleBeanInfo.getEventSetDescriptors +java.beans.SimpleBeanInfo.getDefaultEventIndex +java.beans.SimpleBeanInfo.getBeanDescriptor +java.beans.SimpleBeanInfo.getAdditionalBeanInfo +java.beans.SimpleBeanInfo.loadImage +java.beans.EventSetDescriptor.constructorTest1 +java.beans.FeatureDescriptor.check +java.beans.beancontext.BeanContextSupport.toArray +java.beans.beancontext.BeanContextSupport.getChildPropertyChangeListener +java.beans.beancontext.BeanContextSupport.serialize +java.beans.beancontext.BeanContextSupport.getChildBeanContextChild +java.beans.beancontext.BeanContextSupport.getChildBeanContextMembershipListener +java.beans.beancontext.BeanContextSupport.setDesignTime +java.beans.beancontext.BeanContextSupport.getChildVisibility +java.beans.beancontext.BeanContextSupport.constructors +java.beans.beancontext.BeanContextSupport.getChildVetoableChangeListener +java.beans.beancontext.BeanContextSupport.getChildSerializable +java.beans.beancontext.BeanContextSupport.getBeanContextPeer +java.beans.beancontext.BeanContextServicesSupport.getChildBeanContextServicesListener +java.beans.beancontext.InstantiateChild +java.beans.beancontext.Remove +java.beans.beancontext.Array +java.beans.beancontext.Add +java.beans.PropertyChangeSupport.firePropertyChange +java.beans.VetoableChangeSupport.addVetoableChangeListener +java.beans.Statement.check +java.beans.Beans.instantiate_1 +java.beans.EventHandler.check +java.beans.EventHandler.check14b +java.beans.PropertyDescriptor.constructorTest2 +java.beans.PropertyDescriptor.constructorTest1 +java.beans.MethodDescriptor.constructorTest1 +java.awt.AWTEvent.constants +java.awt.CardLayout.show +java.awt.CardLayout.first +java.awt.CardLayout.testMaximumLayoutSize +java.awt.CardLayout.testMinimumLayoutSize +java.awt.Graphics.clearRect +java.awt.Polygon.contains +java.awt.Polygon.getPathIterator +java.awt.BasicStroke.equals +java.awt.BasicStroke.constructors +java.awt.BasicStroke.hashCode +java.awt.BasicStroke.constants +java.awt.Graphics2D.setClip +java.awt.Graphics2D.getClip +java.awt.Graphics2D.getClipBounds +java.awt.Graphics2D.setTransform +java.awt.Graphics2D.clip +java.awt.Graphics2D.transform +java.awt.Point.move +java.awt.Point.clone +java.awt.Point.equals +java.awt.Point.constructors +java.awt.Point.setLocation +java.awt.Point.translate +java.awt.Point.getLocation +java.awt.event.ComponentEvent.paramString +java.awt.image.ShortLookupTable.getTable +java.awt.image.ShortLookupTable.lookupPixel +java.awt.image.ShortLookupTable.constructors +java.awt.image.PixelGrabber.SimpleGrabber +java.awt.image.PixelGrabber.testNullProducer +java.awt.image.ConvolveOp.getEdgeCondition +java.awt.image.ConvolveOp.getKernel +java.awt.image.ConvolveOp.filterRaster +java.awt.image.ConvolveOp.getRenderingHints +java.awt.image.ConvolveOp.getPoint2D +java.awt.image.ConvolveOp.createCompatibleDestRaster +java.awt.image.ConvolveOp.constructors +java.awt.image.ConvolveOp.getBounds2D +java.awt.image.ConvolveOp.constants +java.awt.image.IndexColorModel.getGreens +java.awt.image.IndexColorModel.getComponentSize +java.awt.image.IndexColorModel.getTransparentPixel +java.awt.image.IndexColorModel.getColorSpace +java.awt.image.IndexColorModel.getAlphas +java.awt.image.IndexColorModel.getPixelSize +java.awt.image.IndexColorModel.isValid +java.awt.image.IndexColorModel.constructors +java.awt.image.IndexColorModel.getBlues +java.awt.image.IndexColorModel.getReds +java.awt.image.IndexColorModel.getTransparency +java.awt.image.DataBuffer.getDataTypeSize +java.awt.image.DataBuffer.getOffset +java.awt.image.DataBuffer.constants +java.awt.image.DataBuffer.getOffsets +java.awt.image.DataBufferUShort.getData +java.awt.image.DataBufferUShort.getBankData +java.awt.image.DataBufferUShort.setElem +java.awt.image.DataBufferUShort.getElem +java.awt.image.DataBufferUShort.getDataType +java.awt.image.DataBufferUShort.constructors +java.awt.image.ComponentSampleModel.setPixels +java.awt.image.ComponentSampleModel.getPixelStride +java.awt.image.ComponentSampleModel.getDataElements +java.awt.image.ComponentSampleModel.getSample +java.awt.image.ComponentSampleModel.getBandOffsets +java.awt.image.ComponentSampleModel.equals +java.awt.image.ComponentSampleModel.getPixel +java.awt.image.ComponentSampleModel.getNumDataElements +java.awt.image.ComponentSampleModel.getSamples +java.awt.image.ComponentSampleModel.getSampleSize +java.awt.image.ComponentSampleModel.getSampleFloat +java.awt.image.ComponentSampleModel.setDataElements +java.awt.image.ComponentSampleModel.constructors +java.awt.image.ComponentSampleModel.setPixel +java.awt.image.ComponentSampleModel.createDataBuffer +java.awt.image.ComponentSampleModel.getOffset +java.awt.image.ComponentSampleModel.getSampleDouble +java.awt.image.ComponentSampleModel.createCompatibleSampleModel +java.awt.image.ComponentSampleModel.setSamples +java.awt.image.ComponentSampleModel.hashCode +java.awt.image.ComponentSampleModel.getPixels +java.awt.image.ComponentSampleModel.getScanlineStride +java.awt.image.ComponentSampleModel.createSubsetSampleModel +1 problem (1 error)java.awt.image.ColorModel.getComponentSize +java.awt.image.ColorModel.getRGBdefault +java.awt.image.ColorModel.constructors +java.awt.image.LookupTable.constructor +java.awt.image.LookupTable.getNumComponents +java.awt.image.RescaleOp.getScaleFactors +java.awt.image.RescaleOp.getRenderingHints +java.awt.image.RescaleOp.getPoint2D +java.awt.image.RescaleOp.constructors +java.awt.image.RescaleOp.getNumFactors +java.awt.image.RescaleOp.getOffsets +java.awt.image.DirectColorModel.coerceData +java.awt.image.WritableRaster.createChild +java.awt.image.WritableRaster.createWritableChild +java.awt.image.ComponentColorModel.coerceData +java.awt.image.SampleModel.setPixels +java.awt.image.SampleModel.getSample +java.awt.image.SampleModel.getPixel +java.awt.image.SampleModel.getSamples +java.awt.image.SampleModel.getSampleSize +java.awt.image.SampleModel.getSampleFloat +java.awt.image.SampleModel.setPixel +java.awt.image.SampleModel.setSample +java.awt.image.SampleModel.createDataBuffer +java.awt.image.SampleModel.getSampleDouble +java.awt.image.SampleModel.setSamples +java.awt.image.SampleModel.getPixels +java.awt.image.BandCombineOp.getPoint2D +java.awt.image.BandCombineOp.createCompatibleDestRaster +java.awt.image.BandCombineOp.getBounds2D +java.awt.image.BandCombineOp.filter +java.awt.image.LookupOp.constructor +java.awt.image.LookupOp.filterRaster +java.awt.image.LookupOp.getRenderingHints +java.awt.image.LookupOp.getTable +java.awt.image.LookupOp.getPoint2D +java.awt.image.Kernel.getYOrigin +java.awt.image.Kernel.constructor +java.awt.image.Kernel.getXOrigin +java.awt.image.Kernel.getHeight +java.awt.image.Kernel.check +java.awt.image.Kernel.getKernelData +java.awt.image.Kernel.getWidth +java.awt.image.BufferedImage.getSubimage +java.awt.image.BufferedImage.getSetRgb1Pixel +java.awt.image.DataBufferByte.getData +java.awt.image.DataBufferByte.getBankData +java.awt.image.DataBufferByte.setElem +java.awt.image.DataBufferByte.getElem +java.awt.image.DataBufferByte.getDataType +java.awt.image.DataBufferByte.constructors +java.awt.image.DataBufferShort.getData +java.awt.image.DataBufferShort.getBankData +java.awt.image.DataBufferShort.setElem +java.awt.image.DataBufferShort.getElem +java.awt.image.DataBufferShort.getDataType +java.awt.image.DataBufferShort.constructors +java.awt.image.Raster.createChild +java.awt.image.DataBufferInt.getData +java.awt.image.DataBufferInt.getBankData +java.awt.image.DataBufferInt.setElem +java.awt.image.DataBufferInt.getElem +java.awt.image.DataBufferInt.getDataType +java.awt.image.DataBufferInt.constructors +java.awt.image.SinglePixelPackedSampleModel.getBitOffsets +java.awt.image.SinglePixelPackedSampleModel.getDataElements +java.awt.image.SinglePixelPackedSampleModel.getSample +java.awt.image.SinglePixelPackedSampleModel.equals +java.awt.image.SinglePixelPackedSampleModel.getPixel +java.awt.image.SinglePixelPackedSampleModel.getNumDataElements +java.awt.image.SinglePixelPackedSampleModel.getSamples +java.awt.image.SinglePixelPackedSampleModel.getSampleSize +java.awt.image.SinglePixelPackedSampleModel.setDataElements +java.awt.image.SinglePixelPackedSampleModel.constructors +java.awt.image.SinglePixelPackedSampleModel.getBitMasks +java.awt.image.SinglePixelPackedSampleModel.setPixel +java.awt.image.SinglePixelPackedSampleModel.setSample +java.awt.image.SinglePixelPackedSampleModel.createDataBuffer +java.awt.image.SinglePixelPackedSampleModel.getOffset +java.awt.image.SinglePixelPackedSampleModel.createCompatibleSampleModel +java.awt.image.SinglePixelPackedSampleModel.hashCode +java.awt.image.SinglePixelPackedSampleModel.getPixels +java.awt.image.SinglePixelPackedSampleModel.getScanlineStride +java.awt.image.SinglePixelPackedSampleModel.createSubsetSampleModel +java.awt.image.ByteLookupTable.getTable +java.awt.image.ByteLookupTable.lookupPixel +java.awt.image.ByteLookupTable.constructors +java.awt.image.MultiPixelPackedSampleModel.getBitOffset +java.awt.image.MultiPixelPackedSampleModel.getTransferType +java.awt.image.MultiPixelPackedSampleModel.getDataElements +java.awt.image.MultiPixelPackedSampleModel.getSample +java.awt.image.MultiPixelPackedSampleModel.equals +java.awt.image.MultiPixelPackedSampleModel.getPixel +java.awt.image.MultiPixelPackedSampleModel.getSampleSize +java.awt.image.MultiPixelPackedSampleModel.setDataElements +java.awt.image.MultiPixelPackedSampleModel.constructors +java.awt.image.MultiPixelPackedSampleModel.setPixel +java.awt.image.MultiPixelPackedSampleModel.setSample +java.awt.image.MultiPixelPackedSampleModel.createDataBuffer +java.awt.image.MultiPixelPackedSampleModel.getPixelBitStride +java.awt.image.MultiPixelPackedSampleModel.getOffset +java.awt.image.MultiPixelPackedSampleModel.createCompatibleSampleModel +java.awt.image.MultiPixelPackedSampleModel.hashCode +java.awt.image.MultiPixelPackedSampleModel.getScanlineStride +java.awt.image.MultiPixelPackedSampleModel.createSubsetSampleModel +java.awt.image.AffineTransformOp.getPoint2D +java.awt.image.AffineTransformOp.createCompatibleDestRaster +java.awt.image.AffineTransformOp.constructors +java.awt.image.AffineTransformOp.getBounds2D +java.awt.image.PixelInterleavedSampleModel.createSubsetSampleModel +java.awt.image.BandedSampleModel.setPixels +java.awt.image.BandedSampleModel.getDataElements +java.awt.image.BandedSampleModel.getSample +java.awt.image.BandedSampleModel.getPixel +java.awt.image.BandedSampleModel.getSamples +java.awt.image.BandedSampleModel.getSampleFloat +java.awt.image.BandedSampleModel.setDataElements +java.awt.image.BandedSampleModel.constructors +java.awt.image.BandedSampleModel.setPixel +java.awt.image.BandedSampleModel.setSample +java.awt.image.BandedSampleModel.createDataBuffer +java.awt.image.BandedSampleModel.getSampleDouble +java.awt.image.BandedSampleModel.createCompatibleSampleModel +java.awt.image.BandedSampleModel.setSamples +java.awt.image.BandedSampleModel.hashCode +java.awt.image.BandedSampleModel.getPixels +java.awt.image.BandedSampleModel.createSubsetSampleModel +java.awt.image.ColorConvertOp.filterRaster +java.awt.image.ColorConvertOp.getPoint2D +java.awt.image.ColorConvertOp.createCompatibleDestRaster +java.awt.image.ColorConvertOp.constructors +java.awt.image.ColorConvertOp.getBounds2D +java.awt.ScrollPaneAdjustable.paramString +java.awt.GridBagLayout.AdjustForGravity +java.awt.GridBagLayout.toString +java.awt.Dimension.clone +java.awt.Dimension.equals +java.awt.Dimension.setSize +java.awt.Dimension.getSize +java.awt.Dimension.constructors +java.awt.TextField.getPreferredSize +java.awt.TextField.getMinimumSize +java.awt.TextField.constructors +java.awt.BorderLayout.layoutContainer +java.awt.BorderLayout.getHgap +java.awt.BorderLayout.maxLayoutSize +java.awt.BorderLayout.setVgap +java.awt.BorderLayout.getVgap +java.awt.BorderLayout.getLayoutAlignmentY +java.awt.BorderLayout.Test15 +java.awt.BorderLayout.getLayoutAlignmentX +java.awt.BorderLayout.setHgap +java.awt.BorderLayout.constructors +java.awt.BorderLayout.constants +java.awt.BorderLayout.preferredLayoutSize +java.awt.BorderLayout.addLayoutComponent +java.awt.Scrollbar.testSetBlockIncrement +java.awt.Scrollbar.testSetUnitIncrement +java.awt.Scrollbar.testSetValues +java.awt.List.testSelected +java.awt.ScrollPane.add +java.awt.ScrollPane.getScrollPosition +java.awt.ScrollPane.testSetLayout +java.awt.ScrollPane.setScrollPosition +java.awt.ScrollPane.doLayout +java.awt.Choice.getSelected +java.awt.Choice.remove +java.awt.KeyboardFocusManager.getFocusOwner +java.awt.KeyboardFocusManager.getGlobalPermanentFocusOwner +java.awt.KeyboardFocusManager.getGlobalFocusOwner +java.awt.AWTPermission.constructor +java.awt.ColorClass.decode +java.awt.ColorClass.serialization +java.awt.ColorClass.equals +java.awt.ColorClass.getGreen +java.awt.ColorClass.constructors +java.awt.ColorClass.brighter +java.awt.ColorClass.hashCode +java.awt.ColorClass.constants +java.awt.ColorClass.getBlue +java.awt.ColorClass.getRed +java.awt.RenderingHints.Key.isCompatibleValue +java.awt.RenderingHints.clone +java.awt.RenderingHints.keySet +java.awt.RenderingHints.put +java.awt.RenderingHints.add +java.awt.RenderingHints.putAll +java.awt.RenderingHints.entrySet +java.awt.RenderingHints.equals +java.awt.RenderingHints.size +java.awt.RenderingHints.get +java.awt.RenderingHints.values +java.awt.RenderingHints.containsValue +java.awt.RenderingHints.isEmpty +java.awt.RenderingHints.remove +java.awt.RenderingHints.clear +java.awt.Panel.TestPanelRepaint +java.awt.AWTKeyStroke.serialization +java.awt.AWTKeyStroke.equals +java.awt.AWTKeyStroke.getAWTKeyStroke +java.awt.Rectangle.clone +java.awt.Rectangle.add +java.awt.Rectangle.setRect +java.awt.Rectangle.setBounds +java.awt.Rectangle.equals +java.awt.Rectangle.intersects +java.awt.Rectangle.setSize +java.awt.Rectangle.grow +java.awt.Rectangle.outcode +java.awt.Rectangle.union +java.awt.Rectangle.constructors +java.awt.Rectangle.intersection +java.awt.Rectangle.setLocation +java.awt.Rectangle.translate +java.awt.Rectangle.contains +java.awt.Rectangle.isEmpty +java.awt.Menu.insert +java.awt.AlphaComposite.getInstance +java.awt.AlphaComposite.equals +java.awt.AlphaComposite.getInstance14 +java.awt.AlphaComposite.getRule +java.awt.Window.security +java.awt.Window.focusCycleRootTest +java.awt.EventClass.constants +java.awt.Frame.isDisplayable1 +java.awt.Frame.isDisplayable5 +java.awt.Frame.isDisplayable4 +java.awt.Frame.isDisplayable3 +java.awt.Frame.isDisplayable6 +java.awt.Frame.menubar +java.awt.Frame.isDisplayable2 +java.awt.Frame.isDisplayable7 +java.awt.Container.getListeners +java.awt.Container.setLayout +java.awt.Container.getPreferredSize +java.awt.Container.applyComponentOrientation +java.awt.Container.getComponentAt +java.awt.Container.getAlignmentY +java.awt.Container.getAlignmentX +java.awt.Container.addImpl +java.awt.FontClass.serialization +java.awt.MenuItem.label1 +java.awt.font.TextHitInfo.isLeadingEdge +java.awt.font.TextHitInfo.getOtherHit +java.awt.font.TextHitInfo.leading +java.awt.font.TextHitInfo.getOffsetHit +java.awt.font.TextHitInfo.equals +java.awt.font.TextHitInfo.getCharIndex +java.awt.font.TextHitInfo.afterOffset +java.awt.font.TextHitInfo.getInsertionIndex +java.awt.font.TextHitInfo.toString +java.awt.font.TextHitInfo.beforeOffset +java.awt.font.TextHitInfo.hashCode +java.awt.font.TextHitInfo.trailing +java.awt.font.TransformAttribute.serialization +java.awt.font.TransformAttribute.getTransform +java.awt.font.TransformAttribute.isIdentity +java.awt.font.ShapeGraphicAttribute.ShapeGraphicAttributeTest +java.awt.font.ImageGraphicAttribute.ImageGraphicAttributeTest +java.awt.font.TextAttribute.toString13 +java.awt.font.TextAttribute.serialization +java.awt.font.TextAttribute.toString +java.awt.font.TextAttribute.constants13 +java.awt.font.TextAttribute.constants +java.awt.GradientPaint.getPoint2 +java.awt.GradientPaint.equals +java.awt.GradientPaint.getColor1 +java.awt.GradientPaint.constructors +java.awt.GradientPaint.getColor2 +java.awt.GradientPaint.isCyclic +java.awt.GradientPaint.getTransparency +java.awt.GradientPaint.getPoint1 +java.awt.TextComponent.setSelectionStart +java.awt.Component.repaint +java.awt.Component.getListeners +java.awt.Component.setName +java.awt.Component.properties14 +java.awt.Component.getMaximumSize +java.awt.Component.setMinimumSize +java.awt.Component.getForeground +java.awt.Component.setPreferredSize +java.awt.Component.properties +java.awt.Component.requestFocus +java.awt.Component.isValid +java.awt.Component.getFont +java.awt.Component.setMaximumSize +java.awt.Component.setComponentOrientation +java.awt.datatransfer.DataFlavor.writeExternal +java.awt.datatransfer.StringSelection.selection +java.awt.TextArea.getPreferredSize +java.awt.TextArea.getMinimumSize +java.awt.TextArea.testReplaceText +java.awt.TextArea.constructors +java.awt.TextArea.testAppendText +java.awt.TextArea.testInsertText +java.awt.TextArea.testInvalidConstructorValues +java.awt.color.ColorSpace.isCS_sRGB +java.awt.color.ColorSpace.getInstance +java.awt.FlowLayout.minimumLayoutSize +java.awt.geom.Ellipse2D.Double.clone +java.awt.geom.Ellipse2D.Double.getY +java.awt.geom.Ellipse2D.Double.setFrame +java.awt.geom.Ellipse2D.Double.getHeight +java.awt.geom.Ellipse2D.Double.getX +java.awt.geom.Ellipse2D.Double.constructors +java.awt.geom.Ellipse2D.Double.getBounds2D +java.awt.geom.Ellipse2D.Double.isEmpty +java.awt.geom.Ellipse2D.Double.getWidth +java.awt.geom.Ellipse2D.Float.clone +java.awt.geom.Ellipse2D.Float.getY +java.awt.geom.Ellipse2D.Float.setFrame +java.awt.geom.Ellipse2D.Float.getHeight +java.awt.geom.Ellipse2D.Float.getX +java.awt.geom.Ellipse2D.Float.constructors +java.awt.geom.Ellipse2D.Float.getBounds2D +java.awt.geom.Ellipse2D.Float.isEmpty +java.awt.geom.Ellipse2D.Float.getWidth +java.awt.geom.Ellipse2D.intersects +java.awt.geom.Ellipse2D.contains +java.awt.geom.GeneralPath.getCurrentPoint +java.awt.geom.GeneralPath.GeneralPath +java.awt.geom.GeneralPath.append_PathIterator +java.awt.geom.GeneralPath.contains +java.awt.geom.GeneralPath.getPathIterator +java.awt.geom.RectangularShape.getFrame +java.awt.geom.RectangularShape.setFrame +java.awt.geom.RectangularShape.getMinY +java.awt.geom.RectangularShape.intersects +java.awt.geom.RectangularShape.getMaxY +java.awt.geom.RectangularShape.getMaxX +java.awt.geom.RectangularShape.setFrameFromCenter +java.awt.geom.RectangularShape.setFrameFromDiagonal +java.awt.geom.RectangularShape.getMinX +java.awt.geom.RectangularShape.getCenterX +java.awt.geom.RectangularShape.getCenterY +java.awt.geom.RectangularShape.contains +java.awt.geom.RectangularShape.isEmpty +java.awt.geom.RectangularShape.getBounds +java.awt.geom.Line2D.clone +java.awt.geom.Line2D.getP1 +java.awt.geom.Line2D.linesIntersect +java.awt.geom.Line2D.ptSegDistSq +java.awt.geom.Line2D.relativeCCW +java.awt.geom.Line2D.getP2 +java.awt.geom.Line2D.setLine +java.awt.geom.Line2D.equals +java.awt.geom.Line2D.intersects +java.awt.geom.Line2D.ptLineDistSq +java.awt.geom.Line2D.ptSegDist +java.awt.geom.Line2D.intersectsLine +java.awt.geom.Line2D.contains +java.awt.geom.Line2D.ptLineDist +java.awt.geom.Line2D.getPathIterator +java.awt.geom.Line2D.getBounds +java.awt.geom.Area.clone +java.awt.geom.Area.add +java.awt.geom.Area.isRectangular +java.awt.geom.Area.createTransformedArea +java.awt.geom.Area.isPolygonal +java.awt.geom.Area.intersect +java.awt.geom.Area.equals +java.awt.geom.Area.exclusiveOr +java.awt.geom.Area.intersects +java.awt.geom.Area.reset +java.awt.geom.Area.isSingular +java.awt.geom.Area.constructors +java.awt.geom.Area.getBounds2D +java.awt.geom.Area.contains +java.awt.geom.Area.subtract +java.awt.geom.Area.isEmpty +java.awt.geom.Area.transform +java.awt.geom.Area.getBounds +java.awt.geom.Rectangle2D.Double.clone +java.awt.geom.Rectangle2D.Double.createIntersection +java.awt.geom.Rectangle2D.Double.setRect +java.awt.geom.Rectangle2D.Double.outcode +java.awt.geom.Rectangle2D.Double.createUnion +java.awt.geom.Rectangle2D.Double.isEmpty +java.awt.geom.Rectangle2D.Float.clone +java.awt.geom.Rectangle2D.Float.createIntersection +java.awt.geom.Rectangle2D.Float.setRect +java.awt.geom.Rectangle2D.Float.outcode +java.awt.geom.Rectangle2D.Float.createUnion +java.awt.geom.Rectangle2D.Float.isEmpty +java.awt.geom.Rectangle2D.add +java.awt.geom.Rectangle2D.setFrame +java.awt.geom.Rectangle2D.intersect +java.awt.geom.Rectangle2D.equals +java.awt.geom.Rectangle2D.intersects +java.awt.geom.Rectangle2D.union +java.awt.geom.Rectangle2D.intersectsLine +java.awt.geom.Rectangle2D.getBounds2D +java.awt.geom.Rectangle2D.contains +java.awt.geom.Rectangle2D.constants +java.awt.geom.Rectangle2D.getPathIterator +java.awt.geom.Rectangle2D.getBounds +java.awt.geom.Arc2D.Double.clone +java.awt.geom.Arc2D.Float.clone +java.awt.geom.Arc2D.setFrame +java.awt.geom.Arc2D.setAngleStart +java.awt.geom.Arc2D.setArc +java.awt.geom.Arc2D.setArcByTangent +java.awt.geom.Arc2D.containsAngle +java.awt.geom.Arc2D.setArcByCenter +java.awt.geom.Arc2D.intersects +java.awt.geom.Arc2D.getEndPoint +java.awt.geom.Arc2D.setAngleExtent +java.awt.geom.Arc2D.constructors +java.awt.geom.Arc2D.getBounds2D +java.awt.geom.Arc2D.contains +java.awt.geom.Arc2D.getStartPoint +java.awt.geom.Arc2D.constants +java.awt.geom.Arc2D.isEmpty +java.awt.geom.Arc2D.getPathIterator +java.awt.geom.Arc2D.setAngles +java.awt.geom.Arc2D.setArcType +java.awt.geom.QuadCurve2D.Double.getP1 +java.awt.geom.QuadCurve2D.Double.getP2 +java.awt.geom.QuadCurve2D.Double.getCtrlPt +java.awt.geom.QuadCurve2D.Double.getBounds2D +java.awt.geom.QuadCurve2D.Double.Double +java.awt.geom.QuadCurve2D.Double.setCurve +java.awt.geom.QuadCurve2D.Float.getP1 +java.awt.geom.QuadCurve2D.Float.Float +java.awt.geom.QuadCurve2D.Float.getP2 +java.awt.geom.QuadCurve2D.Float.getCtrlPt +java.awt.geom.QuadCurve2D.Float.getBounds2D +java.awt.geom.QuadCurve2D.Float.setCurve +java.awt.geom.QuadCurve2D.clone +java.awt.geom.QuadCurve2D.getFlatness +java.awt.geom.QuadCurve2D.subdivide +java.awt.geom.QuadCurve2D.getFlatnessSq +java.awt.geom.QuadCurve2D.setCurve +java.awt.geom.QuadCurve2D.getPathIterator +java.awt.geom.CubicCurve2D.Double.getP1 +java.awt.geom.CubicCurve2D.Double.getCtrlP2 +java.awt.geom.CubicCurve2D.Double.getP2 +java.awt.geom.CubicCurve2D.Double.getBounds2D +java.awt.geom.CubicCurve2D.Double.Double +java.awt.geom.CubicCurve2D.Double.setCurve +java.awt.geom.CubicCurve2D.Double.getCtrlP1 +java.awt.geom.CubicCurve2D.Float.getP1 +java.awt.geom.CubicCurve2D.Float.getCtrlP2 +java.awt.geom.CubicCurve2D.Float.Float +java.awt.geom.CubicCurve2D.Float.getP2 +java.awt.geom.CubicCurve2D.Float.getBounds2D +java.awt.geom.CubicCurve2D.Float.setCurve +java.awt.geom.CubicCurve2D.Float.getCtrlP1 +java.awt.geom.CubicCurve2D.clone +java.awt.geom.CubicCurve2D.getFlatness +java.awt.geom.CubicCurve2D.subdivide +java.awt.geom.CubicCurve2D.getFlatnessSq +java.awt.geom.CubicCurve2D.setCurve +java.awt.geom.CubicCurve2D.getPathIterator +java.awt.geom.FlatteningPathIterator.FlatteningPathIterator +java.awt.geom.FlatteningPathIterator.getWindingRule +java.awt.geom.FlatteningPathIterator.getFlatness +java.awt.geom.FlatteningPathIterator.getRecursionLimit +java.awt.geom.FlatteningPathIterator.currentSegment +java.awt.geom.AffineTransform.clone +java.awt.geom.AffineTransform.preConcatenate +java.awt.geom.AffineTransform.getRotateInstance +java.awt.geom.AffineTransform.getMatrix +java.awt.geom.AffineTransform.inverseTransform +java.awt.geom.AffineTransform.getScaleInstance +java.awt.geom.AffineTransform.createInverse +java.awt.geom.AffineTransform.deltaTransform +java.awt.geom.AffineTransform.equals +java.awt.geom.AffineTransform.setTransform +java.awt.geom.AffineTransform.constructors +java.awt.geom.AffineTransform.getTranslateInstance +java.awt.geom.AffineTransform.constants +java.awt.geom.AffineTransform.concatenate +java.awt.geom.AffineTransform.getShearInstance +java.awt.geom.AffineTransform.transform +java.awt.geom.AffineTransform.getDeterminant +java.awt.geom.AffineTransform.isIdentity +java.awt.geom.RoundRectangle2D.intersects +java.awt.geom.RoundRectangle2D.contains +java.awt.testName +java.nio.Buffer.IntBufferTest +java.nio.Buffer.ShortBufferTest +java.nio.Buffer.FloatBufferTest +java.nio.Buffer.LongBufferTest +java.nio.Buffer.ByteBufferTest +java.nio.Buffer.DoubleBufferTest +java.nio.Buffer.CharBufferTest +java.nio.LongBuffer.compact +java.nio.ShortBuffer.compact +java.nio.IntBuffer.compareTo +java.nio.IntBuffer.compact +java.nio.channels.Channels.ChannelsTest +java.nio.channels.Selector.testEmptySelect +java.nio.channels.FileChannel.copyIO +java.nio.channels.FileChannel.multibufferIO +java.nio.channels.FileChannel.truncate +java.nio.channels.FileChannel.map +java.nio.channels.FileChannel.offsetSingleBuffer +java.nio.channels.FileChannel.singlebufferIO +java.nio.channels.FileChannel.multidirectbufferIO +java.nio.channels.FileChannel.offsetSingleDirectBuffer +java.nio.DoubleBuffer.compareTo +java.nio.DoubleBuffer.compact +java.nio.ByteBuffer.direct +java.nio.ByteBuffer.compact +java.nio.ByteBuffer.TestAllocateDirect +java.nio.ByteBuffer.GetPut +java.nio.ByteBuffer.putDouble +java.nio.ByteBuffer.Order +java.nio.ByteBuffer.Allocating +java.nio.CharBuffer.compact +java.nio.FloatBuffer.compareTo +java.nio.FloatBuffer.compact +java.nio.charset.Charset.UTF8Charset +java.nio.charset.Charset.utf16 +java.nio.charset.Charset.canEncode +java.nio.charset.Charset.forName --- openjdk-6-6b27-1.12.6.orig/debian/JB-jre-zero.overrides.in +++ openjdk-6-6b27-1.12.6/debian/JB-jre-zero.overrides.in @@ -0,0 +1,6 @@ +# the doc directory and the symlink are in @basename@-jre-headless +@basename@-jre-zero binary: no-copyright-file +@basename@-jre-zero binary: usr-share-doc-symlink-without-dependency + +# Strip libjvm.so with --strip-debug instead of --strip-unneeded. LP: #574997. +@basename@-jre-zero binary: unstripped-binary-or-object --- openjdk-6-6b27-1.12.6.orig/debian/icedtea-6-jre-cacao.overrides +++ openjdk-6-6b27-1.12.6/debian/icedtea-6-jre-cacao.overrides @@ -0,0 +1,2 @@ +# Strip libjvm.so with --strip-debug instead of --strip-unneeded. LP: #574997. +icedtea-6-jre-cacao binary: unstripped-binary-or-object --- openjdk-6-6b27-1.12.6.orig/debian/sharedmimeinfo +++ openjdk-6-6b27-1.12.6/debian/sharedmimeinfo @@ -0,0 +1,12 @@ + + + + Java Archive + + + + + Java Web Start application + + + --- openjdk-6-6b27-1.12.6.orig/debian/README.alternatives +++ openjdk-6-6b27-1.12.6/debian/README.alternatives @@ -0,0 +1,33 @@ + +Packages providing a runtime or a development environment for the Java +language all use symlinks in the /etc/alternatives directory to enable +the system administrator to choose which programs to use for java, +javac, javah, etc. + +Starting with java-common 0.23ubuntu1, the update-java-alternatives +script can be used to set a bunch of jre/jdk alternatives: + +First, you have to decide which Java implementation to default to. + + update-java-alternatives --list + +tells about the available runtime and/or development environments. The +first column shows the names to be used in for the following examples. + +- Set all runtime tools to point to the alternatives: + + update-java-alternatives --jre --set + +- Set all runtime tools (headless only) to point to the + alternatives: + + update-java-alternatives --jre-headless --set + +- Set all runtime and development tools to point to the + alternatives: + + update-java-alternatives --set + +- Set all runtime and development tools to auto mode: + + update-java-alternatives --auto --- openjdk-6-6b27-1.12.6.orig/debian/JB-doc.doc-base.in +++ openjdk-6-6b27-1.12.6/debian/JB-doc.doc-base.in @@ -0,0 +1,11 @@ +Document: @JDK@-doc +Title: @vendor@ Java(TM) @RELEASE@ JDK, Standard Edition Documentation +Author: @vendor@ +Abstract: The Java @RELEASE@ Platform Documentation contains API specifications, + feature descriptions, developer guides, reference pages for JDK tools + and utilities, demos, and links to related information. +Section: Programming + +Format: HTML +Index: /usr/share/doc/@basename@-jre-headless/api/index.html +Files: /usr/share/doc/@basename@-jre-headless/api/*/*.html --- openjdk-6-6b27-1.12.6.orig/debian/JB-dbg.overrides.in +++ openjdk-6-6b27-1.12.6/debian/JB-dbg.overrides.in @@ -0,0 +1,2 @@ +# The package *-jre-lib depends on *-jre via *-jre-headless. Lintian is wrong here. +@basename@-dbg binary: usr-share-doc-symlink-without-dependency @basename@-jre --- openjdk-6-6b27-1.12.6.orig/debian/copyright.cacao +++ openjdk-6-6b27-1.12.6/debian/copyright.cacao @@ -0,0 +1,356 @@ + +=============================================================================== +CACAO +=============================================================================== + +This package was debianized by Stephan Michels on +Sat, 12 Nov 2005 22:07:41 +0100. + +It was downloaded from http://www.cacaojvm.org/ + +Copyright Holder: CACAO Project + Copyright (C) 1996-2008 Verein zur Foerderung der freien virtuellen Maschine CACAO + Portions Copyright (C) 1996-2005, 2006, 2007 R. Grafl, A. Krall, C. Kruegel, + C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring, + E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich, + J. Wenninger, Institut f. Computersprachen - TU Wien + +License: + + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program 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 for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + +On Debian systems a full copy of the GNU General Public License, GPL, can be +found in the file /usr/share/common-licenses/GPL-2. + + +CACAO uses code from other free software projects. Only code licensed +under a GPL compatible license can be merged in. You can find the +licenses of third party sources in their respective sources. + + +* src/mm/boehm-gc + +Merged in the Boehm-Weiser garbage collector from +http://www.hpl.hp.com/personal/Hans_Boehm/gc/. + +Copyright (c) 1988, 1989 Hans-J. Boehm, Alan J. Demers +Copyright (c) 1991-1996 by Xerox Corporation. All rights reserved. +Copyright (c) 1996-1999 by Silicon Graphics. All rights reserved. +Copyright (c) 1999-2003 by Hewlett-Packard Company. All rights reserved. +Portions Copyright (c) 1999-2001 by Red Hat, Inc. All rights reserved. + +The file linux_threads.c is also +Copyright (c) 1998 by Fergus Henderson. All rights reserved. + +The files Makefile.am, and configure.in are +Copyright (c) 2001 by Red Hat Inc. All rights reserved. + +Several files supporting GNU-style builds are copyrighted by the Free +Software Foundation, and carry a different license from that given +below. + +THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED +OR IMPLIED. ANY USE IS AT YOUR OWN RISK. + +Permission is hereby granted to use or copy this program +for any purpose, provided the above notices are retained on all copies. +Permission to modify the code and to distribute modified code is granted, +provided the above notices are retained, and a notice that the code was +modified is included with the above copyright notice. + +A few of the files needed to use the GNU-style build procedure come with +slightly different licenses, though they are all similar in spirit. A few +are GPL'ed, but with an exception that should cover all uses in the +collector. (If you are concerned about such things, I recommend you look +at the notice in config.guess or ltmain.sh.) + +The files copyrighted by Hewlett-Packard Company have the notice: + + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + +* src/fdlibm + +fdlimb contains general algorithms useful for runtimes and compilers to +support strict double and float mathematical operations. + +fdlibm files carry the following notices: + + Copyright (c) 1991 by AT&T. + + Permission to use, copy, modify, and distribute this software for any + purpose without fee is hereby granted, provided that this entire notice + is included in all copies of any software which is or includes a copy + or modification of this software and in all copies of the supporting + documentation for such software. + + THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED + WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR AT&T MAKES ANY + REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY + OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. + + Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + + Developed at SunPro, a Sun Microsystems, Inc. business. + Permission to use, copy, modify, and distribute this + software is freely granted, provided that this notice + is preserved. + +The upstream for fdlibm is libgcj (http://gcc.gnu.org/java/), they sync +again with the 'real' upstream (http://www.netlib.org/fdlibm/readme). + + +* src/threads/green/{locks.[ch],threadio.[ch],threads.[ch]} + +This files are taken from Kaffe.org VM available at +http://www.kaffe.org/. Kaffe's license.terms file is located in the +top directory of the source code. The current license of Kaffe is the +same as of CACAO, GPL Version 2. + + +* src/vm/jit/{i386,x86_64}/{dis-asm.h,i386-dis.c} + +Print i386 instructions for GDB, the GNU debugger. +Copyright 1988, 1989, 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +2001, 2002, 2003, 2004 Free Software Foundation, Inc. + +This file is part of GDB. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program 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 for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */ + + +* src/vm/jit/{i386,x86_64}/dis-asm.h + +Interface between the opcode library and its callers. + +Copyright 2001, 2002 Free Software Foundation, Inc. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +This program 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 for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, +Boston, MA 02110-1301 USA + +Written by Cygnus Support, 1993. + +The opcode library (libopcodes.a) provides instruction decoders for +a large variety of instruction sets, callable with an identical +interface, for making instruction-processing programs more independent +of the instruction set being processed. + + +* src/vm/jit/powerpc/{ppc.h,ppc-dis.c,ppc-opc.c} + +Copyright 1994, 1995, 2000, 2001, 2002 Free Software Foundation, Inc. +Written by Ian Lance Taylor, Cygnus Support + +This file is part of GDB, GAS, and the GNU binutils. + +GDB, GAS, and the GNU binutils are free software; you can redistribute +them and/or modify them under the terms of the GNU General Public +License as published by the Free Software Foundation; either version +2, or (at your option) any later version. + +GDB, GAS, and the GNU binutils are distributed in the hope that they +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 for more details. + +You should have received a copy of the GNU General Public License +along with this file; see the file COPYING. If not, write to the Free +Software Foundation, Inc., 51 Franklin St, Fifth Floor, +Boston, MA 02110-1301 USA. + + +* src/lib/classes/* + +GNU Classpath is licensed under the terms of the GNU General Public +License with the following clarification and special exception: + + "Linking this library statically or dynamically with other modules + is making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give + you permission to link this library with independent modules to + produce an executable, regardless of the license terms of these + independent modules, and to copy and distribute the resulting + executable under terms of your choice, provided that you also meet, + for each linked independent module, the terms and conditions of the + license of that module. An independent module is a module which is + not derived from or based on this library. If you modify this library, + you may extend this exception to your version of the library, but you + are not obligated to do so. If you do not wish to do so, delete this + exception statement from your version." + +See license.terms for the text of the GNU General Public License. + +More information on GNU Classpath is available from +http://www.gnu.org/software/classpath/classpath.html. + + +* m4/{iconv.m4,lib-ld.m4,lib-link.m4,lib-prefix.m4} + +Copyright (C) 1996-2003 Free Software Foundation, Inc. +This file is free software, distributed under the terms of the GNU +General Public License. As a special exception to the GNU General +Public License, this file may be distributed as part of a program +that contains a configuration script generated by Autoconf, under +the same distribution terms as the rest of that program. + + +* src/toolbox/avl.[ch] + +libavl - library for manipulation of binary trees. +Copyright (C) 1998-2002 Free Software Foundation, Inc. + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +This program 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 for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +02110-1301 USA. + +The author may be contacted at on the Internet, or +write to Ben Pfaff, Stanford University, Computer Science Dept., 353 +Serra Mall, Stanford CA 94305, USA. + + +* src/vm/unzip.[ch] + +Copyright (C) 1998 Gilles Vollant + +This unzip package allow extract file from .ZIP file, compatible with PKZip 2.04g + WinZip, InfoZip tools and compatible. +Encryption and multi volume ZipFile (span) are not supported. +Old compressions used by old PKZip 1.x are not supported + +THIS IS AN ALPHA VERSION. AT THIS STAGE OF DEVELOPPEMENT, SOMES API OR STRUCTURE +CAN CHANGE IN FUTURE VERSION !! +I WAIT FEEDBACK at mail info@winimage.com +Visit also http://www.winimage.com/zLibDll/unzip.htm for evolution + +Condition of use and distribution are the same than zlib : + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. + + +src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/armcc + + * Copyright (c) 2007 by NEC LE-IT: All rights reserved. + * A transcription of ARMv6 atomic operations for the ARM Realview Toolchain. + * This code works with armcc from RVDS 3.1 + * This is based on work in gcc/arm.h by + * Copyright (c) 1991-1994 by Xerox Corporation. All rights reserved. + * Copyright (c) 1996-1999 by Silicon Graphics. All rights reserved. + * Copyright (c) 1999-2003 by Hewlett-Packard Company. All rights reserved. + * + * + * + * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED + * OR IMPLIED. ANY USE IS AT YOUR OWN RISK. + * + * Permission is hereby granted to use or copy this program + * for any purpose, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + +src/mm/boehm-gc/include/private + + Copyright (c) 2004-2005 Andrei Polushin + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + +contrib/vmlog: + +/* Copyright (C) 2006 Edwin Steiner */ +/* 2007 Peter Molnar */ + +/* This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program 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 for more details. + */ + +Some of the build files are + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. --- openjdk-6-6b27-1.12.6.orig/debian/JB-policytool.desktop.in +++ openjdk-6-6b27-1.12.6/debian/JB-policytool.desktop.in @@ -0,0 +1,10 @@ +[Desktop Entry] +Name=@vendor@ Java @RELEASE@ Policy Tool +Name[fi]=@vendor@ Java @RELEASE@ - käytäntötyökalu +Comment=@vendor@ Java @RELEASE@ Policy Tool +Comment[fi]=@vendor@ Java @RELEASE@ - käytäntötyökalu +Exec=/usr/bin/policytool +Terminal=false +Type=Application +Icon=@basename@ +Categories=Settings; --- openjdk-6-6b27-1.12.6.orig/debian/accessibility.properties +++ openjdk-6-6b27-1.12.6/debian/accessibility.properties @@ -0,0 +1,9 @@ +# +# The following line specifies the assistive technology classes +# that should be loaded into the Java VM when the AWT is initialized. +# Specify multiple classes by separating them with commas. +# Note: the line below cannot end the file (there must be at +# a minimum a blank line following it). +# +assistive_technologies=org.GNOME.Accessibility.JavaBridge + --- openjdk-6-6b27-1.12.6.orig/debian/JB-archive.keys.in +++ openjdk-6-6b27-1.12.6/debian/JB-archive.keys.in @@ -0,0 +1,18 @@ +application/java-archive + description=Java Archive + icon_filename=@basename@ + default_action_type=application + default_application_id=java-archive + short_list_application_user_additions=java-archive +application/x-java-archive + description=Java Archive + icon_filename=@basename@ + default_action_type=application + default_application_id=java-archive + short_list_application_user_additions=java-archive +application/x-jar + description=Java Archive + icon_filename=@basename@ + default_action_type=application + default_application_id=java-archive + short_list_application_user_additions=java-archive --- openjdk-6-6b27-1.12.6.orig/debian/control.zero-jre +++ openjdk-6-6b27-1.12.6/debian/control.zero-jre @@ -0,0 +1,16 @@ + +Package: @basename@-jre-zero +Architecture: @altzero_archs@ +Multi-Arch: same +Priority: extra +Pre-Depends: ${dpkg:Depends} +Depends: @basename@-jre-headless (= @pkg_version@), ${shlibs:Depends}, ${misc:Depends} +Provides: ${zerovm:Provides} +Conflicts: @basename@-jre-headless (<< 6b17~pre3-1), @basename@-jre (<< 6b17~pre3-1) +Description: Alternative JVM for OpenJDK, using Zero/Shark + The package provides an alternative runtime using the Zero VM and the + Shark Just In Time Compiler (JIT). Built on architectures in addition + to the Hotspot VM as a debugging aid for those architectures which don't + have a Hotspot VM. + . + The VM is started with the option `-zero'. See the README.Debian for details. --- openjdk-6-6b27-1.12.6.orig/debian/source.lintian-overrides +++ openjdk-6-6b27-1.12.6/debian/source.lintian-overrides @@ -0,0 +1,5 @@ +# needed to build on older releases +openjdk-6: dh_desktop-is-deprecated + +# called conditionally +openjdk-6: debhelper-script-needs-versioned-build-depends --- openjdk-6-6b27-1.12.6.orig/debian/JB-jdk.overrides.in +++ openjdk-6-6b27-1.12.6/debian/JB-jdk.overrides.in @@ -0,0 +1,10 @@ +# It seems to be acceptable to use rpath for private libraries like the +# jdk is doing it. Check http://wiki.debian.org/RpathIssue for more +# information. +@basename@-jdk binary: binary-or-shlib-defines-rpath + +# this is in @basename@-jre +@basename@-jdk binary: menu-icon-missing /usr/share/pixmaps/@basename@.xpm + +# lintian is plain wrong to complain +@basename@-jdk binary: gzip-file-is-not-multi-arch-same-safe --- openjdk-6-6b27-1.12.6.orig/debian/JB-demo.overrides.in +++ openjdk-6-6b27-1.12.6/debian/JB-demo.overrides.in @@ -0,0 +1,2 @@ +# /bin/sh is a known, and available interpreter +@basename@-demo: menu-command-not-in-package --- openjdk-6-6b27-1.12.6.orig/debian/icedtea-6-jre-jamvm.overrides +++ openjdk-6-6b27-1.12.6/debian/icedtea-6-jre-jamvm.overrides @@ -0,0 +1,2 @@ +# Strip libjvm.so with --strip-debug instead of --strip-unneeded. LP: #574997. +icedtea-6-jre-jamvm binary: unstripped-binary-or-object --- openjdk-6-6b27-1.12.6.orig/debian/sun_java_app.xpm +++ openjdk-6-6b27-1.12.6/debian/sun_java_app.xpm @@ -0,0 +1,199 @@ +/* XPM */ +static char * dukejre_xpm[] = { +"32 32 164 2", +" c None", +". c #000000", +"+ c #2D2D2D", +"@ c #363636", +"# c #313131", +"$ c #3E3E3E", +"% c #3D3D3D", +"& c #2B2B2B", +"* c #444444", +"= c #494949", +"- c #373737", +"; c #1C1C1C", +"> c #545454", +", c #434343", +"' c #272727", +") c #0B0B0B", +"! c #414141", +"~ c #5C5C5C", +"{ c #4F4F4F", +"] c #141414", +"^ c #3A3A3A", +"/ c #585858", +"( c #403A3A", +"_ c #32201F", +": c #090202", +"< c #4F4E4E", +"[ c #833D3E", +"} c #BE3432", +"| c #D63736", +"1 c #79201F", +"2 c #040101", +"3 c #251313", +"4 c #212121", +"5 c #9A5857", +"6 c #EBB9B9", +"7 c #E03A38", +"8 c #CA3430", +"9 c #862221", +"0 c #251211", +"a c #774C35", +"b c #CC5213", +"c c #A25151", +"d c #B23D3C", +"e c #AC2B29", +"f c #8F2422", +"g c #691A19", +"h c #321D1E", +"i c #7E3D20", +"j c #D55A0D", +"k c #8E3F10", +"l c #250F0F", +"m c #5D1615", +"n c #631817", +"o c #661918", +"p c #501313", +"q c #200909", +"r c #3D3A39", +"s c #6D341B", +"t c #AE4F14", +"u c #CC5515", +"v c #44403F", +"w c #381414", +"x c #310C0C", +"y c #220908", +"z c #1F0B0B", +"A c #413939", +"B c #525252", +"C c #9B6343", +"D c #D96319", +"E c #D3A88C", +"F c #D7D7D7", +"G c #868383", +"H c #797777", +"I c #898989", +"J c #A3A3A3", +"K c #DBDBDB", +"L c #E27626", +"M c #DE6F21", +"N c #E9E8E7", +"O c #EDEDED", +"P c #F8F8F8", +"Q c #FFFFFF", +"R c #EC7A20", +"S c #E27728", +"T c #ED7C21", +"U c #E5E1DE", +"V c #EEEEEE", +"W c #F6F6F6", +"X c #FDFDFD", +"Y c #B76D3E", +"Z c #E5711D", +"` c #F0851E", +" . c #ED7D24", +".. c #F18B1D", +"+. c #C75810", +"@. c #CC5616", +"#. c #E36F1D", +"$. c #F2911A", +"%. c #FBFBFB", +"&. c #F9F6F2", +"*. c #F9AA14", +"=. c #F08A1D", +"-. c #D35E13", +";. c #E16D1C", +">. c #F49B18", +",. c #B9B9B9", +"'. c #FAFAFA", +"). c #F49818", +"!. c #E3701D", +"~. c #A1480F", +"{. c #E06B1C", +"]. c #FCFCFC", +"^. c #E26D1C", +"/. c #0F0F0F", +"(. c #DE691B", +"_. c #F6A016", +":. c #E97E1C", +"<. c #F7A117", +"[. c #EB7A20", +"}. c #E4701D", +"|. c #837B77", +"1. c #A0938A", +"2. c #717171", +"3. c #959595", +"4. c #E1A27A", +"5. c #DB844B", +"6. c #D6671F", +"7. c #D56318", +"8. c #D6671B", +"9. c #DB6616", +"0. c #DE6614", +"a. c #D96B1C", +"b. c #D66A21", +"c. c #D7996D", +"d. c #C0BFBF", +"e. c #393939", +"f. c #686868", +"g. c #8F8F8F", +"h. c #D3D3D3", +"i. c #D1D1D1", +"j. c #CFCFCF", +"k. c #DCDCDC", +"l. c #D8D8D8", +"m. c #C0C0C0", +"n. c #C3C3C3", +"o. c #333333", +"p. c #696969", +"q. c #606060", +"r. c #E6E6E6", +"s. c #A0A0A0", +"t. c #8A8A8A", +"u. c #5F5F5F", +"v. c #8C8C8C", +"w. c #B6B6B6", +"x. c #BDBDBD", +"y. c #262626", +"z. c #7C7C7C", +"A. c #C2C2C2", +"B. c #C1C1C1", +"C. c #B5B5B5", +"D. c #6E6E6E", +"E. c #868686", +"F. c #ABABAB", +"G. c #292929", +" ", +" . . ", +" . . . . ", +" . . . . ", +" + . . . . . . ", +" @ # . . . . . . . ", +" $ % & . . . . . . ", +" * = - ; . . . . . ", +" * > , ' ) . . . . . . ", +" ! ~ { # ] . . . . ", +" ^ / / ( _ : . . . ", +" # < [ } | 1 2 . ", +" 3 4 5 6 7 8 9 0 a b . ", +" 3 3 c d e f g h i j . ", +" k l m n o p q r s j . ", +" t u v w x y z A B C j . ", +" $ . D E F G H I J K j L . ", +" $ . M j N O P Q Q Q j R j ", +" $ $ . S T j U V W X j T T j Y ", +" $ . . Z ` T j j j j j ...T j +. ", +" . . @.#.$.%.%.%.%.%.%.&.*.=.j -. ", +" . . @.;.>.%.%.,.. '.%.%.*.).!.j ~. ", +" . . @.{.*.%.%.%.. ].].%.*.*.^.j j ", +" /.. j (.*.%.'.%.. '.%.%.*._.^.j j ", +" . . . j :.%.'.%.%.'.'.%.<.[.}.j |. ", +" . . # . . j j j T T T T T T T j 1.2. ", +" . ^ 3.O 4.5.6.7.8.9.0.a.b.c.d.e.f. ", +" ] . g.O h.i.j.j.h.h.h.k.l.m.n.o.p. ", +" q.O O r.s.t.$ $ $ u.v.3.w.x.y.u. ", +" z.A.B.C.D.$ $ $ $ u.E.F.& u. ", +" # F.F.D.$ $ $ $ ' G.e.u. ", +" $ $ $ $ $ $ $ "}; --- openjdk-6-6b27-1.12.6.orig/debian/JB-demo.menu.in +++ openjdk-6-6b27-1.12.6/debian/JB-demo.menu.in @@ -0,0 +1,55 @@ +?package(@basename@-demo):\ + needs="x11"\ + section="Applications/Programming"\ + title="@vendor@ Java @RELEASE@ FileChooser Demo"\ + command="/bin/sh -c 'cd /@basedir@/demo/jfc/FileChooserDemo; /@basedir@/bin/java -jar FileChooserDemo.jar'"\ + icon="/usr/share/pixmaps/@basename@-app.xpm"\ + hints="Java2" + +?package(@basename@-demo):\ + needs="x11"\ + section="Applications/Programming"\ + title="@vendor@ Java @RELEASE@ Font2DTest Demo"\ + command="/bin/sh -c 'cd /@basedir@/demo/jfc/Font2DTest; /@basedir@/bin/java -jar Font2DTest.jar'"\ + icon="/usr/share/pixmaps/@basename@-app.xpm"\ + hints="Java2" + +?package(@basename@-demo):\ + needs="x11"\ + section="Applications/Programming"\ + title="@vendor@ Java @RELEASE@ Java 2D Demo"\ + command="/bin/sh -c 'cd /@basedir@/demo/jfc/Java2D; /@basedir@/bin/java -jar Java2Demo.jar'"\ + icon="/usr/share/pixmaps/@basename@-app.xpm"\ + hints="Java2" + +?package(@basename@-demo):\ + needs="x11"\ + section="Applications/Programming"\ + title="@vendor@ Java @RELEASE@ SampleTree Demo"\ + command="/bin/sh -c 'cd /@basedir@/demo/jfc/SampleTree; /@basedir@/bin/java -jar SampleTree.jar'"\ + icon="/usr/share/pixmaps/@basename@-app.xpm"\ + hints="Java2" + +?package(@basename@-demo):\ + needs="x11"\ + section="Applications/Programming"\ + title="@vendor@ Java @RELEASE@ Stylepad Demo"\ + command="/bin/sh -c 'cd /@basedir@/demo/jfc/Stylepad; /@basedir@/bin/java -jar Stylepad.jar'"\ + icon="/usr/share/pixmaps/@basename@-app.xpm"\ + hints="Java2" + +?package(@basename@-demo):\ + needs="x11"\ + section="Applications/Programming"\ + title="@vendor@ Java @RELEASE@ SwingSet2 Demo"\ + command="/bin/sh -c 'cd /@basedir@/demo/jfc/SwingSet2; /@basedir@/bin/java -jar SwingSet2.jar'"\ + icon="/usr/share/pixmaps/@basename@-app.xpm"\ + hints="Java2" + +?package(@basename@-demo):\ + needs="x11"\ + section="Applications/Programming"\ + title="@vendor@ Java @RELEASE@ TableExample Demo"\ + command="/bin/sh -c 'cd /@basedir@/demo/jfc/TableExample; /@basedir@/bin/java -jar TableExample.jar'"\ + icon="/usr/share/pixmaps/@basename@-app.xpm"\ + hints="Java2" --- openjdk-6-6b27-1.12.6.orig/debian/control +++ openjdk-6-6b27-1.12.6/debian/control @@ -0,0 +1,183 @@ +Source: openjdk-6 +Section: java +Priority: optional +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: OpenJDK Team +Uploaders: Torsten Werner , Matthias Klose , Damien Raude-Morvan +Build-Depends: debhelper (>= 5), binutils-dev [armel armhf], m4, lsb-release, wget, zip, unzip, sharutils, gawk, cpio, pkg-config, procps, time, fastjar (>= 2:0.96-0ubuntu2), autoconf, automake, autotools-dev, ant, ant-optional, libtool [alpha amd64 armel armhf i386 lpia m68k mips mipsel powerpc s390], g++-4.6, ecj-gcj [amd64 armel armhf hppa i386 ia64 lpia powerpc powerpcspe ppc64 m68k mips mipsel sh4 sparc sparc64 s390 s390x], gcj-jdk [amd64 armel armhf hppa i386 ia64 lpia powerpc powerpcspe ppc64 m68k mips mipsel sh4 sparc sparc64 s390 s390x], openjdk-6-jdk (>= 6b11) [alpha], libxtst-dev, libxi-dev, libxt-dev, libxaw7-dev, libxrender-dev, libcups2-dev, libasound2-dev, libfreetype6-dev (>= 2.2.1), libgtk2.0-dev, libxinerama-dev, xsltproc, rhino, fonts-ipafont-mincho, libffi-dev, zlib1g-dev, libpng-dev, libjpeg8-dev, libgif-dev, libpulse-dev (>= 0.9.12), libnss3-dev (>= 3.12.9+ckbi-1.82-0ubuntu4), mauve, xvfb, xauth, xfonts-base, libgl1-mesa-dri, metacity | twm, dbus-x11, x11-xkb-utils, +Standards-Version: 3.9.4 +Homepage: http://openjdk.java.net/ +Vcs-Bzr: http://bazaar.launchpad.net/~openjdk/openjdk/openjdk6 +Vcs-Browser: https://code.launchpad.net/~openjdk/openjdk/openjdk6 + +Package: openjdk-6-jdk +Architecture: any +Multi-Arch: same +Pre-Depends: ${dpkg:Depends} +Depends: openjdk-6-jre (>= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} +Recommends: libxt-dev +Suggests: openjdk-6-demo, openjdk-6-source, visualvm +Provides: java-sdk, java2-sdk, java5-sdk, java6-sdk, java-compiler +Conflicts: openjdk-6-jre-headless (<< 6b17~pre3-1), openjdk-6-jre (<< 6b17~pre3-1) +Description: OpenJDK Development Kit (JDK) + OpenJDK is a development environment for building applications, + applets, and components using the Java programming language. + . + The packages are built using the IcedTea build support and patches + from the IcedTea project. + +Package: openjdk-6-jre-headless +Architecture: any +Multi-Arch: same +Pre-Depends: ${dpkg:Depends}, ${multiarch:Depends} +Depends: openjdk-6-jre-lib (>= ${source:Version}), ${jredefault:Depends}, ${cacert:Depends}, ${tzdata:Depends}, ${jcommon:Depends}, ${dlopenhl:Depends}, ${shlibs:Depends}, ${misc:Depends} +Recommends: ${dlopenjl:Recommends}, ${cacao:Recommends}, ${jamvm:Recommends} +Suggests: libnss-mdns, sun-java6-fonts, ttf-dejavu-extra, fonts-ipafont-gothic, fonts-ipafont-mincho, ttf-wqy-microhei | ttf-wqy-zenhei, ttf-indic-fonts-core, ttf-telugu-fonts, ttf-oriya-fonts, ttf-kannada-fonts, ttf-bengali-fonts, +Provides: java-runtime-headless, java2-runtime-headless, java5-runtime-headless, java6-runtime-headless, ${defaultvm:Provides}, ${jvm:Provides} +Replaces: openjdk-6-jre-lib (<< 6b23~pre10), openjdk-6-jre (<< 6b23~pre1), openjdk-6-jdk (<< 6b20-1.9.1-0ubuntu2) +Conflicts: ${multiarch:Conflicts}, openjdk-6-jre-lib (<< 6b17~pre3-1), openjdk-6-jre (<< 6b17~pre3-1), openjdk-6-jdk (<< 6b17~pre3-1), openjdk-6-demo (<< 6b17~pre3-1), openjdk-6-source (<< 6b17~pre3-1), openjdk-6-doc (<< 6b17~pre3-1), openjdk-6-dbg (<< 6b17~pre3-1), openjdk-6-jre-zero (<< 6b17~pre3-1) +Description: OpenJDK Java runtime, using ${vm:Name} (headless) + Minimal Java runtime - needed for executing non GUI Java programs. + Using ${vm:Name}. + . + The packages are built using the IcedTea build support and patches + from the IcedTea project. + +Package: openjdk-6-jre +Architecture: any +Multi-Arch: same +Pre-Depends: ${dpkg:Depends} +Depends: openjdk-6-jre-headless (>= ${binary:Version}), ${xandsound:Depends}, ${shlibs:Depends}, ${dlopenjre:Depends}, ${misc:Depends}, ${dep:bridge} +Recommends: ${dlopenjre:Recommends}, ttf-dejavu-extra, icedtea-netx +Suggests: icedtea-plugin, ${pkg:pulseaudio} +Conflicts: icedtea-gcjwebplugin (<< 1.0-1ubuntu4), openjdk-6-jre-lib (<< 6b17~pre3-1), openjdk-6-jre-headless (<< 6b17~pre3-1), openjdk-6-jdk (<< 6b17~pre3-1), openjdk-6-demo (<< 6b17~pre3-1), openjdk-6-source (<< 6b17~pre3-1), openjdk-6-doc (<< 6b17~pre3-1), openjdk-6-dbg (<< 6b17~pre3-1), openjdk-6-jre-zero (<< 6b17~pre3-1) +Replaces: openjdk-6-jre-headless (<< 6b16~pre3), openjdk-6-jdk (<< 6b20-1.10~pre2-0ubuntu1) +Provides: java-runtime, java2-runtime, java5-runtime, java6-runtime +Description: OpenJDK Java runtime, using ${vm:Name} + Full Java runtime environment - needed for executing Java GUI and Webstart + programs. Using ${vm:Name}. + . + The packages are built using the IcedTea build support and patches + from the IcedTea project. + +Package: openjdk-6-jre-lib +Architecture: all +Multi-Arch: foreign +Pre-Depends: ${dpkg:Depends} +Depends: openjdk-6-jre-headless (>= ${base:Version}), ${misc:Depends} +Recommends: ${dlopen:Recommends} +Conflicts: openjdk-6-jre-headless (<< 6b17~pre3-1), openjdk-6-jre (<< 6b17~pre3-1) +Breaks: openjdk-6-jre-headless (<< 6b23~pre9-1~) +Description: OpenJDK Java runtime (architecture independent libraries) + OpenJDK Java runtime, using ${vm:Name}. + . + The packages are built using the IcedTea build support and patches + from the IcedTea project. + +Package: openjdk-6-demo +Architecture: any +Priority: extra +Pre-Depends: ${dpkg:Depends} +Depends: openjdk-6-jre (>= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} +Conflicts: openjdk-6-jre-headless (<< 6b17~pre3-1), openjdk-6-jre (<< 6b17~pre3-1) +Description: Java runtime based on OpenJDK (demos and examples) + OpenJDK Java runtime + . + The packages are built using the IcedTea build support and patches + from the IcedTea project. + +Package: openjdk-6-source +Architecture: all +Priority: extra +Pre-Depends: ${dpkg:Depends} +Depends: openjdk-6-jre (>= ${source:Version}), openjdk-6-jdk (>= ${binary:Version}), ${misc:Depends} +Conflicts: openjdk-6-jre-headless (<< 6b17~pre3-1), openjdk-6-jre (<< 6b17~pre3-1) +Description: OpenJDK Development Kit (JDK) source files + OpenJDK is a development environment for building applications, + applets, and components using the Java programming language. + . + This package contains the Java programming language source files + (src.zip) for all classes that make up the Java core API. + . + The packages are built using the IcedTea build support and patches + from the IcedTea project. + +Package: openjdk-6-doc +Section: doc +Pre-Depends: ${dpkg:Depends} +Architecture: all +Priority: extra +Depends: ${misc:Depends} +Suggests: openjdk-6-jdk +Conflicts: openjdk-6-jre-headless (<< 6b17~pre3-1), openjdk-6-jre (<< 6b17~pre3-1) +Description: OpenJDK Development Kit (JDK) documentation + OpenJDK is a development environment for building applications, + applets, and components using the Java programming language. + . + This package contains the API documentation. + . + The packages are built using the IcedTea build support and patches + from the IcedTea project. + +Package: openjdk-6-dbg +Architecture: any +Multi-Arch: same +Priority: extra +Section: debug +Pre-Depends: ${dpkg:Depends} +Depends: openjdk-6-jre-headless (= ${binary:Version}), ${misc:Depends} +Recommends: openjdk-6-jre (= ${binary:Version}) +Suggests: openjdk-6-jdk (= ${binary:Version}) +Conflicts: openjdk-6-jre-headless (<< 6b17~pre3-1), openjdk-6-jre (<< 6b17~pre3-1) +Description: Java runtime based on OpenJDK (debugging symbols) + OpenJDK is a development environment for building applications, + applets, and components using the Java programming language. + . + This package contains the debugging symbols. + . + The packages are built using the IcedTea build support and patches + from the IcedTea project. + +Package: icedtea-6-jre-cacao +Architecture: alpha amd64 armel armhf i386 lpia powerpc m68k mips mipsel s390 +Multi-Arch: same +Priority: extra +Pre-Depends: ${dpkg:Depends} +Depends: openjdk-6-jre-headless (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} +Provides: icedtea6-jre-cacao +Description: Alternative JVM for OpenJDK, using Cacao + The package provides an alternative runtime using the Cacao VM and the + Cacao Just In Time Compiler (JIT). This is a somewhat faster alternative + than the Zero port on architectures like alpha, armel, m68k, mips, mipsel, + powerpc and s390. + . + The VM is started with the option `-cacao'. See the README.Debian for details. + +Package: icedtea-6-jre-jamvm +Architecture: amd64 armel armhf i386 lpia mips mipsel powerpc +Multi-Arch: same +Priority: extra +Pre-Depends: ${dpkg:Depends} +Depends: openjdk-6-jre-headless (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} +Description: Alternative JVM for OpenJDK, using JamVM + The package provides an alternative runtime using the JamVM. This is a + somewhat faster alternative than the Zero port on architectures like armel, + mips, mipsel, powerpc. + . + The VM is started with the option `-jamvm'. See the README.Debian for details. + +Package: openjdk-6-jre-zero +Architecture: amd64 i386 lpia +Multi-Arch: same +Priority: extra +Pre-Depends: ${dpkg:Depends} +Depends: openjdk-6-jre-headless (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} +Provides: ${zerovm:Provides} +Conflicts: openjdk-6-jre-headless (<< 6b17~pre3-1), openjdk-6-jre (<< 6b17~pre3-1) +Description: Alternative JVM for OpenJDK, using Zero/Shark + The package provides an alternative runtime using the Zero VM and the + Shark Just In Time Compiler (JIT). Built on architectures in addition + to the Hotspot VM as a debugging aid for those architectures which don't + have a Hotspot VM. + . + The VM is started with the option `-zero'. See the README.Debian for details. --- openjdk-6-6b27-1.12.6.orig/debian/JB-jdk.preinst.in +++ openjdk-6-6b27-1.12.6/debian/JB-jdk.preinst.in @@ -0,0 +1,23 @@ +#!/bin/sh + +set -e + +multiarch=@multiarch@ +old_basedir=/usr/lib/jvm/java-6-openjdk +jdk_tools='appletviewer apt extcheck idlj jar jarsigner javac javadoc javah javap jconsole jdb jhat jinfo jmap jps jrunscript jsadebugd jstack jstat jstatd native2ascii rmic schemagen serialver wsgen wsimport xjc' + +case "$1" in + upgrade) + if [ -n "$multiarch" ] && [ -n "$2" ]; then + for i in $jdk_tools; do + if [ -n "$(update-alternatives --list $i 2>/dev/null | grep ^$old_basedir/)" ]; then + update-alternatives --remove $i $old_basedir/bin/$i || true + fi + done + fi + ;; +esac + +#DEBHELPER# + +exit 0 --- openjdk-6-6b27-1.12.6.orig/debian/changelog +++ openjdk-6-6b27-1.12.6/debian/changelog @@ -0,0 +1,3067 @@ +openjdk-6 (6b27-1.12.6-1ubuntu0.12.04.4) precise-security; urgency=low + + * SECURITY UPDATE: debian/patches/ubuntu-security-0001-e98b0ef70b26.patch: + http://icedtea.classpath.org/hg/icedtea6/rev/e98b0ef70b26 and IcedTea + 1.11.4 + - S8006900, CVE-2013-3829: Add new date/time capability + - S8008589: Better MBean permission validation + - S8011071, CVE-2013-5780: Better crypto provider handling + - S8011081, CVE-2013-5772: Improve jhat + - S8011157, CVE-2013-5814: Improve CORBA portablility + - S8012071, CVE-2013-5790: Better Building of Beans + - S8012147: Improve tool support + - S8012277: CVE-2013-5849: Improve AWT DataFlavor + - S8012425, CVE-2013-5802: Transform TransformerFactory + - S8013503, CVE-2013-5851: Improve stream factories + - S8013506: Better Pack200 data handling + - S8013510, CVE-2013-5809: Augment image writing code + - S8013514: Improve stability of cmap class + - S8013739, CVE-2013-5817: Better LDAP resource management + - S8013744, CVE-2013-5783: Better tabling for AWT + - S8014085: Better serialization support in JMX classes + - S8014093, CVE-2013-5782: Improve parsing of images + - S8014102, CVE-2013-5778: Improve image conversion + - S8014341, CVE-2013-5803: Better service from Kerberos servers + - S8014349, CVE-2013-5840: (cl) Class.getDeclaredClass problematic in some + class loader configurations + - S8014530, CVE-2013-5825: Better digital signature processing + - S8014534: Better profiling support + - S8014987, CVE-2013-5842: Augment serialization handling + - S8015731: Subject java.security.auth.subject to improvements + - S8015743, CVE-2013-5774: Address internet addresses + - S8016256: Make finalization final + - S8016653, CVE-2013-5804: javadoc should ignore ignoreable characters in + names + - S8016675, CVE-2013-5797: Make Javadoc pages more robust + - S8017196, CVE-2013-5850: Ensure Proxies are handled appropriately + - S8017287, CVE-2013-5829: Better resource disposal + - S8017291, CVE-2013-5830: Cast Proxies Aside + - S8017298, CVE-2013-4002: Better XML support + - S8017300, CVE-2013-5784: Improve Interface Implementation + - S8017505, CVE-2013-5820: Better Client Service + - S8019292: Better Attribute Value Exceptions + - S8019617: Better view of objects + - S8020293: JVM crash + - S8021290, CVE-2013-5823: Better signature validation + - S8022940: Enhance CORBA translations + - S8023683: Enhance class file parsing + * Add the following from IcedTea 1.11.4 that were included in the + Makefile.am update in e98b0ef70b26 but missing from the commit: + - 7196533-timezone_bottleneck.patch + - 8002070-remove_logger_stack_search.patch + - 8010118-caller_sensitive.patch + - oj6-19-fix_8010118_test_cases.patch + - 8011990-logger_test_urls.patch + - 8013380-logger_stack_walk_glassfish.patch + - 8014745-logger_stack_walk_switch.patch + - 8012243-serial_regression.patch + - 8011139-revise_checking_getenclosingclass.patch + Do not apply the following in Makefile.am: + - 7182135-impossible_to_use_some_editors_directly.patch: applied elsewhere + - 8015614-update_build.patch: not supplied (MS only) + - 8023457-tracing_mutex.patch: code not present (Stacktrace_lock) + - 8020943-memory_leak.patch: code not present (gcNotifier.cpp) + - 8023478-hs_crash.patch: code not present (gcNotifier.cpp) + The following patches update javap for added functionality and + non-security bug fixes but cause testsuite regressions. Ship the patches, + but don't apply them in Makefile.am for now. These may be reenabled in a + future update once the testsuite issues are resolved: + - 4075303-javap_update.patch + - 4111861-static_fields.patch + - 4501661-disallow_mixing.patch + - 4884240-javap_additional_option.patch + - 6708729-javap_makefile_update.patch + - 6715767-javap_crash.patch + - 6819246-javap_instruction_decoding.patch + - 6824493-experimental.patch + - 6843013-missing_experimental.patch + - 6852856-javap_subclasses.patch + - 6867671-javap_whitespace.patch + - 6868539-constant_pool_tags.patch + - 6902264-fix_indentation.patch + - 6708729-javap_makefile_update.patch + - 6841420-classfile_methods.patch + - 6841419-classfile_iterator.patch + In addition to the above: + - [UBUNTU]: refresh patches/openjdk/8024914-swapped_usage.patch + * debian/patches/atk-wrapper-security.patch: refresh for the above + * debian/patches/ubuntu-security-0002-update-use-idx_t.patch: refresh + patches/use-idx_t.patch for the above + * debian/patches/ubuntu-security-0003-update-7162902-corba_fixes.patch: + refresh patches/openjdk/7162902-corba_fixes.patch for the above + * debian/patches/ubuntu-security-9999-Makefile.in.patch: updated for changes + to Makefile.am in ubuntu-security-0001-e98b0ef70b26.patch + * debian/rules: adjust so that debian/patches/ubuntu-security-NNNN- are + automatically applied before running configure + - add ubuntu-security and stamps/ubuntu-security-stamp targets to apply + patches in debian/patches/ubuntu-security-* + - have stamps/icedtea-configure depend on stamps/ubuntu-security-stamp + - adjust debian-clean to unapply ubuntu-security patches + + -- Jamie Strandboge Sat, 16 Nov 2013 07:44:40 -0600 + +openjdk-6 (6b27-1.12.6-1ubuntu0.12.04.2) precise-security; urgency=low + + * Backport to precise + * Re-enabled testsuite + + -- Jamie Strandboge Wed, 17 Jul 2013 07:52:29 -0500 + +openjdk-6 (6b27-1.12.6-1ubuntu1) saucy; urgency=low + + * Merge with Debian. + + -- Matthias Klose Thu, 11 Jul 2013 16:50:08 +0200 + +openjdk-6 (6b27-1.12.6-1) unstable; urgency=high + + * IcedTea 1.12.6 release. + * Security fixes: + - S6741606, CVE-2013-2407: Integrate Apache Santuario. + - S7158805, CVE-2013-2445: Better rewriting of nested subroutine calls. + - S7170730, CVE-2013-2451: Improve Windows network stack support. + - S8000638, CVE-2013-2450: Improve deserialization. + - S8000642, CVE-2013-2446: Better handling of objects for transportation. + - S8001032: Restrict object access. + - S8001033, CVE-2013-2452: Refactor network address handling in virtual + machine identifiers. + - S8001034, CVE-2013-1500: Memory management improvements. + - S8001038, CVE-2013-2444: Resourcefully handle resources. + - S8001043: Clarify definition restrictions. + - S8001309: Better handling of annotation interfaces. + - S8001318, CVE-2013-2447: Socket.getLocalAddress not consistent with + InetAddress.getLocalHost. + - S8001330, CVE-2013-2443: Improve on checking order. + - S8003703, CVE-2013-2412: Update RMI connection dialog box. + - S8004584: Augment applet contextualization. + - S8005007: Better glyph processing. + - S8006328, CVE-2013-2448: Improve robustness of sound classes. + - S8006611: Improve scripting. + - S8007467: Improve robustness of JMX internal APIs. + - S8007471: Improve MBean notifications. + - S8007812, CVE-2013-2455: (reflect) Class.getEnclosingMethod problematic + for some classes. + - S8008120, CVE-2013-2457: Improve JMX class checking. + - S8008124, CVE-2013-2453: Better compliance testing. + - S8008128: Better API coherence for JMX. + - S8008132, CVE-2013-2456: Better serialization support. + - S8008585: Better JMX data handling. + - S8008593: Better URLClassLoader resource management. + - S8008603: Improve provision of JMX providers. + - S8008611: Better handling of annotations in JMX. + - S8008615: Improve robustness of JMX internal APIs. + - S8008623: Better handling of MBeanServers. + - S8008744, CVE-2013-2407: Rework part of fix for JDK-6741606. + - S8008982: Adjust JMX for underlying interface changes. + - S8009004: Better implementation of RMI connections. + - S8009013: Better handling of T2K glyphs. + - S8009034: Improve resulting notifications in JMX. + - S8009038: Improve JMX notification support. + - S8009067: Improve storing keys in KeyStore. + - S8009071, CVE-2013-2459: Improve shape handling. + - S8009235: Improve handling of TSA data. + - S8011243, CVE-2013-2470: Improve ImagingLib. + - S8011248, CVE-2013-2471: Better Component Rasters. + - S8011253, CVE-2013-2472: Better Short Component Rasters. + - S8011257, CVE-2013-2473: Better Byte Component Rasters. + - S8012375, CVE-2013-1571: Improve Javadoc framing. + - S8012421: Better positioning of PairPositioning. + - S8012438, CVE-2013-2463: Better image validation. + - S8012597, CVE-2013-2465: Better image channel verification. + - S8012601, CVE-2013-2469: Better validation of image layouts. + - S8014281, CVE-2013-2461: Better checking of XML signature. + - S8015997: Additional improvement in Javadoc framing. + * Backports: + - See the NEWS file for a complete list of the backports. + + -- Matthias Klose Thu, 11 Jul 2013 16:20:30 +0200 + +openjdk-6 (6b27-1.12.5-2) unstable; urgency=low + + * Fix -source dependency on -jre to be binNMU safe. + + -- Matthias Klose Fri, 17 May 2013 21:53:13 +0200 + +openjdk-6 (6b27-1.12.5-1) unstable; urgency=low + + * IcedTea 1.12.5 release. + * Security fixes: + - S6657673, CVE-2013-1518: Issues with JAXP. + - S7200507: Refactor Introspector internals. + - S8000724, CVE-2013-2417: Improve networking serialization. + - S8001031, CVE-2013-2419: Better font processing. + - S8001040, CVE-2013-1537: Rework RMI model. + - S8001322: Refactor deserialization. + - S8001329, CVE-2013-1557: Augment RMI logging. + - S8003335: Better handling of Finalizer thread. + - S8003445: Adjust JAX-WS to focus on API. + - S8003543, CVE-2013-2415: Improve processing of MTOM attachments. + - S8004261: Improve input validation. + - S8004336, CVE-2013-2431: Better handling of method handle + intrinsic frames. + - S8004986, CVE-2013-2383: Better handling of glyph table. + - S8004987, CVE-2013-2384: Improve font layout. + - S8004994, CVE-2013-1569: Improve checking of glyph table. + - S8005432: Update access to JAX-WS. + - S8005943: (process) Improved Runtime.exec. + - S8006309: More reliable control panel operation. + - S8006435, CVE-2013-2424: Improvements in JMX. + - S8006790: Improve checking for windows. + - S8006795: Improve font warning messages. + - S8007406: Improve accessibility of AccessBridge. + - S8007617, CVE-2013-2420: Better validation of images. + - S8007667, CVE-2013-2430: Better image reading. + - S8007918, CVE-2013-2429: Better image writing. + - S8009063, CVE-2013-2426: Improve reliability of ConcurrentHashMap. + - S8009305, CVE-2013-0401: Improve AWT data transfer. + - S8009699, CVE-2013-2421: Methodhandle lookup. + - S8009814, CVE-2013-1488: Better driver management. + - S8009857, CVE-2013-2422: Problem with plugin. + - RH952389: Temporary files created with insecure permissions. + * Backports; + - S7197906: BlockOffsetArray::power_to_cards_back() needs to handle + > 32 bit shifts + - S7036559: ConcurrentHashMap footprint and contention improvements. + - S5102804: Memory leak in Introspector.getBeanInfo(Class) for custom + BeanInfo: Class param (with WeakCache from S6397609). + - S6501644: Sync LayoutEngine *code* structure to match ICU. + - S6886358: Layout code update. + - S6963811: Deadlock-prone locking changes in Introspector. + - S7017324: Kerning crash in JDK 7 since ICU layout update. + - S7064279: Introspector.getBeanInfo() should release some resources + in timely manner. + - S8004302: javax/xml/soap/Test7013971.java fails since jdk6u39b01. + - S7133220: Additional patches to JAXP 1.4.5 update 1 for 7u4 (partial + for S6657673). + - S8009530: ICU Kern table support broken. + * Bug fixes: + - OJ3: Fix get_stack_bounds memory leak (alternate fix for S7197906). + - PR1362: Fedora 19 / rawhide FTBFS SIGILL. + - PR1338: Remove dependency on libXp. + - PR1339: Simplify the rhino class rewriter to avoid use of concurrency. + - PR1319: Correct #ifdef to #if + - Give xalan/xerces access to their own internal packages. + + -- Matthias Klose Thu, 25 Apr 2013 13:04:27 +0200 + +openjdk-6 (6b27-1.12.4-1) unstable; urgency=high + + * IcedTea 1.12.4 release. + * Security fixes: + - S8007014, CVE-2013-0809: Improve image handling. + - S8007675, CVE-2013-1493: Improve color conversion. + + -- Matthias Klose Tue, 05 Mar 2013 16:24:47 +0800 + +openjdk-6 (6b27-1.12.3-1) unstable; urgency=high + + * IcedTea 1.12.3 release. + * Security fixes: + - S8006446: Restrict MBeanServer access. + - S8006777: Improve TLS handling of invalid messages. + - S8007688: Blacklist known bad certificate. + * Backports: + - S8007393: Possible race condition after JDK-6664509. + - S8007611: logging behavior in applet changed. + * Disable bootstrap build on alpha, currently broken. + + -- Matthias Klose Tue, 19 Feb 2013 23:37:14 +0100 + +openjdk-6 (6b27-1.12.1-2) unstable; urgency=high + + * d/patches/java-access-bridge-security.patch: Update (Jamie Strandboge). + * Fix font suggestion for indic fonts in wheezy. + * Fix fontconfig definitions for japanese and korean fonts, fixing + compilation of the fontconfig file. + * Fix cacao build failure on armv4, reverting a Thumb interworking + change working for armv5 only. + * Add Built-Using: rhino attribute for the -lib package. + * Don't use concurrent features to rewrite the rhino jar file. + * Add additional patches to fix regressions introduced by security + fixes: + - S8004341 (Two JCK tests fails with 7u11 b06). + - S6664509 (fix issue with use of custom LogManagers). + Taken from the icedtea6-1.11 branch. + + -- Matthias Klose Fri, 08 Feb 2013 16:55:43 +0100 + +openjdk-6 (6b27-1.12.1-1) unstable; urgency=low + + * IcedTea 1.12.1 release. + * Security fixes: + - S6563318, CVE-2013-0424: RMI data sanitization. + - S6664509, CVE-2013-0425: Add logging context. + - S6664528, CVE-2013-0426: Find log level matching its name or value given + at construction time. + - S6776941: CVE-2013-0427: Improve thread pool shutdown. + - S7141694, CVE-2013-0429: Improving CORBA internals. + - S7173145: Improve in-memory representation of splashscreens. + - S7186945: Unpack200 improvement. + - S7186946: Refine unpacker resource usage. + - S7186948: Improve Swing data validation. + - S7186952, CVE-2013-0432: Improve clipboard access. + - S7186954: Improve connection performance. + - S7186957: Improve Pack200 data validation. + - S7192392, CVE-2013-0443: Better validation of client keys. + - S7192393, CVE-2013-0440: Better Checking of order of TLS Messages. + - S7192977, CVE-2013-0442: Issue in toolkit thread. + - S7197546, CVE-2013-0428: (proxy) Reflect about creating reflective proxies. + - S7200491: Tighten up JTable layout code. + - S7200500: Launcher better input validation. + - S7201064: Better dialogue checking. + - S7201066, CVE-2013-0441: Change modifiers on unused fields. + - S7201068, CVE-2013-0435: Better handling of UI elements. + - S7201070: Serialization to conform to protocol. + - S7201071, CVE-2013-0433: InetSocketAddress serialization issue. + - S8000210: Improve JarFile code quality. + - S8000537, CVE-2013-0450: Contextualize RequiredModelMBean class. + - S8000540, CVE-2013-1475: Improve IIOP type reuse management. + - S8000631, CVE-2013-1476: Restrict access to class constructor. + - S8001235, CVE-2013-0434: Improve JAXP HTTP handling. + - S8001242: Improve RMI HTTP conformance. + - S8001307: Modify ACC_SUPER behavior. + - S8001972, CVE-2013-1478: Improve image processing. + - S8002325, CVE-2013-1480: Improve management of images. + * Disable class data sharing for Zero. + * Enable class data sharing for the hotspot server VM. + + -- Matthias Klose Wed, 06 Feb 2013 19:31:25 +0100 + +openjdk-6 (6b27-1.12-1ubuntu1) raring; urgency=low + + * Upload to raring. + + -- Matthias Klose Thu, 31 Jan 2013 21:32:56 +0100 + +openjdk-6 (6b27-1.12-1) unstable; urgency=low + + * IcedTea 1.12 release. + + [ Matthias Klose ] + * d/patches/atk-wrapper-security.patch: Update. + * Configure with --disable-downloading. + + [ Thorsten Glaser ] + * debian/rules: Use gcj-4.6-jdk for m68k builds. + * d/patches/m68k-text-relocations.patch: build with -fPIC on m68k + + -- Matthias Klose Thu, 31 Jan 2013 15:45:50 +0100 + +openjdk-6 (6b24-1.11.5-1) unstable; urgency=low + + * Upload to unstable. + + -- Matthias Klose Wed, 17 Oct 2012 15:08:12 +0200 + +openjdk-6 (6b24-1.11.5-0ubuntu1) quantal-security; urgency=low + + * IcedTea 1.11.5 release. + * Security fixes + - S6631398, CVE-2012-3216: FilePermission improved path checking. + - S7093490: adjust package access in rmiregistry. + - S7143535, CVE-2012-5068: ScriptEngine corrected permissions. + - S7167656, CVE-2012-5077: Multiple Seeders are being created. + - S7169884, CVE-2012-5073: LogManager checks do not work correctly + for sub-types. + - S7169888, CVE-2012-5075: Narrowing resource definitions in JMX RMI + connector. + - S7172522, CVE-2012-5072: Improve DomainCombiner checking. + - S7186286, CVE-2012-5081: TLS implementation to better adhere to RFC. + - S7189103, CVE-2012-5069: Executors needs to maintain state. + - S7189490: More improvements to DomainCombiner checking. + - S7189567, CVE-2012-5085: java net obselete protocol. + - S7192975, CVE-2012-5071: Conditional usage check is wrong. + - S7195194, CVE-2012-5084: Better data validation for Swing. + - S7195917, CVE-2012-5086: XMLDecoder parsing at close-time should be + improved. + - S7195919, CVE-2012-5979: (sl) ServiceLoader can throw CCE without needing + to create instance. + - S7198296, CVE-2012-5089: Refactor classloader usage. + - S7158800: Improve storage of symbol tables. + - S7158801: Improve VM CompileOnly option. + - S7158804: Improve config file parsing. + - S7176337: Additional changes needed for 7158801 fix. + - S7198606, CVE-2012-4416: Improve VM optimization. + * Bug fixes + - S7175845: "jar uf" changes file permissions unexpectedly. + - S7177216: native2ascii changes file permissions of input file. + - S7199153: TEST_BUG: try-with-resources syntax pushed to 6-open repo. + + -- Matthias Klose Wed, 17 Oct 2012 12:45:53 +0200 + +openjdk-6 (6b24-1.11.4-3ubuntu1) quantal; urgency=low + + * Merge with Debian. + + -- Matthias Klose Tue, 04 Sep 2012 18:09:12 +0200 + +openjdk-6 (6b24-1.11.4-3) unstable; urgency=low + + * Regenerate the control file to fix build dependencies on mips/mipsel. + + -- Matthias Klose Sun, 02 Sep 2012 19:39:17 +0200 + +openjdk-6 (6b24-1.11.4-2) unstable; urgency=low + + * Remove the autoconf Xp check. + + -- Matthias Klose Sun, 02 Sep 2012 12:04:04 +0200 + +openjdk-6 (6b24-1.11.4-1) unstable; urgency=high + + * IcedTea 1.11.4 release. + * Security fixes + - S7162476, CVE-2012-1682: XMLDecoder security issue via ClassFinder. + - S7163201, CVE-2012-0547: Simplify toolkit internals references. + * Remove architecture specific nss-*.cfg configuration files. + Closes: #681631. + + -- Matthias Klose Sat, 01 Sep 2012 11:18:11 +0200 + +openjdk-6 (6b24-1.11.3-2) unstable; urgency=medium + + * Disable running the jdk tests on sparc (hangs). Nobody really cares + about sparc, and this lets the build succeed. + + -- Matthias Klose Tue, 26 Jun 2012 12:03:59 +0200 + +openjdk-6 (6b24-1.11.3-1) unstable; urgency=low + + * IcedTea 1.11.3 release. + * Security fixes. Closes: #677487. + - S7079902, CVE-2012-1711: Refine CORBA data models. + - S7110720: Issue with vm config file loadingIssue with vm config file + loading. + - S7143606, CVE-2012-1717: File.createTempFile should be improved for + temporary files created by the platform. + - S7143614, CVE-2012-1716: SynthLookAndFeel stability improvement. + - S7143617, CVE-2012-1713: Improve fontmanager layout lookup operations. + - S7143851, CVE-2012-1719: Improve IIOP stub and tie generation in RMIC. + - S7143872, CVE-2012-1718: Improve certificate extension processing. + - S7145239: Finetune package definition restriction. + - S7152811, CVE-2012-1723: Issues in client compiler. + - S7157609, CVE-2012-1724: Issues with loop. + - S7160677: missing else in fix for 7152811. + - S7160757, CVE-2012-1725: Problem with hotspot/runtime_classfile. + + -- Matthias Klose Sat, 23 Jun 2012 14:59:42 +0200 + +openjdk-6 (6b24-1.11.1-6) unstable; urgency=low + + * Build using gcc-4.4 on mips, mipsel. + * Don't mark the -demo package as Multi-Arch same. Closes: #670036. + + -- Matthias Klose Tue, 01 May 2012 15:42:45 +0200 + +openjdk-6 (6b24-1.11.1-5) unstable; urgency=low + + * Build again with older gcj versions on mips, mipsel (4.4), s390 (4.6). + + -- Matthias Klose Fri, 20 Apr 2012 15:21:48 +0200 + +openjdk-6 (6b24-1.11.1-4ubuntu3) precise-proposed; urgency=low + + * Do not apply patches/revert-6885123.patch. Closes: #638805. LP: #981037. + * Move hotspot-7020521.patch and hotspot-7026307.patch to debian/patches + and reapply (accidentally disabled). + + -- Matthias Klose Fri, 20 Apr 2012 14:38:21 +0200 + +openjdk-6 (6b24-1.11.1-4ubuntu2) precise; urgency=low + + * Use the /usr/bin path for the policytool desktop file. LP: #980205. + + -- Matthias Klose Thu, 12 Apr 2012 23:00:35 +0200 + +openjdk-6 (6b24-1.11.1-4ubuntu1) precise; urgency=low + + * Regenerate the control file. + + -- Matthias Klose Wed, 11 Apr 2012 08:15:00 +0200 + +openjdk-6 (6b24-1.11.1-4) unstable; urgency=low + + * Install desktop files again, using the common /usr/bin/java + interpreter name. LP: #969322. Closes: #668213. + * Build-depend on libpng-dev for newer releases. Closes: #662452. + * Let dlopen handle finding the libpcsclite library. LP: #898689. + Closes: #668356. + * Build-depend on fonts-ipafont-mincho, fixing a build failure in the + fontconfig compiler (find out why it breaks ...). + * Build using gcc-4.7/gcj-4.7 for sid/wheezy. + + -- Matthias Klose Mon, 09 Apr 2012 16:51:08 +0200 + +openjdk-6 (6b24-1.11.1-3ubuntu4) precise; urgency=low + + * Don't install the binary fontconfig file. + + -- Matthias Klose Sun, 11 Mar 2012 01:27:16 +0100 + +openjdk-6 (6b24-1.11.1-3ubuntu3) precise; urgency=low + + * Revert the ARM inline math functions change, ony meant for a PPA build. + + -- Matthias Klose Thu, 01 Mar 2012 17:48:40 +0100 + +openjdk-6 (6b24-1.11.1-3ubuntu2) precise; urgency=low + + * Disable running the jdk tests. + + -- Matthias Klose Wed, 29 Feb 2012 02:10:14 +0100 + +openjdk-6 (6b24-1.11.1-3) unstable; urgency=low + + * Use NanumMyeongjo as the preferred korean font. LP: #792471. + Closes: #655167. + * Fix java path in jexec for multiarch builds. + * Fix crash in java.net.NetworkInterface.getNetworkInterfaces() when + ifr_ifindex exceeds 255. LP: #925218. S7078386. + * Remove javaws and pluginappletviewer alternatives on upgrade from + squeeze. Closes: #660604. + * Use IPAfont as the preferred japanesse font. Closes: #646054. + * Build using gcj on alpha and armel. Closes: #655750. + * Drop build dependency on libxp-dev. Closes: #623667. + + -- Matthias Klose Sun, 26 Feb 2012 23:50:44 +0100 + +openjdk-6 (6b24-1.11.1-2ubuntu2) precise; urgency=low + + * Make sure that the nss.cfg doesn't mention any library path. + LP: #939361, #939419. + * Disable the accessibility wrapper, doesn't work yet. LP: #935296. + * ARM: Inline math functions, where asm instructions exist (taken from + the trunk). + + -- Matthias Klose Fri, 24 Feb 2012 15:00:34 +0100 + +openjdk-6 (6b24-1.11.1-2ubuntu1) precise; urgency=low + + * Regenerate the control file. + + -- Matthias Klose Wed, 22 Feb 2012 23:05:40 +0100 + +openjdk-6 (6b24-1.11.1-2) unstable; urgency=medium + + * Update from the IcedTea6-1.11 branch (20120222). + * Build using gcc/gcj-4.4 on mips and sparc again. + * Remove build dependency on libxp-dev. + + -- Matthias Klose Wed, 22 Feb 2012 14:37:27 +0100 + +openjdk-6 (6b24-1.11.1-1) unstable; urgency=medium + + * Build using gcj-4.4 on mips and mipsel again (raised on debian-mips). + + -- Matthias Klose Thu, 16 Feb 2012 15:48:25 +0100 + +openjdk-6 (6b24-1.11.1-0ubuntu1) precise; urgency=low + + * IcedTea 1.11.1 release. + * Security fixes: + - S7082299, CVE-2011-3571: Fix in AtomicReferenceArray. + - S7088367, CVE-2011-3563: Fix issues in java sound. + - S7110683, CVE-2012-0502: Issues with some KeyboardFocusManager method. + - S7110687, CVE-2012-0503: Issues with TimeZone class. + - S7110700, CVE-2012-0505: Enhance exception throwing mechanism + in ObjectStreamClass. + - S7110704, CVE-2012-0506: Issues with some method in corba. + - S7112642, CVE-2012-0497: Incorrect checking for graphics rendering object. + - S7118283, CVE-2012-0501: Better input parameter checking + in zip file processing. + - S7126960, CVE-2011-5035: (httpserver) Add property to limit number + of request headers to the HTTP Server. + * Backport fixes for S7066307, S7020521 from OpenJDK7 (Xerxes Rånby). + + -- Matthias Klose Wed, 15 Feb 2012 16:20:16 +0100 + +openjdk-6 (6b24-1.11-4) unstable; urgency=low + + * Build using gcj-4.6 on mips, mipsel, sparc, sparc64. + + -- Matthias Klose Wed, 08 Feb 2012 18:06:09 +0100 + +openjdk-6 (6b24-1.11-3) unstable; urgency=low + + * Make doc files multi-arch installable. + * JB-archive.applications.in: Use /usr/bin/java by default. Maybe + should be moved to the default-jdk package. + + -- Matthias Klose Tue, 07 Feb 2012 20:58:36 +0100 + +openjdk-6 (6b24-1.11-2ubuntu1) precise; urgency=low + + * Regenerate the control file. + + -- Matthias Klose Sat, 04 Feb 2012 12:40:14 +0100 + +openjdk-6 (6b24-1.11-2) unstable; urgency=low + + * Make upgrades from non-multiarch to multiarch builds more silent. + * Fix order of grant decls in java.policy. + * Default to zero again on ARM with the update ARM assembler interpreter. + + -- Matthias Klose Fri, 03 Feb 2012 23:59:42 +0100 + +openjdk-6 (6b24-1.11-1) unstable; urgency=low + + * Upload to unstable. + + -- Matthias Klose Fri, 03 Feb 2012 01:34:16 +0100 + +openjdk-6 (6b24-1.11-0ubuntu1) precise; urgency=low + + * IcedTea6 1.11 release. + + [ Luke Yelavich ] + * Use java-atk-wrapper instead of java-access-bridge for accessibility. + LP: #790240. + + [ Matthias Klose ] + * nss.cfg: Remove nssLibraryDirectory property, rely on the system + library path. + * Make the java.policy file multi-arch installable. LP: #924096. + * Don't install desktop and menu files for multiarch builds. + Needs a better solution. Closes: #658321 + * Pass -n to gzip when compressing manpages to be Multi-Arch: same safe. + * Don't install an alternative for the deprecated apt tool. + * Make the upgrade from a non-multiarch installation location more + robust; don't depend on version numbers, but check the path of the + alternatives. LP: #887077. + * Always use the internal copy of liblcms1; only OpenJDK 7 has the + support to use a system liblcms2. + * Build jamvm on powerpc. + + -- Matthias Klose Fri, 03 Feb 2012 01:20:59 +0100 + +openjdk-6 (6b24~pre4-1ubuntu1) precise; urgency=low + + * Disable the jtreg tests for JamVM on ARM, issues on the buildds. + + -- Matthias Klose Sat, 21 Jan 2012 23:00:21 +0100 + +openjdk-6 (6b24~pre4-1) unstable; urgency=low + + * Upload to unstable. + + -- Matthias Klose Sat, 21 Jan 2012 00:18:46 +0100 + +openjdk-6 (6b24~pre4-0ubuntu1) precise; urgency=low + + * Update from the IcedTea6-1.11 branch (20120120). + * Disable shark builds, broken for this release. + * Fix some lintian warnings. + + -- Matthias Klose Sat, 21 Jan 2012 00:02:47 +0100 + +openjdk-6 (6b24~pre3-0ubuntu1) precise; urgency=low + + * Update from the IcedTea6 branch (20120103). + * Build shark using llvm-3.0. + + -- Matthias Klose Tue, 03 Jan 2012 08:32:51 +0100 + +openjdk-6 (6b24~pre2-1) unstable; urgency=low + + * Regenerate the control file. + + -- Matthias Klose Fri, 16 Dec 2011 17:38:01 +0100 + +openjdk-6 (6b24~pre2-0ubuntu2) precise; urgency=low + + * Build-depend on binutils-dev on armel and armhf. + + -- Matthias Klose Fri, 16 Dec 2011 17:17:09 +0100 + +openjdk-6 (6b24~pre2-0ubuntu1) precise; urgency=low + + * Update from the IcedTea6 branch (20111216). + * Enable CACAO on armhf. + * Fix build flags for cppInterpreter_arm.o. + * openjdk-6-jre-lib: Mark as Multi-Arch: foreign. + * Fix plugin name in jinfo file. Closes: #650928. + + -- Matthias Klose Fri, 16 Dec 2011 14:29:04 +0100 + +openjdk-6 (6b24~pre1-1) unstable; urgency=low + + * OpenJDK 6b24 release. + * Update from the IcedTea6 branch (20111130). + + -- Matthias Klose Wed, 30 Nov 2011 18:51:50 +0100 + +openjdk-6 (6b23~pre11-1) unstable; urgency=high + + * Build with jpeg8. Closes: #644070. + * Tighten inter-package dependencies for Debian builds. Closes: #641240. + + -- Matthias Klose Wed, 19 Oct 2011 21:11:52 +0200 + +openjdk-6 (6b23~pre11-0ubuntu1) precise; urgency=low + + * Update from the IcedTea6 branch (20111019). + - Security fixes: + - S7000600, CVE-2011-3547: InputStream skip() information leak. + - S7019773, CVE-2011-3548: mutable static AWTKeyStroke.ctor. + - S7023640, CVE-2011-3551: Java2D TransformHelper integer overflow. + - S7032417, CVE-2011-3552: excessive default UDP socket limit under + SecurityManager. + - S7046794, CVE-2011-3553: JAX-WS stack-traces information leak. + - S7046823, CVE-2011-3544: missing SecurityManager checks in scripting + engine. + - S7055902, CVE-2011-3521: IIOP deserialization code execution. + - S7057857, CVE-2011-3554: insufficient pack200 JAR files uncompress + error checks. + - S7064341, CVE-2011-3389: HTTPS: block-wise chosen-plaintext attack + against SSL/TLS (BEAST). + - S7070134, CVE-2011-3558: HotSpot crashes with sigsegv from + PorterStemmer. + - S7077466, CVE-2011-3556: RMI DGC server remote code execution. + - S7083012, CVE-2011-3557: RMI registry privileged code execution. + - S7096936, CVE-2011-3560: missing checkSetFactory calls in + HttpsURLConnection. + - Update JamVM. + - Implement classlibCheckIfOnLoad(). + - Make thread states JVMTI compatible. + - Handle 'g' when specifying memory + extra checks. + - Make command line compatibility options table-driven. + - Update CACAO. + + -- Matthias Klose Wed, 19 Oct 2011 18:03:26 +0200 + +openjdk-6 (6b23~pre10-1) unstable; urgency=low + + [ Matthias Klose ] + * Fix exception on trying to start PulseAudio playback on ARM (Xerxes + Rånby, David Henningsson). LP: #862286. + + [ Damien Raude-Morvan ] + * Add myself to Uploaders. + * d/rules: Fix java.policy to include jre/lib/ext/* files (instead of + non-existant ext/*). It'll restore privilegied access from sunpkcs11.jar + to sun.* code. (Closes: #642734, #642598). + + -- Damien Raude-Morvan Sat, 01 Oct 2011 12:11:52 +0200 + +openjdk-6 (6b23~pre10-0ubuntu4) oneiric; urgency=low + + [ Matthias Klose ] + * Fix exception on trying to start PulseAudio playback on ARM (Xerxes + Rånby, David Henningsson). LP: #862286. + + [ Damien Raude-Morvan ] + * Add myself to Uploaders. + * d/rules: Fix java.policy to include jre/lib/ext/* files (instead of + non-existant ext/*). It'll restore privilegied access from sunpkcs11.jar + to sun.* code. (Closes: #642734, #642598). + + -- Matthias Klose Thu, 29 Sep 2011 17:28:29 +0200 + +openjdk-6 (6b23~pre10-0ubuntu3) oneiric; urgency=low + + * Don't use the broken symlink to build on armel. + + -- Matthias Klose Tue, 27 Sep 2011 15:43:03 +0200 + +openjdk-6 (6b23~pre10-0ubuntu2) oneiric; urgency=low + + * Fix dangling java-1.6.0-openjdk symlink. + + -- Matthias Klose Tue, 27 Sep 2011 14:04:08 +0200 + +openjdk-6 (6b23~pre10-0ubuntu1) oneiric; urgency=low + + * Update from the IcedTea6 branch (20110926). + - OpenJDK: + - S6826104: Getting a NullPointer exception when clicked on + Application & Toolkit Modal dialog. + - S5082756: Image I/O plug-ins set metadata boolean attributes to "true" + or "false". + - S6296893: BMP Writer handles TopDown property incorrectly for some + of the compression types. + - JamVM: + - Add support for armhf. + - Skip Java-reflection-related DelegatingClassLoaders, enables JamVM + to run NetBeans. + - Generic JNI stubs for common JNI method signatures. + - Fix memory heap arguments in terms of gigabytes. + - armhf: ensure stack is 8 byte aligned. + - CACAO: + - CA149: Used wrong class loader. + - src/vm/javaobjects.cpp (java_lang_reflect_Method::invoke): [OPENJDK] stack + - index of caller was off by one, causing many apt (Annotation Processing Tool) + failures. + * Default to JamVM on armhf. + + -- Matthias Klose Mon, 26 Sep 2011 15:23:21 +0200 + +openjdk-6 (6b23~pre9-2) unstable; urgency=low + + [ Matthias Klose ] + * openjdk-6-jre-lib: Break openjdk-6-jre-headless (<< 6b23~pre9-1~). + Closes: #640476. + + [ Damien Raude-Morvan ] + * d/patches/icc_loading_with_symlink.diff: Try to fix loading of ICC profile + when jre/lib/cmm is a symlink. (Closes: #641530, #639883, #641240). + + -- Damien Raude-Morvan Fri, 23 Sep 2011 18:56:53 +0200 + +openjdk-6 (6b23~pre9-1) unstable; urgency=low + + * Update from the IcedTea6 branch (20110830). + * Move the -lib files into a different location so that the java-6-openjdk + name can be used as a symlink. + * Symlink the jre/cmm directory, instead of the files inside. Closes: #639883. + + -- Matthias Klose Thu, 01 Sep 2011 00:34:06 +0200 + +openjdk-6 (6b23~pre8-2ubuntu1) oneiric; urgency=low + + * Regenerate the control file. + + -- Matthias Klose Sun, 28 Aug 2011 23:49:18 +0200 + +openjdk-6 (6b23~pre8-2) unstable; urgency=low + + * Set plugin name for the jinfo file. Closes: #638548, + * Disable the mauve testsuite on i386. + * Make the installation multiarch aware. + + -- Matthias Klose Sun, 28 Aug 2011 17:55:22 +0200 + +openjdk-6 (6b23~pre8-1ubuntu1) oneiric; urgency=low + + * Merge with Debian. + + -- Matthias Klose Sat, 20 Aug 2011 14:21:52 +0200 + +openjdk-6 (6b23~pre8-1) unstable; urgency=low + + * Update from the IcedTea6 branch (20110820). + - JamVM updates. + * Build using GCC-4.4 on sparc and sparc64. + * Enable testsuite runs in s390x. + + -- Matthias Klose Fri, 19 Aug 2011 23:30:48 +0000 + +openjdk-6 (6b23~pre7-1) unstable; urgency=low + + * Update from the IcedTea6 branch (20110816). + - JamVM updates. + * Fix typo for s390x build. + + -- Matthias Klose Tue, 16 Aug 2011 07:16:18 +0200 + +openjdk-6 (6b23~pre6-1) unstable; urgency=low + + * Update from the IcedTea6 branch (20110814). + * Disable cacao for armhf. + * Build using g++-4.5 on armhf. + * Call dbus-launch --exit-with-session in testsuite. Closes: #612394. + * Build for s390x using Zero. + + -- Matthias Klose Sun, 14 Aug 2011 09:24:47 +0200 + +openjdk-6 (6b23~pre5-1) experimental; urgency=low + + * Build using GCC-4.4 on mips/mipsel. Closes: #628621. + + -- Matthias Klose Wed, 10 Aug 2011 10:56:09 +0200 + +openjdk-6 (6b23~pre5-0ubuntu1) oneiric; urgency=low + + * Update from the IcedTea6 branch (20110810). + + -- Matthias Klose Wed, 10 Aug 2011 10:46:25 +0200 + +openjdk-6 (6b23~pre4-2ubuntu1) oneiric; urgency=low + + * Regenerate the control file. + + -- Matthias Klose Mon, 08 Aug 2011 14:39:49 +0200 + +openjdk-6 (6b23~pre4-2) experimental; urgency=low + + * openjdk-6-jre-headless: Depend on icedtea-6-jre-jamvm, if it's + the default VM. + * Use gcj-4.4 as the stage1 java VM on mips and mipsel. + * Explicitly build-depend on xsltproc. + + -- Matthias Klose Thu, 04 Aug 2011 11:06:38 +0200 + +openjdk-6 (6b23~pre4-1) experimental; urgency=low + + * Upload to experimental. + + -- Matthias Klose Tue, 02 Aug 2011 21:18:45 +0200 + +openjdk-6 (6b23~pre4-0ubuntu1) oneiric; urgency=low + + * Update from the IcedTea6 branch (20110802). + * Updated JamVM to the 2011-08-01 revision. + * Make JamVM the default VM on Ubuntu oneiric/ARM. + * Fix build on sparc. + * Depend on libnss3 in multiarch location. Closes: #634058, #635111. + + -- Matthias Klose Tue, 02 Aug 2011 19:25:57 +0200 + +openjdk-6 (6b23~pre3-0ubuntu2) oneiric; urgency=low + + * Build using g++-4.5 on oneiric/armel. + + -- Matthias Klose Sat, 09 Jul 2011 13:03:28 +0200 + +openjdk-6 (6b23~pre3-0ubuntu1) oneiric; urgency=low + + * Update to the b23-05_jul_2011 tarball. + - Includes fixes for security issues: + - S6213702, CVE-2011-0872: (so) non-blocking sockets with TCP urgent + disabled get still selected for read ops (win) + - S6618658, CVE-2011-0865: Vulnerability in deserialization + - S7012520, CVE-2011-0815: Heap overflow vulnerability in + FileDialog.show() + - S7013519, CVE-2011-0822, CVE-2011-0862: Integer overflows in 2D code + - S7013969, CVE-2011-0867: NetworkInterface.toString can reveal + bindings + - S7013971, CVE-2011-0869: Vulnerability in SAAJ + - S7016340, CVE-2011-0870: Vulnerability in SAAJ + - S7016495, CVE-2011-0868: Crash in Java 2D transforming an image with + scale close to zero + - S7020198, CVE-2011-0871: ImageIcon creates Component with null acc + - S7020373, CVE-2011-0864: JSR rewriting can overflow memory address + size variables + * Don't build with -Werror on sparc. + * Build shark using llvm-2.9. + + -- Matthias Klose Thu, 07 Jul 2011 22:31:12 +0200 + +openjdk-6 (6b23~pre2-2) experimental; urgency=low + + * Explicitly use GCC 4.6. + + -- Matthias Klose Sun, 29 May 2011 21:03:20 +0200 + +openjdk-6 (6b23~pre2-1) experimental; urgency=low + + * Upload to experimental. + + -- Matthias Klose Sun, 29 May 2011 07:54:14 +0200 + +openjdk-6 (6b23~pre2-0ubuntu2) oneiric; urgency=low + + * Don't run the jdk jtreg test with JamVM. + + -- Matthias Klose Sun, 29 May 2011 07:52:04 +0200 + +openjdk-6 (6b23~pre2-0ubuntu1) oneiric; urgency=low + + * Fix non-bootstrap builds. + * Depend against multiarch libnss3. LP: #779174. + * Run jtreg tests using JamVM too. + * Don't run the jtreg tests with the NSS security provider enabled. + * Update JamVM to 20110528. + + -- Matthias Klose Sat, 28 May 2011 15:43:50 +0200 + +openjdk-6 (6b23~pre1-0ubuntu2) oneiric; urgency=low + + * Build using g++-4.6 on oneiric. + + -- Matthias Klose Tue, 17 May 2011 17:38:08 +0200 + +openjdk-6 (6b23~pre1-0ubuntu1) oneiric; urgency=low + + * Update from the IcedTea6 branch (20110517). + * Add lcms configury. + * Build on ARM using the zero port (without the ARM assembler interpreter). + * Build-depend against multiarch libnss3. LP: #783941. + + -- Matthias Klose Tue, 17 May 2011 17:01:37 +0200 + +openjdk-6 (6b22-1.10.1-0ubuntu1) natty; urgency=low + + * IcedTea6 1.10.1 release. + + -- Matthias Klose Tue, 05 Apr 2011 12:20:36 +0200 + +openjdk-6 (6b22-1.10.1~pre1-1) experimental; urgency=low + + * Upload to experimental. + + -- Matthias Klose Sat, 26 Mar 2011 10:43:49 +0100 + +openjdk-6 (6b22-1.10.1~pre1-0ubuntu1) natty; urgency=low + + * Update from the IcedTea6-1.10 release branch (20110325). + * Add multiarch directories to the default library path. LP: #737603. + + -- Matthias Klose Fri, 25 Mar 2011 16:33:57 +0100 + +openjdk-6 (6b22-1.10-3) experimental; urgency=low + + * Fix JamVM build on mips/mipsel (Robert Lougher). + * Re-enable the JamVM build on mips/mipsel. + + -- Matthias Klose Sun, 06 Mar 2011 15:01:54 +0100 + +openjdk-6 (6b22-1.10-2) experimental; urgency=low + + * Mention that IcedTea is copyrigh GPLv2 + "CLASSPATH" EXCEPTION. + Closes: #611269. + * Don't run the jdk checks for the alternate builds (hotspot and + langtools checks are still run). + * Disable the JamVM build on mips/mipsel. + + -- Matthias Klose Sat, 05 Mar 2011 16:13:40 +0100 + +openjdk-6 (6b22-1.10-1) experimental; urgency=low + + * Upload to experimental. + + -- Matthias Klose Fri, 04 Mar 2011 16:12:50 +0100 + +openjdk-6 (6b22-1.10-0ubuntu2) natty; urgency=low + + * Disable the jdk tests with the Shark, JamVM and Cacao VMs. + + -- Matthias Klose Fri, 04 Mar 2011 15:32:50 +0100 + +openjdk-6 (6b22-1.10-0ubuntu1) natty; urgency=low + + * IcedTea6 1.10 release. + + -- Matthias Klose Thu, 03 Mar 2011 09:32:19 +0100 + +openjdk-6 (6b21~pre3-0ubuntu1) natty; urgency=low + + * Update from the IcedTea6 trunk (20110224). + * icedtea-6-jre-jamvm: Build JamVM as an alternative VM, + start with `java -jamvm'. + + -- Matthias Klose Thu, 24 Feb 2011 02:45:56 +0100 + +openjdk-6 (6b21~pre2-0ubuntu1) natty; urgency=low + + * Update from the IcedTea6 trunk (20110217). + * Update hotspot hs20 (not yet enabled). + * Add ppc64 packaging bits. + + -- Matthias Klose Fri, 18 Feb 2011 15:55:41 +0100 + +openjdk-6 (6b21~pre1-1) experimental; urgency=low + + * Upload to experimental. + + -- Matthias Klose Sat, 22 Jan 2011 15:34:21 +0100 + +openjdk-6 (6b21~pre1-0ubuntu1) natty; urgency=low + + * Update to 6b21. + + -- Matthias Klose Sat, 22 Jan 2011 14:28:28 +0100 + +openjdk-6 (6b20-1.10~pre3-0ubuntu4) natty; urgency=low + + * Fix shark build on powerpc. + + -- Matthias Klose Fri, 24 Dec 2010 11:06:32 +0100 + +openjdk-6 (6b20-1.10~pre3-0ubuntu3) natty; urgency=low + + * Update from the IcedTea6 trunk (20101223). + + -- Matthias Klose Thu, 23 Dec 2010 14:27:17 +0100 + +openjdk-6 (6b20-1.10~pre3-0ubuntu1) natty; urgency=low + + * Update from the IcedTea6 trunk (20101126). + * Update hotspot hs19. + * Fix build failures on ia64, s390 and sparc64. + + -- Matthias Klose Fri, 26 Nov 2010 16:38:16 +0100 + +openjdk-6 (6b20-1.10~pre2-0ubuntu7~ppa1) natty; urgency=low + + * Reenable shark on amd64, but build using llvm-2.7. + + -- Matthias Klose Thu, 21 Oct 2010 23:59:30 +0200 + +openjdk-6 (6b20-1.10~pre2-0ubuntu5) natty; urgency=low + + * Don't try to set up an alternative for javaws + + -- Matthias Klose Thu, 21 Oct 2010 17:38:48 +0200 + +openjdk-6 (6b20-1.10~pre2-0ubuntu3) natty; urgency=low + + * Stop building zero/shark on amd64. Fails the self tests. + + -- Matthias Klose Thu, 21 Oct 2010 13:49:56 +0200 + +openjdk-6 (6b20-1.10~pre2-0ubuntu2) natty; urgency=low + + * Don't include OpenJDK's javaws either. + * openjdk-6-jre: Recommend icedtea-netx. + + -- Matthias Klose Thu, 21 Oct 2010 08:34:07 +0200 + +openjdk-6 (6b20-1.10~pre2-0ubuntu1) natty; urgency=low + + * Update from the IcedTea6 trunk (20101020). + * Remove the plugin and javaws from the packaging, removed upstream. + + -- Matthias Klose Wed, 20 Oct 2010 17:45:09 +0200 + +openjdk-6 (6b20-1.10~pre1-0ubuntu2) natty; urgency=low + + * Build with hotspot 19. + + -- Matthias Klose Thu, 14 Oct 2010 11:28:38 +0200 + +openjdk-6 (6b20-1.10~pre1-0ubuntu1) natty; urgency=low + + * Snapshot, taken from the IcedTea6 trunk (20101013). + + -- Matthias Klose Wed, 13 Oct 2010 08:36:44 +0200 + +openjdk-6 (6b20-1.9.2-1) experimental; urgency=low + + * Upload to experimental. + + -- Matthias Klose Wed, 24 Nov 2010 05:29:43 +0100 + +openjdk-6 (6b20-1.9.2-0ubuntu1) maverick-security; urgency=low + + * IcedTea6 1.9.2 release. + - CVE-2010-3860: Fix IcedTea System property information leak via + public static. + * Build using Hotspot hs19. + * Start metacity using dbus-launch, when running the testsuite. LP: #632594. + + -- Matthias Klose Sun, 21 Nov 2010 18:30:39 +0100 + +openjdk-6 (6b20-1.9.1-1ubuntu3) maverick-security; urgency=low + + * Move all japanese man pages belonging to the jre into the -jre package. + Closes: #600765. + * Add -jdk replaces for -jre and -jre-headless. Closes: #600809. + + -- Matthias Klose Wed, 20 Oct 2010 12:51:34 +0200 + +openjdk-6 (6b20-1.9.1-1ubuntu1) maverick-security; urgency=low + + * Fix upgrade to symlinked timezone data. Closes: #600359. + * Move all japanese man pages belonging to the jre into the -jre package. + Closes: #600765. + + -- Matthias Klose Mon, 18 Oct 2010 16:07:48 +0200 + +openjdk-6 (6b20-1.9.1-1) experimental; urgency=low + + * Upload to experimental. + + -- Matthias Klose Tue, 12 Oct 2010 15:07:35 +0200 + +openjdk-6 (6b20-1.9.1-0ubuntu1) maverick-security; urgency=low + + * IcedTea6 1.9.1 release. + - Security updates: + - S6914943, CVE-2009-3555: TLS: MITM attacks via session renegotiation. + - S6559775, CVE-2010-3568: OpenJDK Deserialization Race condition. + - S6891766, CVE-2010-3554: OpenJDK corba reflection vulnerabilities. + - S6925710, CVE-2010-3562: OpenJDK IndexColorModel double-free. + - S6938813, CVE-2010-3557: OpenJDK Swing mutable static. + - S6957564, CVE-2010-3548: OpenJDK DNS server IP address information + leak. + - S6958060, CVE-2010-3564: OpenJDK kerberos vulnerability. + - S6963023, CVE-2010-3565: OpenJDK JPEG writeImage remote code execution. + - S6963489, CVE-2010-3566: OpenJDK ICC Profile remote code execution. + - S6966692, CVE-2010-3569: OpenJDK Serialization inconsistencies. + - S6622002, CVE-2010-3553: UIDefault.ProxyLazyValue has unsafe + reflection usage. + - S6623943: javax.swing.TimerQueue's thread occasionally fails to start. + - S6925672, CVE-2010-3561: Privileged ServerSocket.accept allows + receiving connections from any host. + - S6952017, CVE-2010-3549: HttpURLConnection chunked encoding issue + (Http request splitting). + - S6952603, CVE-2010-3551: NetworkInterface reveals local network + address to untrusted code. + - S6961084, CVE-2010-3541: limit setting of some request headers in + HttpURLConnection. + - S6963285, CVE-2010-3567: Crash in ICU Opentype layout engine due to + mismatch in character counts. + - S6980004, CVE-2010-3573: limit HTTP request cookie headers in + HttpURLConnection. + - S6981426, CVE-2010-3574: limit use of TRACE method in + HttpURLConnection. + - Plugin fixes. + - Backports from newer IcedTea releases. + + -- Matthias Klose Tue, 12 Oct 2010 12:13:40 +0200 + +openjdk-6 (6b20-1.9-1) experimental; urgency=low + + * Upload to experimental. + + -- Matthias Klose Tue, 07 Sep 2010 21:19:21 +0200 + +openjdk-6 (6b20-1.9-0ubuntu1) maverick; urgency=low + + * IcedTea6 1.9 release. + + -- Matthias Klose Tue, 07 Sep 2010 18:13:20 +0200 + +openjdk-6 (6b20~pre2-0ubuntu2) maverick; urgency=low + + * Update from the IcedTea6 trunk. + * Really let the build fail on armel. + + -- Matthias Klose Fri, 30 Jul 2010 16:55:38 +0200 + +openjdk-6 (6b20~pre2-0ubuntu1) maverick; urgency=high + + * Update from the IcedTea6 trunk. + - (CVE-2010-2783): IcedTea 'Extended JNLP Services' arbitrary file access. + - (CVE-2010-2548): IcedTea incomplete property access check for unsigned + applications + * openjdk-6-jre: Recommend ttf-dejavu-extra. LP: #569396. + * Explicitely fail the build on armel. The ARM assembler interpreter is + disabled and would a 3-5x performance regression compared to the current + 6b18 armel binaries in the archive. + + -- Matthias Klose Thu, 29 Jul 2010 00:10:53 +0200 + +openjdk-6 (6b20~pre1-2) experimental; urgency=low + + * Upload to experimental. + + -- Matthias Klose Thu, 15 Jul 2010 13:55:02 +0200 + +openjdk-6 (6b20~pre1-1ubuntu1) maverick; urgency=low + + * Include docs in the -doc package. LP: #600834. + * Update from the IcedTea6 trunk. + - Plugin and netx fixes. + - Don't link the plugin against the libxul libraries. Closes: #576361. + - More plugin cpu usage fixes. Closes: #584335, #587049. + - Plugin: fixes AppletContext.getApplets(). + * Fix Vcs-Bzr location. Closes: #530883. + * Search for unversioned llvm-config tool. + * Don't set XFILESEARCHPATH and NLSPATH on startup. LP: #586641. + * Fix chinese font metrics and prefer using 'WenQuanYi Micro Hei' font. + LP: #472845. + * Strip libjvm.so with --strip-debug instead of --strip-unneeded. + LP: #574997. + + -- Matthias Klose Thu, 15 Jul 2010 12:40:10 +0200 + +openjdk-6 (6b20~pre1-1) experimental; urgency=low + + * Upload to experimental. + + -- Matthias Klose Mon, 28 Jun 2010 00:50:58 +0200 + +openjdk-6 (6b20~pre1-0ubuntu2) maverick; urgency=low + + * Shark & CACAO build fixes. + + -- Matthias Klose Fri, 25 Jun 2010 02:27:10 +0200 + +openjdk-6 (6b20~pre1-0ubuntu1) maverick; urgency=low + + * Update to 6b20 code drop. + + -- Matthias Klose Wed, 14 Apr 2010 02:53:37 +0200 + +openjdk-6 (6b18-1.8-4) unstable; urgency=low + + * Update from the 1.8 branch. + - Plugin and netx fixes. + - Don't link the plugin against the libxul libraries. Closes: #576361. + - More plugin cpu usage fixes. Closes: #584335, #587049. + - Plugin: fixes AppletContext.getApplets(). + - Fix race conditions in plugin initialization code that were causing + hangs when loading multiple applets in parallel. + * Fix Vcs-Bzr location. Closes: #530883. + * Search for unversioned llvm-config tool. + * Don't set XFILESEARCHPATH and NLSPATH on startup. LP: #586641. + * Fix chinese font metrics and prefer using 'WenQuanYi Micro Hei' font. + LP: #472845. + * Strip libjvm.so with --strip-debug instead of --strip-unneeded. + LP: #574997. + * Don't turn on the ARM assembler interpreter when building the shark + VM. + + -- Matthias Klose Thu, 15 Jul 2010 00:40:13 +0200 + +openjdk-6 (6b18-1.8-3) unstable; urgency=low + + * Update from the 1.8 branch. + - Plugin fixes. LP: #597714. + * Add powerpcspe build fixes (Sebastian Andrzej Siewior). Closes: #586359. + * Work around build failure on buildds configured with low ARG_MAX + (Giovanni Mascellani). Closes: #575254. + + -- Matthias Klose Sun, 27 Jun 2010 10:16:27 +0200 + +openjdk-6 (6b18-1.8-2ubuntu3) maverick; urgency=low + + * Update from the 1.8 branch. + - Plugin fixes. LP: #597714. + * Add powerpcspe build fixes (Sebastian Andrzej Siewior). Closes: #586359. + * Work around build failure on buildds configured with low ARG_MAX + (Giovanni Mascellani). Closes: #575254. + + -- Matthias Klose Sun, 27 Jun 2010 10:16:27 +0200 + +openjdk-6 (6b18-1.8-2ubuntu2) maverick; urgency=low + + * Search for unversioned llvm-config tool. + + -- Matthias Klose Sun, 02 May 2010 12:03:01 +0200 + +openjdk-6 (6b18-1.8-2ubuntu1) maverick; urgency=low + + * Upload to maverick. + + -- Matthias Klose Sun, 02 May 2010 11:23:16 +0200 + +openjdk-6 (6b18-1.8-2) unstable; urgency=low + + * Update from the 1.8 branch. + - Fix build on Hitachi SH. Closes: #575346. + - Shark and Zero fixes. + * Build shark using llvm-2.7. + * Don't use shark to run the test harness when testing the shark build. + * README.Debian: Add paragraph about debugging the IcedTea NPPlugin. + + -- Matthias Klose Sat, 01 May 2010 12:35:19 +0200 + +openjdk-6 (6b18-1.8-1) unstable; urgency=low + + * Upload to unstable. + + -- Matthias Klose Wed, 14 Apr 2010 02:53:37 +0200 + +openjdk-6 (6b18-1.8-0ubuntu1) lucid; urgency=low + + * Update IcedTea6 to the icedtea6-1.8 release. + * Fix builds on Ubuntu/dapper and Debian/lenny. + * On hppa, configure --without-rhino --disable-plugin. + * Fix Hitachi SH configury. Closes: #575346. + * Start a window manager when running the tests. Prefer metacity, + as more tests pass with it. + * Let XToolkit.isTraySupported() return true, if Compiz is running. + Works around sun#6438179. LP: #300948. + * Make /jre/lib/security/nss.cfg a config file. + * Fail in the configuration of the packages, if /proc is not mounted. + java currently uses tricks to find its own shared libraries depending + on the path of the binary. Will be changed in OpenJDK7. Closes: #576453. + * Fix PR icedtea/469, testsuite failures with the NSS based security + provider. LP: #556549. + * Do not pass LD_LIBRARY_PATH from the plugin to the java process. + While libnss3.so gets loaded from /usr/lib, the dependent libraries + are loaded from MOZILLA_FIVE_HOME (See #561216 for the wrong firefox + config). LP: #561124. + Closes as well: LP: #551328, #554909, #560829, #549010, #553452. + * Always build shark with hs14. + + -- Matthias Klose Wed, 14 Apr 2010 01:53:33 +0200 + +openjdk-6 (6b18~pre4-1ubuntu1) lucid; urgency=low + + * Build-depend on xulrunner-1.9.2-dev instead of xulrunner-dev, + unexpectedly demoted to universe. + * icedtea6-plugin: Hardcode dependency on xulrunner-1.9.2. No way + to do better? See #552780. + * Fix builds on Ubuntu hardy. + + -- Matthias Klose Wed, 31 Mar 2010 22:21:49 +0200 + +openjdk-6 (6b18~pre4-1) unstable; urgency=high + + * Upload to unstable. + + -- Matthias Klose Wed, 31 Mar 2010 16:35:18 +0200 + +openjdk-6 (6b18~pre4-0ubuntu2) lucid; urgency=low + + * Fix typo in NPPlugin code. LP: #552287. + + -- Matthias Klose Wed, 31 Mar 2010 10:41:11 +0200 + +openjdk-6 (6b18~pre4-0ubuntu1) lucid; urgency=low + + [ Matthias Klose ] + * Update IcedTea6 form the 1.8 branch. + * SECURITY UPDATE: multiple upstream vulnerabilities. Upstream fixes: + - (CVE-2010-0837): JAR "unpack200" must verify input parameters (6902299). + - (CVE-2010-0845): No ClassCastException for HashAttributeSet constructors + if run with -Xcomp (6894807). + - (CVE-2010-0838): CMM readMabCurveData Buffer Overflow Vulnerability + (6899653). + - (CVE-2010-0082): Loader-constraint table allows arrays instead of + only the base-classes (6626217). + - (CVE-2010-0095): Subclasses of InetAddress may incorrectly interpret + network addresses (6893954) [ZDI-CAN-603]. + - (CVE-2010-0085): File TOCTOU deserialization vulnerability (6736390). + - (CVE-2010-0091): Unsigned applet can retrieve the dragged information + before drop action occurs (6887703). + - (CVE-2010-0088): Inflater/Deflater clone issues (6745393). + - (CVE-2010-0084): Policy/PolicyFile leak dynamic ProtectionDomains + (6633872). + - (CVE-2010-0092): AtomicReferenceArray causes SIGSEGV -> SEGV_MAPERR + error (6888149). + - (CVE-2010-0094): Deserialization of RMIConnectionImpl objects should + enforce stricter checks (6893947) [ZDI-CAN-588]. + - (CVE-2010-0093): System.arraycopy unable to reference elements + beyond Integer.MAX_VALUE bytes (6892265). + - (CVE-2010-0840): Applet Trusted Methods Chaining Privilege Escalation + Vulnerability (6904691). + - (CVE-2010-0848): AWT Library Invalid Index Vulnerability (6914823). + - (CVE-2010-0847): ImagingLib arbitrary code execution vulnerability + (6914866). + - (CVE-2009-3555): TLS: MITM attacks via session renegotiation. + - 6639665: ThreadGroup finalizer allows creation of false root + ThreadGroups. + - 6898622: ObjectIdentifer.equals is not capable of detecting incorrectly. + encoded CommonName OIDs. + - 6910590: Application can modify command array in ProcessBuilder. + - 6909597: JPEGImageReader stepX Integer Overflow Vulnerability. + - 6932480: Crash in CompilerThread/Parser. Unloaded array klass? + - 6898739: TLS renegotiation issue. + + [ Torsten Werner ] + * Switch off IPV6_V6ONLY for IN6_IS_ADDR_UNSPECIFIED addresses, too. + (Closes: #575163) + + -- Matthias Klose Wed, 31 Mar 2010 02:34:04 +0200 + +openjdk-6 (6b18~pre3-1) unstable; urgency=low + + [ Matthias Klose ] + * Update IcedTea build infrastructure (20100321). + * Update support for SH4 (Nobuhiro Iwamatsu). + * Handle renaming of the plugin name. + + [ Torsten Werner ] + * Improve patch for IPv4 mapped IPv6 addresses even more. + (Closes: #573742) + + -- Matthias Klose Sun, 21 Mar 2010 22:52:12 +0100 + +openjdk-6 (6b18~pre2-1ubuntu2) lucid; urgency=low + + * Fix build failure on ARM. + + -- Matthias Klose Fri, 12 Mar 2010 15:19:13 +0100 + +openjdk-6 (6b18~pre2-1ubuntu1) lucid; urgency=low + + * Upload to lucid. + + -- Matthias Klose Wed, 10 Mar 2010 23:34:57 +0100 + +openjdk-6 (6b18~pre2-1) unstable; urgency=low + + * Update IcedTea build infrastructure (20100310). + * Disable building the plugin the plugin on alpha (borked xulrunner + packaging using binary indep packages). + * Use a two stage build on alpha. + * Add note about the reparenting WM workaround. Closes: #573026. + * Prefer Sazanami instead of Kochi for Japanese fonts (Hideki Yamane). + Closes: #572511. + * openjdk-6-doc: Don't compress package-list files. Closes: #567899. + + -- Matthias Klose Wed, 10 Mar 2010 11:19:19 +0100 + +openjdk-6 (6b18~pre1-4) unstable; urgency=low + + * Improve patch for IPv4 mapped IPv6 addresses. + + -- Torsten Werner Sun, 07 Mar 2010 01:14:36 +0100 + +openjdk-6 (6b18~pre1-3) unstable; urgency=low + + * Add a patch for improved handling of IPv4 mapped IPv6 addresses. + (Closes: #560056, #561930, #563699, #563946) + + -- Torsten Werner Tue, 02 Mar 2010 23:46:57 +0100 + +openjdk-6 (6b18~pre1-2) unstable; urgency=low + + * Change Build-Depends: ant1.7-optional because of a bus error in gij. + + -- Torsten Werner Mon, 01 Mar 2010 07:17:16 +0100 + +openjdk-6 (6b18~pre1-1ubuntu1) lucid; urgency=low + + * Ignore error code running ant -diagnostics. + * Build-depend on ant-optional. + * Disable the cacao build on armel, fails to build with the non + bootstrap build. + + -- Matthias Klose Sat, 20 Feb 2010 15:36:06 +0100 + +openjdk-6 (6b18~pre1-1) unstable; urgency=low + + * Upload to unstable. + + -- Matthias Klose Fri, 19 Feb 2010 21:52:32 +0100 + +openjdk-6 (6b18~pre1-0ubuntu1) lucid; urgency=low + + * New Openjdk6 b18 source code drop. + * Use mangled copy of rhino. Closes: #512970. LP: #255149. + + -- Matthias Klose Fri, 19 Feb 2010 18:17:23 +0100 + +openjdk-6 (6b17-1.7-1ubuntu1) lucid; urgency=low + + * ARM Thumb2 updates. + * Test build using Hotspt hs14 on ix86. + + -- Matthias Klose Sun, 31 Jan 2010 21:56:59 +0100 + +openjdk-6 (6b18~pre1-1) unstable; urgency=low + + * Upload to unstable. + + -- Matthias Klose Fri, 19 Feb 2010 21:52:32 +0100 + +openjdk-6 (6b18~pre1-0ubuntu1) lucid; urgency=low + + * New Openjdk6 b18 source code drop. + * Use mangled copy of rhino. Closes: #512970. LP: #255149. + + -- Matthias Klose Fri, 19 Feb 2010 18:17:23 +0100 + +openjdk-6 (6b17-1.7-1ubuntu1) lucid; urgency=low + + * ARM Thumb2 updates. + * Test build using Hotspt hs14 on ix86. + + -- Matthias Klose Sun, 31 Jan 2010 21:56:59 +0100 + +openjdk-6 (6b17-1.7-1) unstable; urgency=low + + * Upload to unstable. + + -- Matthias Klose Wed, 27 Jan 2010 23:44:47 +0100 + +openjdk-6 (6b17-1.7-0ubuntu1) lucid; urgency=low + + * IcedTea6 1.7 release. + * Don't try to load libjpeg7; still building with libjpeg62. Closes: #563999. + * Run the testsuite on sh4. + * Ubuntu only: Implement an execute bit checker for the Non-Exec Policy + - debian/JB-java.desktop.in: update mime handler to use new launcher. + * armel: Apply the thumb2 patches from the trunk, plus proposed patches + for the trunk. + + -- Matthias Klose Wed, 27 Jan 2010 22:48:24 +0100 + +openjdk-6 (6b17-0ubuntu1) lucid; urgency=low + + * Build from the IcedTea6-1.7 branch. + * Don't build the plugin on sparc64. + * Enable the NPPlugin. + * Add support for SH4 (Nobuhiro Iwamatsu). + * Fix crash in the ARM assembler interpreter (Edward Nevill). + + -- Matthias Klose Wed, 06 Jan 2010 15:52:50 +0100 + +openjdk-6 (6b17~pre3-1ubuntu2) lucid; urgency=low + + * Update IcedTea build infrastructure (20091224). + * Explicitely build-depend on x11-xkb-utils (xkbcomp is needed by + xvfb-run). + + -- Matthias Klose Thu, 24 Dec 2009 12:43:00 +0100 + +openjdk-6 (6b17~pre3-1ubuntu1) lucid; urgency=low + + * Upload to lucid. + + -- Matthias Klose Fri, 18 Dec 2009 10:40:05 +0100 + +openjdk-6 (6b17~pre3-1) unstable; urgency=low + + * Update IcedTea build infrastructure (20091218). + * Install docs into the openjdk-6-jre-headless directory instead of + openjdk-6-jre. + + -- Matthias Klose Fri, 18 Dec 2009 10:00:08 +0100 + +openjdk-6 (6b17~pre2-1ubuntu1) lucid; urgency=low + + * Update IcedTea build infrastructure (20091215). + * Fix cacao build on armel with current optimization defaults. + + -- Matthias Klose Tue, 15 Dec 2009 16:41:12 +0100 + +openjdk-6 (6b17~pre2-1) unstable; urgency=low + + * Upload to unstable. + + -- Matthias Klose Mon, 09 Nov 2009 21:50:52 +0100 + +openjdk-6 (6b17~pre2-0ubuntu3) lucid; urgency=low + + * Security updates: + - (CVE-2009-3728) ICC_Profile file existence detection information leak + (6631533). + - (CVE-2009-3885) BMP parsing DoS with UNC ICC links (6632445). + - (CVE-2009-3881) resurrected classloaders can still have children + (6636650). + - (CVE-2009-3882) Numerous static security flaws in Swing (findbugs) + (6657026). + - (CVE-2009-3883) Mutable statics in Windows PL&F (findbugs) (6657138). + - (CVE-2009-3880) UI logging information leakage (6664512). + - (CVE-2009-3879) GraphicsConfiguration information leak (6822057). + - (CVE-2009-3884) zoneinfo file existence information leak (6824265). + - (CVE-2009-2409) deprecate MD2 in SSL cert validation (Kaminsky) (6861062). + - (CVE-2009-3873) JPEG Image Writer quantization problem (6862968). + - (CVE-2009-3875) MessageDigest.isEqual introduces timing attack + vulnerabilities (6863503). + - (CVE-2009-3876, CVE-2009-3877) OpenJDK ASN.1/DER input stream parser + denial of service (6864911). + - (CVE-2009-3869) JRE AWT setDifflCM stack overflow (6872357). + - (CVE-2009-3874) ImageI/O JPEG heap overflow (6874643. + - (CVE-2009-3871) JRE AWT setBytePixels heap overflow (6872358). + * Update IcedTea build infrastructure (20091109). + * Use hs16 on armel. + + -- Matthias Klose Mon, 09 Nov 2009 17:48:43 +0100 + +openjdk-6 (6b17~pre2-0ubuntu2) lucid; urgency=low + + * Don't use hs16 on armel and sparc. + + -- Matthias Klose Mon, 02 Nov 2009 15:33:00 +0100 + +openjdk-6 (6b17~pre2-0ubuntu1) lucid; urgency=low + + * New code drop (b17). + * Bump hotspot to hs16. + * Update IcedTea build infrastructure (20091031). + * Set priority of default -jre and -jdk packages to optional. + * Fix binary-all to binary-any dependencies. Closes: #550680. + + -- Matthias Klose Sat, 31 Oct 2009 19:30:54 +0100 + +openjdk-6 (6b16-1.6.1-2) unstable; urgency=medium + + * Build-depend on xulrunner-dev (>= 1.9.1.3-3). + + -- Matthias Klose Sun, 11 Oct 2009 21:34:48 +0200 + +openjdk-6 (6b16-1.6.1-1ubuntu3) karmic; urgency=low + + [Matthias Klose] + * On armel and powerpc, build an additional VM using shark in the + openjdk-6-jre-zero package (java -shark ). Requires llvm-2.6. + * Hide the desktop menu entry for WebStart. LP: #222180. + * Don't provide java-virtual-machine anymore. + + [Edward Nevill] + * Avoid stack overflows in the arm interpreter. + + -- Matthias Klose Thu, 08 Oct 2009 12:41:46 +0200 + +openjdk-6 (6b16-1.6.1-1ubuntu2) karmic; urgency=low + + * Support PKCS11 cryptography via NSS, now allowing import of all + certificates from ca-certificates. + * Remove Michael Koch from uploaders, request by himself. + * Add the doc dir symlink for openjdk-6-jre-zero when the package + is built with shark support. + + -- Matthias Klose Mon, 28 Sep 2009 21:55:08 +0200 + +openjdk-6 (6b16-1.6.1-1ubuntu1) karmic; urgency=low + + * Fix dependency on the java bridge packages. + * debian/rules: Conditionalize stuff so that the recent release + is never mentioned. + * Remove obsolete patches in debian/patches. + * Rebuild on armel to fix up libffi for the soft float abi. + * For jaunty builds, fix IcedTeaPlugin failure to start with xulrunner 1.9.1 + (LP: #359407). + - debian/patches/icedtea-plugin-use-runtime-nsIProcess-IID.diff: Add. + - debian/rules: Apply it for jaunty builds. + * Use pulseaudio as default serviceprovider for + javax.sound.midi.MidiSystem and javax.sound.sampled.AudioSystem. + LP: #407299. + + -- Matthias Klose Sat, 26 Sep 2009 16:01:48 +0200 + +openjdk-6 (6b16-1.6.1-1) unstable; urgency=low + + * Upload to Debian unstable. + + -- Matthias Klose Tue, 15 Sep 2009 02:17:03 +0200 + +openjdk-6 (6b16-1.6.1-0ubuntu1) karmic; urgency=low + + * Update IcedTea6 to the 1.6.1 release. + * Work around GCC PR target/41327, build the JDK on s390 with -O2. + + -- Matthias Klose Thu, 10 Sep 2009 01:55:08 +0200 + +openjdk-6 (6b16-1.6-1) unstable; urgency=low + + * Update IcedTea6 to the 1.6 release. + * Fix GCC build dependencies. + + -- Matthias Klose Wed, 09 Sep 2009 22:18:38 +0200 + +openjdk-6 (6b16-1.6~pre2-1) unstable; urgency=low + + * Upload to unstable. + + -- Matthias Klose Fri, 28 Aug 2009 19:04:31 +0200 + +openjdk-6 (6b16-1.6~pre2-0ubuntu1) karmic; urgency=low + + * Update IcedTea from the 1.6 release branch: + - Fix buffer overflow in debugger's socket handler (Kees Cook). + https://bugs.openjdk.java.net/show_bug.cgi?id=100103. LP: #409736. + - plugin fixes. + * Move the pulseaudio recommendation to a suggestion, don't build-depend + on pulseaudio. Closes: #539394. LP: #361408. + * Build for armv6 (on armel). + + [ Kees Cook ] + * debian/rules: Re-enable fortification and stack protector + (LP: #330713). + * Adding stack markings to the x86 assembly for not using executable + stack. LP: #419018. + + -- Matthias Klose Fri, 28 Aug 2009 18:51:34 +0200 + +openjdk-6 (6b16-1.6~pre1-0ubuntu1) karmic; urgency=low + + * Test build (icedtea6-1.6 release branch). + + -- Matthias Klose Fri, 21 Aug 2009 19:44:42 +0200 + +openjdk-6 (6b16~pre5-0ubuntu2) karmic; urgency=low + + * Add explicit build dependency on libgtk2.0-dev. + + -- Matthias Klose Thu, 06 Aug 2009 11:39:14 +0200 + +openjdk-6 (6b16~pre5-0ubuntu1) karmic; urgency=low + + * Bump hotspot to hs14b16. + * Update IcedTea build infrastructure (20090805). + * patches/java-access-bridge-security.patch: Update. + * Build-depend on xulrunner-dev instead of xulrunner-1.9-dev on karmic. + * Don't recommend the jck fonts anymore, just suggest them; the appropriate + fonts are installed as dependencies of the language packs. + + -- Matthias Klose Thu, 06 Aug 2009 10:27:09 +0200 + +openjdk-6 (6b16~pre4-0ubuntu7) karmic; urgency=low + + * Build using GCC-4.4 on sparc as well, require 4.4.1. + + -- Matthias Klose Thu, 23 Jul 2009 18:23:14 +0200 + +openjdk-6 (6b16~pre4-0ubuntu6) karmic; urgency=low + + * Fix build failure building the zero VM. + + -- Matthias Klose Thu, 16 Jul 2009 09:49:36 -0400 + +openjdk-6 (6b16~pre4-0ubuntu5) karmic; urgency=low + + [Matthias Klose] + * Update IcedTea build infrastructure (20090715). + * Tighten build dependency on llvm-dev. + + [Edward Nevill] + * Add armv4 compatibility. + + -- Matthias Klose Wed, 15 Jul 2009 15:40:44 -0400 + +openjdk-6 (6b16~pre4-0ubuntu4) karmic; urgency=low + + [Edward Nevill] + * Added Bytecode Interpreter Generator. + * Added ARM templates for above. + * Removed old optimised ARM assebler. + * Added -g0 because of problems with ld linking -g. + * Changed alignment to 64 now that as bug is fixed. + + [Matthias Klose] + * Update IcedTea build infrastructure (20090710). + * Let the -jre package depend on the access-bridge package, not the + -jre-headless package. LP: #395074. + * Suggested by Ed Nevill: + - Pass -timeout:3 when running the jtreg testsuite on zero architectures. + - Pass -Xmx256M -vmoption:-Xmx256M on armel for the jtreg testsuite run. + * Tighten build dependency on llvm-dev. + + -- Matthias Klose Fri, 03 Jul 2009 18:32:50 +0200 + +openjdk-6 (6b16~pre4-0ubuntu3) karmic; urgency=low + + * Update zero-port-opt patch on armel. + + -- Matthias Klose Wed, 24 Jun 2009 10:48:48 +0200 + +openjdk-6 (6b16~pre4-0ubuntu2) karmic; urgency=low + + * Update IcedTea build infrastructure (20090623). + * Reapply the zero-port-opt patch on armel. + * Do not use the IPA Mona font family by default. Closes: #521233. + * Build cacao with -fno-strict-aliasing. + + -- Matthias Klose Tue, 23 Jun 2009 16:23:38 +0200 + +openjdk-6 (6b16-4) unstable; urgency=medium + + * Build the zero binary package when building with shark. + * Build-depend on cpio. Closes: #532963. + + -- Matthias Klose Tue, 16 Jun 2009 07:52:19 +0200 + +openjdk-6 (6b16-3) unstable; urgency=low + + * Update IcedTea build infrastructure (20090612). + * Install the libaccess-bridge-java* symlinks again. + * Build zero on ix86 architectures with JIT support (shark). To use the zero + build without shark, use the `-Xint' option to operate in interpreted-only + mode. + + -- Matthias Klose Fri, 12 Jun 2009 17:31:34 +0200 + +openjdk-6 (6b16-2) unstable; urgency=low + + * Don't install libaccess-bridge-java* symlinks until + libaccess-bridge-java-jni is available on all architectures. + * Add missing build dependency on cacao-source. + + -- Matthias Klose Mon, 18 May 2009 14:02:59 +0200 + +openjdk-6 (6b16-1) unstable; urgency=low + + * Upload to unstable, based in 6b16 and IcedTea 1.5. + + -- Matthias Klose Sun, 17 May 2009 23:02:46 +0200 + +openjdk-6 (6b16~pre3-0ubuntu1) karmic; urgency=low + + * Update to hotspot hs14b15. + * Provide symlink for libjava-access-bridge-jni.so. LP: #375347. + + -- Matthias Klose Fri, 15 May 2009 00:41:24 +0200 + +openjdk-6 (6b16~pre2-0ubuntu3) karmic; urgency=low + + * Update IcedTea build infrastructure (20090513). + * Fix build failure when xvfb-run doesn't work, trying to access a + non-existing directory. + + -- Matthias Klose Wed, 13 May 2009 23:01:23 +0200 + +openjdk-6 (6b16~pre2-0ubuntu2) karmic; urgency=low + + * Add libffi-dev as architecture independent build dependency. + + -- Matthias Klose Mon, 11 May 2009 08:41:42 +0200 + +openjdk-6 (6b16~pre2-0ubuntu1) karmic; urgency=low + + * Update to re-tagged code drop (b16). + * Update IcedTea build infrastructure (20090510). + * Remove patches integrated in IcedTea. + * Remove GCJ Web Plugin support. + * Remove build infrastructure to build additional VM's, integrated + in IcedTea. + * Stop building the openjdk-6-source-files package. + * README.Debian: Document using the different VM's. + * Use GCC-4.3 on sparc, ICE with GCC-4.4. + * Fix problem with the ARM assembler interpreter, when executing a 'new' + bytecode with a double on the top of the stack (Edward Nevill). + * Run the testsuite for the zero build on ix86 architectures. + + -- Matthias Klose Sun, 10 May 2009 23:37:42 +0200 + +openjdk-6 (6b16~pre1-0ubuntu1) karmic; urgency=low + + * New code drop (b16). + * Update IcedTea build infrastructure (20090429). + * Merge changes from 6b14-1.4.1. + * Fix section names (using the java section). + * Remove all UTF-8 sequence definitions from the font configuration. + + -- Matthias Klose Wed, 29 Apr 2009 11:33:07 +0200 + +openjdk-6 (6b14-1.4.1-0ubuntu9) jaunty; urgency=low + + * Reenable the testsuite (revert the change in last upload). + * Apply fix for the ARM bytecode interpreter (Edward Nevill). + + -- Matthias Klose Sat, 18 Apr 2009 11:24:27 +0200 + +openjdk-6 (6b14-1.4.1-0ubuntu7) jaunty; urgency=low + + * Don't use some indian fonts with diverging font metrics for the + latin-1.UTF-8 encoding. LP: #289784. + * Disable running the testsuite for this build (no code changes compared + to the previous upload). + + -- Matthias Klose Tue, 14 Apr 2009 11:46:25 +0200 + +openjdk-6 (6b14-1.4.1-0ubuntu6) jaunty; urgency=low + + * Fix native2ascii jdk test case, which let the jdk testsuite fail. + + -- Matthias Klose Fri, 10 Apr 2009 11:58:44 +0200 + +openjdk-6 (6b14-1.4.1-0ubuntu5) jaunty; urgency=low + + [Matthias Klose] + * Update to the final CACAO 0.99.4 release. + * Security Vulnerability Fixes for OpenJDK: + - 6522586: Enforce limits on Font creation. + - 6536193: flaw in UTF8XmlOutput. + - 6610888: Potential use of cleared of incorrect acc in JMX Monitor. + - 6610896: JMX Monitor handles thread groups incorrectly. + - 6630639: lightweight HttpServer leaks file descriptors on no-data + connections. + - 6632886: Font.createFont can be persuaded to leak temporary files. + - 6636360: compiler/6595044/Main.java test fails with 64bit java on + solaris-sparcv9 with SIGSEGV. + - 6652463: MediaSize constructors allow to redefine the mapping of + standard MediaSizeName values. + - 6652929: Font.createFont(int,File) trusts File.getPath. + - 6656633: getNotificationInfo methods static mutable (findbugs). + - 6658158: Mutable statics in SAAJ (findbugs). + - 6658163: txw2.DatatypeWriter.BUILDIN is a mutable static (findbugs). + - 6691246: Thread context class loader can be set using JMX remote + ClientNotifForwarded. + - 6717680: LdapCtx does not close the connection if initialization fails. + - 6721651: Security problem with out-of-the-box management. + - 6737315: LDAP serialized data vulnerability. + - 6792554: Java JAR Pack200 header checks are insufficent. + - 6804996: JWS PNG Decoding Integer Overflow [V-flrhat2ln8]. + - 6804997: JWS GIF Decoding Heap Corruption [V-r687oxuocp]. + - 6804998: JRE GIF Decoding Heap Corruption [V-y6g5jlm8e1]. + * Add security patch for the lcms library. + * Add accessibility patches java-access-bridge-security.patch and + accessible-toolkit.patch. + * Merge fixes for testsuite failures from the IcedTea6 branch. + * Merge the proxy support for the plugin from the IcedTea6 branch. + * Merge http://icedtea.classpath.org/hg/release/icedtea6-1.4.1/rev/546ef0cdee06 + (TJ). LP: #344705. + * Add a Xb-Npp-Description for the IcedTea plugin. LP: #272010. + + [Edward Nevill] + * Put VFP back in - selects VFP / novfp autmatically + * More assembler optimisations + + -- Matthias Klose Thu, 09 Apr 2009 14:14:12 +0200 + +openjdk-6 (6b14-1.4.1-0ubuntu4) jaunty; urgency=low + + * Disable the additional zero JVM on sparc. + * patches/hotspot/default/icedtea-includedb.patch: Add missing include in + openjdk/hotspot/src/share/vm/includeDB_core. + * Fix build failure of the zero VM on lpia with a fixed GCC. + + -- Matthias Klose Fri, 13 Mar 2009 16:39:27 +0100 + +openjdk-6 (6b14-1.4.1-0ubuntu3) jaunty; urgency=low + + * Build the Zero/Shark VM as an additional JVM (call as `java -zero'). + + -- Matthias Klose Sat, 07 Mar 2009 20:54:28 +0100 + +openjdk-6 (6b14-1.4.1-0ubuntu2) jaunty; urgency=low + + * Fix zero-port-opt patching (build failure on armel). + + -- Matthias Klose Thu, 05 Mar 2009 18:19:18 +0100 + +openjdk-6 (6b14-1.4.1-0ubuntu1) jaunty; urgency=low + + * Update IcedTea to the 1.4.1 release. + * Build the Cacao VM as an additional JVM (call as `java -cacao'). + * Build in separate build directory. + + -- Matthias Klose Thu, 05 Mar 2009 15:16:02 +0100 + +openjdk-6 (6b14-1.5~pre1-5) unstable; urgency=low + + * Fix build failure on armel. + * Require the final cacao-0.99.4 release. + * Add /usr/lib/jni to the library path. Closes: #517338. + + -- Matthias Klose Tue, 17 Mar 2009 09:37:20 +0100 + +openjdk-6 (6b14-1.5~pre1-4) unstable; urgency=low + + * Disable the additional zero JVM on sparc. + * Fix casts in hotspot on s390. Closes: #518823. + * Add special flags for javac on s390 to work around a VM problem with bad + code generation during inlining. + * Run the testsuites for the default VM on all architectures. + * Update IcedTea (20090314). + + -- Matthias Klose Sat, 14 Mar 2009 18:29:49 +0100 + +openjdk-6 (6b14-1.5~pre1-3) unstable; urgency=low + + * Don't configure the additional zero JVM with --enable-shark, currently + fails to build. + * Don't build the JDK when building the additional zero JVM. + + -- Matthias Klose Sat, 07 Mar 2009 21:11:16 +0100 + +openjdk-6 (6b14-1.5~pre1-2) experimental; urgency=low + + * Build the Zero/Shark VM as an additional JVM (call as `java -zero'). + + -- Matthias Klose Fri, 06 Mar 2009 11:16:07 +0100 + +openjdk-6 (6b14-1.5~pre1-0ubuntu1) jaunty; urgency=low + + * Update hotspot to 14.0-b10. + * Update IcedTea (20090305). + * Build the Cacao VM as an additional JVM (call as `java -cacao'). + * Build in separate build directory. + + -- Matthias Klose Thu, 05 Mar 2009 15:16:02 +0100 + +openjdk-6 (6b14-0ubuntu17) jaunty; urgency=low + + [ Edward Nevill ] + * Remove VFP from asm loop + * Disble the mauve testsuite for armel. + + [Matthias Klose] + * Update IcedTea (20090302). + + -- Matthias Klose Mon, 02 Mar 2009 16:18:01 +0100 + +openjdk-6 (6b14-0ubuntu16) jaunty; urgency=low + + * Regenerate auto files. + + -- Matthias Klose Wed, 18 Feb 2009 15:20:10 +0100 + +openjdk-6 (6b14-0ubuntu15) jaunty; urgency=low + + [ Edward Nevill ] + * Added ARM assembler interpreter loop + * mauve and jtreg removed again for alpha release + + [Matthias Klose] + * Update IcedTea (20090218). + + -- Matthias Klose Wed, 18 Feb 2009 13:35:02 +0100 + +openjdk-6 (6b14-0ubuntu14) jaunty; urgency=low + + * Configure with --disable-nio2 on armel as well. + + -- Matthias Klose Fri, 13 Feb 2009 10:13:55 +0100 + +openjdk-6 (6b14-0ubuntu13) jaunty; urgency=low + + * Really configure with --disable-nio2. + + -- Matthias Klose Thu, 12 Feb 2009 17:26:43 +0100 + +openjdk-6 (6b14-0ubuntu12) jaunty; urgency=low + + * Configure with --disable-nio2. + * Run mauve and jtreg testsuites on armel. + + -- Matthias Klose Wed, 11 Feb 2009 13:00:15 +0100 + +openjdk-6 (6b14-0ubuntu11) jaunty; urgency=low + + [Edward Nevill] + * Performance improvements for the zero build (currently applied + on armel only). + + [Matthias Klose] + * Update IcedTea (20090210). + + -- Matthias Klose Tue, 10 Feb 2009 15:29:22 +0100 + +openjdk-6 (6b14-0ubuntu10) jaunty; urgency=low + + * Explicitely remove PulseAudioMuteControl.java. + + -- Matthias Klose Mon, 26 Jan 2009 22:09:21 +0100 + +openjdk-6 (6b14-0ubuntu9.1) jaunty; urgency=low + + * Test build. + + -- Matthias Klose Sun, 25 Jan 2009 17:03:51 +0100 + +openjdk-6 (6b14-0ubuntu9) jaunty; urgency=low + + * Update IcedTea build infrastructure (20090125). + * Run the jtreg testsuite for cacao builds, save all test logs. + + -- Matthias Klose Sun, 25 Jan 2009 15:40:52 +0100 + +openjdk-6 (6b14-0ubuntu8) jaunty; urgency=low + + * Fix merge error, don't apply patches twice. + + -- Matthias Klose Mon, 19 Jan 2009 01:15:19 +0100 + +openjdk-6 (6b14-0ubuntu7) jaunty; urgency=low + + * debian/rules: Call dh_desktop. LP: #309999. + * Add dependency on libjpeg62 for the -headless package. LP: #318383. + * Test some jtreg tests which fail in samevm mode in a separate VM. + * Build all with -fno-stack-protector -U_FORTIFY_SOURCE. + * Include jtr files of failed tests in the -jdk package. + + -- Matthias Klose Mon, 19 Jan 2009 00:23:22 +0100 + +openjdk-6 (6b14-0ubuntu6) jaunty; urgency=low + + * The -source package now contains all source files. Closes: #504568. + * The 6b14 build fixes the following security related issues (sun bug number, + CVE, description): + - 6588160, CVE-2008-5348: jaas krb5 client leaks OS-level UDP sockets. + - 6497740, CVE-2009-5349: Limit the size of RSA public keys. + - 6484091, CVE-2008-5350: FileSystemView leaks directory info. + - 4486841, CVE-2008-5351: UTF-8 decoder needed adhere to Unicode 3.0.1 + fixes. + - 6755943, CVE-2008-5352: JAR decompression should enforce stricter header + checks. + - 6734167, CVE-2008-5353: Calendar.readObject allows elevation of + privileges. + - 6733959, CVE-2008-5354: Insufficient checks for "Main-Class" manifest + entry in JAR files + - 6751322, CVE-2008-5356: Sun Java JRE TrueType Font Parsing Heap Overflow. + - 6733336, CVE-2008-5357: Crash on malformed font. + - 6766136, CVE-2008-5358: corrupted gif image may cause crash in java + splashscreen library. + - 6726779, CVE-2008-5359: ConvolveOp on USHORT raster can cause the JVM + crash. + - 6721753, CVE-2008-5360: File.createTempFile produces guessable file names. + - 6592792: Add com.sun.xml.internal to the "package.access" property in + $JAVA_HOME/lib/security/java.security. + * Regenerate the control file. + + -- Matthias Klose Tue, 13 Jan 2009 15:04:36 +0100 + +openjdk-6 (6b14-0ubuntu2~ppa1) intrepid; urgency=low + + * Upload to the OpenJDK PPA for intrepid. + + -- Matthias Klose Tue, 13 Jan 2009 13:28:38 +0100 + +openjdk-6 (6b14-0ubuntu5) jaunty; urgency=low + + * Update IcedTea build infrastructure (20090113). + * Rebuild with updated nss/nspr packages. + * Update debug patches. + * debian/patches/nonreparenting-wm.diff: If the _JAVA_AWT_WM_NONREPARENTING + environment variable is set, disable all workarounds causing blank windows + in non-reparentizing window managers (Bernhard R. Link). Closes: #508650. + * Fix location of plugin for Debian. Closes: #505726. + * Let the -jdk package provide java-compiler. Closes: #507641. + + -- Matthias Klose Tue, 13 Jan 2009 10:18:44 +0100 + +openjdk-6 (6b14-0ubuntu4) jaunty; urgency=low + + * Use a default jvm.cfg not only for java, but for all jdk tools. + LP: #288616. + * Update IcedTea build infrastructure (20081223). + + -- Matthias Klose Tue, 23 Dec 2008 09:24:23 +0100 + +openjdk-6 (6b14-0ubuntu3) jaunty; urgency=low + + * Update IcedTea build infrastructure (20081217). + * Add support for PARISC. + * Use a default jvm.cfg if the jvm.cfg doesn't yet exist after unpacking + the runtime package. LP: #288616. + + -- Matthias Klose Wed, 17 Dec 2008 09:58:26 +0100 + +openjdk-6 (6b14~pre1-0ubuntu2) jaunty; urgency=low + + * Install hotspot tarball in -source-files package. + * Fix build failure on sparc. + + -- Matthias Klose Fri, 05 Dec 2008 09:43:51 +0100 + +openjdk-6 (6b14~pre1-0ubuntu1) jaunty; urgency=low + + * New code drop (b14). + * Update IcedTea build infrastructure (20081204). + + -- Matthias Klose Thu, 04 Dec 2008 11:40:56 +0100 + +openjdk-6 (6b13~pre2-0ubuntu2) jaunty; urgency=low + + * Update IcedTea build infrastructure (20081203). + - Fix build failures on zero based architectures. + * Add build dependency on libxrender-dev. + * Don't use fastjar on ia64, working around a build failure. + + -- Matthias Klose Wed, 03 Dec 2008 18:43:23 +0100 + +openjdk-6 (6b13~pre2-0ubuntu1) jaunty; urgency=low + + * Update IcedTea build infrastructure (20081202). + - Add Dec 3 OpenJDK security patches + * Build with --with-hotspot-build, update patches for this config. + + -- Matthias Klose Wed, 03 Dec 2008 01:05:54 +0100 + +openjdk-6 (6b13~pre1-0ubuntu4) jaunty; urgency=low + + * Update IcedTea build infrastructure (20081122). + - Fixes for the IcedTeaPlugin. LP: #300254. + + -- Matthias Klose Sat, 22 Nov 2008 10:42:10 +0100 + +openjdk-6 (6b13~pre1-0ubuntu3) jaunty; urgency=low + + * Fix versioned conflict on icedtea-gcjwebplugin. LP: #284299. + * Update IcedTea build infrastructure (20081121). + - Fixes for the IcedTeaPlugin. + * Configure with pulseaudio in jaunty. + + -- Matthias Klose Fri, 21 Nov 2008 07:46:10 +0100 + +openjdk-6 (6b13~pre1-0ubuntu2) jaunty; urgency=low + + * Update IcedTea build infrastructure (20081117). + * Use openjdk-6 as stage1 compiler on armel for a faster build. + + -- Matthias Klose Mon, 17 Nov 2008 18:43:17 +0100 + +openjdk-6 (6b13~pre1-0ubuntu1) jaunty; urgency=low + + * New code drop (b13). + - In the langtools area, besides a few miscellaneous bug fixes (6760834, + 6725036, 6657499), all the langtools regression tests now pass out of + the box (6728697, 6707027) and if using the most recent version of + jtreg, the langtools regression tests can be run in the much faster + "same vm" mode of jtreg, enabled with the -s option (6749967, 6748541, + 6748546, 6748601, 6759775, 6759795, 6759796, 6759996, 6760805, 6760930). + - Gervill update, including applying a patch from IcedTea (6758986, + 6748247, 6748251). + - Publishing a few dozen additional existing regression tests as open + source (6601457, 6759433, 6740185). + - JMX and monitoring fixes (6651382, 6616825, 6756202, 6754672). + - Man page updates (6757036, 6392810, 6504867, 6326773). + - Assorted other fixes (6746055, 6621697, 6756569, 6356642, 6761678). + * Update IcedTea build infrastructure (20081111). + - Fix freeze in midi app, LP: #275672. + - Fixes in the IcedTeaPlugin: LP: #282570, LP: #282570, LP: #285729, + LP: #291377, LP: #37330, LP: #239533. + - Fix vertical text metrics with freetype scaler. LP: #289784. + * Build-depend on ecj-gcj instead of ecj on architectures using + gij/gcj as the bootstrap system. + * Fixed in 6b12: Stack overflow running Kea. LP: #244731. + + -- Matthias Klose Tue, 11 Nov 2008 12:39:16 +0100 + +openjdk-6 (6b12-1~exp1) experimental; urgency=low + + * Update IcedTea build infrastructure (20081025). + + -- Matthias Klose Sat, 25 Oct 2008 23:35:14 +0200 + +openjdk-6 (6b12-0ubuntu6) intrepid; urgency=low + + * Make the dependency on ca-certificates-java unversioned. + * Merge from IcedTea: + - plugin/icedtea/netscape/javascript/JSObject.java: Make + long constructor public. + + -- Matthias Klose Fri, 24 Oct 2008 23:06:32 +0200 + +openjdk-6 (6b12-0ubuntu5) intrepid; urgency=low + + * Update IcedTea build infrastructure (20081024). + - Add --pkgversion= configure option. + - IcedTeaPlugin fixes. + - Fix xjc regressions. + * openjdk-jre-headless: Depend on ca-certificates-java. + * Configure with --pkgversion= to encode the package + version in the -version output and in vm dumps. + * cacao: Handle VM options Xverify:all and Xverify:none. + + -- Matthias Klose Fri, 24 Oct 2008 13:39:29 +0200 + +openjdk-6 (6b12-0) experimental; urgency=low + + * Upload to experimental. + * Pretend the availability of at least 384MB RAM; better swap on the + buildds than failing the build. + + -- Matthias Klose Sun, 19 Oct 2008 11:15:28 +0200 + +openjdk-6 (6b12-0ubuntu4) intrepid; urgency=low + + * Update IcedTea build infrastructure (20081019). + - plugin fix (Make applet size factors doubles instead of ints). + * Don't fail the build when the jtreg summary is missing. + * openjdk-6-source-files: Fix priority and section of the binary package. + * Fix section of the plugin package. + + -- Matthias Klose Sun, 19 Oct 2008 09:29:03 +0200 + +openjdk-6 (6b12-0ubuntu3) intrepid; urgency=low + + * Update IcedTea build infrastructure (20081018). + - Fix LiveConnect issues in the web plugin. LP: #282762. + - Fail the build, if patches don't apply. + * Show xvfb and xauth failures in the build log, when running the testsuites. + * Kill processes which still hang after running the testsuite. Closes: #493339. + * Run the testsuite in parallel, reducing build time. + * openjdk-headless: Depend instead of recommending tzdata-java. + + -- Matthias Klose Sat, 18 Oct 2008 17:15:14 +0200 + +openjdk-6 (6b12-0ubuntu2) intrepid; urgency=low + + * icedtea6-plugin: Versioned conflict with icedtea-gcjwebplugin. LP: #184299. + * Don't configure --with-alt-jar=/usr/bin/fastjar on hotspot archs + and cacao builds. Working around a problem generating rt.jar. Manually + add the netscape/javascript files in zero builds. + * Update IcedTea build infrastructure (20081017). + - configury updates. + - IcedTeaPlugin update. + * openjdk-6-jdk: Suggest visualvm. + * Remove cacao patches found in cacao 0.99.4~20081012. + + -- Matthias Klose Fri, 17 Oct 2008 13:25:45 +0200 + +openjdk-6 (6b12-0ubuntu1) intrepid; urgency=low + + * Update IcedTea to the 1.3.0 release. + * Apply upstream patch to fix upstream issue 6758986. + + -- Matthias Klose Wed, 15 Oct 2008 19:49:05 +0000 + +openjdk-6 (6b12~pre2-1) experimental; urgency=low + + * Upload to experimental. + + -- Matthias Klose Sun, 12 Oct 2008 11:16:03 +0000 + +openjdk-6 (6b12~pre2-0ubuntu3) intrepid; urgency=low + + * Update IcedTea build infrastructure (20081015). + * Add netscape/javascript class files to rt.jar. LP: #282762. + * Be more verbose in the icedtea6-plugin package description. + * Fix some lintian warnings. + + -- Matthias Klose Wed, 15 Oct 2008 12:45:59 +0200 + +openjdk-6 (6b12~pre2-0ubuntu2) intrepid; urgency=low + + * Update IcedTea build infrastructure (20081012). + * When building as cacao, build a cacao-oj6-plugin package. + * When building as cacao, run the testsuite on amd64, i386, sparc. + * Add finnish translations to the desktop files (Timo Jyrinki). + Closes: #494354. + * Fix font paths (Rob Gom). Closes: #495988. + * Reenable running the testsuite. + * Fix pulse-java build failure on amd64. + + -- Matthias Klose Sun, 12 Oct 2008 13:05:49 +0200 + +openjdk-6 (6b12~pre2-0ubuntu1) intrepid; urgency=low + + * Update IcedTea build infrastructure (20081011). + * debian/copyright: Add copyright notice for pulseaudio sound files. + * Add support to build with pulseaudio support. + + -- Matthias Klose Sat, 11 Oct 2008 15:44:50 +0200 + +openjdk-6 (6b12~pre1-0ubuntu5) intrepid; urgency=low + + * Move the plugin from the -jre package into the -plugin package. + + -- Matthias Klose Fri, 10 Oct 2008 06:55:34 +0000 + +openjdk-6 (6b12~pre1-0ubuntu4) intrepid; urgency=low + + * Update IcedTea build infrastructure (20081009). + * Configure with --enable-liveconnect, build an icedtea6-plugin package. + Thanks to Deepak Bhole. + LP: #207064, #195783, #199680, #202762, #220241, #242263, #242496, + #242496, #250292, #269885, #274356, #274360, #259313. + * Build an icedtea6-plugin package. + * Merge changes from 6b11-9 packaging. + * Build a openjdk-6-source-files packages (used as a build dependency + of cacao-oj6). + * Build depend on cacao-source for cacao-oj6 builds. + + -- Matthias Klose Thu, 09 Oct 2008 15:04:27 +0200 + +openjdk-6 (6b12~pre1-0ubuntu3) intrepid; urgency=low + + * Update IcedTea build infrastructure (20080915). + * Reapply: openjdk-6-jre-headless: Make libnss-mdns a suggestion + instead of a recommendation. LP: #261847. + * Build-depend against fixed fastjar. LP: #267177. + + -- Matthias Klose Mon, 15 Sep 2008 20:16:51 +0200 + +openjdk-6 (6b12~pre1-0ubuntu2) intrepid; urgency=low + + * Update the icedtea-hotspot patch to b12, fixing build failures + on zero archs (ia64, powerpc). + + -- Matthias Klose Sat, 13 Sep 2008 11:48:44 +0200 + +openjdk-6 (6b12~pre1-0ubuntu1) intrepid; urgency=low + + * New code drop (b12). + * Update IcedTea build infrastructure (20080912). + + -- Matthias Klose Sat, 13 Sep 2008 00:41:42 +0200 + +openjdk-6 (6b11-6) unstable; urgency=low + + * Set minimum heap size independent of available memory for cacao builds. + * Link the wrapper tools with -rdynamic for cacao builds. + * Update cacao based builds: + - Update cacao to 0.99.3, remove patches applied upstream. + - Fix build failures on mipsel-linux. + * Allow setting of the bootstrap compiler per architecture. + * Configure --with-alt-jar set to fastjar to speed up builds. + * Update IcedTea build infrastructure (20080815), remove local patches + integrated in IcedTea. + - Make use of unsigned/signed types explicit. + - Fix PR icedtea/184, adding support for returning floats and doubles + for zero builds. + - Fix Fix PR icedtea/181, class type checks. + + -- Matthias Klose Fri, 15 Aug 2008 16:59:48 +0000 + +openjdk-6 (6b11-5) unstable; urgency=low + + * debian/rules (stamps/mauve-build): Configure with --host and --build. + * openjdk-6-jdk: Recommend libxt-dev (jawt_md.h header includes). + * Fix build issues on s390 (size_t is unsigned long). + + -- Matthias Klose Sun, 03 Aug 2008 20:05:44 +0200 + +openjdk-6 (6b11-4) unstable; urgency=low + + * Update IcedTea build infrastructure (20080801). + - Fix typo, causing build failure on mipsel. + + -- Matthias Klose Fri, 01 Aug 2008 01:25:51 +0200 + +openjdk-6 (6b11-3) unstable; urgency=low + + * Include the name of the VM used in the package description. + * Update IcedTea build infrastructure (20080731). + * Build for alpha, arm, mips and mipsel. + * Switch from libcupsys2(-dev) to libcups2(-dev) for newer releases. + (Closes: #492384) + * Add symlinks for header files found in JAVA_HOME/include/linux in + JAVA_HOME/include. + * openjdk-6-jre: Don' recommend lesstif2 anymore. + + -- Matthias Klose Thu, 31 Jul 2008 17:16:59 +0200 + +openjdk-6 (6b11-2ubuntu1) intrepid; urgency=low + + * xvfb seems to be broken when running with intrepid and an intrepid kernel. + Nevertheless, run xvfb-run -s "-extension GLX" on the buildds (hardy kernels). + * Stop the buildwatch process after the testsuite finishes. + + -- Matthias Klose Fri, 25 Jul 2008 12:33:44 +0200 + +openjdk-6 (6b11-2) unstable; urgency=low + + * Update IcedTea build infrastructure (20080724). + * debian/buildwatch.sh: Track long building files with no visible output. + * Fix build failure when not running the mauve testsuite. + * Disable running the testsuite for cacao builds (leaving processes around). + * Don't set a soversion for the cacao libjvm. + * Configure with --host and --build. + * Call xvfb-run with -s "-extension GLX". + + -- Matthias Klose Thu, 24 Jul 2008 22:25:30 +0200 + +openjdk-6 (6b11-1ubuntu2) intrepid; urgency=low + + * Update IcedTea build infrastructure (20080724). + * debian/buildwatch.sh: Track long building files with no visible output. + * Fix build failure when not running the mauve testsuite. + * Disable running the testsuite for cacao builds (leaving processes around). + * Don't set a soversion for the cacao libjvm. + * Configure with --host and --build. + + -- Matthias Klose Thu, 24 Jul 2008 17:58:53 +0200 + +openjdk-6 (6b11-1ubuntu1) intrepid; urgency=low + + * Regenerate the control file. + + -- Matthias Klose Wed, 23 Jul 2008 00:42:16 +0200 + +openjdk-6 (6b11-1) unstable; urgency=low + + * New code drop (b11). + * Update IcedTea build infrastructure (20080721). + * debian/generate-dfsg.sh: Update for b11. + * debian/patches/const_strings.patch, debian/patches/issue-6659207.diff: + Remove, applied upstream. + * debian/generate-debian-orig.sh: Fix /proc check. + * debian/control.in: Loosen dependency of -jre-lib on -jre. + * Support `nodocs' in DEB_BUILD_OPTIONS. + * Remove build-dependency on lesstif2-dev. + * Bootstrap using gcj on all archs; the 6b10dfsg-2 packages are broken. + * Run the jtreg harness in a virtual X environment. + * Install javazic.jar in the jre-lib package. + * Don't run the testsuite on arm; the build already takes days; only + run the testsuite on hotspot archs and powerpc. + + -- Matthias Klose Wed, 23 Jul 2008 00:28:12 +0200 + +openjdk-6 (6b10dfsg-2) unstable; urgency=low + + * Update IcedTea build infrastructure (20080714). + * On arm configure cacao builds with --enable-softfloat. + * Don't run the mauve testsuite for cacao builds (hangs the test runner + process). + * Don't configure cacao builds with --enable/-disable-zero. + * Don't remove alternatives on upgrade. + * debian/copyright: Add license for NanoXML. + * Do recommends ttf-indic-fonts instead of ttf-indic-fonts-core for + lenny and sid. Closes: #490619. + * Ignore errors when registering the jar binfmt. The alternative may + already be registered by another JVM. Closes: #490594. + * openjdk-6-jre-headless: Depend on ttf-dejavu-core instead of ttf-dejavu. + * On amd64, i386 and sparc, bootstrap using openjdk. + + -- Matthias Klose Mon, 14 Jul 2008 19:41:19 +0200 + +openjdk-6 (6b10dfsg-1ubuntu2) intrepid; urgency=low + + * Update IcedTea build infrastructure (20080702). + - Do not configure --with-shark by default. + - Update license headers from jdk7. + * Start debian/buildwatch.sh for armel and sparc builds as well. + * Allow configuration with --with-cacao. + + -- Matthias Klose Mon, 30 Jun 2008 13:30:06 +0200 + +openjdk-6 (6b10dfsg-1ubuntu1) intrepid; urgency=low + + * The rebuilt upstream tarball now has GPL-compatible free software licenses + and documented copyrights and licenses. LP: #238569. + * Fixed name of the xulrunner-1.9-javaplugin.so in the .jinfo file. + LP: #226911. + * Ignore errors during activation of class data sharing. Closes: #490617, + #490672. + + -- Matthias Klose Mon, 30 Jun 2008 13:30:06 +0200 + +openjdk-6 (6b10dfsg-1) unstable; urgency=low + + * Rebuild the upstream tar ball: + - Remove the jscheme jar files. + - Apply the patch from Iris Clark (Sun) for the copyright headers + (http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=141#c4). + - Remove jdk/src/share/classes/java/lang/instrument/package.html. + - Upload to main. + * Update IcedTea build infrastructure (20080628). + * Build an openjdk-6-dbg package. + * patches/gcc-mtune-generic.diff: Fix typo. + * openjdk-6-jre: Depend on ttf-dejavu. + * debian/copyright: Add two more copyright holders, not directly + mentioned in the third party readme. + Replace Apache 2.0 license with pointer to common-licenses. + * Fix more lintian warnings. + * debian/sun_java_app.xpm: Downsize icon to 32x32 pixels. + * Build-depend/depend on rhino. + + -- Matthias Klose Sun, 29 Jun 2008 17:42:51 +0200 + +openjdk-6 (6b10-1) unstable; urgency=low + + * New code drop (b10). + - Still some non-compliant license headers found in + openjdk/corba/src/share/classes/com/sun/tools/corba/se/idl. + - Upload to non-free. + * Update IcedTea build infrastructure (20080603). + * In fontconfig.properties, fix Korean font names and add paths to the Luxi + fonts for Motif. Add fonts for Indic languages. + * Install compilefontconfig.jar in openjdk-6-jre-lib package. + * Run the testsuites of hotspot, langtools and jdk. + * Include the jscheme-5.0 sources in the tarball, mention the jscheme + licenses in debian/copyright. + * Use the certificates provided by the ca-certificates-java package. + * More fontconfig updates (Arne Goetje). + * Fix some lintian warnings. + * Correct build-dependency for openjdk based bootstraps. + + -- Matthias Klose Wed, 04 Jun 2008 01:46:52 +0200 + +openjdk-6 (6b09-1~pre1) unstable; urgency=low + + [ Matthias Klose ] + * New code drop (b09). + * Update IcedTea build infrastructure (20080528). + - Add missing color profiles. LP: #225174. + - Moved system properties defined in hotspot to TrustManagerFactoryImpl. + LP: #224455. + * 6636469_v4.diff: Remove, committed in IcedTea. + * debian/control: Update Vcs-* attributes. + * debian/JB-jre-headless.p*.in: Fix update-binfmts calls. + * Compress the man pages, fixing the slave symlinks of the alternatives. + * javaws.desktop: Add `%u' to the Exec key, remove -viewer option. + * openjdk-6-jre-headless: Recommends libnss-mdns. + * openjdk-6-jre-headless: Warn about unmounted /proc file system. + * debian/JB-jre.mime.in: Remove the -viewer option from command (Tan Rui + Boon). + * Add a `docs' symlink pointing to /usr/share/doc/openjdk-6. LP: #218405. + * Set maintainer to the team list. + * Add copyright notices for patches and generated files. + * Add helper scripts to modify upstream tarball and generate the debian + tarball. + * Fix names for browser alternatives in jinfo file, set browser_plugin_dirs + unconditionally. + * Recommend the ttf-wqy-zenhei font instead of ttf-arphic-uming, if the + latter is available in Truetype Collection (TTC) format only, add the + fontconfig changes as a patch. + * Make the cjk font packages configurable in the control file. + * Use GCC-4.3 on all platforms where available. + * Install a config file swing.properties, allowing a user to change + the default look and feel. LP: #229112. + * When trying to determine the executable name reading /proc/self/exe, + discard known prefixes used for unionfs mounts. LP: #224110. + * Explicitely configure with --disable-zero on hotspot architectures. + * Add fix for issue 6659207, access violation in CompilerThread0. + Addresses #478560. Needs checking: LP: #229207. + * Disable building the docs on ia64, powerpc and sparc, we don't build + architecture independent packages on these architectures. + * Explicitely configure --with-parallel-jobs, needed by the updated IcedTea. + * Backport the linux-sparc patches, enable building on sparc. LP: #154080. + * Don't use an absolute path calling the compiler. + * Replace the OpenJDK version in desktop and menu files. + * Install menu files. + * Install openjdk-6-java.desktop in -jre, instead of -jre-headless. + + -- Matthias Klose Wed, 14 May 2008 08:49:54 +0200 + +openjdk-6 (6b08-1) unstable; urgency=low + + [ Torsten Werner ] + * first upload to Debian (Closes: #452750) + * Regenerate debian/control. + * Switch to bzip2 package compression in Debian but leave lzma compression + in Ubuntu. + * Temporarily downgrade Depends: tzdata-java to Recommends until the package + becomes available in Debian. + * Add myself to Uploaders. + * Do not install extras license file in openjdk-6-jre-lib. + * Add patch shebang.diff to fix a lintian warning. + * Install openjdk-6-java.desktop into the correct binary package. + * Improve some package descriptions. + * Remove some empty directories from binary packages. + * Install README.Debian in every binary package and give it some useful + content. + * Install java-rmi.cgi in package openjdk-6-jre-headless and mention it in + README.Debian. + * Install /usr/bin/jexec via update-alternatives. + * Downgrade Depends: java-common (>= 0.28). + * Add patch jexec.diff to make the jexec binary executable without + specifying an absolute path. + * Add Build-Depends: xauth and xfonts-base for mauve. + * Update and install the lintian override files. + * Replace all occurences of binary:Version and source:Version by + Source-Version to be compatible with Ubuntu release 6.06. + * Remove Conflicts: gcjwebplugin. + + [ Michael Koch ] + * Fixed Vcs-Bzr and Vcs-Browser fields. + * Removed Encoding entry from all debian/*.desktop.in files. + + [ Matthias Klose ] + * Make Java Full Screen Exclusive Mode work again with Xorg Server 1.3 + and above (Dan Munckton). LP: #154613 (Java bug 6636469). + * Configure with --enable-zero on all archs except amd64, i386, lpia. + * Update IcedTea build infrastructure. + * Handle binary files in updates of the build infrastructure. + * Enable bootstrap/normal builds per architecture. + * javaws-wrapper.sh: Use readlink --canonicalize. LP: #211515. + * binfmt-support: Handle /usr/share/binfmts/jar as a slave symlink of + the jexec alternative, install the binfmt file in the jre libdir. + Use the jexec alternative in the binfmt file. + * JB-jre-headless.postinst.in: Remove sun-java6 specific chunks. + * Differentiate between the openjdk version required as dependency and + as build dependency. + + -- Torsten Werner Wed, 09 Apr 2008 10:12:55 +0200 + +openjdk-6 (6b08-0ubuntu1) hardy; urgency=low + + * New code drop (b08). + * Update IcedTea build infrastructure. + * Move binfmt-support references from -jre to -jre-headless package. + * Don't fail on purge, if /var/lib/binfmts/openjdk-6 is missing. LP: #206721. + * Only use the basename for icons in desktop files. LP: #207413. + * Install javaws(1). LP: #191297. + * Install a wrapper script for javaws, which calls `javaws -viewer' if no + arguments are given (or else starting javaws from the desktop menu + would not do anything). + * debian/JB-web-start.applications.in: Remove the -viewer option from command. + + -- Matthias Klose Fri, 28 Mar 2008 16:10:32 +0000 + +openjdk-6 (6b07-0ubuntu1) hardy; urgency=low + + * New code drop (b07). + * Update IcedTea build infrastructure. + * debian/copyright: Update to OpenJDK Trademark Notice v1.1. + + -- Matthias Klose Sat, 22 Mar 2008 22:41:42 +0100 + +openjdk-6 (6b06-0ubuntu12) hardy; urgency=low + + * Update icon locations in menu files. + * openjdk-6-jre-headless: Provide java-virtual-machine. LP: #189953. + * openjdk-6-jre-headless: Add a conflict to gcjwebplugin; for openjdk + use the icetea-gcjwebplugin, for gij the java-gcj-compat-plugin. + + -- Matthias Klose Sat, 22 Mar 2008 20:12:41 +0100 + +openjdk-6 (6b06-0ubuntu11) hardy; urgency=low + + * Update IcedTea to 20080319. + * Move rt.jar into the openjdk-6-jre-headless package; sun/awt/X11 + class files differ between amd64 and i386. + * Install all desktop files in /usr/share/applications. + + -- Matthias Klose Wed, 19 Mar 2008 23:53:36 +0100 + +openjdk-6 (6b06-0ubuntu10) hardy; urgency=low + + * Remove print-lsb-release.patch, forwarded to IcedTea. + * Fix IcedTea configure to detect libffi without pkg-config. + + -- Matthias Klose Wed, 12 Mar 2008 20:28:55 +0100 + +openjdk-6 (6b06-0ubuntu9) hardy; urgency=low + + * Build-depend on libffi4-dev on architectures other than amd64, i386, lpia. + * Install icons in /usr/share/pixmaps, not /usr/share/icons. + * debian/rules: Call dh_icons. + + -- Matthias Klose Wed, 12 Mar 2008 11:34:44 +0100 + +openjdk-6 (6b06-0ubuntu8) hardy; urgency=low + + * Tighten dependency on java-common. + * debian/copyright: Include trademark notice. + * debian/control: Mention IcedTea in the package descriptions. + * Update IcedTea to 20080311. + + -- Matthias Klose Tue, 11 Mar 2008 21:39:27 +0100 + +openjdk-6 (6b06-0ubuntu7) hardy; urgency=low + + * Build-depend on unzip. + + -- Matthias Klose Fri, 07 Mar 2008 16:47:43 +0100 + +openjdk-6 (6b06-0ubuntu6) hardy; urgency=low + + * Build-depend on zip. + + -- Matthias Klose Fri, 07 Mar 2008 16:16:52 +0100 + +openjdk-6 (6b06-0ubuntu5) hardy; urgency=low + + * debian/mauve_tests: javax.swing.text.html.HTML.ElementTagAttributeTest, + removed, tries to access the network. + * debian/README.alternatives.in: Update for --jre-headless. + * debian/rules: Fix paths for OpenJDK based bootstrap. + * Compress packages using lzma. + * Drop build dependency on zip, unzip. + * Fix build infrastructure to bootstrap with OpenJDK instead of ecj. + * Do not build the gcjwebplugin from the OpenJDK source. + + -- Matthias Klose Fri, 07 Mar 2008 13:53:15 +0100 + +openjdk-6 (6b06-0ubuntu4) hardy; urgency=low + + * Don't register a java-rmi.cgi alternative in /usr/bin. + + -- Matthias Klose Thu, 06 Mar 2008 17:59:35 +0100 + +openjdk-6 (6b06-0ubuntu3) hardy; urgency=low + + * Split out a openjdk-6-jre-headless package, depend on java-common, + supporting update-java-alternatives --jre-headless. + * Make openjdk-6-jre-headless and openjdk-6-jre architecture any. + * New package openjdk-6-jre-lib (arch all). + * Remove openjdk-6-bin package. + * debian/patches/openjdk-ubuntu-branding.patch: New patch. + * Install images/cursors/cursors.properties as a config file. + * Do not compress demos and examples in the -demo package. + * openjdk-6-jre: Add dependency on libxinerama1. + * Update IcedTea to 20080305. + * Don't generate cacerts ourself, but depend on ca-certificates, + fix location of javax.net.ssl.trustStore property. + * Build-depend on mauve and xvfb; run some mauve tests (the list of + tests taken from the Fedora package). + * Keep a backup of the `generated' directory; some files are regenerated + differently, increasing the size of the diff. + + -- Matthias Klose Thu, 06 Mar 2008 10:05:39 +0100 + +openjdk-6 (6b06-0ubuntu2) hardy; urgency=low + + * Re-add gawk and pkg-config as build dependencies. + + -- Matthias Klose Tue, 04 Mar 2008 12:20:21 +0100 + +openjdk-6 (6b06-0ubuntu1) hardy; urgency=low + + * New code drop (b06). + * Remove java-access-bridge tarball, use an externally built package. + * Update IcedTea to 20080304. + * Don't use any compiler flags from the environment. + + -- Matthias Klose Tue, 04 Mar 2008 09:16:59 +0100 + +openjdk-6 (6b05-0ubuntu1) hardy; urgency=low + + * First public OpenJDK upstream code drop (b05). + * Depend on tzdata-java. + + -- Matthias Klose Fri, 29 Feb 2008 19:05:42 +0100 + +icedtea-java7 (7~b24-1.5+20080118-2) UNRELEASED; urgency=low + + * Fix removal of alternatives. + + -- Matthias Klose Sat, 26 Jan 2008 18:41:40 +0100 + +icedtea-java7 (7~b24-1.5+20080118-1) hardy; urgency=low + + * Fix installation of the plugin for firefox-3.0. + + -- Matthias Klose Sat, 19 Jan 2008 15:10:18 +0100 + +icedtea-java7 (7~b24-1.5+20080118-1~ppa1) hardy; urgency=low + + * Update IcedTea to 20080118. + * Fix another build failure when gcc version != gcj version. + * Use the versioned compiler to build the corba parts. + * Register plugin for firefox-3.0. + * Build using GCC-4.3. + + -- Matthias Klose Fri, 18 Jan 2008 21:15:08 +0100 + +icedtea-java7 (7~b24-1.5-2) UNRELEASED; urgency=low + + * First upload to Debian. Closes: #452750. + * debian/control.in: + - Moved package from universe/devel section to devel. + - Put icedtea-java7-doc into doc section. + - Added Homepage field and removed Homepage pseudo field from + descriptions. + - Updated Standards-Version to 3.7.3. + * debian/rules: + - Check if Makefile exists before called clean in clean target. + * debian/copyright: Converted to UTF-8. + + -- Michael Koch Sat, 05 Jan 2008 13:34:46 -0100 + +icedtea-java7 (7~b24-1.5-1) hardy; urgency=low + + * Update to IcedTea-1.5. + * debian/patches/ssp-interpreter.diff: Use bash to call the ssp script, + backslash handling differs betweend dash and bash. + + -- Matthias Klose Fri, 04 Jan 2008 09:58:27 +0100 + +icedtea-java7 (7~b24-1.5~20071214-1) hardy; urgency=low + + * New upstream snapshot (b24). + * Update java-access-bridge to 1.21.1. + * On powerpc keep the build alive using buildwatch script. + * Do not install menu entries for javaws, ControlPanel. LP: #155553, #156673. + * README.alternatives: Fix example. LP: #157063. + + -- Matthias Klose Fri, 14 Dec 2007 11:09:22 +0100 + +icedtea-java7 (7~b23-1.5~20071124-4) hardy; urgency=low + + * Allow libungif4-dev as alternative build dependency. + * On powerpc keep the build alive using buildwatch script. + * Always build the plugin using libxul-dev. + + -- Matthias Klose Mon, 10 Dec 2007 15:20:16 +0100 + +icedtea-java7 (7~b23-1.5~20071124-3) hardy; urgency=low + + * Lower optimization to -O2 for building the jdk on amd64. + * Reenable parallel build. + * Link using -Bsymbolic-functions. + * debian/patches/arguments.patch, debian/patches/const_strings.patch: + New patches (Arnaud Vandyck). + + -- Matthias Klose Thu, 29 Nov 2007 18:50:41 +0100 + +icedtea-java7 (7~b23-1.5~20071124-2) hardy; urgency=low + + * Bootstrap using ecj/gcj. + * Build using g++-4.1 on i386, lpia, powerpc. + + -- Matthias Klose Wed, 28 Nov 2007 14:46:48 +0000 + +icedtea-java7 (7~b23-1.5~20071124-1) hardy; urgency=low + + * New upstream snapshot (b23). + + -- Matthias Klose Tue, 27 Nov 2007 15:48:08 +0100 + +icedtea-java7 (7~b22-1.5~20071018-0ubuntu3) hardy; urgency=low + + * Revert the previous change, require 7~b22 versions again. + + -- Matthias Klose Sat, 20 Oct 2007 14:33:26 +0000 + +icedtea-java7 (7~b22-1.5~20071018-0ubuntu2) hardy; urgency=low + + * Loosen dependencies to 7~b21, until package is built on all archs. + + -- Matthias Klose Sat, 20 Oct 2007 07:48:36 +0000 + +icedtea-java7 (7~b22-1.5~20071018-0ubuntu1) hardy; urgency=low + + * New upstream snapshot (b22). + * Don't use parallel builds to make the build log better comparable. + + -- Matthias Klose Fri, 19 Oct 2007 19:49:51 +0200 + +icedtea-java7 (7~b21-1.4+20071007-0ubuntu5) gutsy; urgency=low + + * Update icedtea to vcs 20071012 (1.4 release), checked that the plugin + works on amd64. + * debian/copyright: Update "License Headers" section. + + -- Matthias Klose Sun, 14 Oct 2007 19:55:12 +0200 + +icedtea-java7 (7~b21-1.4+20071007-0ubuntu4) gutsy; urgency=low + + * Bootstrapping trigger upload for final step of bootstrapping i386, amd64, + lpia. + + -- LaMont Jones Wed, 10 Oct 2007 22:04:25 -0600 + +icedtea-java7 (7~b21-1.4+20071007-0ubuntu3) gutsy; urgency=low + + * Add build dependency on bzip2. + + -- Matthias Klose Wed, 10 Oct 2007 09:00:40 +0000 + +icedtea-java7 (7~b21-1.4+20071007-0ubuntu2) gutsy; urgency=low + + * Add build dependency on ant. + + -- Matthias Klose Wed, 10 Oct 2007 06:33:14 +0000 + +icedtea-java7 (7~b21-1.4+20071007-0ubuntu1) gutsy; urgency=low + + * Update icedtea to vcs 20071007. + * Update java-access-bridge to 1.20.0. + * Add build-dependency on libxinerama-dev. + * Add Xb-Npp-xxx tags for the -plugin package. + * Name the plugin "GCJ Web Browser Plugin (using IcedTea)", GCJ now + "Great Cool Java" (according to Michael Koch). + * Compress binary-indep packages using bzip2. + + -- Matthias Klose Sun, 7 Oct 2007 23:43:28 +0200 + +icedtea-java7 (7~b21-1.4+20071002-0ubuntu2) gutsy; urgency=low + + * Rebuild using icedtea 7~b21. + + -- Matthias Klose Tue, 02 Oct 2007 19:45:21 +0200 + +icedtea-java7 (7~b21-1.4+20071002-0ubuntu1) gutsy; urgency=low + + * New upstream snapshot (b21). + * Correctly unregister the executable binary format in the -bin package. + * Assemble the debian/copyright file. + + -- Matthias Klose Tue, 2 Oct 2007 09:59:37 +0200 + +icedtea-java7 (7~b19-1.3+20070905-0ubuntu1) gutsy; urgency=low + + * New upstream snapshot (b19). + * Build using g++-4.2 on amd64, using g++-4.1 on i386 and lpia. + * Build without -Werror, upstream source is not yet warning clean. + * Support DEB_BUILD_OPTIONS=parallel=. + * Add build dependency on wget. + * Add font suggestions. + * Changed font configuration to fix CJK font support (Arne Goetje). + * Fix location of the plugin, when registering the plugin alternatives. + + -- Matthias Klose Thu, 6 Sep 2007 00:46:40 +0200 + +icedtea-java7 (7~b18-1.2+20070822-0ubuntu2) gutsy; urgency=low + + * Create browser plugin directories. + * Build-depend on liblcms1-dev. + * Recommend packages with dlopened libraries: liblcms1, lesstif2, libcupsys2, + libgtk2.0-0, libgnome2-0, libgnomevfs2-0, libgconf2-4, libxrandr2, + libgl1-mesa-glx. + + -- Matthias Klose Tue, 21 Aug 2007 17:21:00 +0200 + +icedtea-java7 (7~b18-1.2+20070822-0ubuntu1) gutsy; urgency=low + + * New upstream version. + * Include java-access-bridge. + * Build -doc, -plugin packages. + * Register alternatives, priority 1060. + + -- Matthias Klose Tue, 21 Aug 2007 17:21:00 +0200 + +icedtea-java7 (7~b17-1.2+20070808-1) gutsy; urgency=low + + * Initial release, discard the initial packaging based on cdbs. + * Base the packaging on the sun-javaX packages. + + -- Matthias Klose Wed, 08 Aug 2007 15:55:39 +0200 + +icedtea (7~b16-20070724-1) UNRELEASED; urgency=low + + * Update upstream tarball to 7~b16, update icedtea to 20070724. + * debian/control: Build-depend on libfreetype6-dev. + * debian/rules: Configure --with-jar=/usr/bin/fastjar. + * Build using gcj-4.2. + + -- Matthias Klose Tue, 24 Jul 2007 11:24:55 +0200 + +icedtea (7~b14-20070704-1) unstable; urgency=low + + * Initial version. + + -- Michael Koch Wed, 04 Jul 2007 08:25:31 -0100 --- openjdk-6-6b27-1.12.6.orig/debian/JB-jre.menu.in +++ openjdk-6-6b27-1.12.6/debian/JB-jre.menu.in @@ -0,0 +1,7 @@ +?package(@basename@-jre):\ + needs="x11"\ + section="Applications/System/Administration"\ + title="@vendor@ Java @RELEASE@ Policy Tool"\ + command="/usr/bin/policytool"\ + icon="/usr/share/pixmaps/@basename@.xpm"\ + hints="Java2" --- openjdk-6-6b27-1.12.6.orig/debian/JB-jre-headless.overrides.in +++ openjdk-6-6b27-1.12.6/debian/JB-jre-headless.overrides.in @@ -0,0 +1,16 @@ +# It seems to be acceptable to use rpath for private libraries like the +# jdk is doing it. Check http://wiki.debian.org/RpathIssue for more +# information. +@basename@-jre-headless binary: binary-or-shlib-defines-rpath + +# Allow executable stack in libjvm.so. +@basename@-jre-headless binary: shlib-with-executable-stack + +# empty directory by intent +@basename@-jre-headless binary: package-contains-empty-directory usr/share/binfmts/ + +# Strip libjvm.so with --strip-debug instead of --strip-unneeded. LP: #574997. +@basename@-jre-headless binary: unstripped-binary-or-object + +# lintian is plain wrong to complain +@basename@-jre-headless binary: gzip-file-is-not-multi-arch-same-safe --- openjdk-6-6b27-1.12.6.orig/debian/control.in +++ openjdk-6-6b27-1.12.6/debian/control.in @@ -0,0 +1,140 @@ +Source: @basename@ +Section: java +Priority: optional +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: OpenJDK Team +Uploaders: Torsten Werner , Matthias Klose , Damien Raude-Morvan +Build-Depends: debhelper (>= 5), binutils-dev [armel armhf], m4, lsb-release, wget, zip, unzip, sharutils, gawk, cpio, pkg-config, procps, time, @bd_fastjar@ @bd_compress@ @bd_autotools@ @bd_ant@ @bd_cacao@ @bd_gcc@ @bd_bootstrap@ @bd_openjdk@ @bd_zero@ @bd_shark@ @bd_syslibs@ @bd_pulsejava@ @bd_nss@ @bd_systemtap@ @bd_mauve@ @bd_xvfb@ +Standards-Version: 3.9.4 +Homepage: http://openjdk.java.net/ +Vcs-Bzr: http://bazaar.launchpad.net/~openjdk/openjdk/openjdk6 +Vcs-Browser: https://code.launchpad.net/~openjdk/openjdk/openjdk6 + +Package: @basename@-jdk +Architecture: any +Multi-Arch: same +Pre-Depends: ${dpkg:Depends} +Depends: @basename@-jre (@op@ @pkg_version@), ${shlibs:Depends}, ${misc:Depends} +Recommends: libxt-dev +Suggests: @basename@-demo, @basename@-source, visualvm +Provides: java-sdk, java2-sdk, java5-sdk, java6-sdk, java-compiler +Conflicts: @basename@-jre-headless (<< 6b17~pre3-1), @basename@-jre (<< 6b17~pre3-1) +Description: OpenJDK Development Kit (JDK) + OpenJDK is a development environment for building applications, + applets, and components using the Java programming language. + . + The packages are built using the IcedTea build support and patches + from the IcedTea project. + +Package: @basename@-jre-headless +Architecture: any +Multi-Arch: same +Pre-Depends: ${dpkg:Depends}, ${multiarch:Depends} +Depends: @basename@-jre-lib (@op@ @pkg_sversion@), ${jredefault:Depends}, ${cacert:Depends}, ${tzdata:Depends}, ${jcommon:Depends}, ${dlopenhl:Depends}, ${shlibs:Depends}, ${misc:Depends} +Recommends: ${dlopenjl:Recommends}, ${cacao:Recommends}, ${jamvm:Recommends} +Suggests: libnss-mdns, sun-java6-fonts, @core_fonts@, @cjk_fonts@ +Provides: java-runtime-headless, java2-runtime-headless, java5-runtime-headless, java6-runtime-headless, ${defaultvm:Provides}, ${jvm:Provides} +Replaces: @basename@-jre-lib (<< 6b23~pre10), @basename@-jre (<< 6b23~pre1), @basename@-jdk (<< 6b20-1.9.1-0ubuntu2) +Conflicts: ${multiarch:Conflicts}, @basename@-jre-lib (<< 6b17~pre3-1), @basename@-jre (<< 6b17~pre3-1), @basename@-jdk (<< 6b17~pre3-1), @basename@-demo (<< 6b17~pre3-1), @basename@-source (<< 6b17~pre3-1), @basename@-doc (<< 6b17~pre3-1), @basename@-dbg (<< 6b17~pre3-1), @basename@-jre-zero (<< 6b17~pre3-1) +Description: OpenJDK Java runtime, using ${vm:Name} (headless) + Minimal Java runtime - needed for executing non GUI Java programs. + Using ${vm:Name}. + . + The packages are built using the IcedTea build support and patches + from the IcedTea project. + +Package: @basename@-jre +Architecture: any +Multi-Arch: same +Pre-Depends: ${dpkg:Depends} +Depends: @basename@-jre-headless (@op@ @pkg_version@), ${xandsound:Depends}, ${shlibs:Depends}, ${dlopenjre:Depends}, ${misc:Depends}, ${dep:bridge} +Recommends: ${dlopenjre:Recommends}, @core_fonts@, icedtea-netx +Suggests: icedtea-plugin, ${pkg:pulseaudio} +Conflicts: icedtea-gcjwebplugin (<< 1.0-1ubuntu4), @basename@-jre-lib (<< 6b17~pre3-1), @basename@-jre-headless (<< 6b17~pre3-1), @basename@-jdk (<< 6b17~pre3-1), @basename@-demo (<< 6b17~pre3-1), @basename@-source (<< 6b17~pre3-1), @basename@-doc (<< 6b17~pre3-1), @basename@-dbg (<< 6b17~pre3-1), @basename@-jre-zero (<< 6b17~pre3-1) +Replaces: openjdk-6-jre-headless (<< 6b16~pre3), openjdk-6-jdk (<< 6b20-1.10~pre2-0ubuntu1) +Provides: java-runtime, java2-runtime, java5-runtime, java6-runtime +Description: OpenJDK Java runtime, using ${vm:Name} + Full Java runtime environment - needed for executing Java GUI and Webstart + programs. Using ${vm:Name}. + . + The packages are built using the IcedTea build support and patches + from the IcedTea project. + +Package: @basename@-jre-lib +Architecture: @lib_arch@ +Multi-Arch: foreign +Pre-Depends: ${dpkg:Depends} +Depends: @basename@-jre-headless (>= ${base:Version}), ${misc:Depends} +Recommends: ${dlopen:Recommends} +Conflicts: @basename@-jre-headless (<< 6b17~pre3-1), @basename@-jre (<< 6b17~pre3-1) +Breaks: openjdk-6-jre-headless (<< 6b23~pre9-1~) +Built-Using: ${rhino:Source} +Description: OpenJDK Java runtime (architecture independent libraries) + OpenJDK Java runtime, using ${vm:Name}. + . + The packages are built using the IcedTea build support and patches + from the IcedTea project. + +Package: @basename@-demo +Architecture: any +Priority: extra +Pre-Depends: ${dpkg:Depends} +Depends: @basename@-jre (@op@ @pkg_version@), ${shlibs:Depends}, ${misc:Depends} +Conflicts: @basename@-jre-headless (<< 6b17~pre3-1), @basename@-jre (<< 6b17~pre3-1) +Description: Java runtime based on OpenJDK (demos and examples) + OpenJDK Java runtime + . + The packages are built using the IcedTea build support and patches + from the IcedTea project. + +Package: @basename@-source +Architecture: all +Priority: extra +Pre-Depends: ${dpkg:Depends} +Depends: @basename@-jre (>= @pkg_sversion@), @basename@-jdk (>= @pkg_version@), ${misc:Depends} +Conflicts: @basename@-jre-headless (<< 6b17~pre3-1), @basename@-jre (<< 6b17~pre3-1) +Description: OpenJDK Development Kit (JDK) source files + OpenJDK is a development environment for building applications, + applets, and components using the Java programming language. + . + This package contains the Java programming language source files + (src.zip) for all classes that make up the Java core API. + . + The packages are built using the IcedTea build support and patches + from the IcedTea project. + +Package: @basename@-doc +Section: doc +Pre-Depends: ${dpkg:Depends} +Architecture: all +Priority: extra +Depends: ${misc:Depends} +Suggests: @basename@-jdk +Conflicts: @basename@-jre-headless (<< 6b17~pre3-1), @basename@-jre (<< 6b17~pre3-1) +Description: OpenJDK Development Kit (JDK) documentation + OpenJDK is a development environment for building applications, + applets, and components using the Java programming language. + . + This package contains the API documentation. + . + The packages are built using the IcedTea build support and patches + from the IcedTea project. + +Package: @basename@-dbg +Architecture: any +Multi-Arch: same +Priority: extra +Section: debug +Pre-Depends: ${dpkg:Depends} +Depends: @basename@-jre-headless (= @pkg_version@), ${misc:Depends} +Recommends: @basename@-jre (= @pkg_version@) +Suggests: @basename@-jdk (= @pkg_version@) +Conflicts: @basename@-jre-headless (<< 6b17~pre3-1), @basename@-jre (<< 6b17~pre3-1) +Description: Java runtime based on OpenJDK (debugging symbols) + OpenJDK is a development environment for building applications, + applets, and components using the Java programming language. + . + This package contains the debugging symbols. + . + The packages are built using the IcedTea build support and patches + from the IcedTea project. --- openjdk-6-6b27-1.12.6.orig/debian/swing.properties +++ openjdk-6-6b27-1.12.6/debian/swing.properties @@ -0,0 +1,2 @@ +# uncomment to set the default look and feel to GTK +#swing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel --- openjdk-6-6b27-1.12.6.orig/debian/font.properties.ja +++ openjdk-6-6b27-1.12.6/debian/font.properties.ja @@ -0,0 +1,197 @@ +# @(#)font.properties.ja.linux 1.7 02/03/07 +# +# Copyright 2002 Sun Microsystems, Inc. All rights reserved. +# + +# Component Font Mappings +# +serif.0=-b&h-lucidabright-medium-r-normal--*-%d-*-*-p-*-iso8859-1 +serif.1=-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +serif.italic.0=-b&h-lucidabright-medium-i-normal--*-%d-*-*-p-*-iso8859-1 +serif.italic.1=-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +serif.bold.0=-b&h-lucidabright-demibold-r-normal--*-%d-*-*-p-*-iso8859-1 +serif.bold.1=-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +serif.bolditalic.0=-b&h-lucidabright-demibold-i-normal--*-%d-*-*-p-*-iso8859-1 +serif.bolditalic.1=-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +sansserif.0=-b&h-lucidasans-medium-r-normal-sans-*-%d-*-*-p-*-iso8859-1 +sansserif.1=-kochi-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +sansserif.italic.0=-b&h-lucidasans-medium-i-normal-sans-*-%d-*-*-p-*-iso8859-1 +sansserif.italic.1=-kochi-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +sansserif.bold.0=-b&h-lucidasans-bold-r-normal-sans-*-%d-*-*-p-*-iso8859-1 +sansserif.bold.1=-kochi-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +sansserif.bolditalic.0=-b&h-lucidasans-bold-i-normal-sans-*-%d-*-*-p-*-iso8859-1 +sansserif.bolditalic.1=-kochi-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +monospaced.0=-b&h-lucidatypewriter-medium-r-normal-sans-*-%d-*-*-m-*-iso8859-1 +monospaced.1=-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +monospaced.italic.0=-b&h-lucidatypewriter-medium-r-normal-sans-*-%d-*-*-m-*-iso8859-1 +monospaced.italic.1=-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +monospaced.bold.0=-b&h-lucidatypewriter-bold-r-normal-sans-*-%d-*-*-m-*-iso8859-1 +monospaced.bold.1=-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +monospaced.bolditalic.0=-b&h-lucidatypewriter-bold-r-normal-sans-*-%d-*-*-m-*-iso8859-1 +monospaced.bolditalic.1=-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +dialog.0=-b&h-lucidasans-medium-r-normal-sans-*-%d-*-*-p-*-iso8859-1 +dialog.1=-kochi-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +dialog.italic.0=-b&h-lucidasans-medium-i-normal-sans-*-%d-*-*-p-*-iso8859-1 +dialog.italic.1=-kochi-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +dialog.bold.0=-b&h-lucidasans-bold-r-normal-sans-*-%d-*-*-p-*-iso8859-1 +dialog.bold.1=-kochi-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +dialog.bolditalic.0=-b&h-lucidasans-bold-i-normal-sans-*-%d-*-*-p-*-iso8859-1 +dialog.bolditalic.1=-kochi-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +dialoginput.0=-b&h-lucidatypewriter-medium-r-normal-sans-*-%d-*-*-m-*-iso8859-1 +dialoginput.1=-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +dialoginput.italic.0=-b&h-lucidatypewriter-medium-r-normal-sans-*-%d-*-*-m-*-iso8859-1 +dialoginput.italic.1=-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +dialoginput.bold.0=-b&h-lucidatypewriter-bold-r-normal-sans-*-%d-*-*-m-*-iso8859-1 +dialoginput.bold.1=-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +dialoginput.bolditalic.0=-b&h-lucidatypewriter-bold-r-normal-sans-*-%d-*-*-m-*-iso8859-1 +dialoginput.bolditalic.1=-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +# Missing Glyph Character +# +default.char=274f + +# Component Font Character Encodings +# +fontcharset.serif.0=sun.io.CharToByteISO8859_1 +fontcharset.serif.1=sun.awt.motif.CharToByteX11JIS0208 + +fontcharset.sansserif.0=sun.io.CharToByteISO8859_1 +fontcharset.sansserif.1=sun.awt.motif.CharToByteX11JIS0208 + +fontcharset.monospaced.0=sun.io.CharToByteISO8859_1 +fontcharset.monospaced.1=sun.awt.motif.CharToByteX11JIS0208 + +fontcharset.dialog.0=sun.io.CharToByteISO8859_1 +fontcharset.dialog.1=sun.awt.motif.CharToByteX11JIS0208 + +fontcharset.dialoginput.0=sun.io.CharToByteISO8859_1 +fontcharset.dialoginput.1=sun.awt.motif.CharToByteX11JIS0208 + +# Exclusion Ranges +# + +# XFontSet Information +# +fontset.serif.plain=\ +-sony-fixed-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0,\ +-b&h-lucidabright-medium-r-normal--*-%d-*-*-p-*-iso8859-1,\ +-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +fontset.serif.italic=\ +-sony-fixed-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0,\ +-b&h-lucidabright-medium-i-normal--*-%d-*-*-p-*-iso8859-1,\ +-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +fontset.serif.bold=\ +-sony-fixed-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0,\ +-b&h-lucidabright-demibold-r-normal--*-%d-*-*-p-*-iso8859-1,\ +-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +fontset.serif.bolditalic=\ +-sony-fixed-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0,\ +-b&h-lucidabright-demibold-i-normal--*-%d-*-*-p-*-iso8859-1,\ +-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +fontset.sansserif.plain=\ +-sony-fixed-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0,\ +-b&h-lucida-medium-i-normal-sans-*-%d-*-*-p-*-iso8859-1,\ +-kochi-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +fontset.sansserif.italic=\ +-sony-fixed-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0,\ +-b&h-lucida-medium-i-normal-sans-*-%d-*-*-p-*-iso8859-1,\ +-kochi-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +fontset.sansserif.bold=\ +-sony-fixed-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0,\ +-b&h-lucida-bold-r-normal-sans-*-%d-*-*-p-*-iso8859-1,\ +-kochi-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +fontset.sansserif.bolditalic=\ +-sony-fixed-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0,\ +-b&h-lucida-bold-i-normal-sans-*-%d-*-*-p-*-iso8859-1,\ +-kochi-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +fontset.monospaced.plain=\ +-sony-fixed-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0,\ +-b&h-lucidatypewriter-medium-r-normal-sans-*-%d-*-*-m-*-iso8859-1,\ +-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +fontset.monospaced.italic=\ +-sony-fixed-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0,\ +-b&h-lucidatypewriter-medium-r-normal-sans-*-%d-*-*-m-*-iso8859-1,\ +-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +fontset.monospaced.bold=\ +-sony-fixed-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0,\ +-b&h-lucidatypewriter-bold-r-normal-sans-*-%d-*-*-m-*-iso8859-1,\ +-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +fontset.monospaced.bolditalic=\ +-sony-fixed-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0,\ +-b&h-lucidatypewriter-bold-r-normal-sans-*-%d-*-*-m-*-iso8859-1,\ +-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +fontset.dialog.italic=\ +-sony-fixed-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0,\ +-b&h-lucida-medium-i-normal-sans-*-%d-*-*-p-*-iso8859-1,\ +-kochi-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +fontset.dialog.bold=\ +-sony-fixed-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0,\ +-b&h-lucida-bold-r-normal-sans-*-%d-*-*-p-*-iso8859-1,\ +-kochi-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +fontset.dialog.bolditalic=\ +-sony-fixed-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0,\ +-b&h-lucida-bold-i-normal-sans-*-%d-*-*-p-*-iso8859-1,\ +-kochi-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +fontset.dialog.plain=\ +-sony-fixed-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0,\ +-b&h-lucida-medium-r-normal-sans-*-%d-*-*-p-*-iso8859-1,\ +-kochi-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +fontset.dialoginput.italic=\ +-sony-fixed-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0,\ +-b&h-lucidatypewriter-medium-r-normal-sans-*-%d-*-*-m-*-iso8859-1,\ +-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +fontset.dialoginput.bold=\ +-sony-fixed-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0,\ +-b&h-lucidatypewriter-bold-r-normal-sans-*-%d-*-*-m-*-iso8859-1,\ +-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +fontset.dialoginput.bolditalic=\ +-sony-fixed-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0,\ +-b&h-lucidatypewriter-bold-r-normal-sans-*-%d-*-*-m-*-iso8859-1,\ +-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +fontset.dialoginput.plain=\ +-sony-fixed-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0,\ +-b&h-lucidatypewriter-medium-r-normal-sans-*-%d-*-*-m-*-iso8859-1,\ +-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +fontset.default=\ +-sony-fixed-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0,\ +-b&h-lucida-medium-r-normal-sans-*-%d-*-*-p-*-iso8859-1,\ +-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 --- openjdk-6-6b27-1.12.6.orig/debian/icedtea-6-jre-cacao.README.Debian +++ openjdk-6-6b27-1.12.6/debian/icedtea-6-jre-cacao.README.Debian @@ -0,0 +1,18 @@ +icedtea-6-jre-cacao for Debian +------------------------------- + +Please look for further documentation in the directory +/usr/share/doc/openjdk-6-jre/ . + +The package provides cacao as a JVM to be used with OpenJDK 6. +To use the VM, call java with the option `-cacao'. + + $ java -cacao -version + java version "1.6.0_0" + OpenJDK Runtime Environment (IcedTea6 1.4) (6b14-0ubuntu18) + CACAO (build 0.99.3+hg, compiled mode) + +To use one of the tools in the JRE and SDK packages with the +cacao VM, use `-J-cacao' to pass the parameter to the runtime. + + -- Matthias Klose Tue, 03 Mar 2009 17:52:27 +0100 --- openjdk-6-6b27-1.12.6.orig/debian/generate-dfsg-zip.sh +++ openjdk-6-6b27-1.12.6/debian/generate-dfsg-zip.sh @@ -0,0 +1,102 @@ +#!/bin/sh + +if [ ! -f "$1" ]; then + echo "does not exist: $1" + exit 1 +fi + +dist=$(lsb_release -is) + +# Untar openjdk source zip. +rm -rf openjdk +mkdir openjdk +tar xf $1 -C openjdk + +# Remove binaries +rm -f \ + openjdk/jdk/test/sun/management/windows/revokeall.exe \ + openjdk/jdk/test/sun/management/jmxremote/bootstrap/linux-i586/launcher \ + openjdk/jdk/test/sun/management/jmxremote/bootstrap/solaris-sparc/launcher \ + openjdk/jdk/test/sun/management/jmxremote/bootstrap/solaris-i586/launcher + +# Remove test sources with questionable license headers. +rm -f \ + openjdk/jdk/test/java/util/ResourceBundle/Bug4168625Resource3.java \ + openjdk/jdk/test/java/util/ResourceBundle/Bug4168625Resource3_en_IE.java \ + openjdk/jdk/test/java/util/ResourceBundle/Bug4165815Test.java \ + openjdk/jdk/test/java/util/ResourceBundle/Bug4177489_Resource_jf.java \ + openjdk/jdk/test/java/util/ResourceBundle/Bug4168625Resource3_en_CA.java \ + openjdk/jdk/test/java/util/ResourceBundle/Bug4168625Getter.java \ + openjdk/jdk/test/java/util/ResourceBundle/Bug4177489Test.java \ + openjdk/jdk/test/java/util/ResourceBundle/Bug4168625Resource.java \ + openjdk/jdk/test/java/util/ResourceBundle/Bug4168625Resource2.java \ + openjdk/jdk/test/java/util/ResourceBundle/Bug4168625Resource3_en_US.java \ + openjdk/jdk/test/java/util/ResourceBundle/Bug4083270Test.java \ + openjdk/jdk/test/java/util/ResourceBundle/Bug4168625Resource3_en.java \ + openjdk/jdk/test/java/util/ResourceBundle/Bug4177489_Resource.java \ + openjdk/jdk/test/java/util/ResourceBundle/Bug4168625Test.java \ + openjdk/jdk/test/java/util/ResourceBundle/Bug4168625Resource2_en_US.java \ + openjdk/jdk/test/java/util/ResourceBundle/Bug4168625Class.java \ + openjdk/jdk/test/java/util/Locale/Bug4175998Test.java \ + openjdk/jdk/test/java/util/ResourceBundle/RBTestFmwk.java \ + openjdk/jdk/test/java/util/ResourceBundle/TestResource_fr.java \ + openjdk/jdk/test/java/util/ResourceBundle/Bug4179766Resource.java \ + openjdk/jdk/test/java/util/ResourceBundle/Bug4179766Getter.java \ + openjdk/jdk/test/java/util/ResourceBundle/Bug4179766Class.java \ + openjdk/jdk/test/java/util/ResourceBundle/TestResource.java \ + openjdk/jdk/test/java/util/ResourceBundle/FakeTestResource.java \ + openjdk/jdk/test/java/util/ResourceBundle/TestResource_de.java \ + openjdk/jdk/test/java/util/ResourceBundle/TestBug4179766.java \ + openjdk/jdk/test/java/util/ResourceBundle/TestResource_fr_CH.java \ + openjdk/jdk/test/java/util/ResourceBundle/ResourceBundleTest.java \ + openjdk/jdk/test/java/util/ResourceBundle/TestResource_it.java \ + openjdk/jdk/test/java/util/Locale/PrintDefaultLocale.java \ + openjdk/jdk/test/java/util/Locale/LocaleTest.java \ + openjdk/jdk/test/java/util/Locale/LocaleTestFmwk.java \ + openjdk/jdk/test/java/util/Locale/Bug4184873Test.java \ + openjdk/jdk/test/sun/text/resources/LocaleDataTest.java + +# Remove J2DBench sources, some of which have questionable license +# headers. +rm -rf \ + openjdk/jdk/src/share/demo/java2d/J2DBench + +# BEGIN Debian/Ubuntu additions + +# binary files +rm -f \ + openjdk/jdk/test/sun/net/idn/*.spp + +rm -f \ + openjdk/jdk/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/lib/linux-i586/libLauncher.so \ + openjdk/jdk/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/lib/solaris-i586/libLauncher.so \ + openjdk/jdk/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/lib/solaris-sparc/libLauncher.so \ + openjdk/jdk/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/lib/solaris-sparcv9/libLauncher.so \ + openjdk/jdk/test/tools/launcher/lib/i386/lib32/lib32/liblibrary.so \ + openjdk/jdk/test/tools/launcher/lib/i386/lib32/liblibrary.so \ + openjdk/jdk/test/tools/launcher/lib/sparc/lib32/lib32/liblibrary.so \ + openjdk/jdk/test/tools/launcher/lib/sparc/lib32/liblibrary.so \ + openjdk/jdk/test/tools/launcher/lib/sparc/lib64/lib64/liblibrary.so \ + openjdk/jdk/test/tools/launcher/lib/sparc/lib64/liblibrary.so + +rm -f \ + openjdk/jdk/test/java/util/Locale/data/deflocale.exe \ + openjdk/jdk/test/java/util/Locale/data/deflocale.jds3 \ + openjdk/jdk/test/java/util/Locale/data/deflocale.rhel4 \ + openjdk/jdk/test/java/util/Locale/data/deflocale.sh \ + openjdk/jdk/test/java/util/Locale/data/deflocale.sol10 \ + openjdk/jdk/test/java/util/Locale/data/deflocale.winvista \ + openjdk/jdk/test/java/util/Locale/data/deflocale.winxp \ + +# TODO +#$ find openjdk -name '*.jar' -o -name '*.class'|grep -v test + +# END Debian/Ubuntu additions + +# Create new zip with new name. + +NEW_ZIP=$(echo $1 | sed -e 's/\.tar.gz/-dfsg.tar.gz/') +(cd openjdk && tar -cz -f ../$NEW_ZIP *) + +# Remove old unzipped openjdk dir. +rm -rf openjdk --- openjdk-6-6b27-1.12.6.orig/debian/rules +++ openjdk-6-6b27-1.12.6/debian/rules @@ -0,0 +1,1987 @@ +#!/usr/bin/make -f +# -*- makefile -*- + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +unexport LANG LC_ALL + +SHELL = /bin/bash + +vafilt = $(subst $(2)=,,$(filter $(2)=%,$(1))) + +DPKG_VARS := $(shell dpkg-architecture) +DEB_HOST_GNU_TYPE ?= $(call vafilt,$(DPKG_VARS),DEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE ?= $(call vafilt,$(DPKG_VARS),DEB_BUILD_GNU_TYPE) +DEB_HOST_ARCH ?= $(call vafilt,$(DPKG_VARS),DEB_HOST_ARCH) +DEB_HOST_MULTIARCH ?= $(call vafilt,$(DPKG_VARS),DEB_HOST_MULTIARCH) + +PATH := $(CURDIR)/bin:$(PATH) +export PATH + +CHANGELOG_VARS := $(shell dpkg-parsechangelog | sed -n 's/ /_/g;/^[^_]/s/^\([^:]*\):_\(.*\)/\1=\2/p') +PKGSOURCE := $(call vafilt,$(CHANGELOG_VARS),Source) +PKGVERSION := $(call vafilt,$(CHANGELOG_VARS),Version) + +distribution := $(shell lsb_release --id --short) +distrel := $(shell lsb_release --codename --short) +ifeq ($(distrel),n/a) + distrel := sid +endif + +multiarch_dir = /$(DEB_HOST_MULTIARCH) +ifneq (,$(DEB_HOST_MULTIARCH)) + ifneq (,$(filter $(distrel),natty oneiric)) + DEB_HOST_MULTIARCH = + multiarch_dir = + endif +endif + +hotspot_archs = amd64 i386 lpia sparc sparc64 +# requires llvm; llvm in jaunty is recent enough, but in universe +ifeq (,$(filter $(distrel),lenny jaunty intrepid hardy gutsy feisty edgy dapper)) + shark_archs = amd64 i386 lpia + shark_archs = +endif + +VENDOR = openjdk +Vendor = OpenJDK +TOP = usr/lib/jvm +origin = openjdk +basename = openjdk-$(shortver) +ifneq (,$(filter $(DEB_HOST_ARCH), $(hotspot_archs))) + priority = 1061 + vm_name = Hotspot JIT +else ifneq (,$(filter $(DEB_HOST_ARCH), $(shark_archs))) + priority = 1059 + vm_name = Hotspot Shark +else + priority = 1057 + vm_name = Hotspot Zero +endif +p_lib_arch = all +jvmver = 1.6.0 +shortver = 6 +ifneq (,$(DEB_HOST_MULTIARCH)) + jdirname = java-$(shortver)-$(origin)-$(DEB_HOST_ARCH) + jdiralias = java-$(jvmver)-$(origin)-$(DEB_HOST_ARCH) + basedir = $(TOP)/$(jdirname) + commonbasedir = $(TOP)/java-$(shortver)-$(origin)-common + etcdir = etc/java-$(shortver)-$(origin) +else + jdirname = java-$(shortver)-$(origin) + jdiralias = java-$(jvmver)-$(origin) + basedir = $(TOP)/$(jdirname) + commonbasedir = $(TOP)/java-$(shortver)-$(origin) + etcdir = etc/$(jdirname) +endif +security = $(etcdir)/security +jreimg = openjdk.build/j2re-image +sdkimg = openjdk.build/j2sdk-image + +# Support parallel= in DEB_BUILD_OPTIONS (see #209008) +COMMA=, +SPACE = $(EMPTY) $(EMPTY) +ifneq (,$(filter parallel=%,$(subst $(COMMA), ,$(DEB_BUILD_OPTIONS)))) + NJOBS = $(subst parallel=,,$(filter parallel=%,$(subst $(COMMA), ,$(DEB_BUILD_OPTIONS)))) + HOTSPOT_BUILD_JOBS = $(NJOBS) + ALT_PARALLEL_COMPILE_JOBS = $(NJOBS) + export HOTSPOT_BUILD_JOBS + export ALT_PARALLEL_COMPILE_JOBS +endif + +# make the build log comparable +#export HOTSPOT_BUILD_JOBS = 1 +#export ALT_PARALLEL_COMPILE_JOBS = 1 + +with_check = $(if $(findstring nocheck, $(DEB_BUILD_OPTIONS)),,yes) +with_docs = $(if $(findstring nodocs, $(DEB_BUILD_OPTIONS)),,yes) +ifneq (,$(findstring cacao shark, $(PKGSOURCE))) + with_docs = disabled for cacao and shark +endif +#with_check = disabled for this build + +with_wgy_zenhai = $(if $(filter $(distrel),lenny gutsy feisty edgy dapper),,yes) + +arch_map := alpha=alpha arm=arm armel=arm armhf=arm amd64=amd64 hppa=parisc i386=i586 lpia=i586 m68k=m68k mips=mips mipsel=mipsel powerpc=ppc powerpcspe=ppc ppc64=ppc64 sparc=sparc sparc64=sparc64 sh4=sh s390=s390 s390x=s390x ia64=ia64 +archdir_map := alpha=alpha arm=arm armel=arm armhf=arm amd64=amd64 hppa=parisc i386=i386 lpia=i386 m68k=m68k mips=mips mipsel=mipsel powerpc=ppc powerpcspe=ppc ppc64=ppc64 sparc=sparc sparc64=sparcv9 sh4=sh s390=s390 s390x=s390x ia64=ia64 + +jvmarch := $(strip $(patsubst $(DEB_HOST_ARCH)=%, %, \ + $(filter $(DEB_HOST_ARCH)=%, $(arch_map)))) +archdir := $(strip $(patsubst $(DEB_HOST_ARCH)=%, %, \ + $(filter $(DEB_HOST_ARCH)=%, $(archdir_map)))) + +default_vm = $(if $(filter $(DEB_HOST_ARCH), $(hotspot_archs)),hotspot,zero) + +stage1_gcj_archs = amd64 armel armhf hppa i386 ia64 lpia powerpc powerpcspe ppc64 m68k mips mipsel sh4 sparc sparc64 s390 s390x +stage1_openjdk_archs = alpha +stage1_cacao_archs = +ifneq (,$(filter nobootstrap, $(DEB_BUILD_OPTIONS))) + stage1_openjdk_archs := $(stage1_openjdk_archs) $(stage1_gcj_archs) + stage1_gcj_archs := +else ifneq (,$(filter $(distrel),hardy jaunty)) + stage1_openjdk_archs := $(filter-out armel, $(stage1_openjdk_archs) $(stage1_gcj_archs)) + stage1_gcj_archs := armel +else ifneq (,$(filter $(distrel),lenny)) + stage1_gcj_archs := $(filter-out ia64, $(stage1_gcj_archs)) + stage1_openjdk_archs := $(stage1_openjdk_archs) ia64 +endif + +ifeq (,$(filter $(distrel),lenny intrepid hardy gutsy feisty edgy dapper)) + cacao_archs = alpha amd64 armel armhf i386 lpia powerpc m68k mips mipsel s390 +endif +ifeq (,$(filter $(distrel),squeeze lenny maverick lucid karmic hardy dapper)) + jamvm_archs = amd64 armel armhf i386 lpia mips mipsel powerpc +endif +#ifeq (,$(filter $(distrel),wheezy sid squeeze lenny maverick natty maverick lucid karmic hardy dapper)) +# jamvm_defaults = armel armhf +#endif + +# requires patched llvm-2.6 +ifeq (,$(filter $(distrel),lenny jaunty intrepid hardy gutsy feisty edgy dapper)) + # FIXME: armel currently doesn't work + altshark_archs = powerpc ppc64 + altshark_archs = +endif +altzero_archs = $(filter-out sparc sparc64, $(hotspot_archs)) $(altshark_archs) +ifneq (,$(filter $(distrel),lenny dapper hardy intrepid)) + altzero_archs = + altshark_archs = +endif + +ifeq (,$(filter noaltcacao, $(DEB_BUILD_OPTIONS))) + ifneq (,$(filter $(DEB_HOST_ARCH), $(cacao_archs))) + alternate_vms += cacao + endif +endif +ifeq (,$(filter noaltzero, $(DEB_BUILD_OPTIONS))$(filter noaltshark, $(DEB_BUILD_OPTIONS))) + ifneq (,$(filter $(DEB_HOST_ARCH), $(altzero_archs))) + ifneq (,$(filter $(DEB_HOST_ARCH), $(shark_archs) $(altshark_archs))) + alternate_vms += shark + zero_dir = shark + else + alternate_vms += zero + zero_dir = zero + endif + endif +endif +ifeq (,$(filter noaltjamvm, $(DEB_BUILD_OPTIONS))) + ifneq (,$(filter $(DEB_HOST_ARCH), $(jamvm_archs))) + alternate_vms += jamvm + endif +endif + +ifneq (,$(filter $(DEB_HOST_ARCH), $(stage1_gcj_archs))) + STAGE1_JAVA = gcj + ifneq (,$(filter $(distrel),dapper)) + STAGE1_HOME = /usr/lib/jvm/java-1.5.0-gcj-4.5-snap + #STAGE1_HOME = /usr/lib/jvm/java-1.5.0-gcj-4.4 + else + STAGE1_HOME = /usr/lib/jvm/java-gcj + endif +else ifneq (,$(filter $(DEB_HOST_ARCH), $(stage1_openjdk_archs))) + STAGE1_JAVA = openjdk + STAGE1_HOME = $(firstword $(wildcard /usr/lib/jvm/java-6-openjdk-$(DEB_HOST_ARCH) /usr/lib/jvm/java-6-openjdk)) +else ifneq (,$(filter $(DEB_HOST_ARCH), $(stage1_cacao_archs))) + STAGE1_JAVA = cacao + STAGE1_HOME = /usr/lib/jvm/java-6-cacao +else + $(error unknown bootstrap method for architecture $(DEB_HOST_ARCH)) +endif + +OPENJDK_VERSION = b27 +OPENJDK_SRC_ZIP = openjdk-6-src-$(OPENJDK_VERSION)-26_oct_2012-dfsg.tar.gz +# the version of the build dependency for non-bootstrap builds; only adjust if +# the package is installable on all these architectures. +req_openjdk_bd_ver = 6b11 +req_openjdk_ver = 6b17 + +unexport CFLAGS CXXFLAGS CPPFLAGS FFLAGS LDFLAGS + +ifneq (,$(filter $(distrel),dapper)) + #GCJ_SUFFIX = -4.4 + #ifneq (,$(filter $(DEB_HOST_ARCH), i386 lpia)) + # export GCC_SUFFIX = -4.0 + #endif + #ifneq (,$(filter $(DEB_HOST_ARCH), amd64 powerpc sparc)) + # export GCC_SUFFIX = -4.0 + #endif +else ifneq (,$(filter $(distrel),hardy gutsy feisty edgy dapper)) + ifneq (,$(filter $(DEB_HOST_ARCH), i386 lpia)) + export GCC_SUFFIX = -4.1 + GCJ_SUFFIX = -4.2 + endif + ifneq (,$(filter $(DEB_HOST_ARCH), amd64 powerpc sparc)) + export GCC_SUFFIX = -4.2 + endif +else ifneq (,$(filter $(distrel),lenny intrepid jaunty)) + export GCC_SUFFIX = -4.3 + export GCJ_SUFFIX = -4.3 +else ifneq (,$(filter $(distrel),squeeze karmic lucid maverick)) + export GCC_SUFFIX = -4.4 + export GCJ_SUFFIX = -4.4 +else ifneq (,$(filter $(distrel),natty)) + export GCC_SUFFIX = -4.5 + export GCJ_SUFFIX = -4.5 +else ifneq (,$(filter $(distrel),wheezy quantal raring)) + export GCC_SUFFIX = -4.7 + export GCJ_SUFFIX = -4.7 + ifneq (,$(filter $(DEB_HOST_ARCH), mips mipsel)) + export GCC_SUFFIX = -4.4 + endif + ifneq (,$(filter $(DEB_HOST_ARCH), m68k s390)) + export GCJ_SUFFIX = -4.6 + endif +else ifneq (,$(filter $(distrel),oneiric)) + export GCC_SUFFIX = -4.6 + export GCJ_SUFFIX = -4.6 + ifneq (,$(filter $(DEB_HOST_ARCH), armel armhf)) + export GCC_SUFFIX = -4.5 + endif +else ifneq (,$(filter $(distrel),precise)) + export GCC_SUFFIX = -4.6 + export GCJ_SUFFIX = -4.6 +else + export GCC_SUFFIX = -4.8 + export GCJ_SUFFIX = -4.8 +endif + +ifneq (,$(filter $(DEB_HOST_ARCH), armel armhf)) +ifeq ($(distribution),Ubuntu) + ifneq (,$(filter $(distrel),jaunty)) + OPT_CFLAGS/cppInterpreter_arm.o = -O2 -falign-functions=32 -falign-loops=8 -g0 + else + OPT_CFLAGS/cppInterpreter_arm.o = -march=armv6 -mtune=cortex-a8 -O2 -falign-functions=64 -falign-loops=8 -g0 + endif +else + OPT_CFLAGS/cppInterpreter_arm.o = -O2 -falign-functions=32 -falign-loops=8 -g0 +endif +export OPT_CFLAGS/cppInterpreter_arm.o +endif + +ifeq (,$(filter $(distrel),lenny intrepid hardy gutsy feisty edgy dapper)) + with_pulse = yes +endif + +ifneq (,$(filter $(distrel),dapper)) + with_bridge = +else ifneq (,$(filter $(distrel),lenny jaunty intrepid hardy gutsy feisty edgy)) + with_bridge = +else ifneq (,$(filter $(distrel),squeeze karmic lucid maverick natty oneiric)) + with_bridge = bridge + with_jni_bridge = yes +else + with_bridge = atk +endif + +ifeq (,$(filter $(distrel),lenny karmic jaunty intrepid hardy gutsy feisty edgy dapper)) + with_nss = yes +endif + +ifeq (,$(filter $(distrel), dapper)) + with_tzdata = yes +endif + +# OpenJDK 6 always uses the internal lcms, only 7 has support for lcms2 +lcms_version = 1 + +on_buildd := $(shell [ -f /CurrentlyBuilding -o "$$LOGNAME" = buildd ] && echo yes) + +ifeq ($(distribution),Debian) + with_wm = $(notdir $(firstword $(wildcard /usr/bin/metacity /usr/bin/twm))) + ifneq (,$(findstring twm, $(with_wm))) + with_wm_args = -f $(CURDIR)/bin/jtreg.tmwrc + endif + bd_wm = metacity | twm, dbus-x11 | twm, + bd_wm = twm | metacity, twm | dbus-x11, +else + with_wm = $(notdir $(firstword $(wildcard /usr/bin/metacity /usr/bin/twm))) + with_wm_args = + ifneq (,$(findstring twm, $(with_wm))) + with_wm_args = -f $(CURDIR)/bin/jtreg.tmwrc + endif + bd_wm = metacity | twm, + ifeq (,$(filter $(distrel),etch dapper dapper)) + bd_wm += dbus-x11, + endif +endif +ifeq ($(with_wm),metacity) + with_wm_prefix = dbus-launch --exit-with-session +endif + +#ifeq (,$(filter $(distrel),lenny jaunty intrepid hardy gutsy feisty edgy dapper)) +# with_systemtap = yes +#endif + +with_hotspot = original +#ifneq (,$(filter $(DEB_HOST_ARCH), amd64 i386 lpia powerpc ppc64)) +# with_hotspot = hs20 +#endif + +ifneq (,$(filter $(DEB_HOST_ARCH), sparc64)) + export DISABLE_PRECOMPILED_HEADER=1 +endif + +ifeq (,$(filter $(distrel), dapper)) + DISTRIBUTION_PATCHES += \ + debian/patches/ld-symbolic-functions.diff +endif +DISTRIBUTION_PATCHES += \ + debian/patches/set-exec-name-$(with_hotspot).diff \ + debian/patches/shebang.diff \ + debian/patches/jexec.diff \ + debian/patches/no-compiler-path.diff \ + debian/patches/jdk-freetypeScaler-crash.diff \ + debian/patches/icedtea-pretend-memory.diff \ + debian/patches/default-jvm-cfg-$(with_hotspot).diff \ + debian/patches/nonreparenting-wm.diff \ + debian/patches/accessible-toolkit.patch \ + +ifeq ($(with_bridge),atk) + DISTRIBUTION_PATCHES += \ + debian/patches/atk-wrapper-security.patch +else ifneq (,$(with_bridge)) + DISTRIBUTION_PATCHES += \ + debian/patches/java-access-bridge-security.patch +endif + +DISTRIBUTION_PATCHES += \ + debian/patches/icedtea-override-redirect-compiz.patch \ + debian/patches/zero-only-use-floating-point-if-floating-poi.patch \ + debian/patches/icedtea-4953367.patch \ + debian/patches/fontconfig-wqy-microhei.patch \ + $(if $(filter $(DEB_HOST_ARCH), sparc sparc64), debian/patches/hotspot-no-werror.diff) \ + debian/patches/hotspot-sparc.diff \ + debian/patches/icc_loading_with_symlink.diff \ + debian/patches/enumipv6-fix.patch \ + debian/patches/libpcsclite-dlopen.diff \ + debian/patches/hotspot-7020521.patch \ + debian/patches/hotspot-7026307.patch \ + debian/patches/m68k-text-relocations.diff \ + +ifeq ($(DEB_HOST_ARCH),armel) + ifeq ($(distrel),quantal) + DISTRIBUTION_PATCHES += debian/patches/cacao-armv4.diff + else ifeq ($(distribution),Debian) + DISTRIBUTION_PATCHES += debian/patches/cacao-armv4.diff + endif +endif + +# FIXME needs an update: +# $(if $(with_wgy_zenhai),,debian/patches/fontconfig-arphic-uming.diff) \ + +ifeq (,$(filter $(distrel),lenny squeeze oneiric natty maverick lucid jaunty intrepid hardy gutsy feisty edgy dapper)) + DISTRIBUTION_PATCHES += \ + debian/patches/fontconfig-korean-nanum.diff \ + debian/patches/fontconfig-japanese.diff +endif + +# debian/patches/sparc-inline.diff \ +# debian/patches/pkcs11-secmod-debug.diff \ + +DISTRIBUTION_PATCHES += debian/patches/default-libpath-$(with_hotspot).diff \ + debian/patches/deb-multiarch-$(with_hotspot).diff \ + +# debian/patches/sane-library-paths.patch \ +# debian/patches/hotspot-warn-no-errformat.diff \ +# debian/patches/gcc-mtune-generic.diff \ + +ifneq (,$(filter $(distrel),hardy gutsy feisty edgy dapper)) + DISTRIBUTION_PATCHES += \ + $(if $(filter $(DEB_HOST_ARCH), amd64), debian/patches/gcc-jdk-opt-O2.diff) \ + $(if $(filter $(DEB_HOST_ARCH), powerpc), debian/patches/gcc-opt-O2.diff) \ + $(if $(filter $(DEB_HOST_ARCH), powerpcspe), debian/patches/gcc-opt-O2.diff) +else ifeq ($(DEB_HOST_ARCH),s390) + # GCC PR target/41327 + DISTRIBUTION_PATCHES += debian/patches/gcc-jdk-opt-O2.diff +endif + +ifeq (0,1) +ifneq (,$(filter $(distrel),wheezy sid precise)) + DISTRIBUTION_PATCHES += \ + debian/patches/0-sharkllvm30-targetselect-138450.patch \ + debian/patches/1-sharkllvm30-de-const-type-135375.patch \ + debian/patches/2-sharkllvm30-PHI-128537-Call-ArrayRef-135265.patch \ + debian/patches/shark-removed-intrinsics.patch \ + debian/patches/llvm-3.0-buildfix.patch +# debian/patches/3-sharkllvm30-MCJIT.patch +endif +endif + +ifeq ($(distribution),Ubuntu) + DISTRIBUTION_PATCHES += \ + debian/patches/openjdk-ubuntu-branding.patch +endif + +ifeq ($(with_pulse),yes) + # only in karmic and later the default + ifeq (,$(filter $(distrel), lenny squeeze sid jaunty intrepid hardy gutsy feisty edgy dapper)) + DISTRIBUTION_PATCHES += \ + debian/patches/jdk-pulseaudio-default.diff + endif +endif + +ifneq (,$(filter $(DEB_HOST_ARCH), alpha)) + DISTRIBUTION_ECJ_PATCHES += \ + debian/patches/alpha-float-const.diff +endif + +export DISTRIBUTION_PATCHES DISTRIBUTION_ECJ_PATCHES + +ifeq ($(STAGE1_JAVA),gcj) + CONFIGURE_ARGS = \ + --with-jdk-home=$(STAGE1_HOME) + ifeq (,$(filter $(distrel),dapper)) + CONFIGURE_ARGS += \ + --with-javac=/usr/bin/ecj \ + --with-java=$(STAGE1_HOME)/bin/java \ + --with-javah=/usr/bin/gjavah$(GCJ_SUFFIX) \ + --with-rmic=/usr/bin/grmic$(GCJ_SUFFIX) + else + CONFIGURE_ARGS += \ + --with-ecj-jar=$(STAGE1_HOME)/lib/ecj.jar \ + --with-javac=$(STAGE1_HOME)/bin/javac \ + --with-java=$(STAGE1_HOME)/bin/java \ + --with-javah=$(STAGE1_HOME)/bin/javah \ + --with-rmic=$(STAGE1_HOME)/bin/rmic + endif + ifeq (,$(filter ia64, $(DEB_HOST_ARCH))) + CONFIGURE_ARGS += \ + --with-jar=/usr/bin/fastjar + endif + build_target = #icedtea-against-icedtea +else ifeq ($(STAGE1_JAVA),openjdk) + CONFIGURE_ARGS = \ + --with-jdk-home=$(STAGE1_HOME) --disable-bootstrap + build_target = #icedtea-against-icedtea +else ifeq ($(STAGE1_JAVA),cacao) + CONFIGURE_ARGS = \ + --with-jdk-home=$(STAGE1_HOME) + build_target = #icedtea-against-icedtea +endif + +CONFIGURE_ARGS += --with-pkgversion="$(PKGVERSION)" + +# there are problems --with-alt-jar=/usr/bin/fastjar, +# see http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=217 +# only use it for zero ports except powerpc (which we assume as +# fast enough to build. +ifeq (,$(filter $(DEB_HOST_ARCH), $(hotspot_archs) ia64 powerpc powerpcspe ppc64)) + CONFIGURE_ARGS += --with-alt-jar=/usr/bin/fastjar +endif + +ifneq (,$(filter $(DEB_HOST_ARCH), hppa)) + CONFIGURE_ARGS += \ + --without-rhino +else + ifneq (,$(strip $(foreach i, dapper hardy intrepid jaunty,$(findstring $(i),$(PKGVERSION))))) + CONFIGURE_ARGS += \ + --with-rhino=/usr/share/java/js-1.7R2.jar + else + CONFIGURE_ARGS += \ + --with-rhino=/usr/share/java/js.jar + endif +endif +CONFIGURE_ARGS += \ + --disable-downloading \ + --with-openjdk-src-zip=$(firstword $(wildcard $(CURDIR)/$(OPENJDK_SRC_ZIP) /usr/src/$(OPENJDK_SRC_ZIP))) +CONFIGURE_ARGS += \ + --with-hotspot-build=$(with_hotspot) +ifneq ($(with_hotspot),original) + CONFIGURE_ARGS += \ + --with-hotspot-src-zip=$(firstword $(wildcard $(CURDIR)/hotspot-*.tar.gz /usr/src/hotspot-*.tar.gz)) +endif + +ifneq (,$(filter $(DEB_HOST_ARCH), $(cacao_archs))) + CONFIGURE_ARGS += \ + --with-cacao-src-zip=$(firstword $(wildcard $(CURDIR)/cacao-*.tar.* /usr/src/cacao-*.tar.*)) + ifneq (,$(filter $(DEB_HOST_ARCH), armel)) + # TODO: test build done without --enable-softfloat + EXTRA_BUILD_ENV = CACAO_CONFIGURE_ARGS='--host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE)' + else + EXTRA_BUILD_ENV = CACAO_CONFIGURE_ARGS='--host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE)' + endif +endif + +ifneq (,$(filter $(DEB_HOST_ARCH), $(jamvm_archs))) + CONFIGURE_ARGS += \ + --with-jamvm-src-zip=$(firstword $(wildcard $(CURDIR)/jamvm-*.tar.* /usr/src/jamvm-*.tar.*)) +endif + +ifeq (,$(filter $(DEB_HOST_ARCH), $(hotspot_archs))) + CONFIGURE_ARGS += --enable-zero + ifneq (,$(filter $(DEB_HOST_ARCH), $(shark_archs))) + CONFIGURE_ARGS += --enable-shark + endif +endif + +EXTRA_BUILD_ENV += LIBFFI_LIBS=-lffi_pic + +# assume we don't build binary indep packages on these architectures +ifeq ($(with_docs),yes) + ifeq (,$(filter $(DEB_HOST_ARCH), amd64 i386 lpia)) + CONFIGURE_ARGS += --disable-docs + endif +else + CONFIGURE_ARGS += --disable-docs +endif + +ifneq (,$(NJOBS)) + CONFIGURE_ARGS += --with-parallel-jobs=$(NJOBS) +endif + +CONFIGURE_ARGS += --enable-xrender + +ifeq ($(with_pulse),yes) + CONFIGURE_ARGS += --enable-pulse-java +endif + +ifeq ($(with_nss),yes) + CONFIGURE_ARGS += --enable-nss +else ifeq ($(with_nss),no) + CONFIGURE_ARGS += --disable-nss +endif + +ifeq ($(with_systemtap),yes) + CONFIGURE_ARGS += --enable-systemtap --with-abs-install-dir=/$(basedir) +endif + +ifneq (,$(alternate_vms)) + CONFIGURE_ARGS += --with-additional-vms=$(subst $(SPACE),$(COMMA),$(alternate_vms)) +endif + +CONFIGURE_ARGS += --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) + +# (most) jre and jdk tools handled by the alternatives system. +# dups in heimdal-clients, krb5-user: kinit, klist, ktab, no alternatives +# use javaws from icedtea-netx +all_jre_tools = $(filter-out javaws, $(notdir $(wildcard build/$(jreimg)/bin/*))) +jre_tools = $(filter policytool, $(all_jre_tools)) +jre_hl_tools := $(filter-out $(jre_tools), $(all_jre_tools)) + +corba_tools = orbd servertool tnameserv +jre_hl_tools_alt= $(filter-out $(corba_tools), $(jre_hl_tools)) $(corba_tools) +jre_tools_alt = $(filter-out kinit klist ktab, $(jre_tools)) + +all_jdk_tools = $(filter-out javaws, $(notdir $(wildcard build/$(sdkimg)/bin/*))) +jdk_tools = $(filter-out $(all_jre_tools), $(all_jdk_tools)) +jdk_tools_alt = $(filter-out apt java-rmi.cgi, $(jdk_tools)) + +ifeq ($(distribution),Ubuntu) + ifeq ($(distrel),dapper) + pkg_compress = + else + pkg_compress = lzma + endif +else + pkg_compress = bzip2 +endif +pkg_compress = + +# build dependencies +bd_autotools = autoconf, $(if $(filter $(distrel), dapper),automake1.9,automake), autotools-dev, +bd_bootstrap = +ifneq (,$(stage1_gcj_archs)) + ifneq (,$(filter $(distrel),dapper)) + bd_bootstrap += gcc-snapshot (>= 20100403-1~dapper3), + #bd_bootstrap += gcj-4.4-jdk, + else ifneq (,$(filter $(distrel),wheezy)) + stage1_gcj46_archs = m68k s390 + stage1_gcj47_archs = $(filter-out $(stage1_gcj46_archs), $(stage1_gcj_archs)) + bd_bootstrap += \ + ecj-gcj [$(strip $(foreach a,$(stage1_gcj_archs), $(a)))], \ + gcj-4.6-jdk [$(strip $(foreach a,$(stage1_gcj46_archs), $(a)))], \ + gcj-4.7-jdk [$(strip $(foreach a,$(stage1_gcj47_archs), $(a)))], \ + gcj-jdk [$(strip $(foreach a,$(stage1_gcj_archs), $(a)))], + bd_bootstrap += g++-4.4 [mips mipsel], + else ifeq (,$(filter $(distrel),lenny jaunty intrepid hardy gutsy feisty edgy)) + bd_bootstrap += \ + ecj-gcj [$(strip $(foreach a,$(stage1_gcj_archs), $(a)))], \ + gcj-jdk [$(strip $(foreach a,$(stage1_gcj_archs), $(a)))], + else + bd_bootstrap += \ + ecj-gcj [$(strip $(foreach a,$(stage1_gcj_archs), $(a)))], \ + gcj (>= 4:4.2.1) [$(strip $(foreach a,$(stage1_gcj_archs), $(a)))], \ + java-gcj-compat-dev (>= 1.0.76-2ubuntu3) [$(strip $(foreach a,$(stage1_gcj_archs), $(a)))], + endif +endif +ifneq (,$(stage1_openjdk_archs)) + bd_bootstrap += \ + openjdk-6-jdk (>= $(req_openjdk_bd_ver)) [$(strip $(foreach a,$(stage1_openjdk_archs), $(a)))], +endif +ifneq (,$(stage1_cacao_archs)) + bd_bootstrap += \ + cacao-oj6-jdk [$(strip $(foreach a,$(stage1_cacao_archs), $(a)))], +endif + +ifneq (,$(filter $(distrel),dapper)) + bd_gcc = g++-4.0, +else ifneq (,$(filter $(distrel),hardy gutsy feisty edgy)) + bd_gcc = g++-4.2 [amd64 powerpc sparc], g++-4.1 [i386 lpia], +else ifneq (,$(filter $(distrel),lenny intrepid jaunty)) + bd_gcc = g++-4.3, +else ifneq (,$(filter $(distrel),squeeze karmic lucid maverick)) + bd_gcc = g++-4.4 (>= 4.4.1), +else ifneq (,$(filter $(distrel),natty)) + bd_gcc = g++-4.5, +else ifneq (,$(filter $(distrel),oneiric)) + bd_gcc = g++-4.6, g++-4.5 [armel armhf], +else ifneq (,$(filter $(distrel),precise)) + bd_gcc = g++-4.6, +else ifneq (,$(filter $(distrel),wheezy quantal raring)) + bd_gcc = g++-4.7, +else + bd_gcc = g++-4.8, +endif +bd_syslibs = zlib1g-dev, +ifneq (,$(filter $(distrel),lenny squeeze oneiric natty maverick lucid karmic jaunty intrepid hardy gutsy feisty edgy dapper)) + bd_syslibs += libpng12-dev, libjpeg62-dev, +else + bd_syslibs += libpng-dev, libjpeg8-dev, +endif +bd_syslibs += \ + libgif-dev$(if $(filter $(distrel),etch dapper edgy feisty gutsy), | libungif4-dev), +bd_openjdk = \ + libxtst-dev, libxi-dev, libxt-dev, libxaw7-dev, libxrender-dev, \ + $(if $(filter $(distrel), etch dapper edgy gutsy hardy),libcupsys2-dev,libcups2-dev), \ + libasound2-dev, libfreetype6-dev (>= 2.2.1), libgtk2.0-dev, \ + libxinerama-dev, xsltproc, +ifneq (,$(strip $(foreach i, dapper hardy intrepid jaunty,$(findstring $(i),$(PKGVERSION))))) + bd_openjdk += rhino1.7, +else + bd_openjdk += rhino, +endif +ifeq (,$(filter $(distrel),lenny squeeze quantal precise oneiric natty maverick lucid karmic jaunty intrepid hardy gutsy feisty edgy dapper)) + rhino_source := $(shell dpkg-query -f '$${source:Package} (= $${source:Version}), ' -W rhino) +endif + +pkg_ffidev = $(if $(filter $(distribution),Ubuntu),$(if $(filter $(distrel),dapper hardy),libffi4-dev,libffi-dev),libffi-dev) + +bd_zero = \ + $(pkg_ffidev) [$(foreach a,$(hotspot_archs),!$(a))], +bd_zero = \ + $(pkg_ffidev), + +ifneq (,$(shark_archs)) + bd_zero = $(pkg_ffidev), + ifneq (,$(filter $(distrel),lucid)) + bd_shark = llvm-dev (>= 2.7) [$(foreach a,$(shark_archs) $(altshark_archs),$(a))], + bd_shark += oprofile [$(foreach a,$(shark_archs) $(altshark_archs),$(a))], + else ifneq (,$(filter $(distrel),karmic)) + bd_shark = llvm-dev (>= 2.6) [$(foreach a,$(shark_archs) $(altshark_archs),$(a))], + else + ifneq (,$(filter $(distrel),squeeze maverick natty)) + llvm_suffix = -2.7 + else ifneq (,$(filter $(distrel),oneirc precise)) + llvm_suffix = -2.9 + else + llvm_suffix = -3.0 + endif + bd_shark = llvm$(llvm_suffix)-dev [$(foreach a,$(shark_archs) $(altshark_archs),$(a))], + ifneq (,$(filter $(DEB_HOST_ARCH),$(shark_archs) $(altshark_archs))) + CONFIGURE_ARGS += --with-llvm-config=llvm-config$(llvm_suffix) + endif + endif +endif + +ifneq (,$(cacao_archs)) + # cacao included in the openjdk tarball + bd_cacao = libtool [$(strip $(foreach a,$(sort $(cacao_archs) $(jamvm_archs)), $(a)))], +endif + +ifneq (,$(filter $(distrel),squeeze)) + bd_ant = ant1.7, ant1.7-optional, +else + bd_ant = ant, ant-optional, +endif + +bd_fastjar = fastjar (>= 2:0.96-0ubuntu2), +ifneq (,$(filter $(distrel),lenny)) + bd_fastjar = fastjar (>= 2:0.95-4), +else ifneq (,$(filter $(distrel),hardy)) + bd_fastjar = fastjar (>= 2:0.95-1ubuntu2.1), +endif +ifneq (,$(filter $(distrel),dapper)) + bd_compress = $(pkg_compress), +endif +bd_xvfb = xvfb, xauth, xfonts-base, libgl1-mesa-dri, +bd_xvfb += $(bd_wm) +ifeq (,$(filter $(distrel),dapper)) + bd_xvfb += x11-xkb-utils, + bd_mauve = mauve, +endif +ifneq (,$(filter $(distrel),lenny)) + bd_xvfb += xkb-data, xserver-xorg-core, +endif +ifeq ($(with_pulse),yes) + bd_pulsejava = libpulse-dev (>= 0.9.12), +endif +ifeq ($(with_nss),yes) + ifneq (,$(filter $(distrel),lenny squeeze natty maverick lucid karmic hardy dapper)) + bd_nss = libnss3-dev (>= 3.12.3), + else ifneq (,$(filter $(distrel),squeeze wheezy sid)) + bd_nss = libnss3-dev (>= 3.12.3), + else + bd_nss = libnss3-dev (>= 3.12.9+ckbi-1.82-0ubuntu4), + endif +endif +ifeq ($(with_systemtap),yes) + bd_systemtap = systemtap-sdt-dev, +endif + +dlopen_hl_depends = \ + $(if $(filter $(distrel), etch dapper edgy gutsy hardy),libcupsys2,libcups2), \ + $(if $(findstring jpeg8, $(bd_syslibs)),libjpeg8,libjpeg62) +ifneq (,$(filter $(distrel),lenny squeeze natty maverick lucid karmic hardy dapper)) + dlopen_hl_depends += , libnss3-1d (>= 3.12.3) +else ifneq (,$(filter $(distrel),squeeze wheezy sid)) + dlopen_hl_depends += , libnss3-1d (>= 3.12.3) +else + dlopen_hl_depends += , libnss3-1d (>= 3.12.9+ckbi-1.82-0ubuntu4) +endif +dlopen_hl_depends += , libpcsclite1 +dlopen_hl_recommends = \ +dlopen_jre_depends = \ + libgtk2.0-0, libgnome2-0, libgnomevfs2-0, libgconf2-4, \ + libxrandr2, libxinerama1, libgl1-mesa-glx +dlopen_jre_recommends = + +plugin_name = IcedTeaPlugin.so +browser_plugin_dirs = mozilla + +# .desktop files need to be multiarch installable +java_launcher = /$(basedir)/bin/java +java_launcher = /usr/bin/java +ifeq ($(distribution),Ubuntu) + ifeq (,$(filter $(distrel),karmic jaunty intrepid hardy gutsy feisty edgy dapper)) + java_launcher = cautious-launcher %f /$(basedir)/bin/java + java_launcher = cautious-launcher %f /usr/bin/java + endif +endif + +ifneq (,$(filter $(distrel),etch dapper edgy feisty)) + core_fonts = ttf-dejavu +else ifneq (,$(filter $(distrel),lenny gutsy hardy intrepid jaunty karmic)) + core_fonts = ttf-dejavu-core +else + core_fonts = ttf-dejavu-extra +endif +ifneq (,$(filter $(distrel),lenny squeeze oneiric natty maverick lucid jaunty intrepid hardy gutsy feisty edgy dapper)) + cjk_fonts = ttf-baekmuk | ttf-unfonts | ttf-unfonts-core, + cjk_fonts += ttf-sazanami-gothic | ttf-kochi-gothic, + cjk_fonts += ttf-sazanami-mincho | ttf-kochi-mincho, +else + cfk_fonts = fonts-nanum, + cjk_fonts += fonts-ipafont-gothic, fonts-ipafont-mincho, + # FIXME: find out why this b-d is needed, the fontconfig compiler fails without it + bd_openjdk += fonts-ipafont-mincho, +endif +cjk_fonts += $(if $(with_wgy_zenhai),ttf-wqy-microhei | ttf-wqy-zenhei,ttf-arphic-uming), +ifneq (,$(filter $(distrel),lenny squeeze wheezy sid experimental)) + cjk_fonts += ttf-indic-fonts, +else + cjk_fonts += ttf-indic-fonts-core, ttf-telugu-fonts, ttf-oriya-fonts, + cjk_fonts += ttf-kannada-fonts, ttf-bengali-fonts, +endif + +p_jre = $(basename)-jre +p_jrehl = $(basename)-jre-headless +p_jrec = icedtea-$(shortver)-jre-cacao +p_jrej = icedtea-$(shortver)-jre-jamvm +p_jrez = $(basename)-jre-zero +p_lib = $(basename)-jre-lib +p_jdk = $(basename)-jdk +p_demo = $(basename)-demo +p_src = $(basename)-source +p_doc = $(basename)-doc +p_dbg = $(basename)-dbg + +d = debian/tmp +d_jre = debian/$(p_jre) +d_jrehl = debian/$(p_jrehl) +d_jrec = debian/$(p_jrec) +d_jrej = debian/$(p_jrej) +d_jrez = debian/$(p_jrez) +d_lib = debian/$(p_lib) +d_jdk = debian/$(p_jdk) +d_demo = debian/$(p_demo) +d_src = debian/$(p_src) +d_doc = debian/$(p_doc) +d_dbg = debian/$(p_dbg) + +control_vars = \ + '-Vvm:Name=$(vm_name)' \ + '-Vbase:Version=$(req_openjdk_ver)' \ + '-Vdlopenhl:Depends=$(dlopen_hl_depends)' \ + '-Vdlopenhl:Recommends=$(dlopen_hl_recommends)' \ + '-Vdlopenjre:Depends=$(dlopen_jre_depends)' \ + '-Vdlopenjre:Recommends=$(dlopen_jre_recommends)' \ + '-Vpkg:pulseaudio=$(pkg_pulseaudio)' \ + '-Vxulrunner:Depends=$(xulrunner_depends)' \ + +ifeq ($(pkg_compress),lzma) + bd_options = -- -Zlzma + control_vars += '-Vdpkg:Depends=dpkg (>= 1.14.12ubuntu3)' +else ifeq ($(pkg_compress),bzip2) + bd_options = -- -Zbzip2 + control_vars += '-Vdpkg:Depends=dpkg (>= 1.10.24)' +endif + +ifneq (,$(DEB_HOST_MULTIARCH)) + control_vars += \ + '-Vmultiarch:Depends=multiarch-support' \ + '-Vmultiarch:Conflicts=default-jre-headless (<< 1.6-43~), icedtea-netx (<< 1.1.1-2~)' +endif + +ifneq (,$(filter-out $(hotspot_archs), $(cacao_archs))) + control_vars += '-Vcacao:Recommends=$(p_jrec) (= $${binary:Version})' +endif +ifneq (,$(filter-out $(hotspot_archs), $(jamvm_archs))) + ifneq (,$(filter $(DEB_HOST_ARCH),$(jamvm_defaults))) + control_vars += '-Vjredefault:Depends=$(p_jrej) (= $${binary:Version})' + else + control_vars += '-Vjamvm:Recommends=$(p_jrej) (= $${binary:Version})' + endif +endif + +ifeq ($(with_bridge),atk) + control_vars += '-Vdep:bridge=libatk-wrapper-java-jni (>= 0.30.4-0ubuntu2)' +else ifeq ($(with_bridge),yes) + ifneq (,$(DEB_HOST_MULTIARCH)) + control_vars += '-Vdep:bridge=libaccess-bridge-java-jni (>= 1.26.2-6)' + else ifeq ($(with_jni_bridge),yes) + control_vars += '-Vdep:bridge=libaccess-bridge-java-jni' + else + control_vars += '-Vdep:bridge=libaccess-bridge-java' + endif +endif + +ifeq (,$(filter $(DEB_HOST_ARCH), $(hotspot_archs))) + ifneq (,$(filter $(DEB_HOST_ARCH), $(shark_archs))) + control_vars += '-Vdefaultvm:Provides=$(p_jre)-zero, $(p_jre)-shark' + else + control_vars += '-Vdefaultvm:Provides=$(p_jre)-zero' + endif +endif +ifneq (,$(filter $(DEB_HOST_ARCH), $(shark_archs) $(altshark_archs))) + control_vars += '-Vzerovm:Provides=$(p_jre)-shark' +endif + +ifneq (,$(filter $(distrel),lenny jaunty intrepid hardy gutsy feisty edgy dapper)) + control_vars += '-Vjvm:Provides=java-virtual-machine' +endif + +ifeq (,$(filter $(distrel), lenny dapper)) + pkg_certs = ca-certificates-java +endif +control_vars += '-Vcacert:Depends=$(pkg_certs)' + +ifeq ($(with_tzdata),yes) + pkg_tzdata = tzdata-java +endif +control_vars += '-Vtzdata:Depends=$(pkg_tzdata)' + +ifeq (,$(filter $(distrel), dapper)) + pkg_jcommon = java-common (>= 0.28) +endif +control_vars += '-Vjcommon:Depends=$(pkg_jcommon)' + +ifneq (,$(rhino_source)) + control_vars += "-Vrhino:Source=$(rhino_source)" +endif + +debian/control: debian/control.in debian/rules + @cp -p debian/control debian/control.old + sed \ + -e 's/@basename@/$(basename)/g' \ + -e 's/@bd_autotools@/$(bd_autotools)/g' \ + -e 's/@bd_bootstrap@/$(bd_bootstrap)/g' \ + -e 's/@bd_openjdk@/$(bd_openjdk)/g' \ + -e 's/@bd_zero@/$(bd_zero)/g' \ + -e 's/@bd_gcc@/$(bd_gcc)/g' \ + -e 's/@bd_syslibs@/$(bd_syslibs)/g' \ + -e 's/@bd_fastjar@/$(bd_fastjar)/g' \ + -e 's/@bd_mauve@/$(bd_mauve)/g' \ + -e 's/@bd_xvfb@/$(bd_xvfb)/g' \ + -e 's/@bd_compress@/$(pkg_compress)/g' \ + -e 's/@bd_cacao@/$(bd_cacao)/g' \ + -e 's/@bd_jamvm@/$(bd_jamvm)/g' \ + -e 's/@bd_pulsejava@/$(bd_pulsejava)/g' \ + -e 's/@bd_nss@/$(bd_nss)/g' \ + -e 's/@bd_systemtap@/$(bd_systemtap)/g' \ + -e 's/@bd_shark@/$(bd_shark)/g' \ + -e 's/@bd_ant@/$(bd_ant)/g' \ + -e 's/@core_fonts@/$(core_fonts)/g' \ + -e 's/@cjk_fonts@/$(cjk_fonts)/g' \ + -e 's/@cacao_archs@/$(cacao_archs)/g' \ + -e 's/@jamvm_archs@/$(jamvm_archs)/g' \ + -e 's/@hotspot_archs@/$(hotspot_archs)/g' \ + -e 's/@altzero_archs@/$(altzero_archs)/g' \ + -e 's,@pkg_version@,$(if $(filter $(distrel),etch dapper edgy feisty gutsy),$${Source-Version},$${binary:Version}),g' \ + -e 's,@pkg_sversion@,$(if $(filter $(distrel),etch dapper edgy feisty gutsy),$${Source-Version},$${source:Version}),g' \ + -e 's/@op@/$(if $(filter Debian,$(distribution)),=,>=)/g' \ + -e 's/@lib_arch@/$(p_lib_arch)/g' \ + debian/control.in \ + $(if $(cacao_archs), debian/control.cacao-jre) \ + $(if $(jamvm_archs), debian/control.jamvm-jre) \ + $(if $(altzero_archs), debian/control.zero-jre) \ + $(if $(DEB_HOST_MULTIARCH),,| grep -v '^Multi-Arch') \ + $(if $(rhino_source),,| grep -v '^Built-Using') \ + > debian/control + @if cmp -s debian/control debian/control.old; then \ + rm -f debian/control.old; \ + else \ + diff -u debian/control.old debian/control; \ + echo "debian/control did change, please restart the build"; \ + rm -f debian/control.old; \ + exit 1; \ + fi + +ubuntu-security: stamps/ubuntu-security-stamp +stamps/ubuntu-security-stamp: +ifeq ($(distribution),Ubuntu) + mkdir -p stamps + for f in debian/patches/ubuntu-security-*.patch ; do \ + echo "Patching $$f..." ; \ + cat "$$f" | patch -p1 ; \ + done + touch $@ +endif + +packaging-files: + for f in debian/*.in debian/patches/*.in; do \ + case "$$f" in debian/control.in) continue; esac; \ + f2=$$(echo $$f | sed 's/JB/$(basename)/;s/\.in$$//'); \ + sed -e 's/@JRE@/$(p_jre)/g' \ + -e 's/@JDK@/$(p_jdk)/g' \ + -e 's/@vendor@/$(Vendor)/g' \ + -e 's/@RELEASE@/$(shortver)/g' \ + -e 's/@basename@/$(basename)/g' \ + -e 's,@TOP@,$(TOP),g' \ + -e 's,@basedir@,$(basedir),g' \ + -e 's,@etcdir@,$(etcdir),g' \ + -e 's,@jdiralias@,$(jdiralias),g' \ + -e 's,@jdirname@,$(jdirname),g' \ + -e 's/@srcname@/$(srcname)/g' \ + -e 's/@jvmarch@/$(jvmarch)/g' \ + -e 's/@archdir@/$(archdir)/g' \ + -e 's/@tag@/$(tag)/g' \ + -e 's/@priority@/$(priority)/g' \ + -e 's/@mantag@/$(mantag)/g' \ + -e 's/@multiarch@/$(DEB_HOST_MULTIARCH)/g' \ + -e 's/@jre_hl_tools@/$(jre_hl_tools_alt)/g' \ + -e 's/@jre_tools@/$(jre_tools_alt)/g' \ + -e 's/@jdk_tools@/$(jdk_tools_alt)/g' \ + -e 's/@corba_tools@/$(corba_tools)/g' \ + -e 's,@j2se_lib@,$(j2se_lib),g' \ + -e 's,@j2se_share@,$(j2se_share),g' \ + -e 's,@java_launcher@,$(java_launcher),g' \ + -e 's,@with_tzdata@,$(with_tzdata),g' \ + -e 's/@cjk_fonts@/$(cjk_fonts)/g' \ + $$f > $$f2; \ + done +ifneq (,$(filter $(DEB_HOST_ARCH), i386 lpia)) +# not yet in OpenJDK +# cat debian/$(p_jre)-i586.menu >> $(d_jre).menu + rm -f debian/$(p_jre)-i586.menu +endif + +icedtea-configure: stamps/icedtea-configure +stamps/icedtea-configure: stamps/ubuntu-security-stamp + -cat /etc/hosts + + mkdir -p bin +ifeq (,$(filter $(DEB_HOST_ARCH), alpha amd64 hppa ppc64 s390x sparc64)) + ( \ + echo '#! /bin/sh'; \ + echo 'if [ -x /usr/bin/linux32 ]; then'; \ + echo ' exec /usr/bin/linux32 /bin/uname "$$@"'; \ + echo 'else'; \ + echo ' exec /bin/uname "$$@"'; \ + echo 'fi'; \ + ) > bin/uname + chmod +x bin/uname + echo "UNAME checks" + uname -a + /bin/uname -a +endif + +ifneq (,$(filter $(distrel),dapper)) + ln -sf /bin/true bin/sha256sum +# Needed for patches/ecj/icedtea.patch + ln -sf /usr/bin/gcj-4.4 bin/gcj +endif + + mkdir -p stamps + mkdir -p build + chmod +x configure + cd build && $(EXTRA_BUILD_ENV) ../configure $(CONFIGURE_ARGS) + + touch $@ + +unpack: stamps/unpack +stamps/unpack: stamps/icedtea-configure + $(MAKE) -f debian/rules packaging-files + + $(MAKE) -C build \ + stamps/extract.stamp +ifeq ($(STAGE1_JAVA),gcj) + $(MAKE) -C build \ + stamps/extract-ecj.stamp +endif + touch $@ + +dist-openjdk: $(OPENJDK_SRC_ZIP) + @echo "downloading openjdk source from hg to create zipfile: $(OPENJDK_SRC_ZIP)" + $(MAKE) -C build $@ + +patch: stamps/patch +stamps/patch: stamps/unpack packaging-files +ifeq ($(STAGE1_JAVA),gcj) + $(MAKE) -C build stamps/patch-ecj.stamp +endif + $(MAKE) -C build stamps/patch.stamp + touch $@ + +ifeq ($(with_check),yes) + ifneq (,$(filter $(DEB_HOST_ARCH), $(filter-out i386, $(hotspot_archs)) alpha ia64 mips mipsel powerpc powerpcspe ppc64 s390 s390x sh4)) + with_mauve_check = $(default_vm) + endif + ifneq (,$(filter $(DEB_HOST_ARCH), $(hotspot_archs) alpha armel armhf ia64 mips mipsel powerpc powerpcspe ppc64 s390 s390x sh4)) + with_jtreg_check = $(default_vm) + endif + + ifneq (,$(filter cacao, $(alternate_vms))) + ifneq (,$(filter $(DEB_HOST_ARCH), amd64 i386 lpia powerpc powerpcspe sparc)) + # only activate after testing; problems on s390 + with_mauve_check += cacao + endif + ifneq (,$(filter $(DEB_HOST_ARCH), alpha amd64 armel armhf i386 lpia mips mipsel powerpc powerpcspe s390)) + # only activate after testing; hangs several tests. + with_jtreg_check += cacao + endif + endif + + ifneq (,$(filter jamvm, $(alternate_vms))) + ifneq (,$(filter $(DEB_HOST_ARCH), amd64 )) + # only activate after testing + with_mauve_check += jamvm + endif + ifneq (,$(filter $(DEB_HOST_ARCH), amd64 i386 lpia)) + # only activate after testing; hangs several tests. + with_jtreg_check += jamvm + endif + endif + + ifneq (,$(filter shark, $(alternate_vms))) + ifneq (,$(filter $(DEB_HOST_ARCH), amd64 i386 lpia powerpc)) + # only activate after testing + with_mauve_check += $(if $(filter $(DEB_HOST_ARCH),$(altshark_archs)),shark,zero) + endif + # shark hangs on ppc64 + ifneq (,$(filter $(DEB_HOST_ARCH), amd64 i386 lpia powerpc)) + # only activate after testing; hangs several tests. + with_jtreg_check += $(if $(filter $(DEB_HOST_ARCH),$(altshark_archs)),shark,zero) + endif + endif + + ifneq (,$(filter zero, $(alternate_vms))) + ifneq (,$(filter $(DEB_HOST_ARCH), amd64 i386 lpia)) + # only activate after testing + with_mauve_check += zero + endif + ifneq (,$(filter $(DEB_HOST_ARCH), amd64 i386 lpia)) + # only activate after testing; hangs several tests. + with_jtreg_check += zero + endif + endif + ifneq (,$(filter $(distrel), dapper)) + with_mauve_check = + endif + with_mauve_check = +endif + +ifneq (,$(filter $(DEB_HOST_ARCH), alpha armel armhf ia64 mips mipsel powerpc powerpcspe ppc64 s390)) + JTREG_OPTIONS = -timeout:3 +endif +ifneq (,$(filter $(DEB_HOST_ARCH), armel armhf)) + JTREG_OPTIONS += -Xmx256M -vmoption:-Xmx256M +endif + +build_stamps = stamps/build +build_stamps += stamps/mauve-check-default stamps/jtreg-check-default +build_stamps += $(if $(filter jamvm, $(alternate_vms)),stamps/mauve-check-jamvm stamps/jtreg-check-jamvm) +#build_stamps += $(if $(filter cacao, $(alternate_vms)),stamps/mauve-check-cacao stamps/jtreg-check-cacao) +ifeq (,$(filter $(distrel),lenny hardy gutsy feisty edgy dapper)) + build_stamps += $(if $(filter zero, $(alternate_vms)),stamps/mauve-check-zero stamps/jtreg-check-zero) + ifneq (,$(filter shark, $(alternate_vms))) + ifneq (,$(filter $(DEB_HOST_ARCH),$(altshark_archs))) + build_stamps += stamps/mauve-check-shark stamps/jtreg-check-shark + else + build_stamps += stamps/mauve-check-zero stamps/jtreg-check-zero + endif + endif +endif + +pre-build: +#ifneq (,$(filter $(DEB_HOST_ARCH),armel)) +# @echo explicitely fail the build for $(DEB_HOST_ARCH), ARM assembler interpreter not yet ported to hs19 +# false +#endif + +build-arch: build +build-indep: build +build: pre-build $(build_stamps) + if [ -f buildwatch.pid ]; then \ + pid=$$(cat buildwatch.pid); \ + kill -1 $$pid || :; sleep 1; kill -9 $$pid || :; \ + fi + rm -f buildwatch.pid + +stamps/build: stamps/patch +ifneq (,$(filter $(DEB_HOST_ARCH), alpha arm armel armhf hppa ia64 m68k mips mipsel powerpc powerpcspe ppc64 s390 s390x sparc)) + sh -c 'sh debian/buildwatch.sh $(CURDIR)/build &' +endif + $(EXTRA_BUILD_ENV) $(MAKE) -C build $(build_target) + if [ -f buildwatch.pid ]; then \ + pid=$$(cat buildwatch.pid); \ + kill -1 $$pid || :; sleep 1; kill -9 $$pid || : ; \ + rm -f buildwatch.pid; \ + fi + touch $@ + +stamps/xvfb-check: + mkdir -p bin + ( \ + echo '#!/bin/sh'; \ + echo '$(with_wm_prefix) $(with_wm) $(with_wm_args) &'; \ + echo 'pid=$$!'; \ + echo 'sleep 3'; \ + echo '"$$@"'; \ + echo 'kill -9 $$pid'; \ + ) > bin/my-jtreg-run + chmod 755 bin/my-jtreg-run +ifeq (,$(wildcard /usr/bin/$(with_wm))) + echo 'xvfb-run -a -e xvfb-run.log -s "-extension GLX" "$$@"' > bin/my-xvfb-run +else + echo 'xvfb-run -a -e xvfb-run.log -s "-extension GLX" my-jtreg-run "$$@"' > bin/my-xvfb-run + ifeq ($(with_wm),twm) + grep -v '^include-menu-defs' /etc/X11/twm/system.twmrc-menu > bin/jtreg.tmwrc + echo RandomPlacement >> bin/jtreg.tmwrc + endif +endif + if ! /bin/sh bin/my-xvfb-run true ; then \ + echo "error running $$(cat bin/my-xvfb-run)"; \ + cat xvfb-run.log; \ + sed -i 's/ -s *"[^"]*"//' bin/my-xvfb-run; \ + if ! /bin/sh bin/my-xvfb-run true ; then \ + echo "error running $$(cat bin/my-xvfb-run)"; \ + cat xvfb-run.log; \ + rm -f bin/my-xvfb-run; \ + fi; \ + fi + if [ -f bin/my-xvfb-run ]; then \ + echo "using $$(cat bin/my-xvfb-run)"; \ + fi + touch $@ + +stamps/mauve-check-default: stamps/build stamps/xvfb-check + $(MAKE) -f debian/rules mauve-run-check VMNAME=$(default_vm) VMARGS= + touch $@ + +stamps/mauve-check-cacao: stamps/xvfb-check + $(MAKE) -f debian/rules mauve-run-check VMNAME=cacao VMARGS='-vmarg -cacao' + touch $@ + +stamps/mauve-check-jamvm: stamps/xvfb-check + $(MAKE) -f debian/rules mauve-run-check VMNAME=jamvm VMARGS='-vmarg -jamvm' + touch $@ + +stamps/mauve-check-shark: stamps/xvfb-check + $(MAKE) -f debian/rules mauve-run-check VMNAME=shark VMARGS='-vmarg -shark' + touch $@ + +stamps/mauve-check-zero: stamps/xvfb-check + $(MAKE) -f debian/rules mauve-run-check VMNAME=zero VMARGS='-vmarg -zero' + touch $@ + +stamps/mauve-build: stamps/build + rm -rf build/mauve + mkdir -p build/mauve +ifeq ($(with_mauve_check),yes) + tar -x -C build -f /usr/src/mauve.tar.gz + cd build/mauve \ + && aclocal \ + && automake \ + && autoconf \ + && PATH=$(CURDIR)/build/$(sdkimg)/bin:$$PATH \ + ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) + PATH=$(CURDIR)/build/$(sdkimg)/bin:$$PATH $(MAKE) -C build/mauve +endif + touch $@ + +stamps/mauve-check: stamps/build stamps/mauve-build stamps/xvfb-check + +mauve-run-check: + rm -rf build/mauve build/mauve-$(VMNAME) +ifneq (,$(filter $(VMNAME), $(with_mauve_check))) + tar -x -C build -f /usr/src/mauve.tar.gz + mv build/mauve build/mauve-$(VMNAME) + cd build/mauve-$(VMNAME) \ + && aclocal \ + && automake \ + && autoconf \ + && PATH=$(CURDIR)/build/$(sdkimg)/bin:$$PATH ./configure \ + --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) + PATH=$(CURDIR)/build/$(sdkimg)/bin:$$PATH $(MAKE) -C build/mauve-$(VMNAME) + + if [ -f bin/my-xvfb-run ]; then \ + cd build/mauve-$(VMNAME) && \ + JAVA_HOME=$(CURDIR)/build/$(sdkimg) \ + PATH=$(CURDIR)/build/$(sdkimg)/bin:$$PATH \ + time /bin/sh $(CURDIR)/bin/my-xvfb-run java Harness \ + -vm $(CURDIR)/build/$(sdkimg)/bin/java \ + $(VMARGS) \ + -file $(CURDIR)/debian/mauve_tests \ + -timeout 30000 2>&1 \ + | tee mauve_output-$(VMNAME); \ + else \ + echo "mauve testsuite not run for this build (xvfb failures)" \ + > build/mauve-$(VMNAME)/mauve_output-$(VMNAME); \ + cat xvfb-run.log >> build/mauve-$(VMNAME)/mauve_output-$(VMNAME); \ + fi + @sleep 5 +else + mkdir -p build/mauve-$(VMNAME) + echo "mauve testsuite not run for this build" \ + > build/mauve-$(VMNAME)/mauve_output-$(VMNAME) +endif + +jtreg_processes = ps x -ww -o pid,ppid,args \ + | awk '$$2 == 1 && $$3 ~ /^$(subst /,\/,/scratch)/' \ + | sed 's,$(CURDIR)/build/$(sdkimg),,g;s,$(CURDIR),,g' +jtreg_pids = ps x --no-headers -ww -o pid,ppid,args \ + | awk '$$2 == 1 && $$3 ~ /^$(subst /,\/,$(CURDIR)/build/$(sdkimg))/ {print $$1}' + +stamps/jtreg-check-default: stamps/build stamps/xvfb-check + $(MAKE) -f debian/rules jtreg-run-check VMNAME=$(default_vm) VMARGS= \ + $(if $(filter $(default_vm),hotspot),TEST_SUITES='hotspot langtools',TEST_SUITES='hotspot langtools') + touch $@ + +stamps/jtreg-check-cacao: stamps/build stamps/xvfb-check + -$(MAKE) -f debian/rules jtreg-run-check VMNAME=cacao VMARGS='-vmoption:-cacao' \ + TEST_SUITES='hotspot langtools' + touch $@ + +stamps/jtreg-check-jamvm: stamps/build stamps/xvfb-check + -ICEDTEA_JTREG_OTHERVM=-othervm \ + $(MAKE) -f debian/rules jtreg-run-check VMNAME=jamvm VMARGS='-vmoption:-jamvm' \ + TEST_SUITES='hotspot langtools' + touch $@ + +stamps/jtreg-check-shark: stamps/build stamps/xvfb-check + -$(MAKE) -f debian/rules jtreg-run-check VMNAME=shark VMARGS='-vmoption:-shark' \ + TEST_SUITES='hotspot langtools' + touch $@ + +stamps/jtreg-check-zero: stamps/build stamps/xvfb-check + -$(MAKE) -f debian/rules jtreg-run-check VMNAME=zero VMARGS='-vmoption:-zero' \ + TEST_SUITES='langtools hotspot' + touch $@ + +jtreg-run-check: +ifneq (,$(filter $(VMNAME), $(with_jtreg_check))) + if [ ! -f build/$(sdkimg)/jre/lib/security/java.security.install ]; then \ + fgrep -v 'sun.security.pkcs11' build/$(sdkimg)/jre/lib/security/java.security \ + > build/$(sdkimg)/jre/lib/security/java.security.test; \ + mv build/$(sdkimg)/jre/lib/security/java.security \ + build/$(sdkimg)/jre/lib/security/java.security.install; \ + mv build/$(sdkimg)/jre/lib/security/java.security.test \ + build/$(sdkimg)/jre/lib/security/java.security; \ + fi + + @echo "BEGIN jtreg" + if [ -f bin/my-xvfb-run ]; then \ + time /bin/sh bin/my-xvfb-run $(MAKE) -C build -k jtregcheck \ + $(if $(TEST_SUITES),TEST_SUITES="$(TEST_SUITES)") \ + ICEDTEA_JTREG_OPTIONS='$(VMARGS) $(JTREG_OPTIONS)' \ + 2>&1 | tee jtreg_output-$(VMNAME); \ + else \ + echo "jtreg harness not run for this build" > jtreg_output-$(VMNAME); \ + cat xvfb-run.log >> jtreg_output-$(VMNAME); \ + fi + @echo "END jtreg" + + if [ -f build/$(sdkimg)/jre/lib/security/java.security.install ]; then \ + mv build/$(sdkimg)/jre/lib/security/java.security.install \ + build/$(sdkimg)/jre/lib/security/java.security; \ + fi + +# for i in check-hotspot.log check-jdk.log check-langtools.log jtreg-summary.log; do \ +# if [ -f build/test/$$i ]; then \ + mv build/test/$$i build/test/$${i%*.log}-$(VMNAME).log; \ +# else \ +# mkdir -p build/test; \ +# cp jtreg_output-$(VMNAME) build/test/$${i%*.log}-$(VMNAME).log; \ +# fi; \ +# done + + for i in check-hotspot.log check-jdk.log check-langtools.log jtreg-summary.log; do \ + if [ -f build/test/$$i ]; then \ + mv build/test/$$i build/test/$${i%*.log}-$(VMNAME).log; \ + else \ + mkdir -p build/test; \ + fi; \ + done + + @echo "BEGIN jtreg-summary-$(VMNAME)" + -cat build/test/jtreg-summary-$(VMNAME).log + @echo "END jtreg-summary-$(VMNAME)" + + : # kill testsuite processes still hanging + @pids=$$($(jtreg_pids)); \ + if [ -n "$$pids" ]; then \ + echo "killing processes..."; \ + $(jtreg_processes); \ + kill -1 $$pids; \ + sleep 2; \ + pids=$$($(jtreg_pids)); \ + if [ -n "$$pids" ]; then \ + echo "trying harder..."; \ + $(jtreg_processes); \ + kill -9 $$pids; \ + sleep 2; \ + fi; \ + else \ + echo "nothing to cleanup"; \ + fi; \ + pids=$$($(jtreg_pids)); \ + if [ -n "$$pids" ]; then \ + echo "leftover processes..."; \ + $(jtreg_processes); \ + fi + + -for i in hotspot langtools jdk; do \ + for t in $$(egrep '^(FAILED|Error)' build/test/check-$$i-$(VMNAME).log | sed 's/.* \(.*\)\.[^.][^.]*$$/\1/'); do \ + echo test/$$i/JTwork/$$t.jtr; \ + done; \ + done > build/test/failed_tests-$(VMNAME).list; \ + tar -C build -c -z -f build/test/failed_tests-$(VMNAME).tar.gz -T build/test/failed_tests-$(VMNAME).list +else + echo "jtreg harness not run for this build" > jtreg_output-$(VMNAME) +endif + +clean: debian-clean + dh_testdir + dh_testroot + rm -rf stamps build build-* + rm -rf autom4te.cache + rm -rf bin + rm -f jtreg_output* xvfb-run.log + rm -f buildwatch.pid + + dh_clean + +debian-clean: + dh_testdir + dh_testroot + dh_clean -k + for f in debian/*.in debian/patches/*.in; do \ + f2=$$(echo $$f | sed 's/JB/$(basename)/;s/\.in$$//'); \ + case "$$f2" in debian/control) continue; esac; \ + rm -f $$f2; \ + done + rm -f debian/*.install debian/*.links debian/*.debhelper.log +ifeq ($(distribution),Ubuntu) + if [ -f stamps/ubuntu-security-stamp ]; then \ + for f in `ls -1 debian/patches/ubuntu-security-*.patch | sort -r` ; do \ + echo "Unpatching $$f..." ; \ + cat "$$f" | patch -p1 -R ; \ + done ; \ + rm -f stamps/ubuntu-security-stamp ; \ + fi +endif + +lib_ext_dirs = common $(sort $(foreach arch,$(arch_map),$(firstword $(subst =,$(SPACE),$(arch))))) +ifeq ($(distribution),Ubuntu) + lib_ext_dirs := $(filter-out arm hppa m68k mips% powerpcspe s390% sh%, $(lib_ext_dirs)) +else + lib_ext_dirs := $(filter-out arm hppa lpia, $(lib_ext_dirs)) +endif + +install: packaging-files + dh_testdir + dh_testroot + dh_clean -k + rm -f debian/*.install debian/*.links + dh_installdirs + + : # install into temporary location + mkdir -p $(d)/$(basedir) + cp -a build/$(sdkimg)/* $(d)/$(basedir)/ + cp -a build/$(jreimg)/man $(d)/$(basedir)/jre/ + chmod -R u+w $(d) + + : # use javaws from icedtea-netx + find $(d) -name 'javaws*' | xargs -r rm -f + + : # install default jvm config file + cp debian/jvm.cfg-default $(d)/$(basedir)/jre/lib/$(archdir)/ + + : # add extra symlinks for header files + ln -sf linux/jni_md.h $(d)/$(basedir)/include/jni_md.h + ln -sf linux/jawt_md.h $(d)/$(basedir)/include/jawt_md.h + +ifeq ($(with_tzdata),yes) + : # use the timezone files from tzdata-java + rm -rf $(d)/$(basedir)/jre/lib/zi +endif + +ifneq (,$(filter $(distrel),dapper)) + : # include the freetype library for the dapper build + cp -p /usr/lib/libfreetype.so.6.* $(d)/$(basedir)/jre/lib/$(archdir)/ + cd $(d)/$(basedir)/jre/lib/$(archdir) && ln -s libfreetype.so.6.* libfreetype.so.6 +endif + + : # compress manpages + find $(d)/$(basedir)/man $(d)/$(basedir)/jre/man -type f ! -type l \ + | xargs gzip -9v -n + + : # replace common files in jdk and jre by symlinks + @cd $(d)/$(basedir); \ + for i in `find jre -type f`; do \ + i2=$${i#jre/*}; \ + if [ -f $$i2 ]; then \ + if cmp -s $$i $$i2; then \ + : ; \ + else \ + echo "XXX: differing files"; \ + md5sum $$i $$i2; \ + fi; \ + else \ + continue; \ + fi; \ + d=$$(echo ./$$i2 | sed -r 's,[^/]+/,../,g;s,/[^/]+$$,,;s,\.\.$$,,'); \ + echo " symlink $$i2 -> $$d$$i"; \ + ln -sf $$d$$i $$i2; \ + done + + mkdir -p $(d)/$(etcdir)/security + mkdir -p $(d)/$(etcdir)/management + mkdir -p $(d)/$(etcdir)/images/cursors + + : # rename templates (comments only) to config files, + : # and move to /$(etcdir) + for i in \ + management/jmxremote.password \ + management/snmp.acl; \ + do \ + mv $(d)/$(basedir)/jre/lib/$$i.template $(d)/$(etcdir)/$$i; \ + done + +ifeq ($(with_bridge),atk) + cp -p debian/accessibility-atk.properties \ + $(d)/$(basedir)/jre/lib/accessibility.properties +else + cp -p debian/accessibility.properties $(d)/$(basedir)/jre/lib/ +endif + cp -p debian/swing.properties $(d)/$(basedir)/jre/lib/ + +ifneq (,$(pkg_certs)) + rm -f $(d)/$(basedir)/jre/lib/security/cacerts +endif + + grep -v '^nssLibraryDirectory' $(d)/$(basedir)/jre/lib/security/nss.cfg \ + > $(d)/$(basedir)/jre/lib/security/nss.cfg.new + mv -f $(d)/$(basedir)/jre/lib/security/nss.cfg.new \ + $(d)/$(basedir)/jre/lib/security/nss.cfg + + rm -f $(d)/$(basedir)/jre/lib/security/java.security.old + + : # move config files to $(etcdir) and symlink them. + for i in \ + accessibility.properties \ + calendars.properties \ + content-types.properties \ + images/cursors/cursors.properties \ + logging.properties \ + sound.properties \ + flavormap.properties \ + net.properties \ + psfontj2d.properties \ + psfont.properties.ja \ + swing.properties \ + tz.properties \ + management/jmxremote.access \ + management/management.properties \ + security/java.policy \ + security/java.security \ + $$([ -f $(d)/$(basedir)/jre/lib/security/nss.cfg ] && echo security/nss.cfg) \ + $(if $(findstring ca-cert,$(pkg_certs)),,security/cacerts); \ + do \ + mv $(d)/$(basedir)/jre/lib/$$i $(d)/$(etcdir)/$$i; \ + done + mv $(d)/$(basedir)/jre/lib/$(archdir)/jvm.cfg \ + $(d)/$(etcdir)/ +ifneq (,$(filter $(DEB_HOST_ARCH),$(jamvm_defaults))) + grep '^[# ]' $(d)/$(etcdir)/jvm.cfg \ + > $(d)/$(etcdir)/jvm.cfg.new + grep 'jamvm' $(d)/$(etcdir)/jvm.cfg \ + >> $(d)/$(etcdir)/jvm.cfg.new + egrep -v '^[# ]|jamvm' $(d)/$(etcdir)/jvm.cfg \ + >> $(d)/$(etcdir)/jvm.cfg.new + mv $(d)/$(etcdir)/jvm.cfg.new $(d)/$(etcdir)/jvm.cfg +endif + + mv $(d)/$(basedir)/jre/lib/fontconfig.Ubuntu.properties.src \ + $(d)/$(etcdir)/fontconfig.properties + + : # remove files which we do not want to distribute + rm -f $(d)/$(basedir)/jre/lib/fontconfig*.properties.src + rm -f $(d)/$(basedir)/jre/lib/fontconfig*.bfc + rm -f $(d)/$(basedir)/jre/lib/$(archdir)/*/classes.jsa + + : # remove empty directories + rmdir $(d)/$(basedir)/jre/lib/management + rmdir $(d)/$(basedir)/jre/lib/applet + rmdir $(d)/$(basedir)/jre/lib/security + + : # TODO: why do we provide a custom font.properties.ja? + : # cp -p debian/font.properties.ja $(d_jbin)/$(etcdir)/. +# cp debian/font.properties.wgy_zenhai \ +# $(d)/$(etcdir)/font.properties.ja + + + : # now move things to the packages. it is so ****** to create + : # .install files first. dh_movefiles did do the job perfectly + + : # $(p_jrehl).install / $(p_jre).install + ( \ + echo 'etc'; \ + echo '$(basedir)/jre/lib/jexec'; \ + echo '$(basedir)/jre/lib/rt.jar'; \ + echo '$(basedir)/jre/man/ja'; \ + echo '$(basedir)/man/ja'; \ + echo '$(basedir)/bin/java-rmi.cgi'; \ + ) > debian/$(p_jrehl).install +ifneq (,$(DEB_HOST_MULTIARCH)) + ( \ + echo '$(basedir)/jre/lib/meta-index'; \ + echo '$(basedir)/jre/lib/ext/meta-index'; \ + ) >> debian/$(p_jrehl).install +endif + $(RM) debian/$(p_jre).install + + cd $(CURDIR)/$(d); \ + for i in $(basedir)/jre/{bin,man/man1,man/ja_JP.eucJP/man1}/*; do \ + case "$$i" in \ + */policytool*) echo $$i >> ../$(p_jre).install;; \ + *) echo $$i >> ../$(p_jrehl).install; \ + esac; \ + done + + cd $(CURDIR)/$(d); \ + for i in $(basedir)/{bin,man/man1,man/ja_JP.eucJP/man1}/*; do \ + [ -h $$i ] || continue; \ + case "$$i" in \ + */policytool*) echo $$i >> ../$(p_jre).install;; \ + *) echo $$i >> ../$(p_jrehl).install; \ + esac; \ + done; \ + + cd $(CURDIR)/$(d); \ + for i in $(basedir)/jre/lib/$(archdir)/*; do \ + case "$$i" in \ + */libsplashscreen.so|*/libjsoundalsa.so|$(if $(with_pulse),*/libpulse-java.so|)*/xawt) echo $$i >> ../$(p_jre).install;; \ + */cacao) echo $$i >> ../$(p_jrec).install;; \ + */jamvm) echo $$i >> ../$(p_jrej).install;; \ + */zero|*/shark) echo $$i >> ../$(p_jrez).install;; \ + *) echo $$i >> ../$(p_jrehl).install; \ + esac; \ + done + + : # $(p_lib).install + ( \ + echo '$(basedir)/jre/ASSEMBLY_EXCEPTION $(commonbasedir)/jre/'; \ + echo '$(basedir)/jre/THIRD_PARTY_README $(commonbasedir)/jre/'; \ + cd $(d); \ + for i in $(basedir)/jre/lib/*; do \ + case "$$i" in \ + */$(archdir)|*/jexec|*/rt.jar|*/security$(if $(DEB_HOST_MULTIARCH),|*/meta-index)) \ + continue; \ + esac; \ + echo $$i $(commonbasedir)/jre/lib/; \ + done; \ + ) > debian/$(p_lib).install + + : # $(p_jdk).install + ( \ + echo '$(basedir)/include'; \ + echo '$(basedir)/lib'; \ + echo '$(basedir)/LICENSE'; \ + echo '$(basedir)/ASSEMBLY_EXCEPTION'; \ + echo '$(basedir)/THIRD_PARTY_README'; \ + cd $(d); \ + for i in $(basedir)/{bin,man/man1,man/ja_JP.eucJP/man1}/*; do \ + [ -h $$i -o "$$i" = $(basedir)/bin/java-rmi.cgi ] && continue; \ + echo $$i; \ + done; \ + ) > debian/$(p_jdk).install + + : # $(p_src).install + ( \ + echo '$(basedir)/src.zip $(commonbasedir)/'; \ + ) > debian/$(p_src).install + + : # move demos and samples, create symlinks for $(p_demo) + mkdir -p $(d)/usr/share/doc/$(p_jrehl)/demo + for i in $(d)/$(basedir)/demo/*; do \ + b=$$(basename $$i); \ + case "$$i" in \ + */jvmti) \ + echo $(basedir)/demo/$$b usr/share/doc/$(p_jrehl)/demo/$$b >> $(d_demo).links;; \ + *) \ + mv $$i $(d)/usr/share/doc/$(p_jrehl)/demo/$$b; \ + echo usr/share/doc/$(p_jrehl)/demo/$$b $(basedir)/demo/$$b >> $(d_demo).links;; \ + esac; \ + done + mv $(d)/$(basedir)/sample $(d)/usr/share/doc/$(p_jrehl)/examples + echo usr/share/doc/$(p_jrehl)/examples $(basedir)/sample >> $(d_demo).links + echo usr/share/doc/$(p_jre) usr/share/doc/$(p_demo) >> $(d_demo).links + + : # $(p_demo).install + ( \ + echo '$(basedir)/demo'; \ + echo 'usr/share/doc/$(p_jrehl)/examples'; \ + echo 'usr/share/doc/$(p_jrehl)/demo'; \ + ) > debian/$(p_demo).install + + dh_install --sourcedir=debian/tmp --fail-missing -XLICENSE + +ifneq (,$(DEB_HOST_MULTIARCH)) + rm -f $(d_lib)/$(commonbasedir)/jre/lib/ext/meta-index +endif + + : # give all permissions to cross-VM extension directory + sed -i \ + -e '/permission java\.security\.AllPermission;/,/};/c\' \ + -e ' permission java.security.AllPermission;\' \ + -e '};\' \ + -e '\' \ + $(if $(DEB_HOST_MULTIARCH),$(foreach i, $(lib_ext_dirs), \ + -e 'grant codeBase "file:/$(TOP)/java-$(shortver)-$(origin)-$(i)/jre/lib/ext/*" {\' \ + -e ' permission java.security.AllPermission;\' \ + -e '};\')) \ + -e '\' \ + -e '// Comment this out if you want to give all permissions to the\' \ + -e '// Debian Java repository too:\' \ + -e '//grant codeBase "file:/usr/share/java/repository/-" {\' \ + -e '// permission java.security.AllPermission;\' \ + -e '//};\' \ + -e '' \ + $(d_jrehl)/$(security)/java.policy +# 'make Emacs Makefile mode happy + + dh_installdirs -p$(p_jrehl) \ + usr/share/doc/$(p_jrehl) \ + usr/share/binfmts + + dh_installdirs -p$(p_jre) \ + usr/share/applications \ + usr/share/application-registry \ + usr/share/mime-info \ + usr/share/pixmaps + + : # add GNOME stuff + cp -p debian/$(basename)-policytool.desktop \ + $(d_jre)/usr/share/applications/ + cp -p debian/$(basename)-java.desktop \ + $(d_jre)/usr/share/applications/ + + for i in archive; do \ + cp debian/$(basename)-$$i.applications \ + $(d_jre)/usr/share/application-registry/; \ + cp debian/$(basename)-$$i.keys $(d_jre)/usr/share/mime-info/; \ + cp debian/$(basename)-$$i.mime $(d_jre)/usr/share/mime-info/; \ + done + + cp -p debian/sun_java.xpm \ + $(d_jre)/usr/share/pixmaps/$(basename).xpm + + mkdir -p $(d_demo)/usr/share/pixmaps + cp -p debian/sun_java_app.xpm \ + $(d_demo)/usr/share/pixmaps/$(basename)-app.xpm + + : # install icons + for i in 16 24 32 48; do \ + install -D -m 644 -p build/openjdk/jdk/src/solaris/classes/sun/awt/X11/java-icon$${i}.png \ + $(d_jre)/usr/share/icons/hicolor/$${i}x$${i}/apps/$(basename).png; \ + done + + : # create docdir symlinks for $(p_jrehl) + ( \ + echo usr/share/doc/$(p_jrehl) $(basedir)/docs; \ + ) > $(d_jrehl).links +ifneq (,$(DEB_HOST_MULTIARCH)) + echo '/$(basedir) /usr/lib/jvm/$(jdirname)' >> $(d_jrehl).links +endif + + : # create docdir symlinks for $(p_jre) + ( \ + echo usr/share/doc/$(p_jrehl) usr/share/doc/$(p_jre); \ + ) > $(d_jre).links + +ifneq (,$(filter shark zero, $(alternate_vms))) + : # create docdir symlinks for $(p_jrez) + ( \ + echo usr/share/doc/$(p_jrehl) usr/share/doc/$(p_jrez); \ + ) > $(d_jrez).links +endif + + : # create docdir symlinks for $(p_src) + ( \ + echo usr/share/doc/$(p_jre) usr/share/doc/$(p_src); \ + ) > $(d_src).links + + : # create docdir symlinks for $(p_jdk) + ( \ + echo usr/share/doc/$(p_jre) usr/share/doc/$(p_jdk); \ + ) > $(d_jdk).links +# doesn't work, no package dependency +ifneq (,$(DEB_HOST_MULTIARCH)) + echo '$(commonbasedir)/src.zip $(basedir)/src.zip' >> $(d_jdk).links +endif + + : # create docdir symlinks for $(p_lib) + ( \ + echo usr/share/doc/$(p_jrehl) usr/share/doc/$(p_lib); \ + ) > $(d_lib).links + + : # create docdir symlinks for $(p_dbg) + ( \ + echo usr/share/doc/$(p_jrehl) usr/share/doc/$(p_dbg); \ + ) > $(d_dbg).links + +ifeq ($(with_bridge),atk) + : # create links for the atk wrapper + echo "usr/share/java/java-atk-wrapper.jar $(basedir)/jre/lib/ext/java-atk-wrapper.jar" \ + >> $(d_jre).links + echo "usr/lib$(multiarch_dir)/jni/libatk-wrapper.so $(basedir)/jre/lib/ext/libatk-wrapper.so" \ + >> $(d_jre).links +else ifeq ($(with_bridge),yes) + : # create links for the gnome accessibility bridge + echo "usr/share/java/gnome-java-bridge.jar $(basedir)/jre/lib/ext/gnome-java-bridge.jar" \ + >> $(d_jre).links + ifeq ($(with_jni_bridge),yes) + echo "usr/lib$(multiarch_dir)/jni/libjava-access-bridge-jni.so $(basedir)/jre/lib/ext/libjava-access-bridge-jni.so" \ + >> $(d_jre).links + endif +endif + +ifeq ($(with_tzdata),yes) + echo usr/share/javazi $(basedir)/jre/lib/zi \ + >> $(if $(DEB_HOST_MULTIARCH),$(d_jrehl),$(d_lib)).links +endif + + : # create links for the config files + find $(d_jrehl)/$(etcdir) -type f ! -name jvm.cfg \ + -printf "$(etcdir)/%P $(basedir)/jre/lib/%P\n" >> $(d_jrehl).links +ifneq (,$(DEB_HOST_MULTIARCH)) + mv $(d_jrehl)/$(etcdir)/jvm.cfg \ + $(d_jrehl)/$(etcdir)/jvm-$(DEB_HOST_ARCH).cfg + ( \ + echo "$(etcdir)/jvm-$(DEB_HOST_ARCH).cfg $(basedir)/jre/lib/$(archdir)/jvm.cfg"; \ + ) >> $(d_jrehl).links +else + ( \ + echo "$(etcdir)/jvm.cfg $(basedir)/jre/lib/$(archdir)/jvm.cfg"; \ + ) >> $(d_jrehl).links +endif +ifneq (,$(pkg_certs)) + echo "etc/ssl/certs/java/cacerts $(basedir)/jre/lib/security/cacerts" \ + >> $(d_jrehl).links +endif + + @echo JRE_HL_TOOLS: $(jre_hl_tools_alt) jexec + @echo JRE_TOOLS: $(jre_tools_alt) + @echo JDK_TOOLS: $(jdk_tools_alt) + ( \ + echo 'name=$(jdirname)'; \ + echo 'alias=$(jdiralias)'; \ + echo 'priority=$(priority)'; \ + echo 'section=main'; \ + echo ''; \ + for i in $(jre_hl_tools_alt); do \ + echo "hl $$i /$(basedir)/jre/bin/$$i"; \ + done; \ + echo "hl jexec /$(basedir)/jre/lib/jexec"; \ + for i in $(jre_tools_alt); do \ + echo "jre $$i /$(basedir)/jre/bin/$$i"; \ + done; \ + for i in $(jdk_tools_alt); do \ + echo "jdk $$i /$(basedir)/bin/$$i"; \ + done; \ + for d in $(browser_plugin_dirs); do \ + echo "plugin $$d-javaplugin.so /$(basedir)/jre/lib/$(archdir)/$(plugin_name)"; \ + done; \ + ) > $(d_jrehl)/$(TOP)/.$(jdiralias).jinfo + + ( \ + echo 'package $(basename)'; \ + echo 'interpreter /usr/bin/jexec'; \ + echo 'magic PK\x03\x04'; \ + ) > $(d_jrehl)/$(basedir)/jre/lib/jar.binfmt + + : # another jvm symlink + ln -sf $(jdirname) $(d_jrehl)/usr/lib/jvm/$(jdiralias) + +ifeq ($(with_systemtap),yes) + : # systemtap support + mkdir -p $(d_jrehl)/usr/share/systemtap/tapset + cp -p build/tapset/hotspot.stp $(d_jrehl)/usr/share/systemtap/tapset/ +endif + + : # Install stuff to generate font config and timezone files. + mkdir -p $(d_lib)/$(commonbasedir)/jre/lib + cp -p build/openjdk.build/btjars/compilefontconfig.jar \ + $(d_lib)/$(commonbasedir)/jre/lib/ + cp -p build/openjdk.build/btjars/javazic.jar \ + $(d_lib)/$(commonbasedir)/jre/lib/ + +ifneq (,$(DEB_HOST_MULTIARCH)) + : # create symlinks for the files in $(p_lib) + find $(d_lib)/$(commonbasedir) \ + ! -name zi ! -name meta-index \( -name cmm -prune -o -type f \) \ + -printf "$(commonbasedir)/%P $(basedir)/%P\n" >> $(d_jrehl).links + ifeq ($(with_tzdata),yes) + echo usr/share/javazi $(basedir)/jre/lib/zi \ + >> $(d_jrehl).links + endif +endif + + : # install lintian overrides + for FILE in debian/*.overrides; do \ + PKG=`basename $$FILE .overrides`; \ + install -D -m644 $$FILE debian/$$PKG/usr/share/lintian/overrides/$$PKG; \ + done + +nodocs = $(if $(findstring nodocs, $(DEB_BUILD_OPTIONS)),-N$(p_doc)) +nojrec = $(if $(filter cacao, $(alternate_vms)),,-N$(p_jrec)) +nojrej = $(if $(filter jamvm, $(alternate_vms)),,-N$(p_jrej)) +nojrez = $(if $(filter shark zero, $(alternate_vms)),,-N$(p_jrez)) + +# Build architecture independant packages +binary-indep: build install + dh_testdir + dh_testroot +ifeq ($(with_docs),yes) + dh_installchangelogs -p$(p_doc) + dh_installdocs -p$(p_doc) + mkdir -p $(d_doc)/usr/share/doc/$(p_jrehl) + for i in build/openjdk.build/docs/*; do \ + [ -e $$i ] || continue; \ + b=$$(basename $$i); \ + cp -a $$i $(d_doc)/usr/share/doc/$(p_jrehl)/; \ + ln -sf ../$(p_jrehl)/$$b $(d_doc)/usr/share/doc/$(p_doc)/$$b; \ + done +endif +# FIXME: desktop and menu files not ready for multiarch. #658321 +ifeq (,$(DEB_HOST_MULTIARCH)) + dh_installmenu -i $(nodocs) +endif + -dh_icons -i $(nodocs) || dh_iconcache -i $(nodocs) +# dh_installdebconf -i $(nodocs) + dh_link -i $(nodocs) + dh_compress -i $(nodocs) -Xexamples -Xdemos -Xpackage-list + dh_fixperms -i $(nodocs) + dh_installdeb -i $(nodocs) + dh_gencontrol -i $(nodocs) -- $(control_vars) + dh_md5sums -i $(nodocs) + dh_builddeb -i $(nodocs) $(bd_options) + +absarchdir = $(CURDIR)/$(d_jrehl)/$(basedir)/jre/lib/$(archdir) +shlibdeps_ld_path =$(absarchdir):$(absarchdir)/client:$(absarchdir)/server:$(absarchdir)/native_threads$(if $(xulrunner_depends),:$(shell pkg-config --libs-only-L libxul | sed 's/^-L//;s/-devel//;s,/lib *$$,,')) + +# pass vm name as first argument +define install_test_results + mkdir -p $(d_jdk)/usr/share/doc/$(p_jrehl)/test-$(DEB_HOST_ARCH) + -cp build/mauve-$(1)/mauve_output-$(1) \ + $(d_jdk)/usr/share/doc/$(p_jrehl)/test-$(DEB_HOST_ARCH)/mauve_output-$(1).log + -cp jtreg_output-$(1) \ + $(d_jdk)/usr/share/doc/$(p_jrehl)/test-$(DEB_HOST_ARCH)/jtreg_output-$(1).log + -cp build/test/jtreg-summary-$(1).log build/test/check-*-$(1).log \ + $(d_jdk)/usr/share/doc/$(p_jrehl)/test-$(DEB_HOST_ARCH)/ + -cp build/test/failed_tests-$(1).tar.gz \ + $(d_jdk)/usr/share/doc/$(p_jrehl)/test-$(DEB_HOST_ARCH)/failed_tests-$(1).tar.gz +endef + +# Build architecture dependant packages +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs -p$(p_jrehl) + dh_installdocs -p$(p_jrehl) \ + debian/JAVA_HOME \ + debian/README.alternatives \ + debian/README.Debian + for i in AUTHORS NEWS README; do \ + cp -p $$i $(d_jrehl)/usr/share/doc/$(p_jrehl)/$$i.IcedTea; \ + done + $(call install_test_results,$(default_vm)) + +ifneq (,$(filter cacao, $(alternate_vms))) + dh_installchangelogs -p$(p_jrec) + dh_installdocs -p$(p_jrec) + $(call install_test_results,cacao) +endif +ifneq (,$(filter jamvm, $(alternate_vms))) + dh_installchangelogs -p$(p_jrej) + dh_installdocs -p$(p_jrej) + $(call install_test_results,jamvm) +endif +ifneq (,$(filter zero, $(alternate_vms))) + $(call install_test_results,zero) +endif + dh_desktop -s $(nodemo) $(nojrec) $(nojrej) $(nojrez) +# FIXME: desktop and menu files not ready for multiarch. #658321 +ifeq (,$(DEB_HOST_MULTIARCH)) + dh_installmenu -s $(nodemo) $(nojrec) $(nojrej) $(nojrez) +endif + -dh_icons -s $(nodemo) $(nojrec) $(nojrej) $(nojrez) \ + || dh_iconcache -s $(nodemo) $(nojrec) $(nojrej) $(nojrez) +# dh_installdebconf -s $(nodemo) $(nojrec) $(nojrej) $(nojrez) + dh_link -s $(nodemo) $(nojrec) $(nojrej) $(nojrez) + dh_strip -s $(nodemo) $(nojrec) $(nojrej) $(nojrez) \ + -Xlibjvm.so --dbg-package=$(p_dbg) +ifeq (,$(findstring nostrip, $(DEB_BUILD_OPTIONS))) + set -e; \ + for i in {$(d_jrehl),$(d_jrec),$(d_jrez)}/$(basedir)/jre/lib/$(archdir)/*/libjvm.so; do \ + id=$$(echo $$i | sed -r 's,debian/[^/]+,$(d_dbg)/usr/lib/debug,'); \ + [ -f $$i ] || continue; \ + echo strip $$i; \ + mkdir -p $$(dirname $$id); \ + objcopy --only-keep-debug $$i $$id; \ + chmod 644 $$id; \ + strip --remove-section=.comment --remove-section=.note \ + --strip-debug $$i; \ + objcopy --add-gnu-debuglink $$id $$i; \ + done +endif + + dh_compress -s $(nodemo) $(nojrec) $(nojrej) $(nojrez) -Xexamples -Xdemos -Xpackage-list + dh_fixperms -s $(nodemo) $(nojrec) $(nojrej) $(nojrez) + dh_makeshlibs -p$(p_jrehl) -p$(p_jre) + dh_shlibdeps -s $(nodemo) $(nojrec) $(nojrej) $(nojrez) -L $(p_jrehl) \ + -l$(shlibdeps_ld_path) \ + -- +ifneq (,$(filter $(distrel),dapper)) + sed -i 's/, *libfreetype6[^,]*//' debian/$(p_jrehl).substvars +endif + dh_installdeb -s $(nodemo) $(nojrec) $(nojrej) $(nojrez) + dh_gencontrol -s $(nodemo) $(nojrec) $(nojrej) $(nojrez) \ + -- $(control_vars) + dh_md5sums -s $(nodemo) $(nojrec) $(nojrej) $(nojrez) + dh_builddeb -s $(nodemo) $(nojrec) $(nojrej) $(nojrez) #$(bd_options) + +binary: binary-arch binary-indep +.PHONY: build clean binary-indep binary-arch binary install packaging-files --- openjdk-6-6b27-1.12.6.orig/debian/JB-jre.postinst.in +++ openjdk-6-6b27-1.12.6/debian/JB-jre.postinst.in @@ -0,0 +1,67 @@ +#!/bin/sh + +set -e + +multiarch=@multiarch@ +priority=@priority@ +basedir=/@basedir@ +mandir=$basedir/jre/man +srcext=1.gz +dstext=1.gz +jre_tools='@jre_tools@' + +case "$1" in +configure) + if [ -d /usr/share/doc/@basename@-jre ] && [ ! -h /usr/share/doc/@basename@-jre ]; then + rm -rf /usr/share/doc/@basename@-jre + ln -sf @basename@-jre-headless /usr/share/doc/@basename@-jre; + fi + + if [ -z "$2" ]; then + update_alternatives=y + fi + if [ -n "$multiarch" ] && [ -n "$2" ]; then + for i in $jre_tools; do + if [ -z "$(update-alternatives --list $i 2>/dev/null | grep ^$basedir/)" ]; then + update_alternatives=y + break + fi + done + fi + + if [ "$update_alternatives" = y ]; then + if [ -n "$multiarch" ] && [ "$DPKG_MAINTSCRIPT_ARCH" != $(dpkg --print-architecture) ]; then + priority=$(expr $priority - 1) + fi + for i in $jre_tools; do + unset slave1 slave2 || true + if [ -e $mandir/man1/$i.$srcext ]; then + slave1="--slave \ + /usr/share/man/man1/$i.$dstext \ + $i.$dstext \ + $mandir/man1/$i.$srcext" + fi + # disabled + if false && [ -e $mandir/ja/man1/$i.$srcext ]; then + slave2="--slave \ + /usr/share/man/ja/man1/$i.$dstext \ + ${i}_ja.$dstext \ + $mandir/ja/man1/$i.$srcext" + fi + update-alternatives \ + --install \ + /usr/bin/$i \ + $i \ + $basedir/jre/bin/$i \ + $priority \ + $slave1 $slave2 + done + fi # update alternatives + + ;; + +esac + +#DEBHELPER# + +exit 0 --- openjdk-6-6b27-1.12.6.orig/debian/font.properties.ja.wgy_zenhai +++ openjdk-6-6b27-1.12.6/debian/font.properties.ja.wgy_zenhai @@ -0,0 +1,244 @@ +# @(#)font.properties.ja.linux 1.7 02/03/07 +# +# Copyright 2002 Sun Microsystems, Inc. All rights reserved. +# + +# Component Font Mappings +# +serif.0=-b&h-lucidabright-medium-r-normal--*-%d-*-*-p-*-iso8859-1 +serif.1=-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 +serif.2=-sazanami-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +serif.italic.0=-b&h-lucidabright-medium-i-normal--*-%d-*-*-p-*-iso8859-1 +serif.italic.1=-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 +serif.italic.2=-sazanami-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +serif.bold.0=-b&h-lucidabright-demibold-r-normal--*-%d-*-*-p-*-iso8859-1 +serif.bold.1=-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 +serif.bold.2=-sazanami-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +serif.bolditalic.0=-b&h-lucidabright-demibold-i-normal--*-%d-*-*-p-*-iso8859-1 +serif.bolditalic.1=-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 +serif.bolditalic.2=-sazanami-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +sansserif.0=-b&h-lucidasans-medium-r-normal-sans-*-%d-*-*-p-*-iso8859-1 +sansserif.1=-kochi-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 +sansserif.2=-sazanami-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +sansserif.italic.0=-b&h-lucidasans-medium-i-normal-sans-*-%d-*-*-p-*-iso8859-1 +sansserif.italic.1=-kochi-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 +sansserif.italic.2=-sazanami-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +sansserif.bold.0=-b&h-lucidasans-bold-r-normal-sans-*-%d-*-*-p-*-iso8859-1 +sansserif.bold.1=-kochi-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 +sansserif.bold.2=-sazanami-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +sansserif.bolditalic.0=-b&h-lucidasans-bold-i-normal-sans-*-%d-*-*-p-*-iso8859-1 +sansserif.bolditalic.1=-kochi-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 +sansserif.bolditalic.2=-sazanami-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +monospaced.0=-b&h-lucidatypewriter-medium-r-normal-sans-*-%d-*-*-m-*-iso8859-1 +monospaced.1=-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 +monospaced.2=-sazanami-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +monospaced.italic.0=-b&h-lucidatypewriter-medium-r-normal-sans-*-%d-*-*-m-*-iso8859-1 +monospaced.italic.1=-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 +monospaced.italic.2=-sazanami-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +monospaced.bold.0=-b&h-lucidatypewriter-bold-r-normal-sans-*-%d-*-*-m-*-iso8859-1 +monospaced.bold.1=-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 +monospaced.bold.2=-sazanami-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +monospaced.bolditalic.0=-b&h-lucidatypewriter-bold-r-normal-sans-*-%d-*-*-m-*-iso8859-1 +monospaced.bolditalic.1=-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 +monospaced.bolditalic.2=-sazanami-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +dialog.0=-b&h-lucidasans-medium-r-normal-sans-*-%d-*-*-p-*-iso8859-1 +dialog.1=-kochi-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 +dialog.2=-sazanami-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +dialog.italic.0=-b&h-lucidasans-medium-i-normal-sans-*-%d-*-*-p-*-iso8859-1 +dialog.italic.1=-kochi-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 +dialog.italic.2=-sazanami-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +dialog.bold.0=-b&h-lucidasans-bold-r-normal-sans-*-%d-*-*-p-*-iso8859-1 +dialog.bold.1=-kochi-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 +dialog.bold.2=-sazanami-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +dialog.bolditalic.0=-b&h-lucidasans-bold-i-normal-sans-*-%d-*-*-p-*-iso8859-1 +dialog.bolditalic.1=-kochi-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 +dialog.bolditalic.2=-sazanami-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +dialoginput.0=-b&h-lucidatypewriter-medium-r-normal-sans-*-%d-*-*-m-*-iso8859-1 +dialoginput.1=-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 +dialoginput.2=-sazanami-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +dialoginput.italic.0=-b&h-lucidatypewriter-medium-r-normal-sans-*-%d-*-*-m-*-iso8859-1 +dialoginput.italic.1=-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 +dialoginput.italic.2=-sazanami-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +dialoginput.bold.0=-b&h-lucidatypewriter-bold-r-normal-sans-*-%d-*-*-m-*-iso8859-1 +dialoginput.bold.1=-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 +dialoginput.bold.2=-sazanami-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +dialoginput.bolditalic.0=-b&h-lucidatypewriter-bold-r-normal-sans-*-%d-*-*-m-*-iso8859-1 +dialoginput.bolditalic.1=-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 +dialoginput.bolditalic.2=-sazanami-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +# Missing Glyph Character +# +default.char=274f + +# Component Font Character Encodings +# +fontcharset.serif.0=sun.io.CharToByteISO8859_1 +fontcharset.serif.1=sun.awt.motif.CharToByteX11JIS0208 +fontcharset.serif.2=sun.awt.motif.CharToByteX11JIS0208 + +fontcharset.sansserif.0=sun.io.CharToByteISO8859_1 +fontcharset.sansserif.1=sun.awt.motif.CharToByteX11JIS0208 +fontcharset.sansserif.2=sun.awt.motif.CharToByteX11JIS0208 + +fontcharset.monospaced.0=sun.io.CharToByteISO8859_1 +fontcharset.monospaced.1=sun.awt.motif.CharToByteX11JIS0208 +fontcharset.monospaced.2=sun.awt.motif.CharToByteX11JIS0208 + +fontcharset.dialog.0=sun.io.CharToByteISO8859_1 +fontcharset.dialog.1=sun.awt.motif.CharToByteX11JIS0208 +fontcharset.dialog.2=sun.awt.motif.CharToByteX11JIS0208 + +fontcharset.dialoginput.0=sun.io.CharToByteISO8859_1 +fontcharset.dialoginput.1=sun.awt.motif.CharToByteX11JIS0208 +fontcharset.dialoginput.2=sun.awt.motif.CharToByteX11JIS0208 + +# Exclusion Ranges +# + +# XFontSet Information +# +fontset.serif.plain=\ +-sony-fixed-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0,\ +-b&h-lucidabright-medium-r-normal--*-%d-*-*-p-*-iso8859-1,\ +-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0,\ +-sazanami-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +fontset.serif.italic=\ +-sony-fixed-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0,\ +-b&h-lucidabright-medium-i-normal--*-%d-*-*-p-*-iso8859-1,\ +-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0,\ +-sazanami-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +fontset.serif.bold=\ +-sony-fixed-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0,\ +-b&h-lucidabright-demibold-r-normal--*-%d-*-*-p-*-iso8859-1,\ +-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0,\ +-sazanami-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +fontset.serif.bolditalic=\ +-sony-fixed-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0,\ +-b&h-lucidabright-demibold-i-normal--*-%d-*-*-p-*-iso8859-1,\ +-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0,\ +-sazanami-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +fontset.sansserif.plain=\ +-sony-fixed-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0,\ +-b&h-lucida-medium-i-normal-sans-*-%d-*-*-p-*-iso8859-1,\ +-kochi-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0,\ +-sazanami-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +fontset.sansserif.italic=\ +-sony-fixed-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0,\ +-b&h-lucida-medium-i-normal-sans-*-%d-*-*-p-*-iso8859-1,\ +-kochi-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0,\ +-sazanami-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +fontset.sansserif.bold=\ +-sony-fixed-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0,\ +-b&h-lucida-bold-r-normal-sans-*-%d-*-*-p-*-iso8859-1,\ +-kochi-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0,\ +-sazanami-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +fontset.sansserif.bolditalic=\ +-sony-fixed-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0,\ +-b&h-lucida-bold-i-normal-sans-*-%d-*-*-p-*-iso8859-1,\ +-kochi-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0,\ +-sazanami-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +fontset.monospaced.plain=\ +-sony-fixed-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0,\ +-b&h-lucidatypewriter-medium-r-normal-sans-*-%d-*-*-m-*-iso8859-1,\ +-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0,\ +-sazanami-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +fontset.monospaced.italic=\ +-sony-fixed-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0,\ +-b&h-lucidatypewriter-medium-r-normal-sans-*-%d-*-*-m-*-iso8859-1,\ +-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0,\ +-sazanami-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +fontset.monospaced.bold=\ +-sony-fixed-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0,\ +-b&h-lucidatypewriter-bold-r-normal-sans-*-%d-*-*-m-*-iso8859-1,\ +-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0,\ +-sazanami-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +fontset.monospaced.bolditalic=\ +-sony-fixed-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0,\ +-b&h-lucidatypewriter-bold-r-normal-sans-*-%d-*-*-m-*-iso8859-1,\ +-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0,\ +-sazanami-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +fontset.dialog.italic=\ +-sony-fixed-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0,\ +-b&h-lucida-medium-i-normal-sans-*-%d-*-*-p-*-iso8859-1,\ +-kochi-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0,\ +-sazanami-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +fontset.dialog.bold=\ +-sony-fixed-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0,\ +-b&h-lucida-bold-r-normal-sans-*-%d-*-*-p-*-iso8859-1,\ +-kochi-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0,\ +-sazanami-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +fontset.dialog.bolditalic=\ +-sony-fixed-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0,\ +-b&h-lucida-bold-i-normal-sans-*-%d-*-*-p-*-iso8859-1,\ +-kochi-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0,\ +-sazanami-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +fontset.dialog.plain=\ +-sony-fixed-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0,\ +-b&h-lucida-medium-r-normal-sans-*-%d-*-*-p-*-iso8859-1,\ +-kochi-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0,\ +-sazanami-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +fontset.dialoginput.italic=\ +-sony-fixed-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0,\ +-b&h-lucidatypewriter-medium-r-normal-sans-*-%d-*-*-m-*-iso8859-1,\ +-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0,\ +-sazanami-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +fontset.dialoginput.bold=\ +-sony-fixed-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0,\ +-b&h-lucidatypewriter-bold-r-normal-sans-*-%d-*-*-m-*-iso8859-1,\ +-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0,\ +-sazanami-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +fontset.dialoginput.bolditalic=\ +-sony-fixed-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0,\ +-b&h-lucidatypewriter-bold-r-normal-sans-*-%d-*-*-m-*-iso8859-1,\ +-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0,\ +-sazanami-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +fontset.dialoginput.plain=\ +-sony-fixed-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0,\ +-b&h-lucidatypewriter-medium-r-normal-sans-*-%d-*-*-m-*-iso8859-1,\ +-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0,\ +-sazanami-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + +fontset.default=\ +-sony-fixed-medium-r-normal--*-%d-*-*-c-*-jisx0201.1976-0,\ +-b&h-lucida-medium-r-normal-sans-*-%d-*-*-p-*-iso8859-1,\ +-kochi-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0,\ +-sazanami-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 + --- openjdk-6-6b27-1.12.6.orig/debian/JB-jdk.menu.in +++ openjdk-6-6b27-1.12.6/debian/JB-jdk.menu.in @@ -0,0 +1,7 @@ +?package(@basename@-jdk):\ + needs="x11"\ + section="Applications/System/Administration"\ + title="@vendor@ Java @RELEASE@ Console"\ + command="/usr/bin/jconsole"\ + icon="/usr/share/pixmaps/@basename@.xpm"\ + hints="Java2" --- openjdk-6-6b27-1.12.6.orig/debian/JB-jre-headless.prerm.in +++ openjdk-6-6b27-1.12.6/debian/JB-jre-headless.prerm.in @@ -0,0 +1,25 @@ +#!/bin/sh -e + +basedir=/@basedir@ +jre_tools='@jre_hl_tools@' + +rm -f $basedir/jre/lib/@archdir@/client/classes.jsa +rm -f $basedir/jre/lib/@archdir@/server/classes.jsa + +if [ "$1" = "remove" ] || [ "$1" = "deconfigure" ]; then + for i in $jre_tools; do + update-alternatives --remove $i $basedir/jre/bin/$i + done + + if which update-binfmts >/dev/null; then + # try to remove and ignore the error + if [ -e /var/lib/binfmts/@basename@ ]; then + update-binfmts --package @basename@ \ + --remove jar /usr/bin/jexec || true + fi + fi + + update-alternatives --remove jexec $basedir/jre/lib/jexec +fi + +#DEBHELPER# --- openjdk-6-6b27-1.12.6.orig/debian/JB-jre-headless.postrm.in +++ openjdk-6-6b27-1.12.6/debian/JB-jre-headless.postrm.in @@ -0,0 +1,19 @@ +#!/bin/sh -e + +multiarch=@multiarch@ +jdirname=@jdirname@ +etcdir=/@etcdir@ + +case "$1" in +purge) + if [ -z "$jdirname" ] || [ -z "$etcdir" ]; then + echo >&2 "$(basename $0): Internal error" + exit 1 + fi + # removals of config files in /etc is handled by dpkg + + # XXX should remove /etc/.java ??? + ;; +esac + +#DEBHELPER# --- openjdk-6-6b27-1.12.6.orig/debian/JB-jre-lib.postinst.in +++ openjdk-6-6b27-1.12.6/debian/JB-jre-lib.postinst.in @@ -0,0 +1,14 @@ +#! /bin/sh + +set -e + +with_tzdata=@with_tzdata@ + +if [ "$with_tzdata" = yes ]; then + if [ ! -h /@basedir@/jre/lib/zi ] && [ -d /@basedir@/jre/lib/zi ]; then + rm -rf /@basedir@/jre/lib/zi + ln -s ../../../../../share/javazi /@basedir@/jre/lib/zi + fi +fi + +#DEBHELPER# --- openjdk-6-6b27-1.12.6.orig/debian/JB-jre.preinst.in +++ openjdk-6-6b27-1.12.6/debian/JB-jre.preinst.in @@ -0,0 +1,35 @@ +#! /bin/sh + +set -e + +if [ -h /usr/share/doc/@basename@-jre-headless ]; then + rm -f /usr/share/doc/@basename@-jre-headless +fi + +multiarch=@multiarch@ +old_basedir=/usr/lib/jvm/java-6-openjdk +jre_tools='policytool' + +case "$1" in + upgrade) + for i in javaws pluginappletviewer; do + [ -x $old_basedir/jre/bin/$i ] || continue + dpkg-query -L openjdk-6-jre | grep -q ^$old_basedir/jre/bin/$i && continue + if [ -n "$(update-alternatives --list $i 2>/dev/null | grep ^$old_basedir/)" ]; then + update-alternatives --remove $i $old_basedir/jre/bin/$i || true + fi + done + + if [ -n "$multiarch" ] && [ -n "$2" ]; then + for i in $jre_tools; do + if [ -n "$(update-alternatives --list $i 2>/dev/null | grep ^$old_basedir/)" ]; then + update-alternatives --remove $i $old_basedir/jre/bin/$i || true + fi + done + fi + ;; +esac + +#DEBHELPER# + +exit 0 --- openjdk-6-6b27-1.12.6.orig/debian/control.cacao-jre +++ openjdk-6-6b27-1.12.6/debian/control.cacao-jre @@ -0,0 +1,15 @@ + +Package: icedtea-6-jre-cacao +Architecture: @cacao_archs@ +Multi-Arch: same +Priority: extra +Pre-Depends: ${dpkg:Depends} +Depends: @basename@-jre-headless (= @pkg_version@), ${shlibs:Depends}, ${misc:Depends} +Provides: icedtea6-jre-cacao +Description: Alternative JVM for OpenJDK, using Cacao + The package provides an alternative runtime using the Cacao VM and the + Cacao Just In Time Compiler (JIT). This is a somewhat faster alternative + than the Zero port on architectures like alpha, armel, m68k, mips, mipsel, + powerpc and s390. + . + The VM is started with the option `-cacao'. See the README.Debian for details. --- openjdk-6-6b27-1.12.6.orig/debian/accessibility-atk.properties +++ openjdk-6-6b27-1.12.6/debian/accessibility-atk.properties @@ -0,0 +1,10 @@ +# +# The following line specifies the assistive technology classes +# that should be loaded into the Java VM when the AWT is initailized. +# Specify multiple classes by separating them with commas. +# Note: the line below cannot end the file (there must be at +# a minimum a blank line following it). +# +# Doesn't work, see LP: #935296 +#assistive_technologies=org.GNOME.Accessibility.AtkWrapper + --- openjdk-6-6b27-1.12.6.orig/debian/icedtea-6-jre-cacao.copyright +++ openjdk-6-6b27-1.12.6/debian/icedtea-6-jre-cacao.copyright @@ -0,0 +1,443 @@ +This package was debianized by Matthias Klose +on Wed, 08 Aug 2007 15:55:39 +0200. + +It was downloaded from + http://icedtea.classpath.org + http://www.cacaojvm.org/ + +------------------------------------------------------------------------------ +Upstream Authors: + +IcedTea (see AUTHORS for a current list): + Lillian Angel + Gary Benson + Tania Bento + Deepak Bhole + Thomas Fitzsimmons + Kyle Galloway + Andrew Haley + Ioana Iivan + Matthias Klose + Francis Kung + Omair Majid + Casey Marshall + Raif Naffah + Joshua Sumali + Christian Thalinger + Mark Wielaard + +Cacao: + R. Grafl, A. Krall, C. Kruegel, + C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring, + E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich, + J. Wenninger, Institut f. Computersprachen - TU Wien + +Packaging: + Matthias Klose + +------------------------------------------------------------------------------ +Copyright: + +IcedTea: + Portions Copyright © 2007 Lillian Angel + Portions Copyright © 2007 Gary Benson + Portions Copyright © 2007 Tania Bento + Portions Copyright © 2008 Deepak Bhole + Portions Copyright © 2007 Thomas Fitzsimmons + Portions Copyright © 2007 Kyle Galloway + Portions Copyright © 2007 Andrew Haley + Portions Copyright © 2008 Ioana Iivan + Portions Copyright © 2007 Matthias Klose + Portions Copyright © 2007 Francis Kung + Portions Copyright © 2008 Omair Majid + Portions Copyright © 2007 Casey Marshall + Portions Copyright © 2007 Raif Naffah + Portions Copyright © 2007 Joshua Sumali + Portions Copyright © 2007 Christian Thalinger + Portions Copyright © 2007 Mark Wielaard + Portions Copyright © 2007, 2008 Red Hat, Inc. + Portions Copyright © 2001-2003 Jon A. Maxwell (JAM) + Portions Copyright © 1992, 1995-2007 Sun Microsystems, Inc. + Portions Copyright © 2007 Matthew Flaschen + Portions Copyright © 2000-2002 Marc De Scheemaecker + Portions Copyright © 1991-1998 Thomas G. Lane + Portions Copyright © 2007 Free Software Foundation, Inc. + +Cacao: + Copyright Holder: CACAO Project + Copyright (C) 1996-2008 Verein zur Foerderung der freien virtuellen Maschine CACAO + Portions Copyright (C) 1996-2005, 2006, 2007 R. Grafl, A. Krall, C. Kruegel, + C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring, + E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich, + J. Wenninger, Institut f. Computersprachen - TU Wien + +Packaging: + Copyright © 2007, 2008 Canonical Ltd. + +------------------------------------------------------------------------------ +License: + +NOTE: the combined work which includes the upstream components below +carries forward the OpenJDK Assembly Exception (text included below). + +Packaging: + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +IcedTea: + IcedTea is licensed under the GPL v2. See `/usr/share/common-licenses/GPL-2'. + +Cacao: + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program 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 for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + +On Debian systems a full copy of the GNU General Public License, GPL, can be +found in the file /usr/share/common-licenses/GPL-2. + + +CACAO uses code from other free software projects. Only code licensed +under a GPL compatible license can be merged in. You can find the +licenses of third party sources in their respective sources. + + +* src/mm/boehm-gc + +Merged in the Boehm-Weiser garbage collector from +http://www.hpl.hp.com/personal/Hans_Boehm/gc/. + +Copyright (c) 1988, 1989 Hans-J. Boehm, Alan J. Demers +Copyright (c) 1991-1996 by Xerox Corporation. All rights reserved. +Copyright (c) 1996-1999 by Silicon Graphics. All rights reserved. +Copyright (c) 1999-2003 by Hewlett-Packard Company. All rights reserved. +Portions Copyright (c) 1999-2001 by Red Hat, Inc. All rights reserved. + +The file linux_threads.c is also +Copyright (c) 1998 by Fergus Henderson. All rights reserved. + +The files Makefile.am, and configure.in are +Copyright (c) 2001 by Red Hat Inc. All rights reserved. + +Several files supporting GNU-style builds are copyrighted by the Free +Software Foundation, and carry a different license from that given +below. + +THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED +OR IMPLIED. ANY USE IS AT YOUR OWN RISK. + +Permission is hereby granted to use or copy this program +for any purpose, provided the above notices are retained on all copies. +Permission to modify the code and to distribute modified code is granted, +provided the above notices are retained, and a notice that the code was +modified is included with the above copyright notice. + +A few of the files needed to use the GNU-style build procedure come with +slightly different licenses, though they are all similar in spirit. A few +are GPL'ed, but with an exception that should cover all uses in the +collector. (If you are concerned about such things, I recommend you look +at the notice in config.guess or ltmain.sh.) + +The files copyrighted by Hewlett-Packard Company have the notice: + + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + +* src/fdlibm + +fdlimb contains general algorithms useful for runtimes and compilers to +support strict double and float mathematical operations. + +fdlibm files carry the following notices: + + Copyright (c) 1991 by AT&T. + + Permission to use, copy, modify, and distribute this software for any + purpose without fee is hereby granted, provided that this entire notice + is included in all copies of any software which is or includes a copy + or modification of this software and in all copies of the supporting + documentation for such software. + + THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED + WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR AT&T MAKES ANY + REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY + OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. + + Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + + Developed at SunPro, a Sun Microsystems, Inc. business. + Permission to use, copy, modify, and distribute this + software is freely granted, provided that this notice + is preserved. + +The upstream for fdlibm is libgcj (http://gcc.gnu.org/java/), they sync +again with the 'real' upstream (http://www.netlib.org/fdlibm/readme). + + +* src/threads/green/{locks.[ch],threadio.[ch],threads.[ch]} + +This files are taken from Kaffe.org VM available at +http://www.kaffe.org/. Kaffe's license.terms file is located in the +top directory of the source code. The current license of Kaffe is the +same as of CACAO, GPL Version 2. + + +* src/vm/jit/{i386,x86_64}/{dis-asm.h,i386-dis.c} + +Print i386 instructions for GDB, the GNU debugger. +Copyright 1988, 1989, 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +2001, 2002, 2003, 2004 Free Software Foundation, Inc. + +This file is part of GDB. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program 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 for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */ + + +* src/vm/jit/{i386,x86_64}/dis-asm.h + +Interface between the opcode library and its callers. + +Copyright 2001, 2002 Free Software Foundation, Inc. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +This program 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 for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, +Boston, MA 02110-1301 USA + +Written by Cygnus Support, 1993. + +The opcode library (libopcodes.a) provides instruction decoders for +a large variety of instruction sets, callable with an identical +interface, for making instruction-processing programs more independent +of the instruction set being processed. + + +* src/vm/jit/powerpc/{ppc.h,ppc-dis.c,ppc-opc.c} + +Copyright 1994, 1995, 2000, 2001, 2002 Free Software Foundation, Inc. +Written by Ian Lance Taylor, Cygnus Support + +This file is part of GDB, GAS, and the GNU binutils. + +GDB, GAS, and the GNU binutils are free software; you can redistribute +them and/or modify them under the terms of the GNU General Public +License as published by the Free Software Foundation; either version +2, or (at your option) any later version. + +GDB, GAS, and the GNU binutils are distributed in the hope that they +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 for more details. + +You should have received a copy of the GNU General Public License +along with this file; see the file COPYING. If not, write to the Free +Software Foundation, Inc., 51 Franklin St, Fifth Floor, +Boston, MA 02110-1301 USA. + + +* src/lib/classes/* + +GNU Classpath is licensed under the terms of the GNU General Public +License with the following clarification and special exception: + + "Linking this library statically or dynamically with other modules + is making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give + you permission to link this library with independent modules to + produce an executable, regardless of the license terms of these + independent modules, and to copy and distribute the resulting + executable under terms of your choice, provided that you also meet, + for each linked independent module, the terms and conditions of the + license of that module. An independent module is a module which is + not derived from or based on this library. If you modify this library, + you may extend this exception to your version of the library, but you + are not obligated to do so. If you do not wish to do so, delete this + exception statement from your version." + +See license.terms for the text of the GNU General Public License. + +More information on GNU Classpath is available from +http://www.gnu.org/software/classpath/classpath.html. + + +* m4/{iconv.m4,lib-ld.m4,lib-link.m4,lib-prefix.m4} + +Copyright (C) 1996-2003 Free Software Foundation, Inc. +This file is free software, distributed under the terms of the GNU +General Public License. As a special exception to the GNU General +Public License, this file may be distributed as part of a program +that contains a configuration script generated by Autoconf, under +the same distribution terms as the rest of that program. + + +* src/toolbox/avl.[ch] + +libavl - library for manipulation of binary trees. +Copyright (C) 1998-2002 Free Software Foundation, Inc. + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +This program 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 for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +02110-1301 USA. + +The author may be contacted at on the Internet, or +write to Ben Pfaff, Stanford University, Computer Science Dept., 353 +Serra Mall, Stanford CA 94305, USA. + + +* src/vm/unzip.[ch] + +Copyright (C) 1998 Gilles Vollant + +This unzip package allow extract file from .ZIP file, compatible with PKZip 2.04g + WinZip, InfoZip tools and compatible. +Encryption and multi volume ZipFile (span) are not supported. +Old compressions used by old PKZip 1.x are not supported + +THIS IS AN ALPHA VERSION. AT THIS STAGE OF DEVELOPPEMENT, SOMES API OR STRUCTURE +CAN CHANGE IN FUTURE VERSION !! +I WAIT FEEDBACK at mail info@winimage.com +Visit also http://www.winimage.com/zLibDll/unzip.htm for evolution + +Condition of use and distribution are the same than zlib : + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. + + +src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/armcc + + * Copyright (c) 2007 by NEC LE-IT: All rights reserved. + * A transcription of ARMv6 atomic operations for the ARM Realview Toolchain. + * This code works with armcc from RVDS 3.1 + * This is based on work in gcc/arm.h by + * Copyright (c) 1991-1994 by Xerox Corporation. All rights reserved. + * Copyright (c) 1996-1999 by Silicon Graphics. All rights reserved. + * Copyright (c) 1999-2003 by Hewlett-Packard Company. All rights reserved. + * + * + * + * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED + * OR IMPLIED. ANY USE IS AT YOUR OWN RISK. + * + * Permission is hereby granted to use or copy this program + * for any purpose, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + +src/mm/boehm-gc/include/private + + Copyright (c) 2004-2005 Andrei Polushin + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + +contrib/vmlog: + +/* Copyright (C) 2006 Edwin Steiner */ +/* 2007 Peter Molnar */ + +/* This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program 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 for more details. + */ + +Some of the build files are + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. --- openjdk-6-6b27-1.12.6.orig/debian/jvm.cfg-default +++ openjdk-6-6b27-1.12.6/debian/jvm.cfg-default @@ -0,0 +1,5 @@ +# jvm.cfg-default - default jvm configuration which is used if no jvm.cfg +# is found. After unpacking the file jvm.cfg doesn't exist yet (config file), +# in this case use this file instead, so that the VM can be used before +# configuration of the runtime package. +-server KNOWN --- openjdk-6-6b27-1.12.6.orig/debian/JB-jre.overrides.in +++ openjdk-6-6b27-1.12.6/debian/JB-jre.overrides.in @@ -0,0 +1,10 @@ +# It seems to be acceptable to use rpath for private libraries like the +# jdk is doing it. Check http://wiki.debian.org/RpathIssue for more +# information. +@basename@-jre binary: binary-or-shlib-defines-rpath + +# the interpreter is in the -headless package +@basename@-jre binary: desktop-command-not-in-package + +# lintian is plain wrong to complain +@basename@-jre binary: gzip-file-is-not-multi-arch-same-safe --- openjdk-6-6b27-1.12.6.orig/debian/JB-jre-headless.preinst.in +++ openjdk-6-6b27-1.12.6/debian/JB-jre-headless.preinst.in @@ -0,0 +1,28 @@ +#! /bin/sh + +set -e + +if [ -h /usr/share/doc/@basename@-jre-headless ]; then + rm -f /usr/share/doc/@basename@-jre-headless +fi + +multiarch=@multiarch@ +old_basedir=/usr/lib/jvm/java-6-openjdk +jre_tools='java keytool pack200 rmid rmiregistry unpack200 orbd servertool tnameserv' + +case "$1" in + upgrade) + if [ -n "$multiarch" ] && [ -n "$2" ]; then + for i in $jre_tools; do + if [ -n "$(update-alternatives --list $i 2>/dev/null | grep ^$old_basedir/)" ]; then + update-alternatives --remove $i $old_basedir/jre/bin/$i || true + fi + done + if [ -n "$(update-alternatives --list jexec 2>/dev/null | grep ^$old_basedir/)" ]; then + update-alternatives --remove jexec $old_basedir/jre/lib/jexec || true + fi + fi + ;; +esac + +#DEBHELPER# --- openjdk-6-6b27-1.12.6.orig/debian/JB-jre-lib.overrides.in +++ openjdk-6-6b27-1.12.6/debian/JB-jre-lib.overrides.in @@ -0,0 +1,6 @@ +# The package *-jre-lib depends on *-jre via *-jre-headless and +# libaccess-bridge-java. Lintian is wrong here. +@basename@-jre-lib binary: usr-share-doc-symlink-without-dependency @basename@-jre + +# no separate directory for image files +@basename@-jre-lib binary: image-file-in-usr-lib --- openjdk-6-6b27-1.12.6.orig/debian/JB-archive.mime.in +++ openjdk-6-6b27-1.12.6/debian/JB-archive.mime.in @@ -0,0 +1,6 @@ +application/java-archive + ext: jar +application/x-java-archive + ext: jar +application/x-jar + ext: jar --- openjdk-6-6b27-1.12.6.orig/debian/sun_java.xpm +++ openjdk-6-6b27-1.12.6/debian/sun_java.xpm @@ -0,0 +1,194 @@ +/* XPM */ +static char *sun_java[] = { +/* columns rows colors chars-per-pixel */ +"32 32 156 2", +" c #34479E", +". c #4152A3", +"X c #4153A2", +"o c #4153A3", +"O c #4D5EA8", +"+ c #4D5EA9", +"@ c #4E5EA9", +"# c #5A69AD", +"$ c #5A69AE", +"% c #5A69AF", +"& c #5A6AAD", +"* c #6675B3", +"= c #6775B2", +"- c #6775B3", +"; c #6776B3", +": c #6775B5", +"> c #6776B4", +", c #7480B7", +"< c #7380B8", +"1 c #7381B8", +"2 c #7380BA", +"3 c #7481B8", +"4 c #D12124", +"5 c #D42F31", +"6 c #D73D3E", +"7 c #D94A4A", +"8 c #D94A4B", +"9 c #DA4A4A", +"0 c #DA4B4B", +"q c #DC5957", +"w c #DC5858", +"e c #DD5859", +"r c #DD5959", +"t c #DF6664", +"y c #E06664", +"u c #E27471", +"i c #E27570", +"p c #E27472", +"a c #E37472", +"s c #E27574", +"d c #E37474", +"f c #E5827E", +"g c #E5837F", +"h c #818BBD", +"j c #818CBC", +"k c #808CBE", +"l c #818DC0", +"z c #8D97C2", +"x c #8D97C3", +"c c #8D97C5", +"v c #8E98C5", +"b c #99A2C7", +"n c #99A3C7", +"m c #99A2C8", +"M c #99A3C8", +"N c #99A2CA", +"B c #99A2CB", +"V c #A6AECD", +"C c #A5AED2", +"Z c #A6AED0", +"A c #B3B9D3", +"S c #B2B9D4", +"D c #B3B9D5", +"F c #B2B9D6", +"G c #B3BAD5", +"H c #BFC4D6", +"J c #BFC5D7", +"K c #BFC5D8", +"L c #BFC5D9", +"P c #BFC5DA", +"I c #BFC5DB", +"U c #BFC5DC", +"Y c #BFC5DD", +"T c #E58381", +"R c #E68380", +"E c #E88F89", +"W c #E88F8B", +"Q c #E8908A", +"! c #EB9D99", +"~ c #EB9D9A", +"^ c #EB9D9D", +"/ c #EDABA2", +"( c #EEABA6", +") c #EDACA6", +"_ c #F0B9B1", +"` c #F1B9B1", +"' c #F0B9B6", +"] c #F3C7BD", +"[ c #CCD0DA", +"{ c #CCD1DA", +"} c #CDD0DA", +"| c #CCD0DC", +" . c #CCD0DD", +".. c #CCD1DD", +"X. c #CCD0DE", +"o. c #CCD1DE", +"O. c #CCD1DF", +"+. c #D8DBDF", +"@. c #CCD0E0", +"#. c #D8DCE1", +"$. c #D9DCE1", +"%. c #D9DCE3", +"&. c #D9DCE4", +"*. c #D9DCE5", +"=. c #D9DCE6", +"-. c #D9DCE7", +";. c #D9DCE8", +":. c #F6D5CB", +">. c #F6D5CD", +",. c #F6D5D3", +"<. c #F9E3D7", +"1. c #F9E3DA", +"2. c #F9E3DB", +"3. c #E6E7E7", +"4. c #E5E7E9", +"5. c #E5E7EC", +"6. c #E5E8E8", +"7. c #E6E8E9", +"8. c #E6E8EA", +"9. c #E6E8EB", +"0. c #E5E8EC", +"q. c #E6E8EC", +"w. c #F9E3E1", +"e. c #F2F3EC", +"r. c #FCF0E1", +"t. c #FCF0E3", +"y. c #FCF1E5", +"u. c #FCF0E7", +"i. c #FCF1E6", +"p. c #FCF1E7", +"a. c #FCF1E8", +"s. c #FFFEED", +"d. c #FFFEEE", +"f. c #FFFEEF", +"g. c #F2F3F0", +"h. c #F2F3F1", +"j. c #F2F3F2", +"k. c #F2F3F4", +"l. c #FFFEF0", +"z. c #FFFEF1", +"x. c #FFFEF2", +"c. c #FFFEF3", +"v. c #FFFFF3", +"b. c #FFFFF4", +"n. c #FFFFF5", +"m. c #FFFFF6", +"M. c #FFFFF7", +"N. c #FFFFF8", +"B. c #FFFFF9", +"V. c #FFFFFA", +"C. c #FFFFFB", +"Z. c #FFFFFC", +"A. c #FFFFFD", +"S. c #FFFFFE", +"D. c gray100", +"F. c None", +/* pixels */ +"F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.", +"F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.w.~ F.F.F.F.F.F.F.F.F.F.F.F.F.", +"F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.r F.F.F.F.F.F.F.F.F.F.F.F.F.", +"F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.' q F.F.F.F.F.F.F.F.F.F.F.F.F.", +"F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.M.q u F.F.F.F.F.F.F.F.F.F.F.F.F.", +"F.F.F.F.F.F.F.F.F.F.F.F.F.F.M.M.! 4 1.F.F.F.F.F.F.F.F.F.F.F.F.F.", +"F.F.F.F.F.F.F.F.F.F.F.F.F.M.M.f 4 E M.M.F.w.F.F.F.F.F.F.F.F.F.F.", +"F.F.F.F.F.F.F.F.F.F.F.F.M.i.t 4 i x.1.g u ,.F.F.F.F.F.F.F.F.F.F.", +"F.F.F.F.F.F.F.F.F.F.F.M.>.7 4 f r.f 5 ! C.F.F.F.F.F.F.F.F.F.F.F.", +"F.F.F.F.F.F.F.F.F.F.F.1.5 4 / r.7 5 >.M.F.F.F.F.F.F.F.F.F.F.F.F.", +"F.F.F.F.F.F.F.F.F.F.M.q 4 E d.i 4 >.M.F.F.F.F.F.F.F.F.F.F.F.F.F.", +"F.F.F.F.F.F.F.F.F.F.M.4 5 d.d.4 6 x.x.F.F.F.F.F.F.F.F.F.F.F.F.F.", +"F.F.F.F.F.F.F.F.F.F.F.7 7 d.d.4 4 :.M.F.F.F.F.F.F.F.F.F.F.F.F.F.", +"F.F.F.F.F.F.F.F.F.F.M./ 4 <.x.q 4 7 i.F.F.F.F.F.F.F.F.F.F.F.F.F.", +"F.F.F.F.F.F.F.F.F.F.F.M.u t x.] 4 4 ) M.F.F.F.F.F.F.F.F.F.F.F.F.", +"F.F.F.F.F.F.F.F.F.F.F.F.u.7 _ x.E 4 ! M.M.F.F.F.F.F.F.F.F.F.F.F.", +"F.F.F.F.F.F.F.F.F.h.@.4.M.i.u i._ 5 i.M.F.-.N : c @.M.F.F.F.F.F.", +"F.F.F.F.F.F.k.B O h P x.x.M.x.i.a :.x.M.9.L @.L O c M.F.F.F.F.", +"F.F.F.F.F.F.> X c n b n n n n h = & X v M.M.M.8. M.F.F.F.F.", +"F.F.F.F.F.F.F.+...N n n n N N n J ..4.M.M.M.x.M.M. M.F.F.F.F.", +"F.F.F.F.F.F.F.M.+.O ..x.d.x.d.x.x.3.L 8.M.M.M.x. . X M.F.F.F.F.", +"F.F.F.F.F.F.F.M.F X = = = = O 8.M.M.h.& S M.F.F.F.F.", +"F.F.F.F.F.F.F.M.M...z = = = = = j V %.x.F.M.9.% S M.F.F.F.F.F.", +"F.F.F.F.F.F.F.M.M.4.n d.d.d.d.x.d.x.M.M.M.S X l 5.F.M.F.F.F.F.F.", +"F.F.F.F.F.F.M.M.x.= O = = = = o = -.-.S h.M.F.M.F.F.F.F.F.F.", +"F.F.F.F.F.M.-.{ { %., , A x.M.M.M.M.M.F.F.F.F.F.F.F.", +"F.F.F.F.F O , J e.x.d.d.{ { { +.x.x.x.M.M.M.M.M.=.Y F.F.F.F.F.F.", +"F.F.F.F. O z H %.d.x.x.d.d.d.d.x.x.x.x...K N O C C.F.F.F.F.F.", +"F.F.F.F.N O # = = = = = O O L C.F.F.F.F.F.F.", +"F.F.F.F.M.M.%.V > & O = N =.F.F.F.F.F.F.F.F.F.", +"F.F.F.F.F.F.F.M.M.M.M.x.x.M.M.M.M.M.M.M.M.M.F.F.F.F.F.F.F.F.F.F.", +"F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F." +}; --- openjdk-6-6b27-1.12.6.orig/debian/copyright +++ openjdk-6-6b27-1.12.6/debian/copyright @@ -0,0 +1,2347 @@ +This package was debianized by Matthias Klose on +Wed, 08 Aug 2007 15:55:39 +0200. + +It was downloaded from + http://icedtea.classpath.org + http://download.java.net/openjdk/jdk6/ + http://ftp.gnome.org/pub/GNOME/sources/java-access-bridge/ + +------------------------------------------------------------------------------ +Upstream Authors: + +IcedTea (see AUTHORS for a current list): + Lillian Angel + Gary Benson + Tania Bento + Deepak Bhole + Thomas Fitzsimmons + Kyle Galloway + Andrew Haley + Ioana Iivan + Matthias Klose + Francis Kung + Omair Majid + Casey Marshall + Raif Naffah + Joshua Sumali + Christian Thalinger + Mark Wielaard + +OpenJDK: + Sun Microsystems, Inc. + Oracle and/or its affiliates. + +Java Access Bridge: + Bill Haneman + Louise Miller + Gergõ Érdi + Laszlo (Laca) Peter + Jeff Cai + George Kraft IV + Padraig O'Briain + Darren Kenny + +Packaging: + Matthias Klose + +------------------------------------------------------------------------------ +Copyright: + +IcedTea: + Portions Copyright © 2007 Lillian Angel + Portions Copyright © 2007 Gary Benson + Portions Copyright © 2007 Tania Bento + Portions Copyright © 2008 Deepak Bhole + Portions Copyright © 2007 Thomas Fitzsimmons + Portions Copyright © 2007 Kyle Galloway + Portions Copyright © 2007 Andrew Haley + Portions Copyright © 2008 Ioana Iivan + Portions Copyright © 2007 Matthias Klose + Portions Copyright © 2007 Francis Kung + Portions Copyright © 2008 Omair Majid + Portions Copyright © 2007 Casey Marshall + Portions Copyright © 2007 Raif Naffah + Portions Copyright © 2007 Joshua Sumali + Portions Copyright © 2007 Christian Thalinger + Portions Copyright © 2007 Mark Wielaard + Portions Copyright © 2007, 2008 Red Hat, Inc. + Portions Copyright © 2001-2003 Jon A. Maxwell (JAM) + Portions Copyright © 1992, 1995-2007 Sun Microsystems, Inc. + Portions Copyright © 2007 Matthew Flaschen + Portions Copyright © 2000-2002 Marc De Scheemaecker + Portions Copyright © 1991-1998 Thomas G. Lane + Portions Copyright © 2007 Free Software Foundation, Inc. + +OpenJDK: + Copyright © 1996-2007 Sun Microsystems, Inc. + Copyright © 1996-2007 Oracle and/or its affiliates. + For third party copyrights see below (copies from the third party readme). + Portions Copyright © 1993-1999 IBM Corp. + Portions Copyright © 1997 Eastman Kodak Company. + Portions Copyright © 1999-2005 The Apache Software Foundation. + +Java Access Bridge: + Portions Copyright © 2002-2007 Bill Haneman + Portions Copyright © 2002-2007 Louise Miller + Portions Copyright © 2002-2007 Gergõ Érdi + Portions Copyright © 2002-2007 Laszlo (Laca) Peter + Portions Copyright © 2002-2007 Jeff Cai + Portions Copyright © 2002-2007 George Kraft IV + Portions Copyright © 2002-2007 Padraig O'Briain + Portions Copyright © 2002-2007 Darren Kenny + +Packaging: + Copyright © 2007, 2008, 2009, 2010 Canonical Ltd. + +------------------------------------------------------------------------------ +License: + +NOTE: the combined work which includes the upstream components below +carries forward the OpenJDK Assembly Exception (text included below). + +Packaging: + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +IcedTea: + IcedTea is licensed under the GPL v2. See `/usr/share/common-licenses/GPL-2'. + The exception is: "CLASSPATH" EXCEPTION TO THE GPL. + + The sound files (pulseaudio/testsounds/*.wav) were taken from the KDE Project + (www.kde.org). A copy of them can be obtained from + http://websvn.kde.org/branches/KDE/4.0/kdeartwork/sounds/ . They are licensed + by the copyright holders as GPLv2. + +OpenJDK: + OpenJDK is licensed under the GPL v2 with exceptions, + see `/usr/share/common-licenses/GPL-2'. + The exceptions are: + - "CLASSPATH" EXCEPTION TO THE GPL + - OPENJDK ASSEMBLY EXCEPTION + Various third party code in OpenJDK is licensed under different licenses. + See below (THIRD_PARTY_README). + +Java Access Bridge: + Java Access Bridge is licensed under the LGPL v2. + See `/usr/share/common-licenses/LGPL-2'. + +A Note About License Headers +---------------------------- + +Some sources downloaded from openjdk.java.net do not display the GPL +license header. Instances are: + + - The files in openjdk/j2se/src/share/classes/javax/xml/stream/ seem to + comprise the BEA-StAX source code + + http://ftpna2.bea.com/pub/downloads/jsr173.jar + + with some Sun-specific modifications. We're assuming that Sun is + bundling BEA-StAX under the terms of the Apache License 2.0 and + that the modifications are owned by Sun. + + - We are assuming that these files are owned by Sun: + openjdk/j2se/src/share/classes/**/resources/*.properties + +The downloaded sources include a script that inserts proprietary +license headers into the source files it generates. The script +itself is GPL'd so we patched them to emit the GPL header. The +file is: + openjdk/j2se/make/java/nio/genExceptions.sh + +------------------------------------------------------------------------------ +"CLASSPATH" EXCEPTION TO THE GPL + +Certain source files distributed by Sun Microsystems, Inc. are subject to +the following clarification and special exception to the GPL, but only where +Sun has expressly included in the particular source file's header the words +"Sun designates this particular file as subject to the "Classpath" exception +as provided by Sun in the LICENSE file that accompanied this code." + + Linking this library statically or dynamically with other modules is making + a combined work based on this library. Thus, the terms and conditions of + the GNU General Public License cover the whole combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules, + and to copy and distribute the resulting executable under terms of your + choice, provided that you also meet, for each linked independent module, + the terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. If + you modify this library, you may extend this exception to your version of + the library, but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. + +------------------------------------------------------------------------------ +OPENJDK ASSEMBLY EXCEPTION + +The OpenJDK source code made available by Sun at openjdk.java.net and +openjdk.dev.java.net ("OpenJDK Code") is distributed under the terms of the +GNU General Public License version 2 +only ("GPL2"), with the following clarification and special exception. + + Linking this OpenJDK Code statically or dynamically with other code + is making a combined work based on this library. Thus, the terms + and conditions of GPL2 cover the whole combination. + + As a special exception, Sun gives you permission to link this + OpenJDK Code with certain code licensed by Sun as indicated at + http://openjdk.java.net/legal/exception-modules-2007-05-08.html + ("Designated Exception Modules") to produce an executable, + regardless of the license terms of the Designated Exception Modules, + and to copy and distribute the resulting executable under GPL2, + provided that the Designated Exception Modules continue to be + governed by the licenses under which they were offered by Sun. + +As such, it allows licensees and sublicensees of Sun's GPL2 OpenJDK Code to +build an executable that includes those portions of necessary code that Sun +could not provide under GPL2 (or that Sun has provided under GPL2 with the +Classpath exception). If you modify or add to the OpenJDK code, that new +GPL2 code may still be combined with Designated Exception Modules if the +new code is made subject to this exception by its copyright holder. + +------------------------------------------------------------------------------ +OpenJDK Trademark Notice +Version 1.1, 2008/3/10 + +OpenJDK (the "Name") is a trademark of Sun Microsystems, Inc. (the "Owner"). +Owner permits any person obtaining a copy of this software (the "Software") +which is based on original software retrieved from one of the following +websites: http://download.java.net/openjdk, http://hg.openjdk.java.net/jdk6, +or http://openjdk.java.net (each a "Website", with the original software made +available by the Owner on a Website being known as the "Website Software") to +use the Name in package names and version strings of the Software subject to +the following conditions: + + - The Software is a substantially complete implementation of the OpenJDK + development kit or runtime environment code made available by Owner on a + Website, and the vast majority of the Software code is identical to the + upstream Website Software; + + - No permission is hereby granted to use the Name in any other manner, + unless such use constitutes "fair use." + + - The Owner makes no warranties of any kind respecting the Name and all + representations and warranties, including any implied warranty of + merchantability, fitness for a particular purpose or non-infringement + are hereby disclaimed; and + + - This notice and the following legend are included in all copies of the + Software or portions of it: + + OpenJDK is a trademark or registered trademark of Sun Microsystems, + Inc. in the United States and other countries. + +The Name may also be used in connection with descriptions of the Software that +constitute "fair use," such as "derived from the OpenJDK code base" or "based +on the OpenJDK source code." + +Owner intends to revise this Notice as necessary in order to meet the needs of +the OpenJDK Community. Please send questions or comments about this Notice to +Sun Microsystems at openjdk-tm@sun.com. Revisions to this Notice will be +announced on the public mailing list announce@openjdk.java.net, to which you +may subscribe by visiting http://mail.openjdk.java.net. The latest version of +this Notice may be found at http://openjdk.java.net/legal. + +------------------------------------------------------------------------------ +the follwing licenses for third party code are taken from +openjdk/THIRD_PARTY_README +------------------------------------------------------------------------------ + +DO NOT TRANSLATE OR LOCALIZE. + +%% This notice is provided with respect to Thai dictionary for text breaking, which may be included with this software: + +--- begin of LICENSE file --- + +Copyright (C) 1982 The Royal Institute, Thai Royal Government. + +Copyright (C) 1998 National Electronics and Computer Technology Center, + National Science and Technology Development Agency, + Ministry of Science Technology and Environment, + Thai Royal Government. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without +limitation the rights to use, copy, modify, merge, publish, distribute, +sublicense, and/or sell copies of the Software, and to permit persons to +whom the Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +--- end of LICENSE file --- +%% This notice is provided with respect to ASM, which may be included with this software: +Copyright (c) 2000-2005 INRIA, France Telecom +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holders nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +THE POSSIBILITY OF SUCH DAMAGE. +%% This notice is provided with respect to zlib 1.1.3, which may be included with this software: + +Acknowledgments: + + The deflate format used by zlib was defined by Phil Katz. The deflate + and zlib specifications were written by L. Peter Deutsch. Thanks to all the + people who reported problems and suggested various improvements in zlib; + they are too numerous to cite here. + +Copyright notice: + + (C) 1995-1998 Jean-loup Gailly and Mark Adler + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + Jean-loup Gailly Mark Adler + jloup@gzip.org madler@alumni.caltech.edu + +If you use the zlib library in a product, we would appreciate *not* +receiving lengthy legal documents to sign. The sources are provided +for free but without warranty of any kind. The library has been +entirely written by Jean-loup Gailly and Mark Adler; it does not +include third-party code. + +If you redistribute modified sources, we would appreciate that you include +in the file ChangeLog history information documenting your changes. + +%% This notice is provided with respect to W3C (DTD for XML Signatures), which may be included with this software: +W3C® SOFTWARE NOTICE AND LICENSE +Copyright © 1994-2002 World Wide Web Consortium, (Massachusetts Institute of Technology, Institut National de Recherche en Informatique et en Automatique, Keio University). All Rights Reserved. http://www.w3.org/Consortium/Legal/ +This W3C work (including software, documents, or other related items) is being provided by the copyright holders under the following license. By obtaining, using and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions: +Permission to use, copy, modify, and distribute this software and its documentation, with or without modification,  for any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies of the software and documentation or portions thereof, including modifications, that you make: +1.The full text of this NOTICE in a location viewable to users of the redistributed or derivative work. +2.Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, a short notice of the following form (hypertext is preferred, text is permitted) should be used within the body of any redistributed or derivative code: "Copyright © [$date-of-software] World Wide Web Consortium, (Massachusetts Institute of Technology, Institut National de Recherche en Informatique et en Automatique, Keio University). All Rights Reserved. http://www.w3.org/Consortium/Legal/" +3.Notice of any changes or modifications to the W3C files, including the date changes were made. (We recommend you provide URIs to the location from which the code is derived.) +THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. +COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION. +The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the software without specific, written prior permission. Title to copyright in this software and any associated documentation will at all times remain with copyright holders. +____________________________________ +This formulation of W3C's notice and license became active on August 14 1998 so as to improve compatibility with GPL. This version ensures that W3C software licensing terms are no more restrictive than GPL and consequently W3C software may be distributed in GPL packages. See the older formulation for the policy prior to this date. Please see our Copyright FAQ for common questions about using materials from our site, including specific terms and conditions for packages like libwww, Amaya, and Jigsaw. Other questions about this notice can be directed to site-policy@w3.org. +  +%% This notice is provided with respect to jscheme.jar, which may be included with this software: +Software License Agreement +Copyright © 1998-2002 by Peter Norvig. +Permission is granted to anyone to use this software, in source or object code form, on any computer system, and to modify, compile, decompile, run, and redistribute it to anyone else, subject to the following restrictions: +1.The author makes no warranty of any kind, either expressed or implied, about the suitability of this software for any purpose. +2.The author accepts no liability of any kind for damages or other consequences of the use of this software, even if they arise from defects in the software. +3.The origin of this software must not be misrepresented, either by explicit claim or by omission. +4.Altered versions must be plainly marked as such, and must not be misrepresented as being the original software. Altered versions may be distributed in packages under other licenses (such as the GNU license). +If you find this software useful, it would be nice if you let me (peter@norvig.com) know about it, and nicer still if you send me modifications that you are willing to share. However, you are not required to do so. + + +%% This notice is provided with respect to PC/SC Lite for Suse Linux v. 1.1.1, which may be included with this software: + +Copyright (c) 1999-2004 David Corcoran +Copyright (C) 1999-2003 Ludovic Rousseau +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + +Changes to this license can be made only by the copyright author with +explicit written consent. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +%% This notice is provided with respect to IAIK PKCS Wrapper, which may be included with this software: + +Copyright (c) 2002 Graz University of Technology. All rights reserved. +Redistribution and use in source and binary forms, with or without modification,are permitted provided that the following conditions are met: + + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +3. The end-user documentation included with the redistribution, if any, must include the following acknowledgment: + + "This product includes software developed by IAIK of Graz University of Technology." + + Alternately, this acknowledgment may appear in the software itself, if and wherever such third-party acknowledgments normally appear. + +4. The names "Graz University of Technology" and "IAIK of Graz University of Technology" must not be used to endorse or promote products derived from this software without prior written permission. + +5. Products derived from this software may not be called "IAIK PKCS Wrapper", nor may "IAIK" appear in their name, without prior written permission of Graz University of Technology. + +THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE LICENSOR BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, +OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, +OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +%% This notice is provided with respect to Document Object Model (DOM) v. Level 3, which may be included with this software: + +W3Cýý SOFTWARE NOTICE AND LICENSE + +http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + +This work (and included software, documentation such as READMEs, or other related items) is being +provided by the copyright holders under the following license. By obtaining, using and/or copying this work, you +(the licensee) agree that you have read, understood, and will comply with the following terms and conditions. + +Permission to copy, modify, and distribute this software and its documentation, with or without modification, for +any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies +of the software and documentation or portions thereof, including modifications: + 1.The full text of this NOTICE in a location viewable to users of the redistributed or derivative work. + 2.Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, the + W3C Software Short Notice should be included (hypertext is preferred, text is permitted) within the body + of any redistributed or derivative code. + 3.Notice of any changes or modifications to the files, including the date changes were made. (We + recommend you provide URIs to the location from which the code is derived.) +THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKENO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, +WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THEUSE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS,COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. + +COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL ORCONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION. +The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the +software without specific, written prior permission. Title to copyright in this software and any associated +documentation will at all times remain with copyright holders. + +____________________________________ + +This formulation of W3C's notice and license became active on December 31 2002. This version removes the +copyright ownership notice such that this license can be used with materials other than those owned by the +W3C, reflects that ERCIM is now a host of the W3C, includes references to this specific dated version of the +license, and removes the ambiguous grant of "use". Otherwise, this version is the same as the previous +version and is written so as to preserve the Free Software Foundation's assessment of GPL compatibility and +OSI's certification under the Open Source Definition. Please see our Copyright FAQ for common questions +about using materials from our site, including specific terms and conditions for packages like libwww, Amaya, +and Jigsaw. Other questions about this notice can be directed to +site-policy@w3.org. + +%% This notice is provided with respect to Xalan, Xerces, which may be included with this software: + +/* + * The Apache Software License, Version 1.1 + * + * + * Copyright (c) 1999-2003 The Apache Software Foundation. All rights * reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. * + * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by the + * Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * + * 4. The names "Xerces" and "Apache Software Foundation" must + * not be used to endorse or promote products derived from this + * software without prior written permission. For written + * permission, please contact apache@apache.org. + * + * 5. Products derived from this software may not be called "Apache", + * nor may "Apache" appear in their name, without prior written + * permission of the Apache Software Foundation. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * ==================================================================== * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation and was + * originally based on software copyright (c) 1999, International + * Business Machines, Inc., http://www.ibm.com. For more + * information on the Apache Software Foundation, please see + * + +%% This notice is provided with respect to JavaScript, which may be included with this software: + +AMENDMENTS +The Netscape Public License Version 1.1 ("NPL") consists of the Mozilla Public License Version 1.1 with the following Amendments, including Exhibit A-Netscape Public License.  Files identified with "Exhibit A-Netscape Public License" are governed by the Netscape Public License Version 1.1. +Additional Terms applicable to the Netscape Public License. +I. Effect. +These additional terms described in this Netscape Public License -- Amendments shall apply to the Mozilla Communicator client code and to all Covered Code under this License. +II. ''Netscape's Branded Code'' means Covered Code that Netscape distributes and/or permits others to distribute under one or more trademark(s) which are controlled by Netscape but which are not licensed for use under this License. +III. Netscape and logo. +This License does not grant any rights to use the trademarks "Netscape'', the "Netscape N and horizon'' logo or the "Netscape lighthouse" logo, "Netcenter", "Gecko", "Java" or "JavaScript", "Smart Browsing" even if such marks are included in the Original Code or Modifications. +IV. Inability to Comply Due to Contractual Obligation. +Prior to licensing the Original Code under this License, Netscape has licensed third party code for use in Netscape's Branded Code. To the extent that Netscape is limited contractually from making such third party code available under this License, Netscape may choose to reintegrate such code into Covered Code without being required to distribute such code in Source Code form, even if such code would otherwise be considered ''Modifications'' under this License. +V. Use of Modifications and Covered Code by Initial Developer. +V.1. In General. +The obligations of Section 3 apply to Netscape, except to the extent specified in this Amendment, Section V.2 and V.3. +V.2. Other Products. +Netscape may include Covered Code in products other than the Netscape's Branded Code which are released by Netscape during the two (2) years following the release date of the Original Code, without such additional products becoming subject to the terms of this License, and may license such additional products on different terms from those contained in this License. +V.3. Alternative Licensing. +Netscape may license the Source Code of Netscape's Branded Code, including Modifications incorporated therein, without such Netscape Branded Code becoming subject to the terms of this License, and may license such Netscape Branded Code on different terms from those contained in this License. +  +VI. Litigation. +Notwithstanding the limitations of Section 11 above, the provisions regarding litigation in Section 11(a), (b) and (c) of the License shall apply to all disputes relating to this License. + +EXHIBIT A-Netscape Public License. +  +''The contents of this file are subject to the Netscape Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/NPL/ +Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. +The Original Code is Mozilla Communicator client code, released March 31, 1998. +The Initial Developer of the Original Code is Netscape Communications Corporation. Portions created by Netscape are Copyright (C) 1998-1999 Netscape Communications Corporation. All Rights Reserved. +Contributor(s): ______________________________________. +  +Alternatively, the contents of this file may be used under the terms of the _____ license (the  "[___] License"), in which case the provisions of [______] License are applicable  instead of those above.  If you wish to allow use of your version of this file only under the terms of the [____] License and not to allow others to use your version of this file under the NPL, indicate your decision by deleting  the provisions above and replace  them with the notice and other provisions required by the [___] License.  If you do not delete the provisions above, a recipient may use your version of this file under either the NPL or the [___] License." + +MOZILLA PUBLIC LICENSE +Version 1.1 + +1. Definitions. +1.0.1. "Commercial Use" means distribution or otherwise making the Covered Code available to a third party. +1.1. ''Contributor'' means each entity that creates or contributes to the creation of Modifications. +1.2. ''Contributor Version'' means the combination of the Original Code, prior Modifications used by a Contributor, and the Modifications made by that particular Contributor. +1.3. ''Covered Code'' means the Original Code or Modifications or the combination of the Original Code and Modifications, in each case including portions thereof. +1.4. ''Electronic Distribution Mechanism'' means a mechanism generally accepted in the software development community for the electronic transfer of data. +1.5. ''Executable'' means Covered Code in any form other than Source Code. +1.6. ''Initial Developer'' means the individual or entity identified as the Initial Developer in the Source Code notice required by Exhibit A. +1.7. ''Larger Work'' means a work which combines Covered Code or portions thereof with code not governed by the terms of this License. +1.8. ''License'' means this document. +1.8.1. "Licensable" means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein. +1.9. ''Modifications'' means any addition to or deletion from the substance or structure of either the Original Code or any previous Modifications. When Covered Code is released as a series of files, a Modification is: +A. Any addition to or deletion from the contents of a file containing Original Code or previous Modifications. +B. Any new file that contains any part of the Original Code or previous Modifications. +  +1.10. ''Original Code'' means Source Code of computer software code which is described in the Source Code notice required by Exhibit A as Original Code, and which, at the time of its release under this License is not already Covered Code governed by this License. +1.10.1. "Patent Claims" means any patent claim(s), now owned or hereafter acquired, including without limitation,  method, process, and apparatus claims, in any patent Licensable by grantor. +1.11. ''Source Code'' means the preferred form of the Covered Code for making modifications to it, including all modules it contains, plus any associated interface definition files, scripts used to control compilation and installation of an Executable, or source code differential comparisons against either the Original Code or another well known, available Covered Code of the Contributor's choice. The Source Code can be in a compressed or archival form, provided the appropriate decompression or de-archiving software is widely available for no charge. +1.12. "You'' (or "Your")  means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License or a future version of this License issued under Section 6.1. For legal entities, "You'' includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, "control'' means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity. +2. Source Code License. +2.1. The Initial Developer Grant. +The Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims: +(a)  under intellectual property rights (other than patent or trademark) Licensable by Initial Developer to use, reproduce, modify, display, perform, sublicense and distribute the Original Code (or portions thereof) with or without Modifications, and/or as part of a Larger Work; and +(b) under Patents Claims infringed by the making, using or selling of Original Code, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Code (or portions thereof). +  +(c) the licenses granted in this Section 2.1(a) and (b) are effective on the date Initial Developer first distributes Original Code under the terms of this License. +(d) Notwithstanding Section 2.1(b) above, no patent license is granted: 1) for code that You delete from the Original Code; 2) separate from the Original Code;  or 3) for infringements caused by: i) the modification of the Original Code or ii) the combination of the Original Code with other software or devices. +  +2.2. Contributor Grant. +Subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license +  +(a)  under intellectual property rights (other than patent or trademark) Licensable by Contributor, to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof) either on an unmodified basis, with other Modifications, as Covered Code and/or as part of a Larger Work; and +(b) under Patent Claims infringed by the making, using, or selling of  Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: 1) Modifications made by that Contributor (or portions thereof); and 2) the combination of  Modifications made by that Contributor with its Contributor Version (or portions of such combination). +(c) the licenses granted in Sections 2.2(a) and 2.2(b) are effective on the date Contributor first makes Commercial Use of the Covered Code. +(d)    Notwithstanding Section 2.2(b) above, no patent license is granted: 1) for any code that Contributor has deleted from the Contributor Version; 2)  separate from the Contributor Version;  3)  for infringements caused by: i) third party modifications of Contributor Version or ii)  the combination of Modifications made by that Contributor with other software  (except as part of the Contributor Version) or other devices; or 4) under Patent Claims infringed by Covered Code in the absence of Modifications made by that Contributor. + +3. Distribution Obligations. +3.1. Application of License. +The Modifications which You create or to which You contribute are governed by the terms of this License, including without limitation Section 2.2. The Source Code version of Covered Code may be distributed only under the terms of this License or a future version of this License released under Section 6.1, and You must include a copy of this License with every copy of the Source Code You distribute. You may not offer or impose any terms on any Source Code version that alters or restricts the applicable version of this License or the recipients' rights hereunder. However, You may include an additional document offering the additional rights described in Section 3.5. +3.2. Availability of Source Code. +Any Modification which You create or to which You contribute must be made available in Source Code form under the terms of this License either on the same media as an Executable version or via an accepted Electronic Distribution Mechanism to anyone to whom you made an Executable version available; and if made available via Electronic Distribution Mechanism, must remain available for at least twelve (12) months after the date it initially became available, or at least six (6) months after a subsequent version of that particular Modification has been made available to such recipients. You are responsible for ensuring that the Source Code version remains available even if the Electronic Distribution Mechanism is maintained by a third party. +3.3. Description of Modifications. +You must cause all Covered Code to which You contribute to contain a file documenting the changes You made to create that Covered Code and the date of any change. You must include a prominent statement that the Modification is derived, directly or indirectly, from Original Code provided by the Initial Developer and including the name of the Initial Developer in (a) the Source Code, and (b) in any notice in an Executable version or related documentation in which You describe the origin or ownership of the Covered Code. +3.4. Intellectual Property Matters +(a) Third Party Claims. +If Contributor has knowledge that a license under a third party's intellectual property rights is required to exercise the rights granted by such Contributor under Sections 2.1 or 2.2, Contributor must include a text file with the Source Code distribution titled "LEGAL'' which describes the claim and the party making the claim in sufficient detail that a recipient will know whom to contact. If Contributor obtains such knowledge after the Modification is made available as described in Section 3.2, Contributor shall promptly modify the LEGAL file in all copies Contributor makes available thereafter and shall take other steps (such as notifying appropriate mailing lists or newsgroups) reasonably calculated to inform those who received the Covered Code that new knowledge has been obtained. +(b) Contributor APIs. +If Contributor's Modifications include an application programming interface and Contributor has knowledge of patent licenses which are reasonably necessary to implement that API, Contributor must also include this information in the LEGAL file. +  +          (c)    Representations. +Contributor represents that, except as disclosed pursuant to Section 3.4(a) above, Contributor believes that Contributor's Modifications are Contributor's original creation(s) and/or Contributor has sufficient rights to grant the rights conveyed by this License. + +3.5. Required Notices. +You must duplicate the notice in Exhibit A in each file of the Source Code.  If it is not possible to put such notice in a particular Source Code file due to its structure, then You must include such notice in a location (such as a relevant directory) where a user would be likely to look for such a notice.  If You created one or more Modification(s) You may add your name as a Contributor to the notice described in Exhibit A.  You must also duplicate this License in any documentation for the Source Code where You describe recipients' rights or ownership rights relating to Covered Code.  You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Code. However, You may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear than any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer. +3.6. Distribution of Executable Versions. +You may distribute Covered Code in Executable form only if the requirements of Section 3.1-3.5 have been met for that Covered Code, and if You include a notice stating that the Source Code version of the Covered Code is available under the terms of this License, including a description of how and where You have fulfilled the obligations of Section 3.2. The notice must be conspicuously included in any notice in an Executable version, related documentation or collateral in which You describe recipients' rights relating to the Covered Code. You may distribute the Executable version of Covered Code or ownership rights under a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable version does not attempt to limit or alter the recipient's rights in the Source Code version from the rights set forth in this License. If You distribute the Executable version under a different license You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or any Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer. +3.7. Larger Works. +You may create a Larger Work by combining Covered Code with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Code. +4. Inability to Comply Due to Statute or Regulation. +If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Code due to statute, judicial order, or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be included in the LEGAL file described in Section 3.4 and must be included with all distributions of the Source Code. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it. +5. Application of this License. +This License applies to code to which the Initial Developer has attached the notice in Exhibit A and to related Covered Code. +6. Versions of the License. +6.1. New Versions. +Netscape Communications Corporation (''Netscape'') may publish revised and/or new versions of the License from time to time. Each version will be given a distinguishing version number. +6.2. Effect of New Versions. +Once Covered Code has been published under a particular version of the License, You may always continue to use it under the terms of that version. You may also choose to use such Covered Code under the terms of any subsequent version of the License published by Netscape. No one other than Netscape has the right to modify the terms applicable to Covered Code created under this License. +6.3. Derivative Works. +If You create or use a modified version of this License (which you may only do in order to apply it to code which is not already Covered Code governed by this License), You must (a) rename Your license so that the phrases ''Mozilla'', ''MOZILLAPL'', ''MOZPL'', ''Netscape'', "MPL", ''NPL'' or any confusingly similar phrase do not appear in your license (except to note that your license differs from this License) and (b) otherwise make it clear that Your version of the license contains terms which differ from the Mozilla Public License and Netscape Public License. (Filling in the name of the Initial Developer, Original Code or Contributor in the notice described in Exhibit A shall not of themselves be deemed to be modifications of this License.) +7. DISCLAIMER OF WARRANTY. +COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS'' BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. +8. TERMINATION. +8.1.  This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. All sublicenses to the Covered Code which are properly granted shall survive any termination of this License. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive. +8.2.  If You initiate litigation by asserting a patent infringement claim (excluding declatory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You file such action is referred to as "Participant")  alleging that: +(a)  such Participant's Contributor Version directly or indirectly infringes any patent, then any and all rights granted by such Participant to You under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively, unless if within 60 days after receipt of notice You either: (i)  agree in writing to pay Participant a mutually agreeable reasonable royalty for Your past and future use of Modifications made by such Participant, or (ii) withdraw Your litigation claim with respect to the Contributor Version against such Participant.  If within 60 days of notice, a reasonable royalty and payment arrangement are not mutually agreed upon in writing by the parties or the litigation claim is not withdrawn, the rights granted by Participant to You under Sections 2.1 and/or 2.2 automatically terminate at the expiration of the 60 day notice period specified above. +(b)  any software, hardware, or device, other than such Participant's Contributor Version, directly or indirectly infringes any patent, then any rights granted to You by such Participant under Sections 2.1(b) and 2.2(b) are revoked effective as of the date You first made, used, sold, distributed, or had made, Modifications made by that Participant. +8.3.  If You assert a patent infringement claim against Participant alleging that such Participant's Contributor Version directly or indirectly infringes any patent where such claim is resolved (such as by license or settlement) prior to the initiation of patent infringement litigation, then the reasonable value of the licenses granted by such Participant under Sections 2.1 or 2.2 shall be taken into account in determining the amount or value of any payment or license. +8.4.  In the event of termination under Sections 8.1 or 8.2 above,  all end user license agreements (excluding distributors and resellers) which have been validly granted by You or any distributor hereunder prior to termination shall survive termination. +9. LIMITATION OF LIABILITY. +UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. +10. U.S. GOVERNMENT END USERS. +The Covered Code is a ''commercial item,'' as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of ''commercial computer software'' and ''commercial computer software documentation,'' as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Code with only those rights set forth herein. +11. MISCELLANEOUS. +This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by California law provisions (except to the extent applicable law, if any, provides otherwise), excluding its conflict-of-law provisions. With respect to disputes in which at least one party is a citizen of, or an entity chartered or registered to do business in the United States of America, any litigation relating to this License shall be subject to the jurisdiction of the Federal Courts of the Northern District of California, with venue lying in Santa Clara County, California, with the losing party responsible for costs, including without limitation, court costs and reasonable attorneys' fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. +12. RESPONSIBILITY FOR CLAIMS. +As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability. +13. MULTIPLE-LICENSED CODE. +Initial Developer may designate portions of the Covered Code as "Multiple-Licensed".  "Multiple-Licensed" means that the Initial Developer permits you to utilize portions of the Covered Code under Your choice of the NPL or the alternative licenses, if any, specified by the Initial Developer in the file described in Exhibit A. + +EXHIBIT A -Mozilla Public License. +``The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at +http://www.mozilla.org/MPL/ +Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF +ANY KIND, either express or implied. See the License for the specific language governing rights and +limitations under the License. +The Original Code is ______________________________________. +The Initial Developer of the Original Code is ________________________. Portions created by + ______________________ are Copyright (C) ______ _______________________. All Rights +Reserved. +Contributor(s): ______________________________________. +Alternatively, the contents of this file may be used under the terms of the _____ license (the  "[___] License"), in which case the provisions of [______] License are applicable  instead of those above.  If you wish to allow use of your version of this file only under the terms of the [____] License and not to allow others to use your version of this file under the MPL, indicate your decision by deleting  the provisions above and replace  them with the notice and other provisions required by the [___] License.  If you do not delete the provisions above, a recipient may use your version of this file under either the MPL or the [___] License." +[NOTE: The text of this Exhibit A may differ slightly from the text of the notices in the Source Code files of the Original Code. You should use the text of this Exhibit A rather than the text found in the Original Code Source Code for Your Modifications.] + +%% This notice is provided with respect to Mesa 3-D graphics library v. 5, which may be included with this software: + +Copyright (c) 2007 The Khronos Group Inc. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and/or associated documentation files (the +"Materials"), to deal in the Materials without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Materials, and to +permit persons to whom the Materials are furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Materials. + +THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. + +%% This notice is provided with respect to Byte Code Engineering Library (BCEL), which may be included with this software: + + Apache Software License + + /* +==================================================================== * The Apache Software License, Version 1.1 + * + * Copyright (c) 2001 The Apache Software Foundation. Allrights + * reserved. + * + * Redistribution and use in source and binary forms, withor without + * modification, are permitted provided that the followingconditions + * are met: + * + * 1. Redistributions of source code must retain the abovecopyright + * notice, this list of conditions and the followingdisclaimer. + * + * 2. Redistributions in binary form must reproduce theabove copyright + * notice, this list of conditions and the followingdisclaimer in + * the documentation and/or other materials providedwith the + * distribution. + * + * 3. The end-user documentation included with theredistribution, + * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation +(http://www.apache.org/)." + * Alternately, this acknowledgment may appear in thesoftware itself, + * if and wherever such third-party acknowledgmentsnormally appear. + * + * 4. The names "Apache" and "Apache Software Foundation"and + * "Apache BCEL" must not be used to endorse or promoteproducts + * derived from this software without prior writtenpermission. For + * written permission, please contact apache@apache.org. * + * 5. Products derived from this software may not be called"Apache", + * "Apache BCEL", nor may "Apache" appear in their name,without + * prior written permission of the Apache SoftwareFoundation. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED ORIMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIEDWARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSEARE + * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWAREFOUNDATION OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVERCAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICTLIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING INANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THEPOSSIBILITY OF + * SUCH DAMAGE. + * +==================================================================== * + * This software consists of voluntary contributions madeby many + * individuals on behalf of the Apache Software +Foundation. For more + * information on the Apache Software Foundation, pleasesee + * . + */ + +%% This notice is provided with respect to Regexp, Regular Expression Package, which may be included with this software: + +The Apache Software License, Version 1.1 +Copyright (c) 2001 The Apache Software Foundation. All rights +reserved. +Redistribution and use in source and binary forms, with or without modification,are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in +the documentation and/or other materials provided with the +distribution. + +3. The end-user documentation included with the redistribution, +if any, must include the following acknowledgment: +"This product includes software developed by the +Apache Software Foundation (http://www.apache.org/)." +Alternately, this acknowledgment may appear in the software itself, +if and wherever such third-party acknowledgments normally appear. + +4. The names "Apache" and "Apache Software Foundation" and +"Apache Turbine" must not be used to endorse or promote products +derived from this software without prior written permission. For +written permission, please contact apache@apache.org. + +5. Products derived from this software may not be called "Apache", +"Apache Turbine", nor may "Apache" appear in their name, without +prior written permission of the Apache Software Foundation. + +THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR +ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +==================================================================== +This software consists of voluntary contributions made by many +individuals on behalf of the Apache Software Foundation. For more +information on the Apache Software Foundation, please see + +http://www.apache.org. + +%% This notice is provided with respect to CUP Parser Generator for Java, which may be included with this software: + +CUP Parser Generator Copyright Notice, License, and Disclaimer + +Copyright 1996-1999 by Scott Hudson, Frank Flannery, C. Scott Ananian +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided thatthe above copyright notice appear in all copies and that both the copyrightnotice and this permission notice and warranty disclaimer appear in +supporting documentation, and that the names of the authors or their employersnot be used in advertising or publicity pertaining to distribution of +the software without specific, written prior permission. + +The authors and their employers disclaim all warranties with regard to thissoftware, including all implied warranties of merchantability and +fitness. In no event shall the authors or their employers be liable for anyspecial, indirect or consequential damages or any damages whatsoever +resulting from loss of use, data or profits, whether in an action of contract,negligence or other tortious action, arising out of or in connection withthe use or performance of this software. + +%% This notice is provided with respect to SAX v. 2.0.1, which may be included with this software: + +Copyright Status + + SAX is free! + + In fact, it's not possible to own a license to SAX, since it's been placed in the public + domain. + + No Warranty + + Because SAX is released to the public domain, there is no warranty for the design or for + the software implementation, to the extent permitted by applicable law. Except when + otherwise stated in writing the copyright holders and/or other parties provide SAX "as is" + without warranty of any kind, either expressed or implied, including, but not limited to, the + implied warranties of merchantability and fitness for a particular purpose. The entire risk as + to the quality and performance of SAX is with you. Should SAX prove defective, you + assume the cost of all necessary servicing, repair or correction. + + In no event unless required by applicable law or agreed to in writing will any copyright + holder, or any other party who may modify and/or redistribute SAX, be liable to you for + damages, including any general, special, incidental or consequential damages arising out of + the use or inability to use SAX (including but not limited to loss of data or data being + rendered inaccurate or losses sustained by you or third parties or a failure of the SAX to + operate with any other programs), even if such holder or other party has been advised of + the possibility of such damages. + + Copyright Disclaimers + + This page includes statements to that effect by David Megginson, who would have been + able to claim copyright for the original work. + SAX 1.0 + + Version 1.0 of the Simple API for XML (SAX), created collectively by the membership of + the XML-DEV mailing list, is hereby released into the public domain. + + No one owns SAX: you may use it freely in both commercial and non-commercial + applications, bundle it with your software distribution, include it on a CD-ROM, list the + source code in a book, mirror the documentation at your own web site, or use it in any + other way you see fit. + + David Megginson, sax@megginson.com + 1998-05-11 + + SAX 2.0 + + I hereby abandon any property rights to SAX 2.0 (the Simple API for XML), and release + all of the SAX 2.0 source code, compiled code, and documentation contained in this + distribution into the Public Domain. SAX comes with NO WARRANTY or guarantee of + fitness for any purpose. + + David Megginson, david@megginson.com + 2000-05-05 + +%% This notice is provided with respect to Cryptix, which may be included with this software: + +Cryptix General License + +Copyright © 1995-2003 The Cryptix Foundation Limited. All rights reserved. +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions aremet: + + 1.Redistributions of source code must retain the copyright notice, this list of conditions and the following disclaimer. 2.Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +THIS SOFTWARE IS PROVIDED BY THE CRYPTIX FOUNDATION LIMITED AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS ORIMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FORA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE CRYPTIX FOUNDATION LIMITED OR CONTRIBUTORS BELIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOTLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESSINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OFTHE POSSIBILITY OF SUCH DAMAGE. + +%% This notice is provided with respect to X Window System, which may be included with this software: + +Copyright The Open Group + +Permission to use, copy, modify, distribute, and sell this software and itsdocumentation for any purpose is hereby granted without fee, provided that theabove copyright notice appear in all copies and that both that copyright noticeand this permission notice appear in supporting documentation. + +The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESSFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUPBE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OFCONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THESOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. + +Portions also covered by other licenses as noted in the above URL. + +%% This notice is provided with respect to Retroweaver, which may be included with this software: + +Copyright (c) February 2004, Toby Reyelts +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +Neither the name of Toby Reyelts nor the names of his contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICTLIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +%% This notice is provided with respect to stripper, which may be included with this software: + +Stripper : debug information stripper + Copyright (c) 2003 Kohsuke Kawaguchi + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holders nor the names of its + contributors may be used to endorse or promote products derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +%% This notice is provided with respect to libpng official PNG reference library, which may be included with this software: + +This copy of the libpng notices is provided for your convenience. In case ofany discrepancy between this copy and the notices in the file png.h that isincluded in the libpng distribution, the latter shall prevail. + +COPYRIGHT NOTICE, DISCLAIMER, and LICENSE: + +If you modify libpng you may insert additional notices immediately followingthis sentence. + +libpng version 1.2.6, December 3, 2004, is +Copyright (c) 2004 Glenn Randers-Pehrson, and is +distributed according to the same disclaimer and license as libpng-1.2.5with the following individual added to the list of Contributing Authors + Cosmin Truta + +libpng versions 1.0.7, July 1, 2000, through 1.2.5 - October 3, 2002, areCopyright (c) 2000-2002 Glenn Randers-Pehrson, and are +distributed according to the same disclaimer and license as libpng-1.0.6with the following individuals added to the list of Contributing Authors + Simon-Pierre Cadieux + Eric S. Raymond + Gilles Vollant + +and with the following additions to the disclaimer: + + There is no warranty against interference with your enjoyment of the library or against infringement. There is no warranty that our + efforts or the library will fulfill any of your particular purposes or needs. This library is provided with all faults, and the entire risk of satisfactory quality, performance, accuracy, and effort is with the user. + +libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, areCopyright (c) 1998, 1999 Glenn Randers-Pehrson, and are +distributed according to the same disclaimer and license as libpng-0.96,with the following individuals added to the list of Contributing Authors: + Tom Lane + Glenn Randers-Pehrson + Willem van Schaik + +libpng versions 0.89, June 1996, through 0.96, May 1997, are +Copyright (c) 1996, 1997 Andreas Dilger +Distributed according to the same disclaimer and license as libpng-0.88,with the following individuals added to the list of Contributing Authors: + John Bowler + Kevin Bracey + Sam Bushell + Magnus Holmgren + Greg Roelofs + Tom Tanner + +libpng versions 0.5, May 1995, through 0.88, January 1996, are +Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. + +For the purposes of this copyright and license, "Contributing Authors"is defined as the following set of individuals: + + Andreas Dilger + Dave Martindale + Guy Eric Schalnat + Paul Schmidt + Tim Wegner + +The PNG Reference Library is supplied "AS IS". The Contributing Authorsand Group 42, Inc. disclaim all warranties, expressed or implied, +including, without limitation, the warranties of merchantability and offitness for any purpose. The Contributing Authors and Group 42, Inc. +assume no liability for direct, indirect, incidental, special, exemplary,or consequential damages, which may result from the use of the PNG +Reference Library, even if advised of the possibility of such damage. + +Permission is hereby granted to use, copy, modify, and distribute thissource code, or portions hereof, for any purpose, without fee, subjectto the following restrictions: + +1. The origin of this source code must not be misrepresented. + +2. Altered versions must be plainly marked as such and must not + be misrepresented as being the original source. + +3. This Copyright notice may not be removed or altered from any + source or altered source distribution. + +The Contributing Authors and Group 42, Inc. specifically permit, withoutfee, and encourage the use of this source code as a component to +supporting the PNG file format in commercial products. If you use thissource code in a product, acknowledgment is not required but would be +appreciated. + + +A "png_get_copyright" function is available, for convenient use in "about"boxes and the like: + + printf("%s",png_get_copyright(NULL)); + +Also, the PNG logo (in PNG format, of course) is supplied in the +files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31). + +Libpng is OSI Certified Open Source Software. OSI Certified Open Source is acertification mark of the Open Source Initiative. + +Glenn Randers-Pehrson +glennrp at users.sourceforge.net +December 3, 2004 + +%% This notice is provided with respect to Libungif - An uncompressed GIF library, which may be included with this software: + +The GIFLIB distribution is Copyright (c) 1997 Eric S. Raymond + +Permission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included inall copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS INTHE SOFTWARE. + +%% This notice is provided with respect to XML Resolver library, Xalan J2, and StAX API, which may be included with this software: + +[Apache 2.0 license removed from this file. On Debian systems the text of + the Apache 2.0 license can be found in /usr/share/common-licenses/Apache-2.0 ] + +%% Some Portions licensed from IBM are available at: +http://www.ibm.com/software/globalization/icu/ + +%% This notice is provided with respect to ICU4J, ICU 1.8.1 and later, which may be included with this software: + +ICU License - ICU 1.8.1 and later COPYRIGHT AND PERMISSION NOTICE Cop +yright (c) +1995-2003 International Business Machines Corporation and others All rightsreserved. Permission is hereby granted, free of charge, to any person obtaininga copy of this software and associated documentation files (the "Software"), todeal in the Software without restriction, including without limitation therights to use, copy, modify, merge, publish, distribute, and/or sell copies ofthe Software, and to permit persons to whom the Software is furnished to do so,provided that the above copyright notice(s) and this permission notice appear inall copies of the Software and that both the above copyright notice(s) and thispermission notice appear in supporting documentation. THE SOFTWARE IS PROVIDED"AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOTLIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSEAND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHTHOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY C + LAIM, OR ANYSPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTINGFROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCEOR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE ORPERFORMANCE OF THIS SOFTWARE. Except as contained in this notice, the name of acopyright holder shall not be used in advertising or otherwise to promote thesale, use or other dealings in this Software without prior written authorizationof the copyright holder. + +%% This notice is provided with respect to Jing, which may be included with this software: + +Jing Copying Conditions + +Copyright (c) 2001-2003 Thai Open Source Software Center Ltd +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification,are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice,this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice,this list of conditions and the following disclaimer in the documentation and/orother materials provided with the distribution. + * Neither the name of the Thai Open Source Software Center Ltd nor the namesof its contributors may be used to endorse or promote products derived from thissoftware without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ANDANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIEDWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AREDISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANYDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ONANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THISSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +%% This notice is provided with respect to RELAX NG Object Model/Parser, which may be included with this software: + + +The MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy ofthis software and associated documentation files (the "Software"), to deal inthe Software without restriction, including without limitation the rights touse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies ofthe Software, and to permit persons to whom the Software is furnished to do so,subject to the following conditions: + +The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESSFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS ORCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHERIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR INCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +%% This notice is provided with respect to XFree86-VidMode Extension, which may be included with this software: + +Version 1.1 of XFree86 ProjectLicence. + + Copyright (C) 1994-2004 The XFree86 Project, Inc. All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to deal inthe Software without restriction, including without limitation the rights touse, copy, modify, merge, publish, distribute, sublicence, and/or sell copies ofthe Software, and to permit persons to whom the Software is furnished to do so,subject to the following conditions: + + 1. Redistributions of source code must retain the above copyright notice,this list of conditions, and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyrightnotice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution, and in thesame place and form as other copyright, license and disclaimer information. 3. The end-user documentation included with the redistribution, if any,must include the following acknowledgment: "This product includes softwaredeveloped by The XFree86 Project, Inc (http://www.xfree86.org/) and itscontributors", in the same place and form as other third-party acknowledgments.Alternately, this acknowledgment may appear in the software itself, in the sameform and location as other such third-party acknowledgments. + 4. Except as contained in this notice, the name of The XFree86 Project,Inc shall not be used in advertising or otherwise to promote the sale, use orother dealings in this Software without prior written authorization from TheXFree86 Project, Inc. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY ANDFITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE XFREE86PROJECT, INC OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; ORBUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER INCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISINGIN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITYOF SUCH DAMAGE. + +%% This notice is provided with respect to XML Security, which may be included with this software: + + The Apache Software License, + Version 1.1 + + + PDF + + + Copyright (C) 2002 The Apache SoftwareFoundation. + All rights reserved. Redistribution anduse in + source and binary forms, with or withoutmodifica- + tion, are permitted provided that thefollowing + conditions are met: 1. Redistributions ofsource + code must retain the above copyrightnotice, this + list of conditions and the followingdisclaimer. + 2. Redistributions in binary form mustreproduce + the above copyright notice, this list of conditions and the following disclaimerin the + documentation and/or other materialsprovided with + the distribution. 3. The end-userdocumentation + included with the redistribution, if any,must + include the following acknowledgment:"This + product includes software developed bythe Apache + Software Foundation +(http://www.apache.org/)." + Alternately, this acknowledgment mayappear in the + software itself, if and wherever suchthird-party + acknowledgments normally appear. 4. Thenames + "Apache Forrest" and "Apache SoftwareFoundation" + must not be used to endorse or promoteproducts + derived from this software without priorwritten + permission. For written permission,please contact + apache@apache.org. 5. Products derivedfrom this + software may not be called "Apache", normay + "Apache" appear in their name, withoutprior + written permission of the Apache Software Foundation. THIS SOFTWARE IS PROVIDED``AS IS'' + AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THEIMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESSFOR A + PARTICULAR PURPOSE ARE DISCLAIMED. IN NOEVENT + SHALL THE APACHE SOFTWARE FOUNDATION ORITS + CONTRIBUTORS BE LIABLE FOR ANY DIRECT,INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, ORCONSEQUENTIAL + DAMAGES (INCLU- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS ORSERVICES; LOSS + OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANYTHEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICTLIABILITY, + OR TORT (INCLUDING NEGLIGENCE OROTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THEPOSSIBILITY OF + SUCH DAMAGE. This software consists ofvoluntary + contributions made by many individuals onbehalf + of the Apache Software Foundation. Formore + information on the Apache SoftwareFoundation, + please see . + +%% This notice is provided with respect to Independent JPEG Group's software (libjpeg), which may be included with this software: + +In plain English: + +1. We don't promise that this software works. (But if you find any bugs, + please let us know!) +2. You can use this software for whatever you want. You don't have to pay us. +3. You may not pretend that you wrote this software. If you use it in a program, you must acknowledge somewhere in your documentation that you've used the IJG code. + +In legalese: + +The authors make NO WARRANTY or representation, either express or implied, with respect to this software, its quality, accuracy, merchantability, or fitness for a particular purpose. This software is provided "AS IS", and you, its user, assume the entire risk as to its quality and accuracy. + +This software is copyright (C) 1991-1998, Thomas G. Lane. +All Rights Reserved except as specified below. + +Permission is hereby granted to use, copy, modify, and distribute this software (or portions thereof) for any purpose, without fee, subject to these conditions: + +(1) If any part of the source code for this software is distributed, then this +README file must be included, with this copyright and no-warranty notice unaltered; and any additions, deletions, or changes to the original files must be clearly indicated in accompanying documentation. + +(2) If only executable code is distributed, then the accompanying documentation must state that "this software is based in part on the work of the Independent JPEG Group". + +(3) Permission for use of this software is granted only if the user accepts full responsibility for any undesirable consequences; the authors accept NO LIABILITY for damages of any kind. + +These conditions apply to any software derived from or based on the IJG code, not just to the unmodified library. If you use our work, you ought to acknowledge us. + +Permission is NOT granted for the use of any IJG author's name or company name in advertising or publicity relating to this software or products derived from it. This software may be referred to only as "the Independent JPEG Group's software". + +We specifically permit and encourage the use of this software as the basis of commercial products, provided that all warranty or liability claims are assumed by the product vendor. + +ansi2knr.c is included in this distribution by permission of L. Peter Deutsch, sole proprietor of its copyright holder, Aladdin Enterprises of Menlo Park, CA. ansi2knr.c is NOT covered by the above copyright and conditions, but instead by the usual distribution terms of the Free Software Foundation; principally, that you must include source code if you redistribute it. (See the file ansi2knr.c for full details.) However, since ansi2knr.c is not needed as part of any program generated from the IJG code, this does not limit you more than the foregoing paragraphs do. + +The Unix configuration script "configure" was produced with GNU Autoconf. It is copyright by the Free Software Foundation but is freely distributable. The same holds for its supporting scripts (config.guess, config.sub, ltconfig, ltmain.sh). Another support script, install-sh, is copyright by M.I.T. but is also freely distributable. + +It appears that the arithmetic coding option of the JPEG spec is covered by patents owned by IBM, AT&T, and Mitsubishi. Hence arithmetic coding cannot legally be used without obtaining one or more licenses. For this reason, support for arithmetic coding has been removed from the free JPEG software. (Since arithmetic coding provides only a marginal gain over the unpatented Huffman mode, it is unlikely that very many implementations will support it.) So far as we are aware, there are no patent restrictions on the remaining code. + +The IJG distribution formerly included code to read and write GIF files. To avoid entanglement with the Unisys LZW patent, GIF reading support has been removed altogether, and the GIF writer has been simplified to produce "uncompressed GIFs". This technique does not use the LZW algorithm; the resulting GIF files are larger than usual, but are readable by all standard GIF decoders. + +We are required to state that + "The Graphics Interchange Format(c) is the Copyright property of + CompuServe Incorporated. GIF(sm) is a Service Mark property of + CompuServe Incorporated." + +%% This notice is provided with respect to X Resize and Rotate (Xrandr) Extension, which may be included with this software: +2. XFree86 License + +XFree86 code without an explicit copyright is covered by the following +copyright/license: + +Copyright (C) 1994-2003 The XFree86 Project, Inc. All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE XFREE86 +PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the XFree86 Project shall not be +used in advertising or otherwise to promote the sale, use or other dealings in +this Software without prior written authorization from the XFree86 Project. + +%% This notice is provided with respect to fontconfig, which may be included with this software: +Id: COPYING,v 1.3 2003/04/04 20:17:40 keithp Exp $ +Copyright 2001,2003 Keith Packard + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation, and that the name of Keith Packard not be used in +advertising or publicity pertaining to distribution of the software without +specific, written prior permission. Keith Packard makes no +representations about the suitability of this software for any purpose. It +is provided "as is" without express or implied warranty. + +KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +%% This notice is provided with respect to XFree86, which may be included with this software: +Copyright (C) 1994-2002 The XFree86 Project, Inc. All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated +documentation files (the "Software"), to deal in the Software without +restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT +NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the XFree86 Project shall not be +used in advertising or otherwise +to promote the sale, use or other dealings in this Software without prior +written authorization from the XFree86 +Project. +%% This notice is provided with respect to Fast Infoset, which may be included with this software: +* Fast Infoset ver. 0.1 software ("Software") +* +* Copyright, 2004-2005 Sun Microsystems, Inc. All Rights Reserved. +* +* Software is licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. You may +* obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +* License for the specific language governing permissions and limitations. +* +* Sun supports and benefits from the global community of open source +* developers, and thanks the community for its important contributions and +* open standards-based technology, which Sun has adopted into many of its +* products. +* +* Please note that portions of Software may be provided with notices and +* open source licenses from such communities and third parties that govern the +* use of those portions, and any licenses granted hereunder do not alter any +* rights and obligations you may have under such open source licenses, +* however, the disclaimer of warranty and limitation of liability provisions +* in this License will apply to all Software in this distribution. +* +* You acknowledge that the Software is not designed, licensed or intended +* for use in the design, construction, operation or maintenance of any nuclear +* facility. +* +* Apache License +* Version 2.0, January 2004 +* http://www.apache.org/licenses/ +* +*/ +/* +* ==================================================================== +* +* This code is subject to the freebxml License, Version 1.1 +* +* Copyright (c) 2001 - 2005 freebxml.org. All rights reserved. +* +* $Header: /cvs/fi/FastInfoset/src/com/sun/xml/internal/fastinfoset/AbstractResourceBundle.java,v 1.2 +*  ==================================================================== +*/ +%% This notice is provided with respect to Kerberos, which may be included with this software: + +/* + * Copyright (C) 1998 by the FundsXpress, INC. + * + * All rights reserved. + * + * Export of this software from the United States of America may require + * a specific license from the United States Government.  It is the + * responsibility of any person or organization contemplating export to + * obtain such a license before exporting. + * + * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and + * distribute this software and its documentation for any purpose and + * without fee is hereby granted, provided that the above copyright + * notice appear in all copies and that both that copyright notice and + * this permission notice appear in supporting documentation, and that + * the name of FundsXpress. not be used in advertising or publicity pertaining + * to distribution of the software without specific, written prior + * permission. FundsXpress makes no representations about the suitability of + * this software for any purpose. It is provided "as is" without express + * or implied warranty. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + */ + +%% This notice is provided with respect to Unicode's CLDR data repository, which may be included with this software: + + Unicode Copyright + + For the general privacy policy governing access to this site, see the +Unicode Privacy Policy. For trademark usage, see the the Unicode Consortium +Trademarks and Logo Policy. + Notice to End User: Terms of Use + Carefully read the following legal agreement ("Agreement"). Use or copying +of the software and/or codes provided with this agreement (The "Software") +constitutes your acceptance of these terms + + 1. Unicode Copyright. + 1. Copyright © 1991-2005 Unicode, Inc. All rights reserved. + 2. Certain documents and files on this website contain a legend +indicating that "Modification is permitted." Any person is hereby authorized, +without fee, to modify such documents and files to create derivative works +conforming to the Unicode® Standard, subject to Terms and Conditions herein. + 3. Any person is hereby authorized, without fee, to view, use, +reproduce, and distribute all documents and files solely for informational +purposes in the creation of products supporting the Unicode Standard, subject to +the Terms and Conditions herein. + 4. Further specifications of rights and restrictions pertaining to +the use of the particular set of data files known as the "Unicode Character +Database" can be found in Exhibit 1. + 5. Further specifications of rights and restrictions pertaining to +the use of the particular set of files that constitute the online edition of The +Unicode Standard, Version 4.0, may be found in V4.0 online edition. + 6. No license is granted to "mirror" the Unicode website where a +fee is charged for access to the "mirror" site. + 7. Modification is not permitted with respect to this document. All +copies of this document must be verbatim. + 2. Restricted Rights Legend. Any technical data or software which is +licensed to the United States of America, its agencies and/or instrumentalities +under this Agreement is commercial technical data or commercial computer +software developed exclusively at private expense as defined in FAR 2.101, or +DFARS 252.227-7014 (June 1995), as applicable. For technical data, use, +duplication, or disclosure by the Government is subject to restrictions as set +forth in DFARS 202.227-7015 Technical Data, Commercial and Items (Nov 1995) and +this Agreement. For Software, in accordance with FAR 12-212 or DFARS 227-7202, +as applicable, use, duplication or disclosure by the Government is subject to +the restrictions set forth in this Agreement. + 3. Warranties and Disclaimers. + 1. This publication and/or website may include technical or +typographical errors or other inaccuracies . Changes are periodically added to +the information herein; these changes will be incorporated in new editions of +the publication and/or website. Unicode may make improvements and/or changes in +the product(s) and/or program(s) described in this publication and/or website at +any time. + 2. If this file has been purchased on magnetic or optical media +from Unicode, Inc. the sole and exclusive remedy for any claim will be exchange +of the defective media within ninety (90) days of original purchase. + 3. EXCEPT AS PROVIDED IN SECTION C.2, THIS PUBLICATION AND/OR +SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND EITHER EXPRESS, +IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. UNICODE +AND ITS LICENSORS ASSUME NO RESPONSIBILITY FOR ERRORS OR OMISSIONS IN THIS +PUBLICATION AND/OR SOFTWARE OR OTHER DOCUMENTS WHICH ARE REFERENCED BY OR LINKED +TO THIS PUBLICATION OR THE UNICODE WEBSITE. + 4. Waiver of Damages. In no event shall Unicode or its licensors be +liable for any special, incidental, indirect or consequential damages of any +kind, or any damages whatsoever, whether or not Unicode was advised of the +possibility of the damage, including, without limitation, those resulting from +the following: loss of use, data or profits, in connection with the use, +modification or distribution of this information or its derivatives. + 5. Trademarks. + 1. Unicode and the Unicode logo are registered trademarks of +Unicode, Inc. + 2. This site contains product names and corporate names of other +companies. All product names and company names and logos mentioned herein are +the trademarks or registered trademarks of their respective owners. Other +products and corporate names mentioned herein which are trademarks of a third +party are used only for explanation and for the owners' benefit and with no +intent to infringe. + 3. Use of third party products or information referred to herein is +at the user's risk. + 6. Miscellaneous. + 1. Jurisdiction and Venue. This server is operated from a location +in the State of California, United States of America. Unicode makes no +representation that the materials are appropriate for use in other locations. If +you access this server from other locations, you are responsible for compliance +with local laws. This Agreement, all use of this site and any claims and damages +resulting from use of this site are governed solely by the laws of the State of +California without regard to any principles which would apply the laws of a +different jurisdiction. The user agrees that any disputes regarding this site +shall be resolved solely in the courts located in Santa Clara County, +California. The user agrees said courts have personal jurisdiction and agree to +waive any right to transfer the dispute to any other forum. + 2. Modification by Unicode Unicode shall have the right to modify +this Agreement at any time by posting it to this site. The user may not assign +any part of this Agreement without Unicode's prior written consent. + 3. Taxes. The user agrees to pay any taxes arising from access to +this website or use of the information herein, except for those based on +Unicode's net income. + 4. Severability. If any provision of this Agreement is declared +invalid or unenforceable, the remaining provisions of this Agreement shall +remain in effect. + 5. Entire Agreement. This Agreement constitutes the entire +agreement between the parties. + +EXHIBIT 1 +UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE + + Unicode Data Files include all data files under the directories +http://www.unicode.org/Public/ and http://www.unicode.org/reports/. Unicode +Software includes any source code under the directories +http://www.unicode.org/Public/ and http://www.unicode.org/reports/. + + NOTICE TO USER: Carefully read the following legal agreement. BY +DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S DATA FILES +("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"), YOU UNEQUIVOCALLY ACCEPT, AND +AGREE TO BE BOUND BY, ALL OF THE TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU +DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES +OR SOFTWARE. + + COPYRIGHT AND PERMISSION NOTICE + + Copyright Ã?Â,Ã,© 1991-2004 Unicode, Inc. All rights reserved. Distributed under +the Terms of Use in http://www.unicode.org/copyright.html. + + Permission is hereby granted, free of charge, to any person obtaining a copy +of the Unicode data files and associated documentation (the "Data Files") or +Unicode software and associated documentation (the "Software") to deal in the +Data Files or Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, and/or sell copies of +the Data Files or Software, and to permit persons to whom the Data Files or +Software are furnished to do so, provided that (a) the above copyright notice(s) +and this permission notice appear with all copies of the Data Files or Software, +(b) both the above copyright notice(s) and this permission notice appear in +associated documentation, and (c) there is clear notice in each modified Data +File or in the Software as well as in the documentation associated with the Data +File(s) or Software that the data or software has been modified. + + THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD +PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS +NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL +DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING +OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA FILES OR SOFTWARE. + + Except as contained in this notice, the name of a copyright holder shall not +be used in advertising or otherwise to promote the sale, use or other dealings +in these Data Files or Software without prior written authorization of the +copyright holder. + + Unicode and the Unicode logo are trademarks of Unicode, Inc., and may be +registered in some jurisdictions. All other trademarks and registered trademarks +mentioned herein are the property of their respective owners. +%% This notice is provided with respect to RSA PKCS#11 Header Files & Specification, which may be included with this software: + +/* + * Copyright (C) 1998 by the FundsXpress, INC. + * + * All rights reserved. + * + * Export of this software from the United States of America may require + * a specific license from the United States Government.  It is the + * responsibility of any person or organization contemplating export to + * obtain such a license before exporting. + * + * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and + * distribute this software and its documentation for any purpose and + * without fee is hereby granted, provided that the above copyright + * notice appear in all copies and that both that copyright notice and + * this permission notice appear in supporting documentation, and that + * the name of FundsXpress. not be used in advertising or publicity pertaining + * to distribution of the software without specific, written prior + * permission.  FundsXpress makes no representations about the suitability of + * this software for any purpose.  It is provided "as is" without express + * or implied warranty. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + */ + +%% This notice is provided with respect to certain files/code which may included in the implementation of AWT within the software: + +****************************************************** +BEGIN  src/solaris/native/sun/awt/HPkeysym.h +Copyright 1987, 1998  The Open Group + +All Rights Reserved. + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from The Open Group. + +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts, + +All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the names of Hewlett Packard +or Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD +TO THIS SOFWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE.  Hewlett-Packard shall not be liable for errors +contained herein or direct, indirect, special, incidental or +consequential damages in connection with the furnishing, +performance, or use of this material. + +END  src/solaris/native/sun/awt/HPkeysym.h +****************************************************** +BEGIN  src/solaris/native/sun/awt/Xinerama.c +/***************************************************************** +Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL +DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING, +BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of Digital Equipment Corporation +shall not be used in advertising or otherwise to promote the sale, use or other +dealings in this Software without prior written authorization from Digital +Equipment Corporation. +******************************************************************/ +END  src/solaris/native/sun/awt/Xinerama.c +****************************************************** +BEGIN src/solaris/native/sun/awt/Xinerama.h +/* +Copyright (C) 1994-2001 The XFree86 Project, Inc. All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Soft- +ware"), to deal in the Software without restriction, including without +limitation the rights to use, copy, modify, merge, publish, distribute, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, provided that the above copyright +notice(s) and this permission notice appear in all copies of the Soft- +ware and that both the above copyright notice(s) and this permission +notice appear in supporting documentation. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- +ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY +RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN +THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSE- +QUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFOR- +MANCE OF THIS SOFTWARE. + +Except as contained in this notice, the name of a copyright holder shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization of +the copyright holder. +*/ +END src/solaris/native/sun/awt/Xinerama.h +****************************************************** +BEGIN src/solaris/native/sun/awt/Xrandr.h +/* + * $XFree86: xc/lib/Xrandr/Xrandr.h,v 1.9 2002/09/29 23:39:44 keithp Exp $ + * + * Copyright © 2000 Compaq Computer Corporation, Inc. + * Copyright © 2002 Hewlett-Packard Company, Inc. + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Compaq not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission.  HP makes no representations about the + * suitability of this software for any purpose.  It is provided "as is" + * without express or implied warranty. + * + * HP DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL COMPAQ + * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION + * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Author:  Jim Gettys, HP Labs, HP. + */ + + +END src/solaris/native/sun/awt/Xrandr.h +****************************************************** +BEGIN src/solaris/native/sun/awt/extutil.h +/* + * $Xorg: extutil.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ + * +Copyright 1989, 1998  The Open Group + +All Rights Reserved. + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + * + * Author:  Jim Fulton, MIT The Open Group + * + *                     Xlib Extension-Writing Utilities + * + * This package contains utilities for writing the client API for various + * protocol extensions.  THESE INTERFACES ARE NOT PART OF THE X STANDARD AND + * ARE SUBJECT TO CHANGE! + */ +/* $XFree86: xc/include/extensions/extutil.h,v 1.5 2001/01/17 17:53:20 dawes Exp $ */ + +END src/solaris/native/sun/awt/extutil.h +****************************************************** +BEGIN   src/solaris/native/sun/awt/fontconfig.h +/* + * $RCSId: xc/lib/fontconfig/fontconfig/fontconfig.h,v 1.30 2002/09/26 00:17:27 +keithp Exp $ + * + * Copyright © 2001 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission.  Keith Packard makes no + * representations about the suitability of this software for any purpose.  It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + +END   src/solaris/native/sun/awt/fontconfig.h +****************************************************** +BEGIN src/solaris/native/sun/awt/list.c +AND  src/solaris/native/sun/awt/list.h +AND src/solaris/native/sun/awt/multiVis.c +AND  src/solaris/native/sun/awt/multiVis.h +AND  src/solaris/native/sun/awt/wsutils.h + +Copyright (c) 1994 Hewlett-Packard Co. +Copyright (c) 1996  X Consortium + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from the X Consortium. + +END src/solaris/native/sun/awt/list.c +AND  src/solaris/native/sun/awt/list.h +AND src/solaris/native/sun/awt/multiVis.c +AND  src/solaris/native/sun/awt/multiVis.h +AND  src/solaris/native/sun/awt/wsutils.h + +***************************************************************** +BEGIN src/solaris/native/sun/awt/panoramiXext.h +Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL +DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING, +BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of Digital Equipment Corporation +shall not be used in advertising or otherwise to promote the sale, use or other +dealings in this Software without prior written authorization from Digital +Equipment Corporation. + +END src/solaris/native/sun/awt/panoramiXext.h +****************************************************** + +BEGIN src/solaris/native/sun/awt/randr.h + + * + * Copyright © 2000, Compaq Computer Corporation, + * Copyright © 2002, Hewlett Packard, Inc. + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Compaq or HP not be used in advertising + * or publicity pertaining to distribution of the software without specific, + * written prior permission.  HP makes no representations about the + * suitability of this software for any purpose.  It is provided "as is" + * without express or implied warranty. + * + * HP DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL HP + * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION + * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Author:  Jim Gettys, HP Labs, Hewlett-Packard, Inc. + +END src/solaris/native/sun/awt/randr.h +***************************************************** + +BEGIN src/solaris/native/sun/java2d/opengl/J2D_GL/glx.h + * Mesa 3-D graphics library + * Version:  4.1 + * + * Copyright (C) 1999-2002  Brian Paul   All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +END src/solaris/native/sun/java2d/opengl/J2D_GL/glx.h + + + The Jscheme Language and Implementation + +Copyright (c) 2002 Ken R. Anderson, Timothy J. Hickey, Peter Norvig + +This system is licensed under the following +zlib/libpng open-source license. + +This software is provided 'as-is', without any express or +implied warranty. + +In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any +purpose, including commercial applications, and to alter it +and redistribute it freely, subject to the following +restrictions: + +1. The origin of this software must not be misrepresented; you + must not claim that you wrote the original software. If you + use this software in a product, an acknowledgment in the + product documentation would be appreciated but is not + required. + +2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source + distribution. + +JScheme includes software licensed under the Apache Software License, +Version 1.1: + + +/* ==================================================================== + * The Apache Software License, Version 1.1 + * + * Copyright (c) 2000 The Apache Software Foundation. All rights + * reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by the + * Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowledgment may appear in the software itself, + * if and wherever such third-party acknowledgments normally appear. + * + * 4. The names "Apache" and "Apache Software Foundation" must + * not be used to endorse or promote products derived from this + * software without prior written permission. For written + * permission, please contact apache@apache.org. + * + * 5. Products derived from this software may not be called "Apache", + * nor may "Apache" appear in their name, without prior written + * permission of the Apache Software Foundation. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * . + * + * Portions of this software are based upon public domain software + * originally written at the National Center for Supercomputing Applications, + * University of Illinois, Urbana-Champaign. + */ + + +Licenses for sources found in the IcedTea patches/checkins: + +NanoXML: + + * This file is part of NanoXML 2 Lite. + * Copyright (C) 2000-2002 Marc De Scheemaecker, All Rights Reserved. + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the + * use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software in + * a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * + * 3. This notice may not be removed or altered from any source distribution. + + +CACAO +=============================================================================== + +It was downloaded from http://www.cacaojvm.org/ + +Copyright Holder: CACAO Project + Copyright (C) 1996-2008 Verein zur Foerderung der freien virtuellen Maschine CACAO + Portions Copyright (C) 1996-2005, 2006, 2007 R. Grafl, A. Krall, C. Kruegel, + C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring, + E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich, + J. Wenninger, Institut f. Computersprachen - TU Wien + +License: + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program 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 for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + +On Debian systems a full copy of the GNU General Public License, GPL, can be +found in the file /usr/share/common-licenses/GPL-2. + + +CACAO uses code from other free software projects. Only code licensed +under a GPL compatible license can be merged in. You can find the +licenses of third party sources in their respective sources. + + +* src/mm/boehm-gc + +Merged in the Boehm-Weiser garbage collector from +http://www.hpl.hp.com/personal/Hans_Boehm/gc/. + +Copyright (c) 1988, 1989 Hans-J. Boehm, Alan J. Demers +Copyright (c) 1991-1996 by Xerox Corporation. All rights reserved. +Copyright (c) 1996-1999 by Silicon Graphics. All rights reserved. +Copyright (c) 1999-2003 by Hewlett-Packard Company. All rights reserved. +Portions Copyright (c) 1999-2001 by Red Hat, Inc. All rights reserved. + +The file linux_threads.c is also +Copyright (c) 1998 by Fergus Henderson. All rights reserved. + +The files Makefile.am, and configure.in are +Copyright (c) 2001 by Red Hat Inc. All rights reserved. + +Several files supporting GNU-style builds are copyrighted by the Free +Software Foundation, and carry a different license from that given +below. + +THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED +OR IMPLIED. ANY USE IS AT YOUR OWN RISK. + +Permission is hereby granted to use or copy this program +for any purpose, provided the above notices are retained on all copies. +Permission to modify the code and to distribute modified code is granted, +provided the above notices are retained, and a notice that the code was +modified is included with the above copyright notice. + +A few of the files needed to use the GNU-style build procedure come with +slightly different licenses, though they are all similar in spirit. A few +are GPL'ed, but with an exception that should cover all uses in the +collector. (If you are concerned about such things, I recommend you look +at the notice in config.guess or ltmain.sh.) + +The files copyrighted by Hewlett-Packard Company have the notice: + + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + +* src/fdlibm + +fdlimb contains general algorithms useful for runtimes and compilers to +support strict double and float mathematical operations. + +fdlibm files carry the following notices: + + Copyright (c) 1991 by AT&T. + + Permission to use, copy, modify, and distribute this software for any + purpose without fee is hereby granted, provided that this entire notice + is included in all copies of any software which is or includes a copy + or modification of this software and in all copies of the supporting + documentation for such software. + + THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED + WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR AT&T MAKES ANY + REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY + OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. + + Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + + Developed at SunPro, a Sun Microsystems, Inc. business. + Permission to use, copy, modify, and distribute this + software is freely granted, provided that this notice + is preserved. + +The upstream for fdlibm is libgcj (http://gcc.gnu.org/java/), they sync +again with the 'real' upstream (http://www.netlib.org/fdlibm/readme). + + +* src/threads/green/{locks.[ch],threadio.[ch],threads.[ch]} + +This files are taken from Kaffe.org VM available at +http://www.kaffe.org/. Kaffe's license.terms file is located in the +top directory of the source code. The current license of Kaffe is the +same as of CACAO, GPL Version 2. + + +* src/vm/jit/{i386,x86_64}/{dis-asm.h,i386-dis.c} + +Print i386 instructions for GDB, the GNU debugger. +Copyright 1988, 1989, 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +2001, 2002, 2003, 2004 Free Software Foundation, Inc. + +This file is part of GDB. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program 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 for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */ + + +* src/vm/jit/{i386,x86_64}/dis-asm.h + +Interface between the opcode library and its callers. + +Copyright 2001, 2002 Free Software Foundation, Inc. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +This program 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 for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, +Boston, MA 02110-1301 USA + +Written by Cygnus Support, 1993. + +The opcode library (libopcodes.a) provides instruction decoders for +a large variety of instruction sets, callable with an identical +interface, for making instruction-processing programs more independent +of the instruction set being processed. + + +* src/vm/jit/powerpc/{ppc.h,ppc-dis.c,ppc-opc.c} + +Copyright 1994, 1995, 2000, 2001, 2002 Free Software Foundation, Inc. +Written by Ian Lance Taylor, Cygnus Support + +This file is part of GDB, GAS, and the GNU binutils. + +GDB, GAS, and the GNU binutils are free software; you can redistribute +them and/or modify them under the terms of the GNU General Public +License as published by the Free Software Foundation; either version +2, or (at your option) any later version. + +GDB, GAS, and the GNU binutils are distributed in the hope that they +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 for more details. + +You should have received a copy of the GNU General Public License +along with this file; see the file COPYING. If not, write to the Free +Software Foundation, Inc., 51 Franklin St, Fifth Floor, +Boston, MA 02110-1301 USA. + + +* src/lib/classes/* + +GNU Classpath is licensed under the terms of the GNU General Public +License with the following clarification and special exception: + + "Linking this library statically or dynamically with other modules + is making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give + you permission to link this library with independent modules to + produce an executable, regardless of the license terms of these + independent modules, and to copy and distribute the resulting + executable under terms of your choice, provided that you also meet, + for each linked independent module, the terms and conditions of the + license of that module. An independent module is a module which is + not derived from or based on this library. If you modify this library, + you may extend this exception to your version of the library, but you + are not obligated to do so. If you do not wish to do so, delete this + exception statement from your version." + +See license.terms for the text of the GNU General Public License. + +More information on GNU Classpath is available from +http://www.gnu.org/software/classpath/classpath.html. + + +* m4/{iconv.m4,lib-ld.m4,lib-link.m4,lib-prefix.m4} + +Copyright (C) 1996-2003 Free Software Foundation, Inc. +This file is free software, distributed under the terms of the GNU +General Public License. As a special exception to the GNU General +Public License, this file may be distributed as part of a program +that contains a configuration script generated by Autoconf, under +the same distribution terms as the rest of that program. + + +* src/toolbox/avl.[ch] + +libavl - library for manipulation of binary trees. +Copyright (C) 1998-2002 Free Software Foundation, Inc. + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +This program 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 for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +02110-1301 USA. + +The author may be contacted at on the Internet, or +write to Ben Pfaff, Stanford University, Computer Science Dept., 353 +Serra Mall, Stanford CA 94305, USA. + + +* src/vm/unzip.[ch] + +Copyright (C) 1998 Gilles Vollant + +This unzip package allow extract file from .ZIP file, compatible with PKZip 2.04g + WinZip, InfoZip tools and compatible. +Encryption and multi volume ZipFile (span) are not supported. +Old compressions used by old PKZip 1.x are not supported + +THIS IS AN ALPHA VERSION. AT THIS STAGE OF DEVELOPPEMENT, SOMES API OR STRUCTURE +CAN CHANGE IN FUTURE VERSION !! +I WAIT FEEDBACK at mail info@winimage.com +Visit also http://www.winimage.com/zLibDll/unzip.htm for evolution + +Condition of use and distribution are the same than zlib : + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. + + +src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/armcc + + * Copyright (c) 2007 by NEC LE-IT: All rights reserved. + * A transcription of ARMv6 atomic operations for the ARM Realview Toolchain. + * This code works with armcc from RVDS 3.1 + * This is based on work in gcc/arm.h by + * Copyright (c) 1991-1994 by Xerox Corporation. All rights reserved. + * Copyright (c) 1996-1999 by Silicon Graphics. All rights reserved. + * Copyright (c) 1999-2003 by Hewlett-Packard Company. All rights reserved. + * + * + * + * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED + * OR IMPLIED. ANY USE IS AT YOUR OWN RISK. + * + * Permission is hereby granted to use or copy this program + * for any purpose, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + +src/mm/boehm-gc/include/private + + Copyright (c) 2004-2005 Andrei Polushin + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + +contrib/vmlog: + +/* Copyright (C) 2006 Edwin Steiner */ +/* 2007 Peter Molnar */ + +/* This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program 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 for more details. + */ + +Some of the build files are + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. + + +JAMVM: + + Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009, 2010 + Robert Lougher . + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2, + or (at your option) any later version. + + This program 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 for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +On Debian systems a full copy of the GNU General Public License, GPL, can be +found in the file /usr/share/common-licenses/GPL-2. --- openjdk-6-6b27-1.12.6.orig/debian/JB-jdk.prerm.in +++ openjdk-6-6b27-1.12.6/debian/JB-jdk.prerm.in @@ -0,0 +1,13 @@ +#!/bin/sh -e + +jdk_tools='@jdk_tools@' +basedir=/@basedir@ + + +if [ "$1" = "remove" ] || [ "$1" = "deconfigure" ]; then + for i in $jdk_tools; do + update-alternatives --remove $i $basedir/bin/$i + done +fi + +#DEBHELPER# --- openjdk-6-6b27-1.12.6.orig/debian/JB-java.desktop.in +++ openjdk-6-6b27-1.12.6/debian/JB-java.desktop.in @@ -0,0 +1,11 @@ +[Desktop Entry] +Name=@vendor@ Java @RELEASE@ Runtime +Name[fi]=@vendor@ Java @RELEASE@ - ajonaikainen ympäristö +Comment=@vendor@ Java @RELEASE@ Runtime +Comment[fi]=@vendor@ Java @RELEASE@ - ajonaikainen ympäristö +Exec=@java_launcher@ -jar +Terminal=false +Type=Application +Icon=@basename@ +MimeType=application/x-java-archive;application/java-archive;application/x-jar; +NoDisplay=true --- openjdk-6-6b27-1.12.6.orig/debian/JB-jre-headless.postinst.in +++ openjdk-6-6b27-1.12.6/debian/JB-jre-headless.postinst.in @@ -0,0 +1,130 @@ +#!/bin/sh + +set -e + +multiarch=@multiarch@ +priority=@priority@ +basedir=/@basedir@ +mandir=$basedir/jre/man +srcext=1.gz +dstext=1.gz +jre_tools='@jre_hl_tools@' + +case "$1" in +configure) + # fail early. java currently uses tricks to find its own shared + # libraries depending on the path of the binary. Will be changed + # in OpenJDK7 + if ! mountpoint -q /proc; then + echo >&2 "the java command requires a mounted proc fs (/proc)." + exit 1 + fi + + [ -d /etc/.java ] || mkdir -m 755 /etc/.java + [ -d /etc/.java/.systemPrefs ] || mkdir -m 755 /etc/.java/.systemPrefs + if [ ! -f /etc/.java/.systemPrefs/.system.lock ]; then + touch /etc/.java/.systemPrefs/.system.lock + chmod 644 /etc/.java/.systemPrefs/.system.lock + fi + if [ ! -f /etc/.java/.systemPrefs/.systemRootModFile ]; then + touch /etc/.java/.systemPrefs/.systemRootModFile + chmod 644 /etc/.java/.systemPrefs/.systemRootModFile + fi + + if [ -z "$2" ]; then + update_alternatives=y + fi + if [ -n "$multiarch" ] && [ -n "$2" ]; then + for i in $jre_tools; do + if [ -z "$(update-alternatives --list $i 2>/dev/null | grep ^$basedir/)" ]; then + update_alternatives=y + break + fi + done + fi + + if [ "$update_alternatives" = y ]; then + if [ -n "$multiarch" ] && [ "$DPKG_MAINTSCRIPT_ARCH" != $(dpkg --print-architecture) ]; then + priority=$(expr $priority - 1) + fi + for i in $jre_tools; do + unset slave1 slave2 || true + if [ -e $mandir/man1/$i.$srcext ]; then + slave1="--slave \ + /usr/share/man/man1/$i.$dstext \ + $i.$dstext \ + $mandir/man1/$i.$srcext" + fi + # disabled + if false && [ -e $mandir/ja/man1/$i.$srcext ]; then + slave2="--slave \ + /usr/share/man/ja/man1/$i.$dstext \ + ${i}_ja.$dstext \ + $mandir/ja/man1/$i.$srcext" + fi + update-alternatives \ + --install \ + /usr/bin/$i \ + $i \ + $basedir/jre/bin/$i \ + $priority \ + $slave1 $slave2 + done + update-alternatives \ + --install /usr/bin/jexec jexec $basedir/jre/lib/jexec $priority \ + --slave \ + /usr/share/binfmts/jar \ + jexec-binfmt \ + $basedir/jre/lib/jar.binfmt + fi # update alternatives + + if [ -n "$multiarch" ] && [ -n "$2" ] && dpkg --compare-versions "$2" lt 6b23~pre9-1~; then + for d in cmm; do + if [ -d $basedir/jre/lib/$d ] && [ ! -h $basedir/jre/lib/$d ]; then + rm -rf $basedir/jre/lib/$d + ln -s ../../../java-6-openjdk-common/jre/lib/$d $basedir/jre/lib/$d + fi + done + fi + + # register binfmt; ignore errors, the alternative may already be + # registered by another JRE. + if which update-binfmts >/dev/null && [ -r /usr/share/binfmts/jar ]; then + update-binfmts --package @basename@ --import jar || true + fi + + # activate class data sharing + case @archdir@ in i386|sparc) + rm -f $basedir/jre/lib/@archdir@/client/classes.jsa + log=$(tempfile) + if ! $basedir/bin/java -client -Xshare:dump -XX:PermSize=128m > $log; then + cat >&2 $log + rm -f $log + # this may fail on some machines/configurations, just ignore it. + echo >&2 "ignoring dump failure" + #exit 1 + fi + rm -f $log + esac + case @archdir@ in amd64|i386|sparc) + rm -f $basedir/jre/lib/@archdir@/server/classes.jsa + log=$(tempfile) + if ! $basedir/bin/java -server -Xshare:dump > $log; then + cat >&2 $log + rm -f $log + # this may fail on some machines/configurations, just ignore it. + echo >&2 "ignoring dump failure" + #exit 1 + fi + rm -f $log + esac + + # not shipped anymore + rm -f /etc/@basename@/security/nss-*.cfg + ;; + +esac + +#DEBHELPER# + +exit 0 --- openjdk-6-6b27-1.12.6.orig/debian/README.Debian +++ openjdk-6-6b27-1.12.6/debian/README.Debian @@ -0,0 +1,78 @@ +openjdk-6 for Debian/Ubuntu +--------------------------- + +The OpenJDK build is configured --with-additional-vms to build with +different virtual machines. The original implementation of the hotspot +VM is only available on the amd64, i386, lpia and sparc architectures. +Other VM's are CACAO, providing a just in time compiler on several +architectures (although the VM implementation is incomplete), and Zero, +providing a byte code interpreter for every architecture. On some +architectures Zero is built with JIT support using shark (still considered +experimental). + +To use a different VM other than the default, use + + java -cacao|-zero|-shark + +or for the java tools, use + + -J-cacao|-J-zero|-J-shark. + +The zero build on the ix86 architectures is built with shark (just in time +compiler); to use the zero build without shark support, use the `-Xint' +option to operate in interpreted-only mode. + +On some architectures (currently armel and powerpc, when built against +llvm-2.6) which use ther zero vm as the default, the openjdk-6-jre-zero +package contains the shark vm. + +To change the default permanently, edit /etc/java-6-openjdk/jvm.cfg. + +The CACAO VM can be found in the icedtea-6-jre-cacao package, the Zero/Shark +VM can be found in the openjdk-6-jre-zero package (on the architectures +where the Hotspot VM is available). + +Please look for further documentation in the directory +/usr/share/doc/openjdk-6-jre/ . + +The package openjdk-6-jre-headless ships a cgi script +/usr/lib/jvm/java-6-openjdk/bin/java-rmi.cgi that you must integrate +into your webserver setup manually if you need it. It is not activated +automatically. + + +Note for non-reparenting window manager users +--------------------------------------------- + +If you are using a non-reparenting window manager, such as ratpoison, awesome +or dwm, some Java graphical applications using the AWT toolkit will only +display empty grey windows, as described in but #508650. + +There are two solutions to work around this issue: +1. mask your window manager as one of the non-reparenting ones supported by AWT, + using the wmname tool from the dwm-tools + package: + $ wmname LG3D +2. set the environment variable _JAVA_AWT_WM_NONREPARENTING: + $ export _JAVA_AWT_WM_NONREPARENTING=true + +You can automate these tasks by writing them to your ~/.xsessionrc: +$ cat >> ~/.xsessionrc < Sun, 03 May 2009 13:58:10 +0200 + -- Torsten Werner Wed, 02 Apr 2008 11:46:53 +0200 --- openjdk-6-6b27-1.12.6.orig/debian/JB-archive.applications.in +++ openjdk-6-6b27-1.12.6/debian/JB-archive.applications.in @@ -0,0 +1,6 @@ +java-archive + command=/usr/bin/java -jar + name=java-archive + can_open_multiple_files=false + requires_terminal=false + mime_types=application/java-archive,application/x-java-archive,application/x-jar --- openjdk-6-6b27-1.12.6.orig/debian/JAVA_HOME +++ openjdk-6-6b27-1.12.6/debian/JAVA_HOME @@ -0,0 +1,15 @@ + JAVA_HOME + +1. Legacy use of JAVA_HOME + + As of the latest versions of java-common there really should + be no need for JAVA_HOME as Java(TM) should be completely + integrated with your Debian GNU/Linux system. + + For reference, the setting of JAVA_HOME for Sun Java 6 is: + JAVA_HOME=/usr/lib/jvm/java-6-sun + +2. Selecting OpenJDK 6 as the default Java(TM) implementation + + Please see README.alternatives for instructions on how + to make OpenJDK 6 executables and man pages the default on your system. --- openjdk-6-6b27-1.12.6.orig/debian/source/format +++ openjdk-6-6b27-1.12.6/debian/source/format @@ -0,0 +1 @@ +1.0 --- openjdk-6-6b27-1.12.6.orig/debian/patches/0-sharkllvm30-targetselect-138450.patch +++ openjdk-6-6b27-1.12.6/debian/patches/0-sharkllvm30-targetselect-138450.patch @@ -0,0 +1,14 @@ +--- openjdk/hotspot/src/share/vm/shark/llvmHeaders.hpp 2011-08-30 19:28:01.875227001 +0000 ++++ openjdk/hotspot/src/share/vm/shark/llvmHeaders.hpp 2011-08-30 19:30:16.885227001 +0000 +@@ -51,7 +51,11 @@ + #else + #include + #endif ++#if SHARK_LLVM_VERSION >= 30 ++#include ++#else + #include ++#endif + #include + #include + #include --- openjdk-6-6b27-1.12.6.orig/debian/patches/ubuntu-security-0001-e98b0ef70b26.patch +++ openjdk-6-6b27-1.12.6/debian/patches/ubuntu-security-0001-e98b0ef70b26.patch @@ -0,0 +1,41507 @@ +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/ChangeLog openjdk-6-6b27-1.12.6/ChangeLog +--- openjdk-6-6b27-1.12.6.orig/ChangeLog 2013-07-10 09:13:47.000000000 -0500 ++++ openjdk-6-6b27-1.12.6/ChangeLog 2013-11-14 16:20:46.000000000 -0600 +@@ -1,3 +1,112 @@ ++2013-10-29 Andrew John Hughes ++ ++ * Makefile.am: ++ (SECURITY_PATCHES): Add security update. ++ * patches/jtreg-LastErrorString.patch: Regenerated. ++ * patches/openjdk/4075303-javap_update.patch, ++ * patches/openjdk/4111861-static_fields.patch, ++ * patches/openjdk/4501661-disallow_mixing.patch, ++ * patches/openjdk/4884240-javap_additional_option.patch, ++ * patches/openjdk/6708729-javap_makefile_update.patch, ++ * patches/openjdk/6715767-javap_crash.patch, ++ * patches/openjdk/6819246-javap_instruction_decoding.patch, ++ * patches/openjdk/6824493-experimental.patch, ++ * patches/openjdk/6841419-classfile_iterator.patch, ++ * patches/openjdk/6841420-classfile_methods.patch, ++ * patches/openjdk/6843013-missing_experimental.patch, ++ * patches/openjdk/6852856-javap_subclasses.patch, ++ * patches/openjdk/6867671-javap_whitespace.patch, ++ * patches/openjdk/6868539-constant_pool_tags.patch, ++ * patches/openjdk/6902264-fix_indentation.patch, ++ * patches/openjdk/6954275-big_xml_signatures.patch, ++ * patches/openjdk/7146431-java.security_files.patch, ++ * patches/openjdk/7196533-timezone_bottleneck.patch, ++ * patches/openjdk/8000450-restrict_access.patch, ++ * patches/openjdk/8002070-remove_logger_stack_search.patch, ++ * patches/openjdk/8003992-embedded_nulls.patch, ++ * patches/openjdk/8004188-rename_java.security.patch, ++ * patches/openjdk/8006882-jmockit.patch, ++ * patches/openjdk/8006900-new_date_time.patch, ++ * patches/openjdk/8008589-better_mbean_permission_validation.patch, ++ * patches/openjdk/8010118-caller_sensitive.patch, ++ * patches/openjdk/8010727-empty_logger_name.patch, ++ * patches/openjdk/8010939-logmanager_deadlock.patch, ++ * patches/openjdk/8011071-better_crypto_provider_handling.patch, ++ * patches/openjdk/8011081-improve_jhat.patch, ++ * patches/openjdk/8011139-revise_checking_getenclosingclass.patch, ++ * patches/openjdk/8011157-improve_corba_portability-jdk.patch, ++ * patches/openjdk/8011157-improve_corba_portability.patch, ++ * patches/openjdk/8011990-logger_test_urls.patch, ++ * patches/openjdk/8012071-better_bean_building.patch, ++ * patches/openjdk/8012147-improve_tool.patch, ++ * patches/openjdk/8012243-serial_regression.patch, ++ * patches/openjdk/8012277-improve_dataflavour.patch, ++ * patches/openjdk/8012425-transform_transformfactory.patch, ++ * patches/openjdk/8012453-runtime.exec.patch, ++ * patches/openjdk/8012617-arrayindexoutofbounds_linebreakmeasurer.patch, ++ * patches/openjdk/8013380-logger_stack_walk_glassfish.patch, ++ * patches/openjdk/8013503-improve_stream_factories.patch, ++ * patches/openjdk/8013506-better_pack200.patch, ++ * patches/openjdk/8013510-augment_image_writing.patch, ++ * patches/openjdk/8013514-improve_cmap_stability.patch, ++ * patches/openjdk/8013739-better_ldap_resource_management.patch, ++ * patches/openjdk/8013744-better_tabling.patch, ++ * patches/openjdk/8013827-createtempfile_hang.patch, ++ * patches/openjdk/8014085-better_serialization.patch, ++ * patches/openjdk/8014093-improve_image_parsing.patch, ++ * patches/openjdk/8014102-improve_image_conversion.patch, ++ * patches/openjdk/8014341-better_kerberos_service.patch, ++ * patches/openjdk/8014349-getdeclaredclass_fix.patch, ++ * patches/openjdk/8014530-better_dsp.patch, ++ * patches/openjdk/8014534-better_profiling.patch, ++ * patches/openjdk/8014718-remove_logging_suntoolkit.patch, ++ * patches/openjdk/8014745-logger_stack_walk_switch.patch, ++ * patches/openjdk/8014987-augment_serialization.patch, ++ * patches/openjdk/8015144-performance_regression.patch, ++ * patches/openjdk/8015614-update_build.patch, ++ * patches/openjdk/8015731-auth_improvements.patch, ++ * patches/openjdk/8015743-address_internet_addresses.patch, ++ * patches/openjdk/8015965-typo_in_property_name.patch, ++ * patches/openjdk/8015978-incorrect_transformation.patch, ++ * patches/openjdk/8016256-finalization_final.patch, ++ * patches/openjdk/8016357-update_hs_diagnostic_class.patch, ++ * patches/openjdk/8016653-ignoreable_characters.patch, ++ * patches/openjdk/8016675-robust_javadoc.patch, ++ * patches/openjdk/8017196-ensure_proxies_are_handled_appropriately-jdk.patch, ++ * patches/openjdk/8017196-ensure_proxies_are_handled_appropriately.patch, ++ * patches/openjdk/8017287-better_resource_disposal.patch, ++ * patches/openjdk/8017291-cast_proxies_aside.patch, ++ * patches/openjdk/8017298-better_xml_support.patch, ++ * patches/openjdk/8017300-improve_interface_implementation.patch, ++ * patches/openjdk/8017505-better_client_service.patch, ++ * patches/openjdk/8017566-backout_part_of_8000450.patch, ++ * patches/openjdk/8019292-better_attribute_value_exceptions.patch, ++ * patches/openjdk/8019584-invalid_notification_fix.patch, ++ * patches/openjdk/8019617-better_view_of_objects.patch, ++ * patches/openjdk/8019969-inet6_test_case_fix.patch, ++ * patches/openjdk/8019979-better_access_test.patch, ++ * patches/openjdk/8020293-jvm_crash.patch, ++ * patches/openjdk/8020943-memory_leak.patch, ++ * patches/openjdk/8021290-signature_validation.patch, ++ * patches/openjdk/8021355-splashscreen_regression.patch, ++ * patches/openjdk/8021366-jaxp_test_fix-01.patch, ++ * patches/openjdk/8021577-bean_serialization_fix.patch, ++ * patches/openjdk/8021933-jaxp_test_fix-02.patch, ++ * patches/openjdk/8021969-jnlp_load_failure.patch, ++ * patches/openjdk/8022661-writeobject_flush.patch, ++ * patches/openjdk/8022682-supporting_xom.patch, ++ * patches/openjdk/8022940-enhance_corba_translations.patch, ++ * patches/openjdk/8023457-tracing_mutex.patch, ++ * patches/openjdk/8023478-hs_crash.patch, ++ * patches/openjdk/8023683-enhance_class_file_parsing.patch, ++ * patches/openjdk/8023964-ignore_test.patch, ++ * patches/openjdk/8024914-swapped_usage.patch, ++ * patches/openjdk/8025128-createtempfile_absolute_prefix.patch, ++ * patches/openjdk/oj6-19-fix_8010118_test_cases.patch, ++ * patches/openjdk/oj6-20-merge.patch, ++ * patches/openjdk/oj6-21-overrides.patch: Added. ++ * NEWS: Updated. ++ + 2013-07-10 Andrew John Hughes + + * patches/security/20130618/7158805-nested_subroutine_rewriting-it6.patch: +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/Makefile.am openjdk-6-6b27-1.12.6/Makefile.am +--- openjdk-6-6b27-1.12.6.orig/Makefile.am 2013-07-10 09:13:47.000000000 -0500 ++++ openjdk-6-6b27-1.12.6/Makefile.am 2013-11-14 16:20:52.000000000 -0600 +@@ -436,7 +436,90 @@ SECURITY_PATCHES = \ + patches/security/20130618/langtools_merge-01.patch \ + patches/security/20130618/langtools_merge-02.patch \ + patches/security/20130618/langtools_generics.patch \ +- patches/security/20130618/langtools_merge-03.patch ++ patches/security/20130618/langtools_merge-03.patch \ ++ patches/openjdk/8017196-ensure_proxies_are_handled_appropriately.patch \ ++ patches/openjdk/8011157-improve_corba_portability.patch \ ++ patches/openjdk/8022940-enhance_corba_translations.patch \ ++ patches/openjdk/8013503-improve_stream_factories.patch \ ++ patches/openjdk/8012425-transform_transformfactory.patch \ ++ patches/openjdk/8017298-better_xml_support.patch \ ++ patches/openjdk/8014530-better_dsp.patch \ ++ patches/openjdk/8021366-jaxp_test_fix-01.patch \ ++ patches/openjdk/8021933-jaxp_test_fix-02.patch \ ++ patches/openjdk/8022682-supporting_xom.patch \ ++ patches/openjdk/8015978-incorrect_transformation.patch \ ++ patches/openjdk/oj6-20-merge.patch \ ++ patches/openjdk/8024914-swapped_usage.patch \ ++ patches/openjdk/8017505-better_client_service.patch \ ++ patches/openjdk/8016256-finalization_final.patch \ ++ patches/openjdk/8023683-enhance_class_file_parsing.patch \ ++ patches/openjdk/8016675-robust_javadoc.patch \ ++ patches/openjdk/8016653-ignoreable_characters.patch \ ++ patches/openjdk/7196533-timezone_bottleneck.patch \ ++ patches/openjdk/8006900-new_date_time.patch \ ++ patches/openjdk/8008589-better_mbean_permission_validation.patch \ ++ patches/openjdk/8011071-better_crypto_provider_handling.patch \ ++ patches/openjdk/8011081-improve_jhat.patch \ ++ patches/openjdk/8011157-improve_corba_portability-jdk.patch \ ++ patches/openjdk/8012071-better_bean_building.patch \ ++ patches/openjdk/8012147-improve_tool.patch \ ++ patches/openjdk/8012277-improve_dataflavour.patch \ ++ patches/openjdk/8013506-better_pack200.patch \ ++ patches/openjdk/8013510-augment_image_writing.patch \ ++ patches/openjdk/8013514-improve_cmap_stability.patch \ ++ patches/openjdk/8013744-better_tabling.patch \ ++ patches/openjdk/8014085-better_serialization.patch \ ++ patches/openjdk/8014093-improve_image_parsing.patch \ ++ patches/openjdk/8014102-improve_image_conversion.patch \ ++ patches/openjdk/8014341-better_kerberos_service.patch \ ++ patches/openjdk/8014534-better_profiling.patch \ ++ patches/openjdk/8014987-augment_serialization.patch \ ++ patches/openjdk/8015731-auth_improvements.patch \ ++ patches/openjdk/8015743-address_internet_addresses.patch \ ++ patches/openjdk/8016357-update_hs_diagnostic_class.patch \ ++ patches/openjdk/8002070-remove_logger_stack_search.patch \ ++ patches/openjdk/8010118-caller_sensitive.patch \ ++ patches/openjdk/oj6-19-fix_8010118_test_cases.patch \ ++ patches/openjdk/8010727-empty_logger_name.patch \ ++ patches/openjdk/8010939-logmanager_deadlock.patch \ ++ patches/openjdk/8011990-logger_test_urls.patch \ ++ patches/openjdk/8013380-logger_stack_walk_glassfish.patch \ ++ patches/openjdk/8014745-logger_stack_walk_switch.patch \ ++ patches/openjdk/8012243-serial_regression.patch \ ++ patches/openjdk/8014718-remove_logging_suntoolkit.patch \ ++ patches/openjdk/8011139-revise_checking_getenclosingclass.patch \ ++ patches/openjdk/8017196-ensure_proxies_are_handled_appropriately-jdk.patch \ ++ patches/openjdk/8017287-better_resource_disposal.patch \ ++ patches/openjdk/8017291-cast_proxies_aside.patch \ ++ patches/openjdk/7146431-java.security_files.patch \ ++ patches/openjdk/8006882-jmockit.patch \ ++ patches/openjdk/8000450-restrict_access.patch \ ++ patches/openjdk/8019979-better_access_test.patch \ ++ patches/openjdk/8004188-rename_java.security.patch \ ++ patches/openjdk/8017566-backout_part_of_8000450.patch \ ++ patches/openjdk/8017300-improve_interface_implementation.patch \ ++ patches/openjdk/8019292-better_attribute_value_exceptions.patch \ ++ patches/openjdk/8019617-better_view_of_objects.patch \ ++ patches/openjdk/8012617-arrayindexoutofbounds_linebreakmeasurer.patch \ ++ patches/openjdk/8020293-jvm_crash.patch \ ++ patches/openjdk/8013739-better_ldap_resource_management.patch \ ++ patches/openjdk/8014349-getdeclaredclass_fix.patch \ ++ patches/openjdk/6954275-big_xml_signatures.patch \ ++ patches/openjdk/8021290-signature_validation.patch \ ++ patches/openjdk/8012453-runtime.exec.patch \ ++ patches/openjdk/8015965-typo_in_property_name.patch \ ++ patches/openjdk/8015144-performance_regression.patch \ ++ patches/openjdk/8019969-inet6_test_case_fix.patch \ ++ patches/openjdk/8019584-invalid_notification_fix.patch \ ++ patches/openjdk/8021577-bean_serialization_fix.patch \ ++ patches/openjdk/8021969-jnlp_load_failure.patch \ ++ patches/openjdk/8021355-splashscreen_regression.patch \ ++ patches/openjdk/8022661-writeobject_flush.patch \ ++ patches/openjdk/8023964-ignore_test.patch \ ++ patches/openjdk/8003992-embedded_nulls.patch \ ++ patches/openjdk/8013827-createtempfile_hang.patch \ ++ patches/openjdk/8025128-createtempfile_absolute_prefix.patch \ ++ patches/openjdk/oj6-21-overrides.patch + + SPECIAL_SECURITY_PATCH_1 = patches/security/20120214/7112642.patch + SPECIAL_SECURITY_PATCH_2 = patches/security/20130618/8009071-improve_shape_handling.patch +@@ -681,13 +764,9 @@ ICEDTEA_PATCHES = \ + patches/openjdk/8011154-awt_regression.patch \ + patches/openjdk/8011992-MlibOpsTest_failed.patch \ + patches/openjdk/8012112-MlibOpsTest_fails.patch \ +- patches/openjdk/8012617-arrayindexoutofbounds_linebreakmeasurer.patch \ + patches/openjdk/8012933-appcontext_disposed_too_early.patch \ + patches/openjdk/8013196-TimeZone_getDefault_throws_exception.patch \ + patches/openjdk/8014427-raster_regression.patch \ +- patches/openjdk/8010727-empty_logger_name.patch \ +- patches/openjdk/8010939-logmanager_deadlock.patch \ +- patches/openjdk/8014718-remove_logging_suntoolkit.patch \ + patches/openjdk/8009996-emitter_bean.patch \ + patches/openjdk/6541350-tz_display_names_l10n.patch \ + patches/openjdk/6821191-tz_display_names_l10n.patch \ +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/NEWS openjdk-6-6b27-1.12.6/NEWS +--- openjdk-6-6b27-1.12.6.orig/NEWS 2013-07-10 09:13:47.000000000 -0500 ++++ openjdk-6-6b27-1.12.6/NEWS 2013-11-14 16:20:46.000000000 -0600 +@@ -11,6 +11,52 @@ OJX - http://java.net/jira/browse/OPENJD + + CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY + ++New in security release against 1.12.6 (2013-11-08): ++Based on http://icedtea.classpath.org/hg/icedtea6/rev/e98b0ef70b26 ++ ++* Security fixes ++ - S8006900, CVE-2013-3829: Add new date/time capability ++ - S8008589: Better MBean permission validation ++ - S8011071, CVE-2013-5780: Better crypto provider handling ++ - S8011081, CVE-2013-5772: Improve jhat ++ - S8011157, CVE-2013-5814: Improve CORBA portablility ++ - S8012071, CVE-2013-5790: Better Building of Beans ++ - S8012147: Improve tool support ++ - S8012277: CVE-2013-5849: Improve AWT DataFlavor ++ - S8012425, CVE-2013-5802: Transform TransformerFactory ++ - S8013503, CVE-2013-5851: Improve stream factories ++ - S8013506: Better Pack200 data handling ++ - S8013510, CVE-2013-5809: Augment image writing code ++ - S8013514: Improve stability of cmap class ++ - S8013739, CVE-2013-5817: Better LDAP resource management ++ - S8013744, CVE-2013-5783: Better tabling for AWT ++ - S8014085: Better serialization support in JMX classes ++ - S8014093, CVE-2013-5782: Improve parsing of images ++ - S8014102, CVE-2013-5778: Improve image conversion ++ - S8014341, CVE-2013-5803: Better service from Kerberos servers ++ - S8014349, CVE-2013-5840: (cl) Class.getDeclaredClass problematic in some class loader configurations ++ - S8014530, CVE-2013-5825: Better digital signature processing ++ - S8014534: Better profiling support ++ - S8014987, CVE-2013-5842: Augment serialization handling ++ - S8015614: Update build settings ++ - S8015731: Subject java.security.auth.subject to improvements ++ - S8015743, CVE-2013-5774: Address internet addresses ++ - S8016256: Make finalization final ++ - S8016653, CVE-2013-5804: javadoc should ignore ignoreable characters in names ++ - S8016675, CVE-2013-5797: Make Javadoc pages more robust ++ - S8017196, CVE-2013-5850: Ensure Proxies are handled appropriately ++ - S8017287, CVE-2013-5829: Better resource disposal ++ - S8017291, CVE-2013-5830: Cast Proxies Aside ++ - S8017298, CVE-2013-4002: Better XML support ++ - S8017300, CVE-2013-5784: Improve Interface Implementation ++ - S8017505, CVE-2013-5820: Better Client Service ++ - S8019292: Better Attribute Value Exceptions ++ - S8019617: Better view of objects ++ - S8020293: JVM crash ++ - S8021290, CVE-2013-5823: Better signature validation ++ - S8022940: Enhance CORBA translations ++ - S8023683: Enhance class file parsing ++ + New in release 1.12.6 (2013-07-10): + + * Security fixes +@@ -115,6 +161,48 @@ New in release 1.12.6 (2013-07-10): + + New in release 1.12.5 (2013-04-24): + ++* Security fixes ++ - S8006900, CVE-2013-3829: Add new date/time capability ++ - S8008589: Better MBean permission validation ++ - S8011071, CVE-2013-5780: Better crypto provider handling ++ - S8011081, CVE-2013-5772: Improve jhat ++ - S8011157, CVE-2013-5814: Improve CORBA portablility ++ - S8012071, CVE-2013-5790: Better Building of Beans ++ - S8012147: Improve tool support ++ - S8012277: CVE-2013-5849: Improve AWT DataFlavor ++ - S8012425, CVE-2013-5802: Transform TransformerFactory ++ - S8013503, CVE-2013-5851: Improve stream factories ++ - S8013506: Better Pack200 data handling ++ - S8013510, CVE-2013-5809: Augment image writing code ++ - S8013514: Improve stability of cmap class ++ - S8013739, CVE-2013-5817: Better LDAP resource management ++ - S8013744, CVE-2013-5783: Better tabling for AWT ++ - S8014085: Better serialization support in JMX classes ++ - S8014093, CVE-2013-5782: Improve parsing of images ++ - S8014102, CVE-2013-5778: Improve image conversion ++ - S8014341, CVE-2013-5803: Better service from Kerberos servers ++ - S8014349, CVE-2013-5840: (cl) Class.getDeclaredClass problematic in some class loader configurations ++ - S8014530, CVE-2013-5825: Better digital signature processing ++ - S8014534: Better profiling support ++ - S8014987, CVE-2013-5842: Augment serialization handling ++ - S8015614: Update build settings ++ - S8015731: Subject java.security.auth.subject to improvements ++ - S8015743, CVE-2013-5774: Address internet addresses ++ - S8016256: Make finalization final ++ - S8016653, CVE-2013-5804: javadoc should ignore ignoreable characters in names ++ - S8016675, CVE-2013-5797: Make Javadoc pages more robust ++ - S8017196, CVE-2013-5850: Ensure Proxies are handled appropriately ++ - S8017287, CVE-2013-5829: Better resource disposal ++ - S8017291, CVE-2013-5830: Cast Proxies Aside ++ - S8017298, CVE-2013-4002: Better XML support ++ - S8017300, CVE-2013-5784: Improve Interface Implementation ++ - S8017505, CVE-2013-5820: Better Client Service ++ - S8019292: Better Attribute Value Exceptions ++ - S8019617: Better view of objects ++ - S8020293: JVM crash ++ - S8021290, CVE-2013-5823: Better signature validation ++ - S8022940: Enhance CORBA translations ++ - S8023683: Enhance class file parsing + * New features + - JAXP, JAXWS & JAF supplied as patches rather than drops to aid subsequent patching. + - PR1380: Add AArch64 support to Zero +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/jtreg-LastErrorString.patch openjdk-6-6b27-1.12.6/patches/jtreg-LastErrorString.patch +--- openjdk-6-6b27-1.12.6.orig/patches/jtreg-LastErrorString.patch 2013-07-10 09:13:47.000000000 -0500 ++++ openjdk-6-6b27-1.12.6/patches/jtreg-LastErrorString.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -1,16 +1,15 @@ +-diff -Nru IOException/LastErrorString.java /home/brq/ptisnovs/IOException/LastErrorString.java +---- openjdk-old/jdk/test/java/io/IOException/LastErrorString.java 2011-01-21 00:54:47.000000000 +0100 +-+++ openjdk/jdk/test/java/io/IOException/LastErrorString.java 2011-02-21 15:34:58.972481000 +0100 +-@@ -21,9 +21,13 @@ +- * questions. ++diff -Nru openjdk.orig/jdk/test/java/io/IOException/LastErrorString.java openjdk/jdk/test/java/io/IOException/LastErrorString.java ++--- openjdk.orig/jdk/test/java/io/IOException/LastErrorString.java 2013-10-29 09:39:12.978000311 +0000 +++++ openjdk/jdk/test/java/io/IOException/LastErrorString.java 2013-10-29 09:41:26.024030445 +0000 ++@@ -22,9 +22,12 @@ + */ + +--/* @test +-- @bug 4167937 ++ /* @test ++- @bug 4167937 8023964 ++- @ignore Test truncates system files when run as root, see 7042603 + - @summary Test code paths that use the JVM_LastErrorString procedure +-+/* +-+ * @test +-+ * @bug 4167937 +++ * @bug 4167937 8023964 +++ * @ignore Test truncates system files when run as root, see 7042603 + + * @summary Test code paths that use the JVM_LastErrorString procedure + + * + + * @compile LastErrorString.java +@@ -18,7 +17,7 @@ diff -Nru IOException/LastErrorString.ja + */ + + import java.io.IOException; +-@@ -37,33 +41,11 @@ ++@@ -38,33 +41,11 @@ + + static String UNWRITEABLE_DIR; + static String UNREADABLE_FILE; +@@ -53,7 +52,7 @@ diff -Nru IOException/LastErrorString.ja + static abstract class Test { + + String name; +-@@ -197,7 +179,7 @@ ++@@ -198,7 +179,7 @@ + + new Test("FileOutputStream") { + public void run() throws IOException { +@@ -62,7 +61,7 @@ diff -Nru IOException/LastErrorString.ja + }}.go(); + + new ClosedFOSTest("write()") { +-@@ -257,8 +239,29 @@ ++@@ -258,8 +239,29 @@ + + } + +@@ -92,9 +91,9 @@ diff -Nru IOException/LastErrorString.ja + go(); + } + +-diff -Nru IOException/LastErrorString.sh /home/brq/ptisnovs/IOException/LastErrorString.sh +---- /dev/null 1970-01-01 01:00:00.000000000 +0100 +-+++ openjdk/jdk/test/java/io/IOException/LastErrorString.sh 2011-02-21 15:34:58.972481000 +0100 ++diff -Nru openjdk.orig/jdk/test/java/io/IOException/LastErrorString.sh openjdk/jdk/test/java/io/IOException/LastErrorString.sh ++--- openjdk.orig/jdk/test/java/io/IOException/LastErrorString.sh 1970-01-01 01:00:00.000000000 +0100 +++++ openjdk/jdk/test/java/io/IOException/LastErrorString.sh 2013-10-29 09:40:29.223163741 +0000 + @@ -0,0 +1,103 @@ + +#!/bin/sh + + +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/4075303-javap_update.patch openjdk-6-6b27-1.12.6/patches/openjdk/4075303-javap_update.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/4075303-javap_update.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/4075303-javap_update.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,12081 @@ ++# HG changeset patch ++# User jjg ++# Date 1382400229 -3600 ++# Tue Oct 22 01:03:49 2013 +0100 ++# Node ID bfd7bb4218253bac4f57abbc90b987f16e4b7f6c ++# Parent 8e38c8fe0a0beaef943e754071be0358c34e76dd ++4075303: Use javap to enquire about a specific inner class ++4348375: Javap is not internationalized ++4459541: "javap -l" shows line numbers as signed short; they should be unsigned ++4501660: change diagnostic of -help as 'print this help message and exit' ++4776241: unused source file in javap... ++4870651: javap should recognize generics, varargs, enum ++4876942: javap invoked without args does not print help screen ++4880663: javap could output whitespace between class name and opening brace ++4975569: javap doesn't print new flag bits ++6271787: javap dumps LocalVariableTypeTable attribute in hex, needs to print a table ++6305779: javap: support annotations ++6439940: Clean up javap implementation ++6469569: wrong check of searchpath in JavapEnvironment ++6474890: javap does not open .zip files in -classpath ++6587786: Javap throws error : "ERROR:Could not find " for JRE classes ++6622215: javap ignores certain relevant access flags ++6622216: javap names some attributes incorrectly ++6622232: javap gets whitespace confused ++6622260: javap prints negative bytes incorrectly in hex ++Reviewed-by: ksrini ++ ++diff -r 8e38c8fe0a0b -r bfd7bb421825 make/build.properties ++--- openjdk/langtools/make/build.properties Fri Oct 04 12:22:34 2013 -0400 +++++ openjdk/langtools/make/build.properties Tue Oct 22 01:03:49 2013 +0100 ++@@ -130,6 +130,8 @@ ++ # ++ ++ javap.includes = \ +++ com/sun/tools/classfile/ \ +++ com/sun/tools/javap/ \ ++ sun/tools/javap/ ++ ++ javap.tests = \ ++diff -r 8e38c8fe0a0b -r bfd7bb421825 make/build.xml ++--- openjdk/langtools/make/build.xml Fri Oct 04 12:22:34 2013 -0400 +++++ openjdk/langtools/make/build.xml Tue Oct 22 01:03:49 2013 +0100 ++@@ -316,14 +316,15 @@ ++ jarmainclass="sun.tools.javap.Main"/> ++ ++ ++- +++ ++ ++ ++ ++- +++ ++ +++ jarmainclass="sun.tools.javap.Main" +++ jarclasspath="javac.jar"/> ++ ++ ++ ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/classfile/AccessFlags.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/AccessFlags.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,254 @@ +++/* +++ * Copyright 2007 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.classfile; +++ +++import java.io.IOException; +++import java.util.LinkedHashSet; +++import java.util.Set; +++ +++/** +++ * See JVMS3, sections 4.2, 4.6, 4.7. +++ * +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class AccessFlags { +++ public static final int ACC_PUBLIC = 0x0001; // class, inner, field, method +++ public static final int ACC_PRIVATE = 0x0002; // inner, field, method +++ public static final int ACC_PROTECTED = 0x0004; // inner, field, method +++ public static final int ACC_STATIC = 0x0008; // inner, field, method +++ public static final int ACC_FINAL = 0x0010; // class, inner, field, method +++ public static final int ACC_SUPER = 0x0020; // class +++ public static final int ACC_SYNCHRONIZED = 0x0020; // method +++ public static final int ACC_VOLATILE = 0x0040; // field +++ public static final int ACC_BRIDGE = 0x0040; // method +++ public static final int ACC_TRANSIENT = 0x0080; // field +++ public static final int ACC_VARARGS = 0x0080; // method +++ public static final int ACC_NATIVE = 0x0100; // method +++ public static final int ACC_INTERFACE = 0x0200; // class, inner +++ public static final int ACC_ABSTRACT = 0x0400; // class, inner, method +++ public static final int ACC_STRICT = 0x0800; // method +++ public static final int ACC_SYNTHETIC = 0x1000; // class, inner, field, method +++ public static final int ACC_ANNOTATION = 0x2000; // class, inner +++ public static final int ACC_ENUM = 0x4000; // class, inner, field +++ public static final int ACC_MODULE = 0x8000; // class, inner, field, method +++ +++ private static enum Type { Class, InnerClass, Field, Method}; +++ +++ AccessFlags(ClassReader cr) throws IOException { +++ this(cr.readUnsignedShort()); +++ } +++ +++ public AccessFlags(int flags) { +++ this.flags = flags; +++ } +++ +++ public AccessFlags ignore(int mask) { +++ return new AccessFlags(flags & ~mask); +++ } +++ +++ public boolean is(int mask) { +++ return (flags & mask) != 0; +++ } +++ +++ private static final int[] classModifiers = { +++ ACC_PUBLIC, ACC_FINAL, ACC_ABSTRACT, ACC_MODULE +++ }; +++ +++ private static final int[] classFlags = { +++ ACC_PUBLIC, ACC_FINAL, ACC_SUPER, ACC_INTERFACE, ACC_ABSTRACT, +++ ACC_SYNTHETIC, ACC_ANNOTATION, ACC_ENUM, ACC_MODULE +++ }; +++ +++ public Set getClassModifiers() { +++ int f = ((flags & ACC_INTERFACE) != 0 ? flags & ~ACC_ABSTRACT : flags); +++ return getModifiers(f, classModifiers, Type.Class); +++ } +++ +++ public Set getClassFlags() { +++ return getFlags(classFlags, Type.Class); +++ } +++ +++ private static final int[] innerClassModifiers = { +++ ACC_PUBLIC, ACC_PRIVATE, ACC_PROTECTED, ACC_STATIC, ACC_FINAL, +++ ACC_ABSTRACT, ACC_MODULE +++ }; +++ +++ private static final int[] innerClassFlags = { +++ ACC_PUBLIC, ACC_PRIVATE, ACC_PROTECTED, ACC_STATIC, ACC_FINAL, ACC_SUPER, +++ ACC_INTERFACE, ACC_ABSTRACT, ACC_SYNTHETIC, ACC_ANNOTATION, ACC_ENUM, ACC_MODULE +++ }; +++ +++ public Set getInnerClassModifiers() { +++ int f = ((flags & ACC_INTERFACE) != 0 ? flags & ~ACC_ABSTRACT : flags); +++ return getModifiers(f, innerClassModifiers, Type.InnerClass); +++ } +++ +++ public Set getInnerClassFlags() { +++ return getFlags(innerClassFlags, Type.InnerClass); +++ } +++ +++ private static final int[] fieldModifiers = { +++ ACC_PUBLIC, ACC_PRIVATE, ACC_PROTECTED, ACC_STATIC, ACC_FINAL, +++ ACC_VOLATILE, ACC_TRANSIENT, ACC_MODULE +++ }; +++ +++ private static final int[] fieldFlags = { +++ ACC_PUBLIC, ACC_PRIVATE, ACC_PROTECTED, ACC_STATIC, ACC_FINAL, +++ ACC_VOLATILE, ACC_TRANSIENT, ACC_SYNTHETIC, ACC_ENUM, ACC_MODULE +++ }; +++ +++ public Set getFieldModifiers() { +++ return getModifiers(fieldModifiers, Type.Field); +++ } +++ +++ public Set getFieldFlags() { +++ return getFlags(fieldFlags, Type.Field); +++ } +++ +++ private static final int[] methodModifiers = { +++ ACC_PUBLIC, ACC_PRIVATE, ACC_PROTECTED, ACC_STATIC, ACC_FINAL, +++ ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT, ACC_STRICT, ACC_MODULE +++ }; +++ +++ private static final int[] methodFlags = { +++ ACC_PUBLIC, ACC_PRIVATE, ACC_PROTECTED, ACC_STATIC, ACC_FINAL, +++ ACC_SYNCHRONIZED, ACC_BRIDGE, ACC_VARARGS, ACC_NATIVE, ACC_ABSTRACT, +++ ACC_STRICT, ACC_SYNTHETIC, ACC_MODULE +++ }; +++ +++ public Set getMethodModifiers() { +++ return getModifiers(methodModifiers, Type.Method); +++ } +++ +++ public Set getMethodFlags() { +++ return getFlags(methodFlags, Type.Method); +++ } +++ +++ private Set getModifiers(int[] modifierFlags, Type t) { +++ return getModifiers(flags, modifierFlags, t); +++ } +++ +++ private static Set getModifiers(int flags, int[] modifierFlags, Type t) { +++ Set s = new LinkedHashSet(); +++ for (int m: modifierFlags) { +++ if ((flags & m) != 0) +++ s.add(flagToModifier(m, t)); +++ } +++ return s; +++ } +++ +++ private Set getFlags(int[] expectedFlags, Type t) { +++ Set s = new LinkedHashSet(); +++ int f = flags; +++ for (int e: expectedFlags) { +++ if ((f & e) != 0) { +++ s.add(flagToName(e, t)); +++ f = f & ~e; +++ } +++ } +++ while (f != 0) { +++ int bit = Integer.highestOneBit(f); +++ s.add("0x" + Integer.toHexString(bit)); +++ f = f & ~bit; +++ } +++ return s; +++ } +++ +++ private static String flagToModifier(int flag, Type t) { +++ switch (flag) { +++ case ACC_PUBLIC: +++ return "public"; +++ case ACC_PRIVATE: +++ return "private"; +++ case ACC_PROTECTED: +++ return "protected"; +++ case ACC_STATIC: +++ return "static"; +++ case ACC_FINAL: +++ return "final"; +++ case ACC_SYNCHRONIZED: +++ return "synchronized"; +++ case 0x80: +++ return (t == Type.Field ? "transient" : null); +++ case ACC_VOLATILE: +++ return "volatile"; +++ case ACC_NATIVE: +++ return "native"; +++ case ACC_ABSTRACT: +++ return "abstract"; +++ case ACC_STRICT: +++ return "strictfp"; +++ case ACC_MODULE: +++ return "module"; +++ default: +++ return null; +++ } +++ } +++ +++ private static String flagToName(int flag, Type t) { +++ switch (flag) { +++ case ACC_PUBLIC: +++ return "ACC_PUBLIC"; +++ case ACC_PRIVATE: +++ return "ACC_PRIVATE"; +++ case ACC_PROTECTED: +++ return "ACC_PROTECTED"; +++ case ACC_STATIC: +++ return "ACC_STATIC"; +++ case ACC_FINAL: +++ return "ACC_FINAL"; +++ case 0x20: +++ return (t == Type.Class ? "ACC_SUPER" : "ACC_SYNCHRONIZED"); +++ case 0x40: +++ return (t == Type.Field ? "ACC_VOLATILE" : "ACC_BRIDGE"); +++ case 0x80: +++ return (t == Type.Field ? "ACC_TRANSIENT" : "ACC_VARARGS"); +++ case ACC_NATIVE: +++ return "ACC_NATIVE"; +++ case ACC_INTERFACE: +++ return "ACC_INTERFACE"; +++ case ACC_ABSTRACT: +++ return "ACC_ABSTRACT"; +++ case ACC_STRICT: +++ return "ACC_STRICT"; +++ case ACC_SYNTHETIC: +++ return "ACC_SYNTHETIC"; +++ case ACC_ANNOTATION: +++ return "ACC_ANNOTATION"; +++ case ACC_ENUM: +++ return "ACC_ENUM"; +++ case ACC_MODULE: +++ return "ACC_MODULE"; +++ default: +++ return null; +++ } +++ } +++ +++ final int flags; +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/classfile/Annotation.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/Annotation.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,243 @@ +++/* +++ * Copyright 2007 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.classfile; +++ +++import java.io.IOException; +++ +++/** +++ * See JVMS3, section 4.8.16. +++ * +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class Annotation { +++ static class InvalidAnnotation extends AttributeException { +++ InvalidAnnotation(String msg) { +++ super(msg); +++ } +++ } +++ +++ Annotation(ClassReader cr) throws IOException, InvalidAnnotation { +++ type_index = cr.readUnsignedShort(); +++ num_element_value_pairs = cr.readUnsignedShort(); +++ element_value_pairs = new element_value_pair[num_element_value_pairs]; +++ for (int i = 0; i < element_value_pairs.length; i++) +++ element_value_pairs[i] = new element_value_pair(cr); +++ } +++ +++ public Annotation(ConstantPool constant_pool, +++ int type_index, +++ element_value_pair[] element_value_pairs) { +++ this.type_index = type_index; +++ num_element_value_pairs = element_value_pairs.length; +++ this.element_value_pairs = element_value_pairs; +++ } +++ +++ public int length() { +++ int n = 2 /*type_index*/ + 2 /*num_element_value_pairs*/; +++ for (element_value_pair pair: element_value_pairs) +++ n += pair.length(); +++ return n; +++ } +++ +++ public final int type_index; +++ public final int num_element_value_pairs; +++ public final element_value_pair element_value_pairs[]; +++ +++ /** +++ * See JVMS3, section 4.8.16.1. +++ */ +++ public static abstract class element_value { +++ public static element_value read(ClassReader cr) +++ throws IOException, InvalidAnnotation { +++ int tag = cr.readUnsignedByte(); +++ switch (tag) { +++ case 'B': +++ case 'C': +++ case 'D': +++ case 'F': +++ case 'I': +++ case 'J': +++ case 'S': +++ case 'Z': +++ case 's': +++ return new Primitive_element_value(cr, tag); +++ +++ case 'e': +++ return new Enum_element_value(cr, tag); +++ +++ case 'c': +++ return new Class_element_value(cr, tag); +++ +++ case '@': +++ return new Annotation_element_value(cr, tag); +++ +++ case '[': +++ return new Array_element_value(cr, tag); +++ +++ default: +++ throw new InvalidAnnotation("unrecognized tag: " + tag); +++ } +++ } +++ +++ protected element_value(int tag) { +++ this.tag = tag; +++ } +++ +++ public abstract int length(); +++ +++ public abstract R accept(Visitor visitor, P p); +++ +++ public interface Visitor { +++ R visitPrimitive(Primitive_element_value ev, P p); +++ R visitEnum(Enum_element_value ev, P p); +++ R visitClass(Class_element_value ev, P p); +++ R visitAnnotation(Annotation_element_value ev, P p); +++ R visitArray(Array_element_value ev, P p); +++ } +++ +++ public final int tag; +++ } +++ +++ public static class Primitive_element_value extends element_value { +++ Primitive_element_value(ClassReader cr, int tag) throws IOException { +++ super(tag); +++ const_value_index = cr.readUnsignedShort(); +++ } +++ +++ @Override +++ public int length() { +++ return 2; +++ } +++ +++ public R accept(Visitor visitor, P p) { +++ return visitor.visitPrimitive(this, p); +++ } +++ +++ public final int const_value_index; +++ +++ } +++ +++ public static class Enum_element_value extends element_value { +++ Enum_element_value(ClassReader cr, int tag) throws IOException { +++ super(tag); +++ type_name_index = cr.readUnsignedShort(); +++ const_name_index = cr.readUnsignedShort(); +++ } +++ +++ @Override +++ public int length() { +++ return 4; +++ } +++ +++ public R accept(Visitor visitor, P p) { +++ return visitor.visitEnum(this, p); +++ } +++ +++ public final int type_name_index; +++ public final int const_name_index; +++ } +++ +++ public static class Class_element_value extends element_value { +++ Class_element_value(ClassReader cr, int tag) throws IOException { +++ super(tag); +++ class_info_index = cr.readUnsignedShort(); +++ } +++ +++ @Override +++ public int length() { +++ return 2; +++ } +++ +++ public R accept(Visitor visitor, P p) { +++ return visitor.visitClass(this, p); +++ } +++ +++ public final int class_info_index; +++ } +++ +++ public static class Annotation_element_value extends element_value { +++ Annotation_element_value(ClassReader cr, int tag) +++ throws IOException, InvalidAnnotation { +++ super(tag); +++ annotation_value = new Annotation(cr); +++ } +++ +++ @Override +++ public int length() { +++ return annotation_value.length(); +++ } +++ +++ public R accept(Visitor visitor, P p) { +++ return visitor.visitAnnotation(this, p); +++ } +++ +++ public final Annotation annotation_value; +++ } +++ +++ public static class Array_element_value extends element_value { +++ Array_element_value(ClassReader cr, int tag) +++ throws IOException, InvalidAnnotation { +++ super(tag); +++ num_values = cr.readUnsignedShort(); +++ values = new element_value[num_values]; +++ for (int i = 0; i < values.length; i++) +++ values[i] = element_value.read(cr); +++ } +++ +++ @Override +++ public int length() { +++ int n = 2; +++ for (int i = 0; i < values.length; i++) +++ n += values[i].length(); +++ return n; +++ } +++ +++ public R accept(Visitor visitor, P p) { +++ return visitor.visitArray(this, p); +++ } +++ +++ public final int num_values; +++ public final element_value[] values; +++ } +++ +++ public static class element_value_pair { +++ element_value_pair(ClassReader cr) +++ throws IOException, InvalidAnnotation { +++ element_name_index = cr.readUnsignedShort(); +++ value = element_value.read(cr); +++ } +++ +++ public int length() { +++ return 2 + value.length(); +++ } +++ +++ public final int element_name_index; +++ public final element_value value; +++ } +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/classfile/AnnotationDefault_attribute.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/AnnotationDefault_attribute.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,61 @@ +++/* +++ * Copyright 2007 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.classfile; +++ +++import java.io.IOException; +++ +++/** +++ * See JVMS3, section 4.8.15. +++ * +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class AnnotationDefault_attribute extends Attribute { +++ AnnotationDefault_attribute(ClassReader cr, int name_index, int length) +++ throws IOException, Annotation.InvalidAnnotation { +++ super(name_index, length); +++ default_value = Annotation.element_value.read(cr); +++ } +++ +++ public AnnotationDefault_attribute(ConstantPool constant_pool, Annotation.element_value default_value) +++ throws ConstantPoolException { +++ this(constant_pool.getUTF8Index(Attribute.AnnotationDefault), default_value); +++ } +++ +++ public AnnotationDefault_attribute(int name_index, Annotation.element_value default_value) { +++ super(name_index, default_value.length()); +++ this.default_value = default_value; +++ } +++ +++ public R accept(Visitor visitor, D data) { +++ return visitor.visitAnnotationDefault(this, data); +++ } +++ +++ public final Annotation.element_value default_value; +++} +++ ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/classfile/Attribute.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/Attribute.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,199 @@ +++/* +++ * Copyright 2007 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.classfile; +++ +++import java.io.IOException; +++import java.lang.reflect.Constructor; +++import java.util.HashMap; +++import java.util.Map; +++ +++/** +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++ +++public abstract class Attribute { +++ public static final String AnnotationDefault = "AnnotationDefault"; +++ public static final String CharacterRangeTable = "CharacterRangeTable"; +++ public static final String Code = "Code"; +++ public static final String ConstantValue = "ConstantValue"; +++ public static final String CompilationID = "CompilationID"; +++ public static final String Deprecated = "Deprecated"; +++ public static final String EnclosingMethod = "EnclosingMethod"; +++ public static final String Exceptions = "Exceptions"; +++ public static final String InnerClasses = "InnerClasses"; +++ public static final String LineNumberTable = "LineNumberTable"; +++ public static final String LocalVariableTable = "LocalVariableTable"; +++ public static final String LocalVariableTypeTable = "LocalVariableTypeTable"; +++ public static final String RuntimeVisibleAnnotations = "RuntimeVisibleAnnotations"; +++ public static final String RuntimeInvisibleAnnotations = "RuntimeInvisibleAnnotations"; +++ public static final String RuntimeVisibleParameterAnnotations = "RuntimeVisibleParameterAnnotations"; +++ public static final String RuntimeInvisibleParameterAnnotations = "RuntimeInvisibleParameterAnnotations"; +++ public static final String Signature = "Signature"; +++ public static final String SourceDebugExtension = "SourceDebugExtension"; +++ public static final String SourceFile = "SourceFile"; +++ public static final String SourceID = "SourceID"; +++ public static final String StackMap = "StackMap"; +++ public static final String StackMapTable = "StackMapTable"; +++ public static final String Synthetic = "Synthetic"; +++ +++ // JSR 277/294 +++ public static final String Module = "Module"; +++ public static final String ModuleExportTable = "ModuleExportTable"; +++ public static final String ModuleMemberTable = "ModuleMemberTable"; +++ +++ public static class Factory { +++ public Factory() { +++ // defer init of standardAttributeClasses until after options set up +++ } +++ +++ public void setCompat(boolean compat) { +++ this.compat = compat; +++ } +++ +++ public void setJSR277(boolean jsr277) { +++ this.jsr277 = jsr277; +++ } +++ +++ public Attribute createAttribute(ClassReader cr, int name_index, byte[] data) +++ throws IOException { +++ if (standardAttributes == null) +++ init(); +++ +++ ConstantPool cp = cr.getConstantPool(); +++ try { +++ String name = cp.getUTF8Value(name_index); +++ Class attrClass = standardAttributes.get(name); +++ if (attrClass != null) { +++ try { +++ Class[] constrArgTypes = {ClassReader.class, int.class, int.class}; +++ Constructor constr = attrClass.getDeclaredConstructor(constrArgTypes); +++ return constr.newInstance(new Object[] { cr, name_index, data.length }); +++ } catch (Throwable t) { +++ // fall through and use DefaultAttribute +++ // t.printStackTrace(); +++ } +++ } +++ } catch (ConstantPoolException e) { +++ // fall through and use DefaultAttribute +++ } +++ return new DefaultAttribute(cr, name_index, data); +++ } +++ +++ protected void init() { +++ standardAttributes = new HashMap>(); +++ standardAttributes.put(AnnotationDefault, AnnotationDefault_attribute.class); +++ standardAttributes.put(CharacterRangeTable, CharacterRangeTable_attribute.class); +++ standardAttributes.put(Code, Code_attribute.class); +++ standardAttributes.put(ConstantValue, ConstantValue_attribute.class); +++ standardAttributes.put(Deprecated, Deprecated_attribute.class); +++ standardAttributes.put(EnclosingMethod, EnclosingMethod_attribute.class); +++ standardAttributes.put(Exceptions, Exceptions_attribute.class); +++ standardAttributes.put(InnerClasses, InnerClasses_attribute.class); +++ standardAttributes.put(LineNumberTable, LineNumberTable_attribute.class); +++ standardAttributes.put(LocalVariableTable, LocalVariableTable_attribute.class); +++ standardAttributes.put(LocalVariableTypeTable, LocalVariableTypeTable_attribute.class); +++ +++ if (jsr277) { +++ standardAttributes.put(Module, Module_attribute.class); +++ standardAttributes.put(ModuleExportTable, ModuleExportTable_attribute.class); +++ standardAttributes.put(ModuleMemberTable, ModuleMemberTable_attribute.class); +++ } +++ +++ if (!compat) { // old javap does not recognize recent attributes +++ standardAttributes.put(CompilationID, CompilationID_attribute.class); +++ standardAttributes.put(RuntimeInvisibleAnnotations, RuntimeInvisibleAnnotations_attribute.class); +++ standardAttributes.put(RuntimeInvisibleParameterAnnotations, RuntimeInvisibleParameterAnnotations_attribute.class); +++ standardAttributes.put(RuntimeVisibleAnnotations, RuntimeVisibleAnnotations_attribute.class); +++ standardAttributes.put(RuntimeVisibleParameterAnnotations, RuntimeVisibleParameterAnnotations_attribute.class); +++ standardAttributes.put(Signature, Signature_attribute.class); +++ standardAttributes.put(SourceID, SourceID_attribute.class); +++ } +++ +++ standardAttributes.put(SourceDebugExtension, SourceDebugExtension_attribute.class); +++ standardAttributes.put(SourceFile, SourceFile_attribute.class); +++ standardAttributes.put(StackMap, StackMap_attribute.class); +++ standardAttributes.put(StackMapTable, StackMapTable_attribute.class); +++ standardAttributes.put(Synthetic, Synthetic_attribute.class); +++ } +++ +++ private Map> standardAttributes; +++ private boolean compat; // don't support recent attrs in compatibility mode +++ private boolean jsr277; // support new jsr277 attrs +++ } +++ +++ public static Attribute read(ClassReader cr) throws IOException { +++ return cr.readAttribute(); +++ } +++ +++ protected Attribute(int name_index, int length) { +++ attribute_name_index = name_index; +++ attribute_length = length; +++ } +++ +++ public String getName(ConstantPool constant_pool) throws ConstantPoolException { +++ return constant_pool.getUTF8Value(attribute_name_index); +++ } +++ +++ public abstract R accept(Attribute.Visitor visitor, D data); +++ +++ public final int attribute_name_index; +++ public final int attribute_length; +++ +++ +++ public interface Visitor { +++ R visitDefault(DefaultAttribute attr, P p); +++ R visitAnnotationDefault(AnnotationDefault_attribute attr, P p); +++ R visitCharacterRangeTable(CharacterRangeTable_attribute attr, P p); +++ R visitCode(Code_attribute attr, P p); +++ R visitCompilationID(CompilationID_attribute attr, P p); +++ R visitConstantValue(ConstantValue_attribute attr, P p); +++ R visitDeprecated(Deprecated_attribute attr, P p); +++ R visitEnclosingMethod(EnclosingMethod_attribute attr, P p); +++ R visitExceptions(Exceptions_attribute attr, P p); +++ R visitInnerClasses(InnerClasses_attribute attr, P p); +++ R visitLineNumberTable(LineNumberTable_attribute attr, P p); +++ R visitLocalVariableTable(LocalVariableTable_attribute attr, P p); +++ R visitLocalVariableTypeTable(LocalVariableTypeTable_attribute attr, P p); +++ R visitRuntimeVisibleAnnotations(RuntimeVisibleAnnotations_attribute attr, P p); +++ R visitRuntimeInvisibleAnnotations(RuntimeInvisibleAnnotations_attribute attr, P p); +++ R visitRuntimeVisibleParameterAnnotations(RuntimeVisibleParameterAnnotations_attribute attr, P p); +++ R visitRuntimeInvisibleParameterAnnotations(RuntimeInvisibleParameterAnnotations_attribute attr, P p); +++ R visitSignature(Signature_attribute attr, P p); +++ R visitSourceDebugExtension(SourceDebugExtension_attribute attr, P p); +++ R visitSourceFile(SourceFile_attribute attr, P p); +++ R visitSourceID(SourceID_attribute attr, P p); +++ R visitStackMap(StackMap_attribute attr, P p); +++ R visitStackMapTable(StackMapTable_attribute attr, P p); +++ R visitSynthetic(Synthetic_attribute attr, P p); +++ +++ R visitModule(Module_attribute attr, P p); +++ R visitModuleExportTable(ModuleExportTable_attribute attr, P p); +++ R visitModuleMemberTable(ModuleMemberTable_attribute attr, P p); +++ } +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/classfile/AttributeException.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/AttributeException.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,40 @@ +++/* +++ * Copyright 2008 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.classfile; +++ +++/* +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class AttributeException extends Exception { +++ AttributeException() { } +++ +++ AttributeException(String msg) { +++ super(msg); +++ } +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/classfile/Attributes.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/Attributes.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,87 @@ +++/* +++ * Copyright 2007 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.classfile; +++ +++import java.io.IOException; +++import java.util.Arrays; +++import java.util.HashMap; +++import java.util.Iterator; +++import java.util.Map; +++ +++/* +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class Attributes implements Iterable { +++ Attributes(ClassReader cr) throws IOException { +++ map = new HashMap(); +++ int attrs_count = cr.readUnsignedShort(); +++ attrs = new Attribute[attrs_count]; +++ for (int i = 0; i < attrs_count; i++) { +++ Attribute attr = Attribute.read(cr); +++ attrs[i] = attr; +++ try { +++ map.put(attr.getName(cr.getConstantPool()), attr); +++ } catch (ConstantPoolException e) { +++ // don't enter invalid names in map +++ } +++ } +++ } +++ +++ public Attributes(ConstantPool constant_pool, Attribute[] attrs) { +++ this.attrs = attrs; +++ map = new HashMap(); +++ for (int i = 0; i < attrs.length; i++) { +++ Attribute attr = attrs[i]; +++ try { +++ map.put(attr.getName(constant_pool), attr); +++ } catch (ConstantPoolException e) { +++ // don't enter invalid names in map +++ } +++ } +++ } +++ +++ public Iterator iterator() { +++ return Arrays.asList(attrs).iterator(); +++ } +++ +++ public Attribute get(int index) { +++ return attrs[index]; +++ } +++ +++ public Attribute get(String name) { +++ return map.get(name); +++ } +++ +++ public int size() { +++ return attrs.length; +++ } +++ +++ public final Attribute[] attrs; +++ public final Map map; +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/classfile/CharacterRangeTable_attribute.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/CharacterRangeTable_attribute.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,90 @@ +++/* +++ * Copyright 2007 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.classfile; +++ +++import java.io.IOException; +++ +++/** +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class CharacterRangeTable_attribute extends Attribute { +++ public static final int CRT_STATEMENT = 0x0001; +++ public static final int CRT_BLOCK = 0x0002; +++ public static final int CRT_ASSIGNMENT = 0x0004; +++ public static final int CRT_FLOW_CONTROLLER = 0x0008; +++ public static final int CRT_FLOW_TARGET = 0x0010; +++ public static final int CRT_INVOKE = 0x0020; +++ public static final int CRT_CREATE = 0x0040; +++ public static final int CRT_BRANCH_TRUE = 0x0080; +++ public static final int CRT_BRANCH_FALSE = 0x0100; +++ +++ CharacterRangeTable_attribute(ClassReader cr, int name_index, int length) throws IOException { +++ super(name_index, length); +++ int character_range_table_length = cr.readUnsignedShort(); +++ character_range_table = new Entry[character_range_table_length]; +++ for (int i = 0; i < character_range_table_length; i++) +++ character_range_table[i] = new Entry(cr); +++ } +++ +++ public CharacterRangeTable_attribute(ConstantPool constant_pool, Entry[] character_range_table) +++ throws ConstantPoolException { +++ this(constant_pool.getUTF8Index(Attribute.CharacterRangeTable), character_range_table); +++ } +++ +++ public CharacterRangeTable_attribute(int name_index, Entry[] character_range_table) { +++ super(name_index, character_range_table.length * Entry.length()); +++ this.character_range_table = character_range_table; +++ } +++ +++ public R accept(Visitor visitor, D data) { +++ return visitor.visitCharacterRangeTable(this, data); +++ } +++ +++ public final Entry[] character_range_table; +++ +++ public static class Entry { +++ Entry(ClassReader cr) throws IOException { +++ start_pc = cr.readUnsignedShort(); +++ end_pc = cr.readUnsignedShort(); +++ character_range_start = cr.readInt(); +++ character_range_end = cr.readInt(); +++ flags = cr.readUnsignedShort(); +++ } +++ +++ public static int length() { +++ return 14; +++ } +++ +++ public final int start_pc; +++ public final int end_pc; +++ public final int character_range_start; +++ public final int character_range_end; +++ public final int flags; +++ }; +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/classfile/ClassFile.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/ClassFile.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,153 @@ +++/* +++ * Copyright 2007 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.classfile; +++ +++import java.io.File; +++import java.io.FileInputStream; +++import java.io.IOException; +++import java.io.InputStream; +++ +++import static com.sun.tools.classfile.AccessFlags.*; +++ +++/** +++ * See JVMS3, section 4.2. +++ * +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class ClassFile { +++ public static ClassFile read(File file) +++ throws IOException, ConstantPoolException { +++ return read(file, new Attribute.Factory()); +++ } +++ +++ public static ClassFile read(File file, Attribute.Factory attributeFactory) +++ throws IOException, ConstantPoolException { +++ FileInputStream in = new FileInputStream(file); +++ try { +++ return new ClassFile(in, attributeFactory); +++ } finally { +++ try { +++ in.close(); +++ } catch (IOException e) { +++ // ignore +++ } +++ } +++ } +++ +++ public static ClassFile read(InputStream in) +++ throws IOException, ConstantPoolException { +++ return new ClassFile(in, new Attribute.Factory()); +++ } +++ +++ public static ClassFile read(InputStream in, Attribute.Factory attributeFactory) +++ throws IOException, ConstantPoolException { +++ return new ClassFile(in, attributeFactory); +++ } +++ +++ ClassFile(InputStream in, Attribute.Factory attributeFactory) throws IOException, ConstantPoolException { +++ ClassReader cr = new ClassReader(this, in, attributeFactory); +++ magic = cr.readInt(); +++ minor_version = cr.readUnsignedShort(); +++ major_version = cr.readUnsignedShort(); +++ constant_pool = new ConstantPool(cr); +++ access_flags = new AccessFlags(cr); +++ this_class = cr.readUnsignedShort(); +++ super_class = cr.readUnsignedShort(); +++ +++ int interfaces_count = cr.readUnsignedShort(); +++ interfaces = new int[interfaces_count]; +++ for (int i = 0; i < interfaces_count; i++) +++ interfaces[i] = cr.readUnsignedShort(); +++ +++ int fields_count = cr.readUnsignedShort(); +++ fields = new Field[fields_count]; +++ for (int i = 0; i < fields_count; i++) +++ fields[i] = new Field(cr); +++ +++ int methods_count = cr.readUnsignedShort(); +++ methods = new Method[methods_count]; +++ for (int i = 0; i < methods_count; i++) +++ methods[i] = new Method(cr); +++ +++ attributes = new Attributes(cr); +++ } +++ +++ public ClassFile(int magic, int minor_version, int major_version, +++ ConstantPool constant_pool, AccessFlags access_flags, +++ int this_class, int super_class, int[] interfaces, +++ Field[] fields, Method[] methods, Attributes attributes) { +++ this.magic = magic; +++ this.minor_version = minor_version; +++ this.major_version = major_version; +++ this.constant_pool = constant_pool; +++ this.access_flags = access_flags; +++ this.this_class = this_class; +++ this.super_class = super_class; +++ this.interfaces = interfaces; +++ this.fields = fields; +++ this.methods = methods; +++ this.attributes = attributes; +++ } +++ +++ public String getName() throws ConstantPoolException { +++ return constant_pool.getClassInfo(this_class).getName(); +++ } +++ +++ public String getSuperclassName() throws ConstantPoolException { +++ return constant_pool.getClassInfo(super_class).getName(); +++ } +++ +++ public String getInterfaceName(int i) throws ConstantPoolException { +++ return constant_pool.getClassInfo(interfaces[i]).getName(); +++ } +++ +++ public Attribute getAttribute(String name) { +++ return attributes.get(name); +++ } +++ +++ public boolean isClass() { +++ return !isInterface(); +++ } +++ +++ public boolean isInterface() { +++ return access_flags.is(ACC_INTERFACE); +++ } +++ +++ public final int magic; +++ public final int minor_version; +++ public final int major_version; +++ public final ConstantPool constant_pool; +++ public final AccessFlags access_flags; +++ public final int this_class; +++ public final int super_class; +++ public final int[] interfaces; +++ public final Field[] fields; +++ public final Method[] methods; +++ public final Attributes attributes; +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/classfile/ClassReader.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/ClassReader.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,109 @@ +++/* +++ * Copyright 2007 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.classfile; +++ +++import java.io.BufferedInputStream; +++import java.io.ByteArrayInputStream; +++import java.io.DataInputStream; +++import java.io.IOException; +++import java.io.InputStream; +++ +++/** +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class ClassReader { +++ ClassReader(ClassFile classFile, InputStream in, Attribute.Factory attributeFactory) throws IOException { +++ // null checks +++ classFile.getClass(); +++ attributeFactory.getClass(); +++ +++ this.classFile = classFile; +++ this.in = new DataInputStream(new BufferedInputStream(in)); +++ this.attributeFactory = attributeFactory; +++ } +++ +++ ClassFile getClassFile() { +++ return classFile; +++ } +++ +++ ConstantPool getConstantPool() { +++ return classFile.constant_pool; +++ } +++ +++ public Attribute readAttribute() throws IOException { +++ int name_index = readUnsignedShort(); +++ int length = readInt(); +++ byte[] data = new byte[length]; +++ readFully(data); +++ +++ DataInputStream prev = in; +++ in = new DataInputStream(new ByteArrayInputStream(data)); +++ try { +++ return attributeFactory.createAttribute(this, name_index, data); +++ } finally { +++ in = prev; +++ } +++ } +++ +++ public void readFully(byte[] b) throws IOException { +++ in.readFully(b); +++ } +++ +++ public int readUnsignedByte() throws IOException { +++ return in.readUnsignedByte(); +++ } +++ +++ public int readUnsignedShort() throws IOException { +++ return in.readUnsignedShort(); +++ } +++ +++ public int readInt() throws IOException { +++ return in.readInt(); +++ } +++ +++ public long readLong() throws IOException { +++ return in.readLong(); +++ } +++ +++ public float readFloat() throws IOException { +++ return in.readFloat(); +++ } +++ +++ public double readDouble() throws IOException { +++ return in.readDouble(); +++ } +++ +++ public String readUTF() throws IOException { +++ return in.readUTF(); +++ } +++ +++ private DataInputStream in; +++ private ClassFile classFile; +++ private Attribute.Factory attributeFactory; +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/classfile/ClassTranslator.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/ClassTranslator.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,368 @@ +++/* +++ * Copyright 2008 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.classfile; +++ +++import com.sun.tools.classfile.ConstantPool.CONSTANT_Class_info; +++import com.sun.tools.classfile.ConstantPool.CONSTANT_Double_info; +++import com.sun.tools.classfile.ConstantPool.CONSTANT_Fieldref_info; +++import com.sun.tools.classfile.ConstantPool.CONSTANT_Float_info; +++import com.sun.tools.classfile.ConstantPool.CONSTANT_Integer_info; +++import com.sun.tools.classfile.ConstantPool.CONSTANT_InterfaceMethodref_info; +++import com.sun.tools.classfile.ConstantPool.CONSTANT_Long_info; +++import com.sun.tools.classfile.ConstantPool.CONSTANT_Methodref_info; +++import com.sun.tools.classfile.ConstantPool.CONSTANT_NameAndType_info; +++import com.sun.tools.classfile.ConstantPool.CONSTANT_String_info; +++import com.sun.tools.classfile.ConstantPool.CONSTANT_Utf8_info; +++import com.sun.tools.classfile.ConstantPool.CPInfo; +++import java.util.Map; +++ +++/** +++ * Rewrites a class file using a map of translations. +++ * +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class ClassTranslator +++ implements ConstantPool.Visitor> { +++ /** +++ * Create a new ClassFile from {@code cf}, such that for all entries +++ * {@code k -\> v} in {@code translations}, +++ * each occurrence of {@code k} in {@code cf} will be replaced by {@code v}. +++ * in +++ * @param cf the class file to be processed +++ * @param translations the set of translations to be applied +++ * @return a copy of {@code} with the values in {@code translations} substituted +++ */ +++ public ClassFile translate(ClassFile cf, Map translations) { +++ ClassFile cf2 = (ClassFile) translations.get(cf); +++ if (cf2 == null) { +++ ConstantPool constant_pool2 = translate(cf.constant_pool, translations); +++ Field[] fields2 = translate(cf.fields, cf.constant_pool, translations); +++ Method[] methods2 = translateMethods(cf.methods, cf.constant_pool, translations); +++ Attributes attributes2 = translateAttributes(cf.attributes, cf.constant_pool, +++ translations); +++ +++ if (constant_pool2 == cf.constant_pool && +++ fields2 == cf.fields && +++ methods2 == cf.methods && +++ attributes2 == cf.attributes) +++ cf2 = cf; +++ else +++ cf2 = new ClassFile( +++ cf.magic, +++ cf.minor_version, +++ cf.major_version, +++ constant_pool2, +++ cf.access_flags, +++ cf.this_class, +++ cf.super_class, +++ cf.interfaces, +++ fields2, +++ methods2, +++ attributes2); +++ translations.put(cf, cf2); +++ } +++ return cf2; +++ } +++ +++ ConstantPool translate(ConstantPool cp, Map translations) { +++ ConstantPool cp2 = (ConstantPool) translations.get(cp); +++ if (cp2 == null) { +++ ConstantPool.CPInfo[] pool2 = new ConstantPool.CPInfo[cp.size()]; +++ boolean eq = true; +++ for (int i = 0; i < cp.size(); i++) { +++ ConstantPool.CPInfo cpInfo; +++ try { +++ cpInfo = cp.get(i); +++ } catch (ConstantPool.InvalidIndex e) { +++ throw new IllegalStateException(e); +++ } +++ ConstantPool.CPInfo cpInfo2 = translate(cpInfo, translations); +++ eq &= (cpInfo == cpInfo2); +++ pool2[i] = cpInfo2; +++ if (cpInfo.getTag() != cpInfo2.getTag()) +++ throw new IllegalStateException(); +++ switch (cpInfo.getTag()) { +++ case ConstantPool.CONSTANT_Double: +++ case ConstantPool.CONSTANT_Long: +++ i += 1; +++ } +++ } +++ +++ if (eq) +++ cp2 = cp; +++ else +++ cp2 = new ConstantPool(pool2); +++ +++ translations.put(cp, cp2); +++ } +++ return cp2; +++ } +++ +++ ConstantPool.CPInfo translate(ConstantPool.CPInfo cpInfo, Map translations) { +++ ConstantPool.CPInfo cpInfo2 = (ConstantPool.CPInfo) translations.get(cpInfo); +++ if (cpInfo2 == null) { +++ cpInfo2 = cpInfo.accept(this, translations); +++ translations.put(cpInfo, cpInfo2); +++ } +++ return cpInfo2; +++ } +++ +++ Field[] translate(Field[] fields, ConstantPool constant_pool, Map translations) { +++ Field[] fields2 = (Field[]) translations.get(fields); +++ if (fields2 == null) { +++ fields2 = new Field[fields.length]; +++ for (int i = 0; i < fields.length; i++) +++ fields2[i] = translate(fields[i], constant_pool, translations); +++ if (equal(fields, fields2)) +++ fields2 = fields; +++ translations.put(fields, fields2); +++ } +++ return fields2; +++ } +++ +++ Field translate(Field field, ConstantPool constant_pool, Map translations) { +++ Field field2 = (Field) translations.get(field); +++ if (field2 == null) { +++ Attributes attributes2 = translateAttributes(field.attributes, constant_pool, +++ translations); +++ +++ if (attributes2 == field.attributes) +++ field2 = field; +++ else +++ field2 = new Field( +++ field.access_flags, +++ field.name_index, +++ field.descriptor, +++ attributes2); +++ translations.put(field, field2); +++ } +++ return field2; +++ } +++ +++ Method[] translateMethods(Method[] methods, ConstantPool constant_pool, Map translations) { +++ Method[] methods2 = (Method[]) translations.get(methods); +++ if (methods2 == null) { +++ methods2 = new Method[methods.length]; +++ for (int i = 0; i < methods.length; i++) +++ methods2[i] = translate(methods[i], constant_pool, translations); +++ if (equal(methods, methods2)) +++ methods2 = methods; +++ translations.put(methods, methods2); +++ } +++ return methods2; +++ } +++ +++ Method translate(Method method, ConstantPool constant_pool, Map translations) { +++ Method method2 = (Method) translations.get(method); +++ if (method2 == null) { +++ Attributes attributes2 = translateAttributes(method.attributes, constant_pool, +++ translations); +++ +++ if (attributes2 == method.attributes) +++ method2 = method; +++ else +++ method2 = new Method( +++ method.access_flags, +++ method.name_index, +++ method.descriptor, +++ attributes2); +++ translations.put(method, method2); +++ } +++ return method2; +++ } +++ +++ Attributes translateAttributes(Attributes attributes, +++ ConstantPool constant_pool, Map translations) { +++ Attributes attributes2 = (Attributes) translations.get(attributes); +++ if (attributes2 == null) { +++ Attribute[] attrArray2 = new Attribute[attributes.size()]; +++ ConstantPool constant_pool2 = translate(constant_pool, translations); +++ boolean attrsEqual = true; +++ for (int i = 0; i < attributes.size(); i++) { +++ Attribute attr = attributes.get(i); +++ Attribute attr2 = translate(attr, translations); +++ if (attr2 != attr) +++ attrsEqual = false; +++ attrArray2[i] = attr2; +++ } +++ if ((constant_pool2 == constant_pool) && attrsEqual) +++ attributes2 = attributes; +++ else +++ attributes2 = new Attributes(constant_pool2, attrArray2); +++ translations.put(attributes, attributes2); +++ } +++ return attributes2; +++ } +++ +++ Attribute translate(Attribute attribute, Map translations) { +++ Attribute attribute2 = (Attribute) translations.get(attribute); +++ if (attribute2 == null) { +++ attribute2 = attribute; // don't support translation within attributes yet +++ // (what about Code attribute) +++ translations.put(attribute, attribute2); +++ } +++ return attribute2; +++ } +++ +++ private static boolean equal(T[] a1, T[] a2) { +++ if (a1 == null || a2 == null) +++ return (a1 == a2); +++ if (a1.length != a2.length) +++ return false; +++ for (int i = 0; i < a1.length; i++) { +++ if (a1[i] != a2[i]) +++ return false; +++ } +++ return true; +++ } +++ +++ public CPInfo visitClass(CONSTANT_Class_info info, Map translations) { +++ CONSTANT_Class_info info2 = (CONSTANT_Class_info) translations.get(info); +++ if (info2 == null) { +++ ConstantPool cp2 = translate(info.cp, translations); +++ if (cp2 == info.cp) +++ info2 = info; +++ else +++ info2 = new CONSTANT_Class_info(cp2, info.name_index); +++ translations.put(info, info2); +++ } +++ return info; +++ } +++ +++ public CPInfo visitDouble(CONSTANT_Double_info info, Map translations) { +++ CONSTANT_Double_info info2 = (CONSTANT_Double_info) translations.get(info); +++ if (info2 == null) { +++ info2 = info; +++ translations.put(info, info2); +++ } +++ return info; +++ } +++ +++ public CPInfo visitFieldref(CONSTANT_Fieldref_info info, Map translations) { +++ CONSTANT_Fieldref_info info2 = (CONSTANT_Fieldref_info) translations.get(info); +++ if (info2 == null) { +++ ConstantPool cp2 = translate(info.cp, translations); +++ if (cp2 == info.cp) +++ info2 = info; +++ else +++ info2 = new CONSTANT_Fieldref_info(cp2, info.class_index, info.name_and_type_index); +++ translations.put(info, info2); +++ } +++ return info; +++ } +++ +++ public CPInfo visitFloat(CONSTANT_Float_info info, Map translations) { +++ CONSTANT_Float_info info2 = (CONSTANT_Float_info) translations.get(info); +++ if (info2 == null) { +++ info2 = info; +++ translations.put(info, info2); +++ } +++ return info; +++ } +++ +++ public CPInfo visitInteger(CONSTANT_Integer_info info, Map translations) { +++ CONSTANT_Integer_info info2 = (CONSTANT_Integer_info) translations.get(info); +++ if (info2 == null) { +++ info2 = info; +++ translations.put(info, info2); +++ } +++ return info; +++ } +++ +++ public CPInfo visitInterfaceMethodref(CONSTANT_InterfaceMethodref_info info, Map translations) { +++ CONSTANT_InterfaceMethodref_info info2 = (CONSTANT_InterfaceMethodref_info) translations.get(info); +++ if (info2 == null) { +++ ConstantPool cp2 = translate(info.cp, translations); +++ if (cp2 == info.cp) +++ info2 = info; +++ else +++ info2 = new CONSTANT_InterfaceMethodref_info(cp2, info.class_index, info.name_and_type_index); +++ translations.put(info, info2); +++ } +++ return info; +++ } +++ +++ public CPInfo visitLong(CONSTANT_Long_info info, Map translations) { +++ CONSTANT_Long_info info2 = (CONSTANT_Long_info) translations.get(info); +++ if (info2 == null) { +++ info2 = info; +++ translations.put(info, info2); +++ } +++ return info; +++ } +++ +++ public CPInfo visitNameAndType(CONSTANT_NameAndType_info info, Map translations) { +++ CONSTANT_NameAndType_info info2 = (CONSTANT_NameAndType_info) translations.get(info); +++ if (info2 == null) { +++ ConstantPool cp2 = translate(info.cp, translations); +++ if (cp2 == info.cp) +++ info2 = info; +++ else +++ info2 = new CONSTANT_NameAndType_info(cp2, info.name_index, info.type_index); +++ translations.put(info, info2); +++ } +++ return info; +++ } +++ +++ public CPInfo visitMethodref(CONSTANT_Methodref_info info, Map translations) { +++ CONSTANT_Methodref_info info2 = (CONSTANT_Methodref_info) translations.get(info); +++ if (info2 == null) { +++ ConstantPool cp2 = translate(info.cp, translations); +++ if (cp2 == info.cp) +++ info2 = info; +++ else +++ info2 = new CONSTANT_Methodref_info(cp2, info.class_index, info.name_and_type_index); +++ translations.put(info, info2); +++ } +++ return info; +++ } +++ +++ public CPInfo visitString(CONSTANT_String_info info, Map translations) { +++ CONSTANT_String_info info2 = (CONSTANT_String_info) translations.get(info); +++ if (info2 == null) { +++ ConstantPool cp2 = translate(info.cp, translations); +++ if (cp2 == info.cp) +++ info2 = info; +++ else +++ info2 = new CONSTANT_String_info(cp2, info.string_index); +++ translations.put(info, info2); +++ } +++ return info; +++ } +++ +++ public CPInfo visitUtf8(CONSTANT_Utf8_info info, Map translations) { +++ CONSTANT_Utf8_info info2 = (CONSTANT_Utf8_info) translations.get(info); +++ if (info2 == null) { +++ info2 = info; +++ translations.put(info, info2); +++ } +++ return info; +++ } +++ +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/classfile/ClassWriter.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/ClassWriter.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,689 @@ +++/* +++ * Copyright 2008 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.classfile; +++ +++import java.io.ByteArrayOutputStream; +++import java.io.DataOutputStream; +++import java.io.File; +++import java.io.FileOutputStream; +++import java.io.IOException; +++import java.io.OutputStream; +++ +++import static com.sun.tools.classfile.Annotation.*; +++import static com.sun.tools.classfile.ConstantPool.*; +++import static com.sun.tools.classfile.StackMapTable_attribute.*; +++import static com.sun.tools.classfile.StackMapTable_attribute.verification_type_info.*; +++ +++/** +++ * Write a ClassFile data structure to a file or stream. +++ * +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class ClassWriter { +++ public ClassWriter() { +++ attributeWriter = new AttributeWriter(); +++ constantPoolWriter = new ConstantPoolWriter(); +++ out = new ClassOutputStream(); +++ } +++ +++ /** +++ * Write a ClassFile data structure to a file. +++ */ +++ public void write(ClassFile classFile, File f) throws IOException { +++ FileOutputStream f_out = new FileOutputStream(f); +++ try { +++ write(classFile, f_out); +++ } finally { +++ f_out.close(); +++ } +++ } +++ +++ /** +++ * Write a ClassFile data structure to a stream. +++ */ +++ public void write(ClassFile classFile, OutputStream s) throws IOException { +++ this.classFile = classFile; +++ out.reset(); +++ write(); +++ out.writeTo(s); +++ } +++ +++ protected void write() throws IOException { +++ writeHeader(); +++ writeConstantPool(); +++ writeAccessFlags(classFile.access_flags); +++ writeClassInfo(); +++ writeFields(); +++ writeMethods(); +++ writeAttributes(classFile.attributes); +++ } +++ +++ protected void writeHeader() { +++ out.writeInt(classFile.magic); +++ out.writeShort(classFile.minor_version); +++ out.writeShort(classFile.major_version); +++ } +++ +++ protected void writeAccessFlags(AccessFlags flags) { +++ out.writeShort(flags.flags); +++ } +++ +++ protected void writeAttributes(Attributes attributes) { +++ int size = attributes.size(); +++ out.writeShort(size); +++ for (Attribute attr: attributes) +++ attributeWriter.write(attr, out); +++ } +++ +++ protected void writeClassInfo() { +++ out.writeShort(classFile.this_class); +++ out.writeShort(classFile.super_class); +++ int[] interfaces = classFile.interfaces; +++ out.writeShort(interfaces.length); +++ for (int i: interfaces) +++ out.writeShort(i); +++ } +++ +++ protected void writeDescriptor(Descriptor d) { +++ out.writeShort(d.index); +++ } +++ +++ protected void writeConstantPool() { +++ ConstantPool pool = classFile.constant_pool; +++ int size = pool.size(); +++ out.writeShort(size); +++ try { +++ for (int i = 1; i < size; ) { +++ i += constantPoolWriter.write(pool.get(i), out); +++ } +++ } catch (ConstantPoolException e) { +++ throw new Error(e); // ?? +++ } +++ } +++ +++ protected void writeFields() throws IOException { +++ Field[] fields = classFile.fields; +++ out.writeShort(fields.length); +++ for (Field f: fields) +++ writeField(f); +++ } +++ +++ protected void writeField(Field f) throws IOException { +++ writeAccessFlags(f.access_flags); +++ out.writeShort(f.name_index); +++ writeDescriptor(f.descriptor); +++ writeAttributes(f.attributes); +++ } +++ +++ protected void writeMethods() throws IOException { +++ Method[] methods = classFile.methods; +++ out.writeShort(methods.length); +++ for (Method m: methods) { +++ writeMethod(m); +++ } +++ } +++ +++ protected void writeMethod(Method m) throws IOException { +++ writeAccessFlags(m.access_flags); +++ out.writeShort(m.name_index); +++ writeDescriptor(m.descriptor); +++ writeAttributes(m.attributes); +++ } +++ +++ protected ClassFile classFile; +++ protected ClassOutputStream out; +++ protected AttributeWriter attributeWriter; +++ protected ConstantPoolWriter constantPoolWriter; +++ +++ /** +++ * Subtype of ByteArrayOutputStream with the convenience methods of +++ * a DataOutputStream. Since ByteArrayOutputStream does not throw +++ * IOException, there are no exceptions from the additional +++ * convenience methods either, +++ */ +++ protected static class ClassOutputStream extends ByteArrayOutputStream { +++ public ClassOutputStream() { +++ d = new DataOutputStream(this); +++ } +++ +++ public void writeByte(int value) { +++ try { +++ d.writeByte(value); +++ } catch (IOException ignore) { +++ } +++ } +++ +++ public void writeShort(int value) { +++ try { +++ d.writeShort(value); +++ } catch (IOException ignore) { +++ } +++ } +++ +++ public void writeInt(int value) { +++ try { +++ d.writeInt(value); +++ } catch (IOException ignore) { +++ } +++ } +++ +++ public void writeLong(long value) { +++ try { +++ d.writeLong(value); +++ } catch (IOException ignore) { +++ } +++ } +++ +++ public void writeFloat(float value) { +++ try { +++ d.writeFloat(value); +++ } catch (IOException ignore) { +++ } +++ } +++ +++ public void writeDouble(double value) { +++ try { +++ d.writeDouble(value); +++ } catch (IOException ignore) { +++ } +++ } +++ +++ public void writeUTF(String value) { +++ try { +++ d.writeUTF(value); +++ } catch (IOException ignore) { +++ } +++ } +++ +++ public void writeTo(ClassOutputStream s) { +++ try { +++ super.writeTo(s); +++ } catch (IOException ignore) { +++ } +++ } +++ +++ private DataOutputStream d; +++ } +++ +++ /** +++ * Writer for the entries in the constant pool. +++ */ +++ protected static class ConstantPoolWriter +++ implements ConstantPool.Visitor { +++ protected int write(CPInfo info, ClassOutputStream out) { +++ out.writeByte(info.getTag()); +++ return info.accept(this, out); +++ } +++ +++ public Integer visitClass(CONSTANT_Class_info info, ClassOutputStream out) { +++ out.writeShort(info.name_index); +++ return 1; +++ } +++ +++ public Integer visitDouble(CONSTANT_Double_info info, ClassOutputStream out) { +++ out.writeDouble(info.value); +++ return 2; +++ } +++ +++ public Integer visitFieldref(CONSTANT_Fieldref_info info, ClassOutputStream out) { +++ writeRef(info, out); +++ return 1; +++ } +++ +++ public Integer visitFloat(CONSTANT_Float_info info, ClassOutputStream out) { +++ out.writeFloat(info.value); +++ return 1; +++ } +++ +++ public Integer visitInteger(CONSTANT_Integer_info info, ClassOutputStream out) { +++ out.writeInt(info.value); +++ return 1; +++ } +++ +++ public Integer visitInterfaceMethodref(CONSTANT_InterfaceMethodref_info info, ClassOutputStream out) { +++ writeRef(info, out); +++ return 1; +++ } +++ +++ public Integer visitLong(CONSTANT_Long_info info, ClassOutputStream out) { +++ out.writeLong(info.value); +++ return 2; +++ } +++ +++ public Integer visitNameAndType(CONSTANT_NameAndType_info info, ClassOutputStream out) { +++ out.writeShort(info.name_index); +++ out.writeShort(info.type_index); +++ return 1; +++ } +++ +++ public Integer visitMethodref(CONSTANT_Methodref_info info, ClassOutputStream out) { +++ return writeRef(info, out); +++ } +++ +++ public Integer visitString(CONSTANT_String_info info, ClassOutputStream out) { +++ out.writeShort(info.string_index); +++ return 1; +++ } +++ +++ public Integer visitUtf8(CONSTANT_Utf8_info info, ClassOutputStream out) { +++ out.writeUTF(info.value); +++ return 1; +++ } +++ +++ protected Integer writeRef(CPRefInfo info, ClassOutputStream out) { +++ out.writeShort(info.class_index); +++ out.writeShort(info.name_and_type_index); +++ return 1; +++ } +++ } +++ +++ /** +++ * Writer for the different types of attribute. +++ */ +++ protected static class AttributeWriter implements Attribute.Visitor { +++ public void write(Attributes attributes, ClassOutputStream out) { +++ int size = attributes.size(); +++ out.writeShort(size); +++ for (Attribute a: attributes) +++ write(a, out); +++ } +++ +++ // Note: due to the use of shared resources, this method is not reentrant. +++ public void write(Attribute attr, ClassOutputStream out) { +++ out.writeShort(attr.attribute_name_index); +++ sharedOut.reset(); +++ attr.accept(this, sharedOut); +++ out.writeInt(sharedOut.size()); +++ sharedOut.writeTo(out); +++ } +++ +++ protected ClassOutputStream sharedOut = new ClassOutputStream(); +++ protected AnnotationWriter annotationWriter = new AnnotationWriter(); +++ +++ public Void visitDefault(DefaultAttribute attr, ClassOutputStream out) { +++ out.write(attr.info, 0, attr.info.length); +++ return null; +++ } +++ +++ public Void visitAnnotationDefault(AnnotationDefault_attribute attr, ClassOutputStream out) { +++ annotationWriter.write(attr.default_value, out); +++ return null; +++ } +++ +++ public Void visitCharacterRangeTable(CharacterRangeTable_attribute attr, ClassOutputStream out) { +++ out.writeShort(attr.character_range_table.length); +++ for (CharacterRangeTable_attribute.Entry e: attr.character_range_table) +++ writeCharacterRangeTableEntry(e, out); +++ return null; +++ } +++ +++ protected void writeCharacterRangeTableEntry(CharacterRangeTable_attribute.Entry entry, ClassOutputStream out) { +++ out.writeShort(entry.start_pc); +++ out.writeShort(entry.end_pc); +++ out.writeInt(entry.character_range_start); +++ out.writeInt(entry.character_range_end); +++ out.writeShort(entry.flags); +++ } +++ +++ public Void visitCode(Code_attribute attr, ClassOutputStream out) { +++ out.writeShort(attr.max_stack); +++ out.writeShort(attr.max_locals); +++ out.writeInt(attr.code.length); +++ out.write(attr.code, 0, attr.code.length); +++ out.writeShort(attr.exception_table.length); +++ for (Code_attribute.Exception_data e: attr.exception_table) +++ writeExceptionTableEntry(e, out); +++ new AttributeWriter().write(attr.attributes, out); +++ return null; +++ } +++ +++ protected void writeExceptionTableEntry(Code_attribute.Exception_data exception_data, ClassOutputStream out) { +++ out.writeShort(exception_data.start_pc); +++ out.writeShort(exception_data.end_pc); +++ out.writeShort(exception_data.handler_pc); +++ out.writeShort(exception_data.catch_type); +++ } +++ +++ public Void visitCompilationID(CompilationID_attribute attr, ClassOutputStream out) { +++ out.writeShort(attr.compilationID_index); +++ return null; +++ } +++ +++ public Void visitConstantValue(ConstantValue_attribute attr, ClassOutputStream out) { +++ out.writeShort(attr.constantvalue_index); +++ return null; +++ } +++ +++ public Void visitDeprecated(Deprecated_attribute attr, ClassOutputStream out) { +++ return null; +++ } +++ +++ public Void visitEnclosingMethod(EnclosingMethod_attribute attr, ClassOutputStream out) { +++ out.writeShort(attr.class_index); +++ out.writeShort(attr.method_index); +++ return null; +++ } +++ +++ public Void visitExceptions(Exceptions_attribute attr, ClassOutputStream out) { +++ out.writeShort(attr.exception_index_table.length); +++ for (int i: attr.exception_index_table) +++ out.writeShort(i); +++ return null; +++ } +++ +++ public Void visitInnerClasses(InnerClasses_attribute attr, ClassOutputStream out) { +++ out.writeShort(attr.classes.length); +++ for (InnerClasses_attribute.Info info: attr.classes) +++ writeInnerClassesInfo(info, out); +++ return null; +++ } +++ +++ protected void writeInnerClassesInfo(InnerClasses_attribute.Info info, ClassOutputStream out) { +++ out.writeShort(info.inner_class_info_index); +++ out.writeShort(info.outer_class_info_index); +++ out.writeShort(info.inner_name_index); +++ writeAccessFlags(info.inner_class_access_flags, out); +++ } +++ +++ public Void visitLineNumberTable(LineNumberTable_attribute attr, ClassOutputStream out) { +++ out.writeShort(attr.line_number_table.length); +++ for (LineNumberTable_attribute.Entry e: attr.line_number_table) +++ writeLineNumberTableEntry(e, out); +++ return null; +++ } +++ +++ protected void writeLineNumberTableEntry(LineNumberTable_attribute.Entry entry, ClassOutputStream out) { +++ out.writeShort(entry.start_pc); +++ out.writeShort(entry.line_number); +++ } +++ +++ public Void visitLocalVariableTable(LocalVariableTable_attribute attr, ClassOutputStream out) { +++ out.writeShort(attr.local_variable_table.length); +++ for (LocalVariableTable_attribute.Entry e: attr.local_variable_table) +++ writeLocalVariableTableEntry(e, out); +++ return null; +++ } +++ +++ protected void writeLocalVariableTableEntry(LocalVariableTable_attribute.Entry entry, ClassOutputStream out) { +++ out.writeShort(entry.start_pc); +++ out.writeShort(entry.length); +++ out.writeShort(entry.name_index); +++ out.writeShort(entry.descriptor_index); +++ out.writeShort(entry.index); +++ } +++ +++ public Void visitLocalVariableTypeTable(LocalVariableTypeTable_attribute attr, ClassOutputStream out) { +++ out.writeByte(attr.local_variable_table.length); +++ for (LocalVariableTypeTable_attribute.Entry e: attr.local_variable_table) +++ writeLocalVariableTypeTableEntry(e, out); +++ return null; +++ } +++ +++ protected void writeLocalVariableTypeTableEntry(LocalVariableTypeTable_attribute.Entry entry, ClassOutputStream out) { +++ out.writeShort(entry.start_pc); +++ out.writeShort(entry.length); +++ out.writeShort(entry.name_index); +++ out.writeShort(entry.signature_index); +++ out.writeShort(entry.index); +++ } +++ +++ public Void visitModule(Module_attribute attr, ClassOutputStream out) { +++ out.writeShort(attr.module_name); +++ return null; +++ } +++ +++ public Void visitModuleExportTable(ModuleExportTable_attribute attr, ClassOutputStream out) { +++ out.writeShort(attr.export_type_table.length); +++ for (int i: attr.export_type_table) +++ out.writeShort(i); +++ return null; +++ } +++ +++ public Void visitModuleMemberTable(ModuleMemberTable_attribute attr, ClassOutputStream out) { +++ out.writeShort(attr.package_member_table.length); +++ for (int i: attr.package_member_table) +++ out.writeShort(i); +++ return null; +++ } +++ +++ public Void visitRuntimeVisibleAnnotations(RuntimeVisibleAnnotations_attribute attr, ClassOutputStream out) { +++ annotationWriter.write(attr.annotations, out); +++ return null; +++ } +++ +++ public Void visitRuntimeInvisibleAnnotations(RuntimeInvisibleAnnotations_attribute attr, ClassOutputStream out) { +++ annotationWriter.write(attr.annotations, out); +++ return null; +++ } +++ +++ public Void visitRuntimeVisibleParameterAnnotations(RuntimeVisibleParameterAnnotations_attribute attr, ClassOutputStream out) { +++ out.writeByte(attr.parameter_annotations.length); +++ for (Annotation[] annos: attr.parameter_annotations) +++ annotationWriter.write(annos, out); +++ return null; +++ } +++ +++ public Void visitRuntimeInvisibleParameterAnnotations(RuntimeInvisibleParameterAnnotations_attribute attr, ClassOutputStream out) { +++ out.writeByte(attr.parameter_annotations.length); +++ for (Annotation[] annos: attr.parameter_annotations) +++ annotationWriter.write(annos, out); +++ return null; +++ } +++ +++ public Void visitSignature(Signature_attribute attr, ClassOutputStream out) { +++ out.writeShort(attr.signature_index); +++ return null; +++ } +++ +++ public Void visitSourceDebugExtension(SourceDebugExtension_attribute attr, ClassOutputStream out) { +++ out.write(attr.debug_extension, 0, attr.debug_extension.length); +++ return null; +++ } +++ +++ public Void visitSourceFile(SourceFile_attribute attr, ClassOutputStream out) { +++ out.writeShort(attr.sourcefile_index); +++ return null; +++ } +++ +++ public Void visitSourceID(SourceID_attribute attr, ClassOutputStream out) { +++ out.writeShort(attr.sourceID_index); +++ return null; +++ } +++ +++ public Void visitStackMap(StackMap_attribute attr, ClassOutputStream out) { +++ if (stackMapWriter == null) +++ stackMapWriter = new StackMapTableWriter(); +++ +++ out.writeShort(attr.entries.length); +++ for (stack_map_frame f: attr.entries) +++ stackMapWriter.write(f, out); +++ return null; +++ } +++ +++ public Void visitStackMapTable(StackMapTable_attribute attr, ClassOutputStream out) { +++ if (stackMapWriter == null) +++ stackMapWriter = new StackMapTableWriter(); +++ +++ out.writeShort(attr.entries.length); +++ for (stack_map_frame f: attr.entries) +++ stackMapWriter.write(f, out); +++ return null; +++ } +++ +++ public Void visitSynthetic(Synthetic_attribute attr, ClassOutputStream out) { +++ return null; +++ } +++ +++ protected void writeAccessFlags(AccessFlags flags, ClassOutputStream p) { +++ sharedOut.writeShort(flags.flags); +++ } +++ +++ protected StackMapTableWriter stackMapWriter; +++ } +++ +++ /** +++ * Writer for the frames of StackMap and StackMapTable attributes. +++ */ +++ protected static class StackMapTableWriter +++ implements stack_map_frame.Visitor { +++ +++ public void write(stack_map_frame frame, ClassOutputStream out) { +++ out.write(frame.frame_type); +++ frame.accept(this, out); +++ } +++ +++ public Void visit_same_frame(same_frame frame, ClassOutputStream p) { +++ return null; +++ } +++ +++ public Void visit_same_locals_1_stack_item_frame(same_locals_1_stack_item_frame frame, ClassOutputStream out) { +++ writeVerificationTypeInfo(frame.stack[0], out); +++ return null; +++ } +++ +++ public Void visit_same_locals_1_stack_item_frame_extended(same_locals_1_stack_item_frame_extended frame, ClassOutputStream out) { +++ out.writeShort(frame.offset_delta); +++ writeVerificationTypeInfo(frame.stack[0], out); +++ return null; +++ } +++ +++ public Void visit_chop_frame(chop_frame frame, ClassOutputStream out) { +++ out.writeShort(frame.offset_delta); +++ return null; +++ } +++ +++ public Void visit_same_frame_extended(same_frame_extended frame, ClassOutputStream out) { +++ out.writeShort(frame.offset_delta); +++ return null; +++ } +++ +++ public Void visit_append_frame(append_frame frame, ClassOutputStream out) { +++ out.writeShort(frame.offset_delta); +++ for (verification_type_info l: frame.locals) +++ writeVerificationTypeInfo(l, out); +++ return null; +++ } +++ +++ public Void visit_full_frame(full_frame frame, ClassOutputStream out) { +++ out.writeShort(frame.offset_delta); +++ out.writeShort(frame.locals.length); +++ for (verification_type_info l: frame.locals) +++ writeVerificationTypeInfo(l, out); +++ out.writeShort(frame.stack.length); +++ for (verification_type_info s: frame.stack) +++ writeVerificationTypeInfo(s, out); +++ return null; +++ } +++ +++ protected void writeVerificationTypeInfo(verification_type_info info, +++ ClassOutputStream out) { +++ out.write(info.tag); +++ switch (info.tag) { +++ case ITEM_Top: +++ case ITEM_Integer: +++ case ITEM_Float: +++ case ITEM_Long: +++ case ITEM_Double: +++ case ITEM_Null: +++ case ITEM_UninitializedThis: +++ break; +++ +++ case ITEM_Object: +++ Object_variable_info o = (Object_variable_info) info; +++ out.writeShort(o.cpool_index); +++ break; +++ +++ case ITEM_Uninitialized: +++ Uninitialized_variable_info u = (Uninitialized_variable_info) info; +++ out.writeShort(u.offset); +++ break; +++ +++ default: +++ throw new Error(); +++ } +++ } +++ } +++ +++ /** +++ * Writer for annotations and the values they contain. +++ */ +++ protected static class AnnotationWriter +++ implements Annotation.element_value.Visitor { +++ public void write(Annotation[] annos, ClassOutputStream out) { +++ out.writeShort(annos.length); +++ for (Annotation anno: annos) +++ write(anno, out); +++ } +++ +++ public void write(Annotation anno, ClassOutputStream out) { +++ out.writeShort(anno.type_index); +++ out.writeShort(anno.element_value_pairs.length); +++ for (element_value_pair p: anno.element_value_pairs) +++ write(p, out); +++ } +++ +++ public void write(element_value_pair pair, ClassOutputStream out) { +++ out.writeShort(pair.element_name_index); +++ write(pair.value, out); +++ } +++ +++ public void write(element_value ev, ClassOutputStream out) { +++ out.writeByte(ev.tag); +++ ev.accept(this, out); +++ } +++ +++ public Void visitPrimitive(Primitive_element_value ev, ClassOutputStream out) { +++ out.writeShort(ev.const_value_index); +++ return null; +++ } +++ +++ public Void visitEnum(Enum_element_value ev, ClassOutputStream out) { +++ out.writeShort(ev.type_name_index); +++ out.writeShort(ev.const_name_index); +++ return null; +++ } +++ +++ public Void visitClass(Class_element_value ev, ClassOutputStream out) { +++ out.writeShort(ev.class_info_index); +++ return null; +++ } +++ +++ public Void visitAnnotation(Annotation_element_value ev, ClassOutputStream out) { +++ write(ev.annotation_value, out); +++ return null; +++ } +++ +++ public Void visitArray(Array_element_value ev, ClassOutputStream out) { +++ out.writeShort(ev.num_values); +++ for (element_value v: ev.values) +++ write(v, out); +++ return null; +++ } +++ } +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/classfile/Code_attribute.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/Code_attribute.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,123 @@ +++/* +++ * Copyright 2007 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.classfile; +++ +++import java.io.IOException; +++ +++/** +++ * See JVMS3, section 4.8.3. +++ * +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class Code_attribute extends Attribute { +++ public class InvalidIndex extends AttributeException { +++ InvalidIndex(int index) { +++ this.index = index; +++ } +++ +++ @Override +++ public String getMessage() { +++ // i18n +++ return "invalid index " + index + " in Code attribute"; +++ } +++ +++ public final int index; +++ } +++ +++ Code_attribute(ClassReader cr, int name_index, int length) +++ throws IOException, ConstantPoolException { +++ super(name_index, length); +++ max_stack = cr.readUnsignedShort(); +++ max_locals = cr.readUnsignedShort(); +++ code_length = cr.readInt(); +++ code = new byte[code_length]; +++ cr.readFully(code); +++ exception_table_langth = cr.readUnsignedShort(); +++ exception_table = new Exception_data[exception_table_langth]; +++ for (int i = 0; i < exception_table_langth; i++) +++ exception_table[i] = new Exception_data(cr); +++ attributes = new Attributes(cr); +++ } +++ +++ public int getByte(int offset) throws InvalidIndex { +++ if (offset < 0 || offset >= code.length) +++ throw new InvalidIndex(offset); +++ return code[offset]; +++ } +++ +++ public int getUnsignedByte(int offset) throws InvalidIndex { +++ if (offset < 0 || offset >= code.length) +++ throw new InvalidIndex(offset); +++ return code[offset] & 0xff; +++ } +++ +++ public int getShort(int offset) throws InvalidIndex { +++ if (offset < 0 || offset + 1 >= code.length) +++ throw new InvalidIndex(offset); +++ return (code[offset] << 8) | (code[offset + 1] & 0xFF); +++ } +++ +++ public int getUnsignedShort(int offset) throws InvalidIndex { +++ if (offset < 0 || offset + 1 >= code.length) +++ throw new InvalidIndex(offset); +++ return ((code[offset] << 8) | (code[offset + 1] & 0xFF)) & 0xFFFF; +++ } +++ +++ public int getInt(int offset) throws InvalidIndex { +++ if (offset < 0 || offset + 3 >= code.length) +++ throw new InvalidIndex(offset); +++ return (getShort(offset) << 16) | (getShort(offset + 2) & 0xFFFF); +++ } +++ +++ public R accept(Visitor visitor, D data) { +++ return visitor.visitCode(this, data); +++ } +++ +++ public final int max_stack; +++ public final int max_locals; +++ public final int code_length; +++ public final byte[] code; +++ public final int exception_table_langth; +++ public final Exception_data[] exception_table; +++ public final Attributes attributes; +++ +++ public class Exception_data { +++ Exception_data(ClassReader cr) throws IOException { +++ start_pc = cr.readUnsignedShort(); +++ end_pc = cr.readUnsignedShort(); +++ handler_pc = cr.readUnsignedShort(); +++ catch_type = cr.readUnsignedShort(); +++ } +++ +++ public final int start_pc; +++ public final int end_pc; +++ public final int handler_pc; +++ public final int catch_type; +++ } +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/classfile/CompilationID_attribute.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/CompilationID_attribute.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,62 @@ +++/* +++ * Copyright 2008 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++package com.sun.tools.classfile; +++ +++import java.io.IOException; +++ +++/** +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class CompilationID_attribute extends Attribute { +++ +++ CompilationID_attribute(ClassReader cr, int name_index, int length) throws IOException { +++ super(name_index, length); +++ compilationID_index = cr.readUnsignedShort(); +++ } +++ +++ public CompilationID_attribute(ConstantPool constant_pool, int compilationID_index) +++ throws ConstantPoolException { +++ this(constant_pool.getUTF8Index(Attribute.CompilationID), compilationID_index); +++ } +++ +++ public CompilationID_attribute(int name_index, int compilationID_index) { +++ super(name_index, 2); +++ this.compilationID_index = compilationID_index; +++ } +++ +++ String getCompilationID(ConstantPool constant_pool) +++ throws ConstantPoolException { +++ return constant_pool.getUTF8Value(compilationID_index); +++ } +++ +++ public R accept(Visitor visitor, D data) { +++ return visitor.visitCompilationID(this, data); +++ } +++ +++ public final int compilationID_index; +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/classfile/ConstantPool.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/ConstantPool.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,562 @@ +++/* +++ * Copyright 2007 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.classfile; +++ +++import java.io.IOException; +++ +++/** +++ * See JVMS3, section 4.5. +++ * +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class ConstantPool { +++ +++ public class InvalidIndex extends ConstantPoolException { +++ InvalidIndex(int index) { +++ super(index); +++ } +++ +++ @Override +++ public String getMessage() { +++ // i18n +++ return "invalid index #" + index; +++ } +++ } +++ +++ public class UnexpectedEntry extends ConstantPoolException { +++ UnexpectedEntry(int index, int expected_tag, int found_tag) { +++ super(index); +++ this.expected_tag = expected_tag; +++ this.found_tag = found_tag; +++ } +++ +++ @Override +++ public String getMessage() { +++ // i18n? +++ return "unexpected entry at #" + index + " -- expected tag " + expected_tag + ", found " + found_tag; +++ } +++ +++ public final int expected_tag; +++ public final int found_tag; +++ } +++ +++ public class InvalidEntry extends ConstantPoolException { +++ InvalidEntry(int index, int tag) { +++ super(index); +++ this.tag = tag; +++ } +++ +++ @Override +++ public String getMessage() { +++ // i18n? +++ return "unexpected tag at #" + index + ": " + tag; +++ } +++ +++ public final int tag; +++ } +++ +++ public class EntryNotFound extends ConstantPoolException { +++ EntryNotFound(Object value) { +++ super(-1); +++ this.value = value; +++ } +++ +++ @Override +++ public String getMessage() { +++ // i18n? +++ return "value not found: " + value; +++ } +++ +++ public final Object value; +++ } +++ +++ public static final int CONSTANT_Utf8 = 1; +++ public static final int CONSTANT_Integer = 3; +++ public static final int CONSTANT_Float = 4; +++ public static final int CONSTANT_Long = 5; +++ public static final int CONSTANT_Double = 6; +++ public static final int CONSTANT_Class = 7; +++ public static final int CONSTANT_String = 8; +++ public static final int CONSTANT_Fieldref = 9; +++ public static final int CONSTANT_Methodref = 10; +++ public static final int CONSTANT_InterfaceMethodref = 11; +++ public static final int CONSTANT_NameAndType = 12; +++ +++ ConstantPool(ClassReader cr) throws IOException, InvalidEntry { +++ int count = cr.readUnsignedShort(); +++ pool = new CPInfo[count]; +++ for (int i = 1; i < count; i++) { +++ int tag = cr.readUnsignedByte(); +++ switch (tag) { +++ case CONSTANT_Class: +++ pool[i] = new CONSTANT_Class_info(this, cr); +++ break; +++ +++ case CONSTANT_Double: +++ pool[i] = new CONSTANT_Double_info(cr); +++ i++; +++ break; +++ +++ case CONSTANT_Fieldref: +++ pool[i] = new CONSTANT_Fieldref_info(this, cr); +++ break; +++ +++ case CONSTANT_Float: +++ pool[i] = new CONSTANT_Float_info(cr); +++ break; +++ +++ case CONSTANT_Integer: +++ pool[i] = new CONSTANT_Integer_info(cr); +++ break; +++ +++ case CONSTANT_InterfaceMethodref: +++ pool[i] = new CONSTANT_InterfaceMethodref_info(this, cr); +++ break; +++ +++ case CONSTANT_Long: +++ pool[i] = new CONSTANT_Long_info(cr); +++ i++; +++ break; +++ +++ case CONSTANT_Methodref: +++ pool[i] = new CONSTANT_Methodref_info(this, cr); +++ break; +++ +++ case CONSTANT_NameAndType: +++ pool[i] = new CONSTANT_NameAndType_info(this, cr); +++ break; +++ +++ case CONSTANT_String: +++ pool[i] = new CONSTANT_String_info(cr); +++ break; +++ +++ case CONSTANT_Utf8: +++ pool[i] = new CONSTANT_Utf8_info(cr); +++ break; +++ +++ default: +++ throw new InvalidEntry(i, tag); +++ } +++ } +++ } +++ +++ public ConstantPool(CPInfo[] pool) { +++ this.pool = pool; +++ } +++ +++ public int size() { +++ return pool.length; +++ } +++ +++ public CPInfo get(int index) throws InvalidIndex { +++ if (index <= 0 || index >= pool.length) +++ throw new InvalidIndex(index); +++ CPInfo info = pool[index]; +++ if (info == null) { +++ // this occurs for indices referencing the "second half" of an +++ // 8 byte constant, such as CONSTANT_Double or CONSTANT_Long +++ throw new InvalidIndex(index); +++ } +++ return pool[index]; +++ } +++ +++ private CPInfo get(int index, int expected_type) throws InvalidIndex, UnexpectedEntry { +++ CPInfo info = get(index); +++ if (info.getTag() != expected_type) +++ throw new UnexpectedEntry(index, expected_type, info.getTag()); +++ return info; +++ } +++ +++ public CONSTANT_Utf8_info getUTF8Info(int index) throws InvalidIndex, UnexpectedEntry { +++ return ((CONSTANT_Utf8_info) get(index, CONSTANT_Utf8)); +++ } +++ +++ public CONSTANT_Class_info getClassInfo(int index) throws InvalidIndex, UnexpectedEntry { +++ return ((CONSTANT_Class_info) get(index, CONSTANT_Class)); +++ } +++ +++ public CONSTANT_NameAndType_info getNameAndTypeInfo(int index) throws InvalidIndex, UnexpectedEntry { +++ return ((CONSTANT_NameAndType_info) get(index, CONSTANT_NameAndType)); +++ } +++ +++ public String getUTF8Value(int index) throws InvalidIndex, UnexpectedEntry { +++ return getUTF8Info(index).value; +++ } +++ +++ public int getUTF8Index(String value) throws EntryNotFound { +++ for (int i = 1; i < pool.length; i++) { +++ CPInfo info = pool[i]; +++ if (info instanceof CONSTANT_Utf8_info && +++ ((CONSTANT_Utf8_info) info).value.equals(value)) +++ return i; +++ } +++ throw new EntryNotFound(value); +++ } +++ +++ private CPInfo[] pool; +++ +++ public interface Visitor { +++ R visitClass(CONSTANT_Class_info info, P p); +++ R visitDouble(CONSTANT_Double_info info, P p); +++ R visitFieldref(CONSTANT_Fieldref_info info, P p); +++ R visitFloat(CONSTANT_Float_info info, P p); +++ R visitInteger(CONSTANT_Integer_info info, P p); +++ R visitInterfaceMethodref(CONSTANT_InterfaceMethodref_info info, P p); +++ R visitLong(CONSTANT_Long_info info, P p); +++ R visitNameAndType(CONSTANT_NameAndType_info info, P p); +++ R visitMethodref(CONSTANT_Methodref_info info, P p); +++ R visitString(CONSTANT_String_info info, P p); +++ R visitUtf8(CONSTANT_Utf8_info info, P p); +++ } +++ +++ public static abstract class CPInfo { +++ CPInfo() { +++ this.cp = null; +++ } +++ +++ CPInfo(ConstantPool cp) { +++ this.cp = cp; +++ } +++ +++ public abstract int getTag(); +++ +++ public abstract R accept(Visitor visitor, D data); +++ +++ protected final ConstantPool cp; +++ } +++ +++ public static abstract class CPRefInfo extends CPInfo { +++ protected CPRefInfo(ConstantPool cp, ClassReader cr, int tag) throws IOException { +++ super(cp); +++ this.tag = tag; +++ class_index = cr.readUnsignedShort(); +++ name_and_type_index = cr.readUnsignedShort(); +++ } +++ +++ protected CPRefInfo(ConstantPool cp, int tag, int class_index, int name_and_type_index) { +++ super(cp); +++ this.tag = tag; +++ this.class_index = class_index; +++ this.name_and_type_index = name_and_type_index; +++ } +++ +++ public int getTag() { +++ return tag; +++ } +++ +++ public CONSTANT_Class_info getClassInfo() throws ConstantPoolException { +++ return cp.getClassInfo(class_index); +++ } +++ +++ public String getClassName() throws ConstantPoolException { +++ return cp.getClassInfo(class_index).getName(); +++ } +++ +++ public CONSTANT_NameAndType_info getNameAndTypeInfo() throws ConstantPoolException { +++ return cp.getNameAndTypeInfo(name_and_type_index); +++ } +++ +++ public final int tag; +++ public final int class_index; +++ public final int name_and_type_index; +++ } +++ +++ public static class CONSTANT_Class_info extends CPInfo { +++ CONSTANT_Class_info(ConstantPool cp, ClassReader cr) throws IOException { +++ super(cp); +++ name_index = cr.readUnsignedShort(); +++ } +++ +++ public CONSTANT_Class_info(ConstantPool cp, int name_index) { +++ super(cp); +++ this.name_index = name_index; +++ } +++ +++ public int getTag() { +++ return CONSTANT_Class; +++ } +++ +++ public String getName() throws ConstantPoolException { +++ return cp.getUTF8Value(name_index); +++ } +++ +++ @Override +++ public String toString() { +++ return "CONSTANT_Class_info[name_index: " + name_index + "]"; +++ } +++ +++ public R accept(Visitor visitor, D data) { +++ return visitor.visitClass(this, data); +++ } +++ +++ public final int name_index; +++ } +++ +++ public static class CONSTANT_Double_info extends CPInfo { +++ CONSTANT_Double_info(ClassReader cr) throws IOException { +++ value = cr.readDouble(); +++ } +++ +++ public CONSTANT_Double_info(double value) { +++ this.value = value; +++ } +++ +++ public int getTag() { +++ return CONSTANT_Double; +++ } +++ +++ @Override +++ public String toString() { +++ return "CONSTANT_Double_info[value: " + value + "]"; +++ } +++ +++ public R accept(Visitor visitor, D data) { +++ return visitor.visitDouble(this, data); +++ } +++ +++ public final double value; +++ } +++ +++ public static class CONSTANT_Fieldref_info extends CPRefInfo { +++ CONSTANT_Fieldref_info(ConstantPool cp, ClassReader cr) throws IOException { +++ super(cp, cr, CONSTANT_Fieldref); +++ } +++ +++ public CONSTANT_Fieldref_info(ConstantPool cp, int class_index, int name_and_type_index) { +++ super(cp, CONSTANT_Fieldref, class_index, name_and_type_index); +++ } +++ +++ @Override +++ public String toString() { +++ return "CONSTANT_Fieldref_info[class_index: " + class_index + ", name_and_type_index: " + name_and_type_index + "]"; +++ } +++ +++ public R accept(Visitor visitor, D data) { +++ return visitor.visitFieldref(this, data); +++ } +++ } +++ +++ public static class CONSTANT_Float_info extends CPInfo { +++ CONSTANT_Float_info(ClassReader cr) throws IOException { +++ value = cr.readFloat(); +++ } +++ +++ public CONSTANT_Float_info(float value) { +++ this.value = value; +++ } +++ +++ public int getTag() { +++ return CONSTANT_Float; +++ } +++ +++ @Override +++ public String toString() { +++ return "CONSTANT_Float_info[value: " + value + "]"; +++ } +++ +++ public R accept(Visitor visitor, D data) { +++ return visitor.visitFloat(this, data); +++ } +++ +++ public final float value; +++ } +++ +++ public static class CONSTANT_Integer_info extends CPInfo { +++ CONSTANT_Integer_info(ClassReader cr) throws IOException { +++ value = cr.readInt(); +++ } +++ +++ public CONSTANT_Integer_info(int value) { +++ this.value = value; +++ } +++ +++ public int getTag() { +++ return CONSTANT_Integer; +++ } +++ +++ @Override +++ public String toString() { +++ return "CONSTANT_Integer_info[value: " + value + "]"; +++ } +++ +++ public R accept(Visitor visitor, D data) { +++ return visitor.visitInteger(this, data); +++ } +++ +++ public final int value; +++ } +++ +++ public static class CONSTANT_InterfaceMethodref_info extends CPRefInfo { +++ CONSTANT_InterfaceMethodref_info(ConstantPool cp, ClassReader cr) throws IOException { +++ super(cp, cr, CONSTANT_InterfaceMethodref); +++ } +++ +++ public CONSTANT_InterfaceMethodref_info(ConstantPool cp, int class_index, int name_and_type_index) { +++ super(cp, CONSTANT_InterfaceMethodref, class_index, name_and_type_index); +++ } +++ +++ @Override +++ public String toString() { +++ return "CONSTANT_InterfaceMethodref_info[class_index: " + class_index + ", name_and_type_index: " + name_and_type_index + "]"; +++ } +++ +++ public R accept(Visitor visitor, D data) { +++ return visitor.visitInterfaceMethodref(this, data); +++ } +++ } +++ +++ public static class CONSTANT_Long_info extends CPInfo { +++ CONSTANT_Long_info(ClassReader cr) throws IOException { +++ value = cr.readLong(); +++ } +++ +++ public CONSTANT_Long_info(long value) { +++ this.value = value; +++ } +++ +++ public int getTag() { +++ return CONSTANT_Long; +++ } +++ +++ @Override +++ public String toString() { +++ return "CONSTANT_Long_info[value: " + value + "]"; +++ } +++ +++ public R accept(Visitor visitor, D data) { +++ return visitor.visitLong(this, data); +++ } +++ +++ public final long value; +++ } +++ +++ public static class CONSTANT_Methodref_info extends CPRefInfo { +++ CONSTANT_Methodref_info(ConstantPool cp, ClassReader cr) throws IOException { +++ super(cp, cr, CONSTANT_Methodref); +++ } +++ +++ public CONSTANT_Methodref_info(ConstantPool cp, int class_index, int name_and_type_index) { +++ super(cp, CONSTANT_Methodref, class_index, name_and_type_index); +++ } +++ +++ @Override +++ public String toString() { +++ return "CONSTANT_Methodref_info[class_index: " + class_index + ", name_and_type_index: " + name_and_type_index + "]"; +++ } +++ +++ public R accept(Visitor visitor, D data) { +++ return visitor.visitMethodref(this, data); +++ } +++ } +++ +++ public static class CONSTANT_NameAndType_info extends CPInfo { +++ CONSTANT_NameAndType_info(ConstantPool cp, ClassReader cr) throws IOException { +++ super(cp); +++ name_index = cr.readUnsignedShort(); +++ type_index = cr.readUnsignedShort(); +++ } +++ +++ public CONSTANT_NameAndType_info(ConstantPool cp, int name_index, int type_index) { +++ super(cp); +++ this.name_index = name_index; +++ this.type_index = type_index; +++ } +++ +++ public int getTag() { +++ return CONSTANT_NameAndType; +++ } +++ +++ public String getName() throws ConstantPoolException { +++ return cp.getUTF8Value(name_index); +++ } +++ +++ public String getType() throws ConstantPoolException { +++ return cp.getUTF8Value(type_index); +++ } +++ +++ public R accept(Visitor visitor, D data) { +++ return visitor.visitNameAndType(this, data); +++ } +++ +++ public final int name_index; +++ public final int type_index; +++ } +++ +++ public static class CONSTANT_String_info extends CPInfo { +++ CONSTANT_String_info(ClassReader cr) throws IOException { +++ string_index = cr.readUnsignedShort(); +++ } +++ +++ public CONSTANT_String_info(ConstantPool cp, int string_index) { +++ super(cp); +++ this.string_index = string_index; +++ } +++ +++ public int getTag() { +++ return CONSTANT_String; +++ } +++ +++ public String getString() throws ConstantPoolException { +++ return cp.getUTF8Value(string_index); +++ } +++ +++ public R accept(Visitor visitor, D data) { +++ return visitor.visitString(this, data); +++ } +++ +++ public final int string_index; +++ } +++ +++ public static class CONSTANT_Utf8_info extends CPInfo { +++ CONSTANT_Utf8_info(ClassReader cr) throws IOException { +++ value = cr.readUTF(); +++ } +++ +++ public CONSTANT_Utf8_info(String value) { +++ this.value = value; +++ } +++ +++ public int getTag() { +++ return CONSTANT_Utf8; +++ } +++ +++ @Override +++ public String toString() { +++ return "CONSTANT_Utf8_info[value: " + value + "]"; +++ } +++ +++ public R accept(Visitor visitor, D data) { +++ return visitor.visitUtf8(this, data); +++ } +++ +++ public final String value; +++ } +++ +++ +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/classfile/ConstantPoolException.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/ConstantPoolException.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,41 @@ +++/* +++ * Copyright 2008 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++ +++package com.sun.tools.classfile; +++ +++/* +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class ConstantPoolException extends Exception { +++ ConstantPoolException(int index) { +++ this.index = index; +++ } +++ +++ public final int index; +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/classfile/ConstantValue_attribute.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/ConstantValue_attribute.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,59 @@ +++/* +++ * Copyright 2007 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.classfile; +++ +++import java.io.IOException; +++ +++/** +++ * See JVMS3, section 4.8.2. +++ * +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class ConstantValue_attribute extends Attribute { +++ ConstantValue_attribute(ClassReader cr, int name_index, int length) throws IOException { +++ super(name_index, length); +++ constantvalue_index = cr.readUnsignedShort(); +++ } +++ +++ public ConstantValue_attribute(ConstantPool constant_pool, int constantvalue_index) +++ throws ConstantPoolException { +++ this(constant_pool.getUTF8Index(Attribute.ConstantValue), constantvalue_index); +++ } +++ +++ public ConstantValue_attribute(int name_index, int constantvalue_index) { +++ super(name_index, 2); +++ this.constantvalue_index = constantvalue_index; +++ } +++ +++ public R accept(Visitor visitor, D data) { +++ return visitor.visitConstantValue(this, data); +++ } +++ +++ public final int constantvalue_index; +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/classfile/DefaultAttribute.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/DefaultAttribute.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,50 @@ +++/* +++ * Copyright 2007 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.classfile; +++ +++/* +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class DefaultAttribute extends Attribute { +++ DefaultAttribute(ClassReader cr, int name_index, byte[] data) { +++ super(name_index, data.length); +++ info = data; +++ } +++ +++ public DefaultAttribute(ConstantPool constant_pool, int name_index, byte[] info) { +++ super(name_index, info.length); +++ this.info = info; +++ } +++ +++ public R accept(Visitor visitor, P p) { +++ return visitor.visitDefault(this, p); +++ } +++ +++ public final byte[] info; +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/classfile/Deprecated_attribute.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/Deprecated_attribute.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,55 @@ +++/* +++ * Copyright 2007 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.classfile; +++ +++import java.io.IOException; +++ +++/** +++ * See JVMS3, section 4.8.15. +++ * +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class Deprecated_attribute extends Attribute { +++ Deprecated_attribute(ClassReader cr, int name_index, int length) throws IOException { +++ super(name_index, length); +++ } +++ +++ public Deprecated_attribute(ConstantPool constant_pool) +++ throws ConstantPoolException { +++ this(constant_pool.getUTF8Index(Attribute.Deprecated)); +++ } +++ +++ public Deprecated_attribute(int name_index) { +++ super(name_index, 0); +++ } +++ +++ public R accept(Visitor visitor, D data) { +++ return visitor.visitDeprecated(this, data); +++ } +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/classfile/Descriptor.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/Descriptor.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,198 @@ +++/* +++ * Copyright 2007 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++ +++package com.sun.tools.classfile; +++ +++import java.io.IOException; +++ +++/** +++ * See JVMS3, section 4.4. +++ * +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class Descriptor { +++ public class InvalidDescriptor extends DescriptorException { +++ InvalidDescriptor(String desc) { +++ this.desc = desc; +++ this.index = -1; +++ } +++ +++ InvalidDescriptor(String desc, int index) { +++ this.desc = desc; +++ this.index = index; +++ } +++ +++ @Override +++ public String getMessage() { +++ // i18n +++ if (index == -1) +++ return "invalid descriptor \"" + desc + "\""; +++ else +++ return "descriptor is invalid at offset " + index + " in \"" + desc + "\""; +++ } +++ +++ public final String desc; +++ public final int index; +++ +++ } +++ +++ public Descriptor(ClassReader cr) throws IOException { +++ this(cr.readUnsignedShort()); +++ } +++ +++ public Descriptor(int index) { +++ this.index = index; +++ +++ } +++ +++ public String getValue(ConstantPool constant_pool) throws ConstantPoolException { +++ return constant_pool.getUTF8Value(index); +++ } +++ +++ public int getParameterCount(ConstantPool constant_pool) +++ throws ConstantPoolException, InvalidDescriptor { +++ String desc = getValue(constant_pool); +++ int end = desc.indexOf(")"); +++ if (end == -1) +++ throw new InvalidDescriptor(desc); +++ parse(desc, 0, end + 1); +++ return count; +++ +++ } +++ +++ public String getParameterTypes(ConstantPool constant_pool) +++ throws ConstantPoolException, InvalidDescriptor { +++ String desc = getValue(constant_pool); +++ int end = desc.indexOf(")"); +++ if (end == -1) +++ throw new InvalidDescriptor(desc); +++ return parse(desc, 0, end + 1); +++ } +++ +++ public String getReturnType(ConstantPool constant_pool) +++ throws ConstantPoolException, InvalidDescriptor { +++ String desc = getValue(constant_pool); +++ int end = desc.indexOf(")"); +++ if (end == -1) +++ throw new InvalidDescriptor(desc); +++ return parse(desc, end + 1, desc.length()); +++ } +++ +++ public String getFieldType(ConstantPool constant_pool) +++ throws ConstantPoolException, InvalidDescriptor { +++ String desc = getValue(constant_pool); +++ return parse(desc, 0, desc.length()); +++ } +++ +++ private String parse(String desc, int start, int end) +++ throws InvalidDescriptor { +++ int p = start; +++ StringBuffer sb = new StringBuffer(); +++ int dims = 0; +++ count = 0; +++ +++ while (p < end) { +++ String type; +++ char ch; +++ switch (ch = desc.charAt(p++)) { +++ case '(': +++ sb.append('('); +++ continue; +++ +++ case ')': +++ sb.append(')'); +++ continue; +++ +++ case '[': +++ dims++; +++ continue; +++ +++ case 'B': +++ type = "byte"; +++ break; +++ +++ case 'C': +++ type = "char"; +++ break; +++ +++ case 'D': +++ type = "double"; +++ break; +++ +++ case 'F': +++ type = "float"; +++ break; +++ +++ case 'I': +++ type = "int"; +++ break; +++ +++ case 'J': +++ type = "long"; +++ break; +++ +++ case 'L': +++ int sep = desc.indexOf(';', p); +++ if (sep == -1) +++ throw new InvalidDescriptor(desc, p - 1); +++ type = desc.substring(p, sep).replace('/', '.'); +++ p = sep + 1; +++ break; +++ +++ case 'S': +++ type = "short"; +++ break; +++ +++ case 'Z': +++ type = "boolean"; +++ break; +++ +++ case 'V': +++ type = "void"; +++ break; +++ +++ default: +++ throw new InvalidDescriptor(desc, p - 1); +++ } +++ +++ if (sb.length() > 1 && sb.charAt(0) == '(') +++ sb.append(", "); +++ sb.append(type); +++ for ( ; dims > 0; dims-- ) +++ sb.append("[]"); +++ +++ count++; +++ } +++ +++ return sb.toString(); +++ } +++ +++ public final int index; +++ private int count; +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/classfile/DescriptorException.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/DescriptorException.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,36 @@ +++/* +++ * Copyright 2008 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++ +++package com.sun.tools.classfile; +++ +++/* +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class DescriptorException extends Exception { +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/classfile/EnclosingMethod_attribute.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/EnclosingMethod_attribute.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,73 @@ +++ +++/* +++ * Copyright 2007 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.classfile; +++ +++import java.io.IOException; +++ +++/** +++ * See JVMS3, section 4.8.7. +++ * +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class EnclosingMethod_attribute extends Attribute { +++ EnclosingMethod_attribute(ClassReader cr, int name_index, int length) throws IOException { +++ super(name_index, length); +++ class_index = cr.readUnsignedShort(); +++ method_index = cr.readUnsignedShort(); +++ } +++ +++ public EnclosingMethod_attribute(ConstantPool constant_pool, int class_index, int method_index) +++ throws ConstantPoolException { +++ this(constant_pool.getUTF8Index(Attribute.EnclosingMethod), class_index, method_index); +++ } +++ +++ public EnclosingMethod_attribute(int name_index, int class_index, int method_index) { +++ super(name_index, 4); +++ this.class_index = class_index; +++ this.method_index = method_index; +++ } +++ +++ public String getClassName(ConstantPool constant_pool) throws ConstantPoolException { +++ return constant_pool.getClassInfo(class_index).getName(); +++ } +++ +++ public String getMethodName(ConstantPool constant_pool) throws ConstantPoolException { +++ if (method_index == 0) +++ return ""; +++ return constant_pool.getNameAndTypeInfo(method_index).getName(); +++ } +++ +++ public R accept(Visitor visitor, D data) { +++ return visitor.visitEnclosingMethod(this, data); +++ } +++ +++ public final int class_index; +++ public final int method_index; +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/classfile/Exceptions_attribute.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/Exceptions_attribute.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,69 @@ +++/* +++ * Copyright 2007 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.classfile; +++ +++import java.io.IOException; +++ +++/** +++ * See JVMS3, section 4.8.5. +++ * +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class Exceptions_attribute extends Attribute { +++ Exceptions_attribute(ClassReader cr, int name_index, int length) throws IOException { +++ super(name_index, length); +++ number_of_exceptions = cr.readUnsignedShort(); +++ exception_index_table = new int[number_of_exceptions]; +++ for (int i = 0; i < number_of_exceptions; i++) +++ exception_index_table[i] = cr.readUnsignedShort(); +++ } +++ +++ public Exceptions_attribute(ConstantPool constant_pool, int[] exception_index_table) +++ throws ConstantPoolException { +++ this(constant_pool.getUTF8Index(Attribute.Exceptions), exception_index_table); +++ } +++ +++ public Exceptions_attribute(int name_index, int[] exception_index_table) { +++ super(name_index, 2 + 2 * exception_index_table.length); +++ this.number_of_exceptions = exception_index_table.length; +++ this.exception_index_table = exception_index_table; +++ } +++ +++ public String getException(int index, ConstantPool constant_pool) throws ConstantPoolException { +++ int exception_index = exception_index_table[index]; +++ return constant_pool.getClassInfo(exception_index).getName(); +++ } +++ +++ public R accept(Visitor visitor, D data) { +++ return visitor.visitExceptions(this, data); +++ } +++ +++ public final int number_of_exceptions; +++ public final int[] exception_index_table; +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/classfile/Field.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/Field.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,61 @@ +++/* +++ * Copyright 2007 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.classfile; +++ +++import java.io.IOException; +++ +++/* +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class Field { +++ Field(ClassReader cr) throws IOException { +++ access_flags = new AccessFlags(cr); +++ name_index = cr.readUnsignedShort(); +++ descriptor = new Descriptor(cr); +++ attributes = new Attributes(cr); +++ } +++ +++ public Field(AccessFlags access_flags, +++ int name_index, Descriptor descriptor, +++ Attributes attributes) { +++ this.access_flags = access_flags; +++ this.name_index = name_index; +++ this.descriptor = descriptor; +++ this.attributes = attributes; +++ } +++ +++ public String getName(ConstantPool constant_pool) throws ConstantPoolException { +++ return constant_pool.getUTF8Value(name_index); +++ } +++ +++ public final AccessFlags access_flags; +++ public final int name_index; +++ public final Descriptor descriptor; +++ public final Attributes attributes; +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/classfile/InnerClasses_attribute.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/InnerClasses_attribute.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,102 @@ +++/* +++ * Copyright 2007 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.classfile; +++ +++import java.io.IOException; +++ +++import com.sun.tools.classfile.ConstantPool.*; +++ +++/** +++ * See JVMS3, section 4.8.6. +++ * +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class InnerClasses_attribute extends Attribute { +++ InnerClasses_attribute(ClassReader cr, int name_index, int length) throws IOException { +++ super(name_index, length); +++ number_of_classes = cr.readUnsignedShort(); +++ classes = new Info[number_of_classes]; +++ for (int i = 0; i < number_of_classes; i++) +++ classes[i] = new Info(cr); +++ } +++ +++ public InnerClasses_attribute(ConstantPool constant_pool, Info[] classes) +++ throws ConstantPoolException { +++ this(constant_pool.getUTF8Index(Attribute.InnerClasses), classes); +++ } +++ +++ public InnerClasses_attribute(int name_index, Info[] classes) { +++ super(name_index, 2 + Info.length() * classes.length); +++ this.number_of_classes = classes.length; +++ this.classes = classes; +++ } +++ +++ public R accept(Visitor visitor, D data) { +++ return visitor.visitInnerClasses(this, data); +++ } +++ +++ public final int number_of_classes; +++ public final Info[] classes; +++ +++ public static class Info { +++ Info(ClassReader cr) throws IOException { +++ inner_class_info_index = cr.readUnsignedShort(); +++ outer_class_info_index = cr.readUnsignedShort(); +++ inner_name_index = cr.readUnsignedShort(); +++ inner_class_access_flags = new AccessFlags(cr.readUnsignedShort()); +++ } +++ +++ public CONSTANT_Class_info getInnerClassInfo(ConstantPool constant_pool) throws ConstantPoolException { +++ if (inner_class_info_index == 0) +++ return null; +++ return constant_pool.getClassInfo(inner_class_info_index); +++ } +++ +++ public CONSTANT_Class_info getOuterClassInfo(ConstantPool constant_pool) throws ConstantPoolException { +++ if (outer_class_info_index == 0) +++ return null; +++ return constant_pool.getClassInfo(outer_class_info_index); +++ } +++ +++ public String getInnerName(ConstantPool constant_pool) throws ConstantPoolException { +++ if (inner_name_index == 0) +++ return null; +++ return constant_pool.getUTF8Value(inner_name_index); +++ } +++ +++ public static int length() { +++ return 8; +++ } +++ +++ public final int inner_class_info_index; +++ public final int outer_class_info_index; +++ public final int inner_name_index; +++ public final AccessFlags inner_class_access_flags; +++ } +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/classfile/LineNumberTable_attribute.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/LineNumberTable_attribute.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,78 @@ +++/* +++ * Copyright 2007 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.classfile; +++ +++import java.io.IOException; +++ +++/** +++ * See JVMS3, section 4.8.12. +++ * +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class LineNumberTable_attribute extends Attribute { +++ LineNumberTable_attribute(ClassReader cr, int name_index, int length) throws IOException { +++ super(name_index, length); +++ line_number_table_length = cr.readUnsignedShort(); +++ line_number_table = new Entry[line_number_table_length]; +++ for (int i = 0; i < line_number_table_length; i++) +++ line_number_table[i] = new Entry(cr); +++ } +++ +++ public LineNumberTable_attribute(ConstantPool constant_pool, Entry[] line_number_table) +++ throws ConstantPoolException { +++ this(constant_pool.getUTF8Index(Attribute.LineNumberTable), line_number_table); +++ } +++ +++ public LineNumberTable_attribute(int name_index, Entry[] line_number_table) { +++ super(name_index, line_number_table.length * Entry.length()); +++ this.line_number_table_length = line_number_table.length; +++ this.line_number_table = line_number_table; +++ } +++ +++ public R accept(Visitor visitor, D data) { +++ return visitor.visitLineNumberTable(this, data); +++ } +++ +++ public final int line_number_table_length; +++ public final Entry[] line_number_table; +++ +++ public static class Entry { +++ Entry(ClassReader cr) throws IOException { +++ start_pc = cr.readUnsignedShort(); +++ line_number = cr.readUnsignedShort(); +++ } +++ +++ public static int length() { +++ return 4; +++ } +++ +++ public final int start_pc; +++ public final int line_number; +++ } +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/classfile/LocalVariableTable_attribute.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/LocalVariableTable_attribute.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,84 @@ +++/* +++ * Copyright 2007 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.classfile; +++ +++import java.io.IOException; +++ +++/** +++ * See JVMS3, section 4.8.13. +++ * +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class LocalVariableTable_attribute extends Attribute { +++ LocalVariableTable_attribute(ClassReader cr, int name_index, int length) throws IOException { +++ super(name_index, length); +++ local_variable_table_length = cr.readUnsignedShort(); +++ local_variable_table = new Entry[local_variable_table_length]; +++ for (int i = 0; i < local_variable_table_length; i++) +++ local_variable_table[i] = new Entry(cr); +++ } +++ +++ public LocalVariableTable_attribute(ConstantPool constant_pool, Entry[] local_variable_table) +++ throws ConstantPoolException { +++ this(constant_pool.getUTF8Index(Attribute.LocalVariableTable), local_variable_table); +++ } +++ +++ public LocalVariableTable_attribute(int name_index, Entry[] local_variable_table) { +++ super(name_index, local_variable_table.length * Entry.length()); +++ this.local_variable_table_length = local_variable_table.length; +++ this.local_variable_table = local_variable_table; +++ } +++ +++ public R accept(Visitor visitor, D data) { +++ return visitor.visitLocalVariableTable(this, data); +++ } +++ +++ public final int local_variable_table_length; +++ public final Entry[] local_variable_table; +++ +++ public static class Entry { +++ Entry(ClassReader cr) throws IOException { +++ start_pc = cr.readUnsignedShort(); +++ length = cr.readUnsignedShort(); +++ name_index = cr.readUnsignedShort(); +++ descriptor_index = cr.readUnsignedShort(); +++ index = cr.readUnsignedShort(); +++ } +++ +++ public static int length() { +++ return 10; +++ } +++ +++ public final int start_pc; +++ public final int length; +++ public final int name_index; +++ public final int descriptor_index; +++ public final int index; +++ } +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/classfile/LocalVariableTypeTable_attribute.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/LocalVariableTypeTable_attribute.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,84 @@ +++/* +++ * Copyright 2007 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.classfile; +++ +++import java.io.IOException; +++ +++/** +++ * See JVMS3, section 4.8.14. +++ * +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class LocalVariableTypeTable_attribute extends Attribute { +++ LocalVariableTypeTable_attribute(ClassReader cr, int name_index, int length) throws IOException { +++ super(name_index, length); +++ local_variable_table_length = cr.readUnsignedShort(); +++ local_variable_table = new Entry[local_variable_table_length]; +++ for (int i = 0; i < local_variable_table_length; i++) +++ local_variable_table[i] = new Entry(cr); +++ } +++ +++ public LocalVariableTypeTable_attribute(ConstantPool constant_pool, Entry[] local_variable_table) +++ throws ConstantPoolException { +++ this(constant_pool.getUTF8Index(Attribute.LocalVariableTypeTable), local_variable_table); +++ } +++ +++ public LocalVariableTypeTable_attribute(int name_index, Entry[] local_variable_table) { +++ super(name_index, local_variable_table.length * Entry.length()); +++ this.local_variable_table_length = local_variable_table.length; +++ this.local_variable_table = local_variable_table; +++ } +++ +++ public R accept(Visitor visitor, D data) { +++ return visitor.visitLocalVariableTypeTable(this, data); +++ } +++ +++ public final int local_variable_table_length; +++ public final Entry[] local_variable_table; +++ +++ public static class Entry { +++ Entry(ClassReader cr) throws IOException { +++ start_pc = cr.readUnsignedShort(); +++ length = cr.readUnsignedShort(); +++ name_index = cr.readUnsignedShort(); +++ signature_index = cr.readUnsignedShort(); +++ index = cr.readUnsignedShort(); +++ } +++ +++ public static int length() { +++ return 10; +++ } +++ +++ public final int start_pc; +++ public final int length; +++ public final int name_index; +++ public final int signature_index; +++ public final int index; +++ } +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/classfile/Method.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/Method.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,61 @@ +++/* +++ * Copyright 2007 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.classfile; +++ +++import java.io.IOException; +++ +++/* +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class Method { +++ Method(ClassReader cr) throws IOException { +++ access_flags = new AccessFlags(cr); +++ name_index = cr.readUnsignedShort(); +++ descriptor = new Descriptor(cr); +++ attributes = new Attributes(cr); +++ } +++ +++ public Method(AccessFlags access_flags, +++ int name_index, Descriptor descriptor, +++ Attributes attributes) { +++ this.access_flags = access_flags; +++ this.name_index = name_index; +++ this.descriptor = descriptor; +++ this.attributes = attributes; +++ } +++ +++ public String getName(ConstantPool constant_pool) throws ConstantPoolException { +++ return constant_pool.getUTF8Value(name_index); +++ } +++ +++ public final AccessFlags access_flags; +++ public final int name_index; +++ public final Descriptor descriptor; +++ public final Attributes attributes; +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/classfile/ModuleExportTable_attribute.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/ModuleExportTable_attribute.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,70 @@ +++/* +++ * Copyright 2007 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.classfile; +++ +++import java.io.IOException; +++ +++/** +++ * See JSR 277. +++ * +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class ModuleExportTable_attribute extends Attribute { +++ ModuleExportTable_attribute(ClassReader cr, int name_index, int length) throws IOException { +++ super(name_index, length); +++ int export_type_length = cr.readUnsignedShort(); +++ export_type_table = new int[export_type_length]; +++ for (int i = 0; i < export_type_table.length; i++) +++ export_type_table[i] = cr.readUnsignedShort(); +++ } +++ +++ public ModuleExportTable_attribute(ConstantPool cp, int[] export_type_table) +++ throws ConstantPoolException { +++ this(cp.getUTF8Index(Attribute.ModuleExportTable), export_type_table); +++ } +++ +++ public ModuleExportTable_attribute(int name_index, int[] export_type_table) { +++ super(name_index, 2 * export_type_table.length); +++ this.export_type_table = export_type_table; +++ } +++ +++ public int getExportTypeCount() { +++ return export_type_table.length; +++ } +++ +++ public String getExportTypeName(int index, ConstantPool constant_pool) throws ConstantPoolException { +++ return constant_pool.getUTF8Value(export_type_table[index]); +++ } +++ +++ public R accept(Visitor visitor, P p) { +++ return visitor.visitModuleExportTable(this, p); +++ } +++ +++ public final int[] export_type_table; +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/classfile/ModuleMemberTable_attribute.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/ModuleMemberTable_attribute.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,69 @@ +++/* +++ * Copyright 2007 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++package com.sun.tools.classfile; +++ +++import java.io.IOException; +++ +++/** +++ * See JSR 277. +++ * +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class ModuleMemberTable_attribute extends Attribute { +++ ModuleMemberTable_attribute(ClassReader cr, int name_index, int length) throws IOException { +++ super(name_index, length); +++ int package_member_length = cr.readUnsignedShort(); +++ package_member_table = new int[package_member_length]; +++ for (int i = 0; i < package_member_table.length; i++) +++ package_member_table[i] = cr.readUnsignedShort(); +++ } +++ +++ public ModuleMemberTable_attribute(ConstantPool cp, int[] package_member_table) +++ throws ConstantPoolException { +++ this(cp.getUTF8Index(Attribute.ModuleMemberTable), package_member_table); +++ } +++ +++ public ModuleMemberTable_attribute(int name_index, int[] package_member_table) { +++ super(name_index, 2 * package_member_table.length); +++ this.package_member_table = package_member_table; +++ } +++ +++ public int getPackageMemberCount() { +++ return package_member_table.length; +++ } +++ +++ public String getPackageMemberName(int index, ConstantPool constant_pool) throws ConstantPoolException { +++ return constant_pool.getUTF8Value(package_member_table[index]); +++ } +++ +++ public R accept(Visitor visitor, P p) { +++ return visitor.visitModuleMemberTable(this, p); +++ } +++ +++ public final int[] package_member_table; +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/classfile/Module_attribute.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/Module_attribute.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,64 @@ +++/* +++ * Copyright 2007 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.classfile; +++ +++import java.io.IOException; +++ +++/** +++ * See JSR 277. +++ * +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class Module_attribute extends Attribute { +++ Module_attribute(ClassReader cr, int name_index, int length) throws IOException { +++ super(name_index, length); +++ module_name = cr.readUnsignedShort(); +++ } +++ +++ public Module_attribute(ConstantPool constant_pool, int module_name) +++ throws ConstantPoolException { +++ this(constant_pool.getUTF8Index(Attribute.Module), module_name); +++ } +++ +++ public Module_attribute(int name_index, int module_name) { +++ super(name_index, 2); +++ this.module_name = module_name; +++ } +++ +++ public String getModuleName(ConstantPool constant_pool) throws ConstantPoolException { +++ return constant_pool.getUTF8Value(module_name); +++ } +++ +++ public R accept(Visitor visitor, D data) { +++ return visitor.visitModule(this, data); +++ } +++ +++ public final int module_name; +++ +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/classfile/OpCodes.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/OpCodes.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,868 @@ +++/* +++ * Copyright 2007 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.classfile; +++ +++import java.util.HashMap; +++ +++/** +++ * See JVMS3, section 6. +++ * +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class OpCodes { +++ +++ public static int opcLength(int opc) throws IllegalArgumentException { +++ switch (opc >> 8) { +++ case 0: +++ return opcLengthsTab[opc]; +++ case opc_wide: +++ switch (opc & 0xFF) { +++ case opc_aload: +++ case opc_astore: +++ case opc_fload: +++ case opc_fstore: +++ case opc_iload: +++ case opc_istore: +++ case opc_lload: +++ case opc_lstore: +++ case opc_dload: +++ case opc_dstore: +++ case opc_ret: +++ return 4; +++ case opc_iinc: +++ return 6; +++ default: +++ throw new IllegalArgumentException(); +++ } +++ case opc_nonpriv: +++ case opc_priv: +++ return 2; +++ default: +++ throw new IllegalArgumentException(); +++ } +++ } +++ +++ public static String opcName(int opc) { +++ try { +++ switch (opc >> 8) { +++ case 0: +++ return opcNamesTab[opc]; +++ case opc_wide: +++ { +++ String mnem = opcNamesTab[opc & 0xFF] + "_w"; +++ if (mnemocodes.get(mnem) == null) { +++ return null; // non-existent opcode +++ } +++ return mnem; +++ } +++ case opc_nonpriv: +++ return opcExtNamesTab[opc & 0xFF]; +++ case opc_priv: +++ return opcPrivExtNamesTab[opc & 0xFF]; +++ default: +++ return null; +++ } +++ } catch (ArrayIndexOutOfBoundsException e) { +++ switch (opc) { +++ case opc_nonpriv: +++ return "nonpriv"; +++ case opc_priv: +++ return "priv"; +++ default: +++ return null; +++ } +++ } +++ } +++ +++ /* Opcodes */ +++ public static final int opc_dead = -2; +++ public static final int opc_label = -1; +++ public static final int opc_nop = 0; +++ public static final int opc_aconst_null = 1; +++ public static final int opc_iconst_m1 = 2; +++ public static final int opc_iconst_0 = 3; +++ public static final int opc_iconst_1 = 4; +++ public static final int opc_iconst_2 = 5; +++ public static final int opc_iconst_3 = 6; +++ public static final int opc_iconst_4 = 7; +++ public static final int opc_iconst_5 = 8; +++ public static final int opc_lconst_0 = 9; +++ public static final int opc_lconst_1 = 10; +++ public static final int opc_fconst_0 = 11; +++ public static final int opc_fconst_1 = 12; +++ public static final int opc_fconst_2 = 13; +++ public static final int opc_dconst_0 = 14; +++ public static final int opc_dconst_1 = 15; +++ public static final int opc_bipush = 16; +++ public static final int opc_sipush = 17; +++ public static final int opc_ldc = 18; +++ public static final int opc_ldc_w = 19; +++ public static final int opc_ldc2_w = 20; +++ public static final int opc_iload = 21; +++ public static final int opc_lload = 22; +++ public static final int opc_fload = 23; +++ public static final int opc_dload = 24; +++ public static final int opc_aload = 25; +++ public static final int opc_iload_0 = 26; +++ public static final int opc_iload_1 = 27; +++ public static final int opc_iload_2 = 28; +++ public static final int opc_iload_3 = 29; +++ public static final int opc_lload_0 = 30; +++ public static final int opc_lload_1 = 31; +++ public static final int opc_lload_2 = 32; +++ public static final int opc_lload_3 = 33; +++ public static final int opc_fload_0 = 34; +++ public static final int opc_fload_1 = 35; +++ public static final int opc_fload_2 = 36; +++ public static final int opc_fload_3 = 37; +++ public static final int opc_dload_0 = 38; +++ public static final int opc_dload_1 = 39; +++ public static final int opc_dload_2 = 40; +++ public static final int opc_dload_3 = 41; +++ public static final int opc_aload_0 = 42; +++ public static final int opc_aload_1 = 43; +++ public static final int opc_aload_2 = 44; +++ public static final int opc_aload_3 = 45; +++ public static final int opc_iaload = 46; +++ public static final int opc_laload = 47; +++ public static final int opc_faload = 48; +++ public static final int opc_daload = 49; +++ public static final int opc_aaload = 50; +++ public static final int opc_baload = 51; +++ public static final int opc_caload = 52; +++ public static final int opc_saload = 53; +++ public static final int opc_istore = 54; +++ public static final int opc_lstore = 55; +++ public static final int opc_fstore = 56; +++ public static final int opc_dstore = 57; +++ public static final int opc_astore = 58; +++ public static final int opc_istore_0 = 59; +++ public static final int opc_istore_1 = 60; +++ public static final int opc_istore_2 = 61; +++ public static final int opc_istore_3 = 62; +++ public static final int opc_lstore_0 = 63; +++ public static final int opc_lstore_1 = 64; +++ public static final int opc_lstore_2 = 65; +++ public static final int opc_lstore_3 = 66; +++ public static final int opc_fstore_0 = 67; +++ public static final int opc_fstore_1 = 68; +++ public static final int opc_fstore_2 = 69; +++ public static final int opc_fstore_3 = 70; +++ public static final int opc_dstore_0 = 71; +++ public static final int opc_dstore_1 = 72; +++ public static final int opc_dstore_2 = 73; +++ public static final int opc_dstore_3 = 74; +++ public static final int opc_astore_0 = 75; +++ public static final int opc_astore_1 = 76; +++ public static final int opc_astore_2 = 77; +++ public static final int opc_astore_3 = 78; +++ public static final int opc_iastore = 79; +++ public static final int opc_lastore = 80; +++ public static final int opc_fastore = 81; +++ public static final int opc_dastore = 82; +++ public static final int opc_aastore = 83; +++ public static final int opc_bastore = 84; +++ public static final int opc_castore = 85; +++ public static final int opc_sastore = 86; +++ public static final int opc_pop = 87; +++ public static final int opc_pop2 = 88; +++ public static final int opc_dup = 89; +++ public static final int opc_dup_x1 = 90; +++ public static final int opc_dup_x2 = 91; +++ public static final int opc_dup2 = 92; +++ public static final int opc_dup2_x1 = 93; +++ public static final int opc_dup2_x2 = 94; +++ public static final int opc_swap = 95; +++ public static final int opc_iadd = 96; +++ public static final int opc_ladd = 97; +++ public static final int opc_fadd = 98; +++ public static final int opc_dadd = 99; +++ public static final int opc_isub = 100; +++ public static final int opc_lsub = 101; +++ public static final int opc_fsub = 102; +++ public static final int opc_dsub = 103; +++ public static final int opc_imul = 104; +++ public static final int opc_lmul = 105; +++ public static final int opc_fmul = 106; +++ public static final int opc_dmul = 107; +++ public static final int opc_idiv = 108; +++ public static final int opc_ldiv = 109; +++ public static final int opc_fdiv = 110; +++ public static final int opc_ddiv = 111; +++ public static final int opc_irem = 112; +++ public static final int opc_lrem = 113; +++ public static final int opc_frem = 114; +++ public static final int opc_drem = 115; +++ public static final int opc_ineg = 116; +++ public static final int opc_lneg = 117; +++ public static final int opc_fneg = 118; +++ public static final int opc_dneg = 119; +++ public static final int opc_ishl = 120; +++ public static final int opc_lshl = 121; +++ public static final int opc_ishr = 122; +++ public static final int opc_lshr = 123; +++ public static final int opc_iushr = 124; +++ public static final int opc_lushr = 125; +++ public static final int opc_iand = 126; +++ public static final int opc_land = 127; +++ public static final int opc_ior = 128; +++ public static final int opc_lor = 129; +++ public static final int opc_ixor = 130; +++ public static final int opc_lxor = 131; +++ public static final int opc_iinc = 132; +++ public static final int opc_i2l = 133; +++ public static final int opc_i2f = 134; +++ public static final int opc_i2d = 135; +++ public static final int opc_l2i = 136; +++ public static final int opc_l2f = 137; +++ public static final int opc_l2d = 138; +++ public static final int opc_f2i = 139; +++ public static final int opc_f2l = 140; +++ public static final int opc_f2d = 141; +++ public static final int opc_d2i = 142; +++ public static final int opc_d2l = 143; +++ public static final int opc_d2f = 144; +++ public static final int opc_i2b = 145; +++ public static final int opc_int2byte = 145; +++ public static final int opc_i2c = 146; +++ public static final int opc_int2char = 146; +++ public static final int opc_i2s = 147; +++ public static final int opc_int2short = 147; +++ public static final int opc_lcmp = 148; +++ public static final int opc_fcmpl = 149; +++ public static final int opc_fcmpg = 150; +++ public static final int opc_dcmpl = 151; +++ public static final int opc_dcmpg = 152; +++ public static final int opc_ifeq = 153; +++ public static final int opc_ifne = 154; +++ public static final int opc_iflt = 155; +++ public static final int opc_ifge = 156; +++ public static final int opc_ifgt = 157; +++ public static final int opc_ifle = 158; +++ public static final int opc_if_icmpeq = 159; +++ public static final int opc_if_icmpne = 160; +++ public static final int opc_if_icmplt = 161; +++ public static final int opc_if_icmpge = 162; +++ public static final int opc_if_icmpgt = 163; +++ public static final int opc_if_icmple = 164; +++ public static final int opc_if_acmpeq = 165; +++ public static final int opc_if_acmpne = 166; +++ public static final int opc_goto = 167; +++ public static final int opc_jsr = 168; +++ public static final int opc_ret = 169; +++ public static final int opc_tableswitch = 170; +++ public static final int opc_lookupswitch = 171; +++ public static final int opc_ireturn = 172; +++ public static final int opc_lreturn = 173; +++ public static final int opc_freturn = 174; +++ public static final int opc_dreturn = 175; +++ public static final int opc_areturn = 176; +++ public static final int opc_return = 177; +++ public static final int opc_getstatic = 178; +++ public static final int opc_putstatic = 179; +++ public static final int opc_getfield = 180; +++ public static final int opc_putfield = 181; +++ public static final int opc_invokevirtual = 182; +++ public static final int opc_invokenonvirtual = 183; +++ public static final int opc_invokespecial = 183; +++ public static final int opc_invokestatic = 184; +++ public static final int opc_invokeinterface = 185; +++// public static final int opc_xxxunusedxxx = 186; +++ public static final int opc_new = 187; +++ public static final int opc_newarray = 188; +++ public static final int opc_anewarray = 189; +++ public static final int opc_arraylength = 190; +++ public static final int opc_athrow = 191; +++ public static final int opc_checkcast = 192; +++ public static final int opc_instanceof = 193; +++ public static final int opc_monitorenter = 194; +++ public static final int opc_monitorexit = 195; +++ public static final int opc_wide = 196; +++ public static final int opc_multianewarray = 197; +++ public static final int opc_ifnull = 198; +++ public static final int opc_ifnonnull = 199; +++ public static final int opc_goto_w = 200; +++ public static final int opc_jsr_w = 201; +++ +++ /* Pseudo-instructions */ +++ public static final int opc_bytecode = 203; +++ public static final int opc_try = 204; +++ public static final int opc_endtry = 205; +++ public static final int opc_catch = 206; +++ public static final int opc_var = 207; +++ public static final int opc_endvar = 208; +++ public static final int opc_localsmap = 209; +++ public static final int opc_stackmap = 210; +++ +++ /* PicoJava prefixes */ +++ public static final int opc_nonpriv = 254; +++ public static final int opc_priv = 255; +++ +++ /* Wide instructions */ +++ public static final int opc_iload_w = (opc_wide << 8 ) | opc_iload; +++ public static final int opc_lload_w = (opc_wide << 8 ) | opc_lload; +++ public static final int opc_fload_w = (opc_wide << 8 ) | opc_fload; +++ public static final int opc_dload_w = (opc_wide << 8 ) | opc_dload; +++ public static final int opc_aload_w = (opc_wide << 8 ) | opc_aload; +++ public static final int opc_istore_w = (opc_wide << 8 ) | opc_istore; +++ public static final int opc_lstore_w = (opc_wide << 8 ) | opc_lstore; +++ public static final int opc_fstore_w = (opc_wide << 8 ) | opc_fstore; +++ public static final int opc_dstore_w = (opc_wide << 8 ) | opc_dstore; +++ public static final int opc_astore_w = (opc_wide << 8 ) | opc_astore; +++ public static final int opc_ret_w = (opc_wide << 8 ) | opc_ret; +++ public static final int opc_iinc_w = (opc_wide << 8 ) | opc_iinc; +++ +++ /* Opcode Names */ +++ private static final String opcNamesTab[] = { +++ "nop", +++ "aconst_null", +++ "iconst_m1", +++ "iconst_0", +++ "iconst_1", +++ "iconst_2", +++ "iconst_3", +++ "iconst_4", +++ "iconst_5", +++ "lconst_0", +++ "lconst_1", +++ "fconst_0", +++ "fconst_1", +++ "fconst_2", +++ "dconst_0", +++ "dconst_1", +++ "bipush", +++ "sipush", +++ "ldc", +++ "ldc_w", +++ "ldc2_w", +++ "iload", +++ "lload", +++ "fload", +++ "dload", +++ "aload", +++ "iload_0", +++ "iload_1", +++ "iload_2", +++ "iload_3", +++ "lload_0", +++ "lload_1", +++ "lload_2", +++ "lload_3", +++ "fload_0", +++ "fload_1", +++ "fload_2", +++ "fload_3", +++ "dload_0", +++ "dload_1", +++ "dload_2", +++ "dload_3", +++ "aload_0", +++ "aload_1", +++ "aload_2", +++ "aload_3", +++ "iaload", +++ "laload", +++ "faload", +++ "daload", +++ "aaload", +++ "baload", +++ "caload", +++ "saload", +++ "istore", +++ "lstore", +++ "fstore", +++ "dstore", +++ "astore", +++ "istore_0", +++ "istore_1", +++ "istore_2", +++ "istore_3", +++ "lstore_0", +++ "lstore_1", +++ "lstore_2", +++ "lstore_3", +++ "fstore_0", +++ "fstore_1", +++ "fstore_2", +++ "fstore_3", +++ "dstore_0", +++ "dstore_1", +++ "dstore_2", +++ "dstore_3", +++ "astore_0", +++ "astore_1", +++ "astore_2", +++ "astore_3", +++ "iastore", +++ "lastore", +++ "fastore", +++ "dastore", +++ "aastore", +++ "bastore", +++ "castore", +++ "sastore", +++ "pop", +++ "pop2", +++ "dup", +++ "dup_x1", +++ "dup_x2", +++ "dup2", +++ "dup2_x1", +++ "dup2_x2", +++ "swap", +++ "iadd", +++ "ladd", +++ "fadd", +++ "dadd", +++ "isub", +++ "lsub", +++ "fsub", +++ "dsub", +++ "imul", +++ "lmul", +++ "fmul", +++ "dmul", +++ "idiv", +++ "ldiv", +++ "fdiv", +++ "ddiv", +++ "irem", +++ "lrem", +++ "frem", +++ "drem", +++ "ineg", +++ "lneg", +++ "fneg", +++ "dneg", +++ "ishl", +++ "lshl", +++ "ishr", +++ "lshr", +++ "iushr", +++ "lushr", +++ "iand", +++ "land", +++ "ior", +++ "lor", +++ "ixor", +++ "lxor", +++ "iinc", +++ "i2l", +++ "i2f", +++ "i2d", +++ "l2i", +++ "l2f", +++ "l2d", +++ "f2i", +++ "f2l", +++ "f2d", +++ "d2i", +++ "d2l", +++ "d2f", +++ "i2b", +++ "i2c", +++ "i2s", +++ "lcmp", +++ "fcmpl", +++ "fcmpg", +++ "dcmpl", +++ "dcmpg", +++ "ifeq", +++ "ifne", +++ "iflt", +++ "ifge", +++ "ifgt", +++ "ifle", +++ "if_icmpeq", +++ "if_icmpne", +++ "if_icmplt", +++ "if_icmpge", +++ "if_icmpgt", +++ "if_icmple", +++ "if_acmpeq", +++ "if_acmpne", +++ "goto", +++ "jsr", +++ "ret", +++ "tableswitch", +++ "lookupswitch", +++ "ireturn", +++ "lreturn", +++ "freturn", +++ "dreturn", +++ "areturn", +++ "return", +++ "getstatic", +++ "putstatic", +++ "getfield", +++ "putfield", +++ "invokevirtual", +++ "invokespecial", // was "invokenonvirtual", +++ "invokestatic", +++ "invokeinterface", +++ "bytecode 186", //"xxxunusedxxx", +++ "new", +++ "newarray", +++ "anewarray", +++ "arraylength", +++ "athrow", +++ "checkcast", +++ "instanceof", +++ "monitorenter", +++ "monitorexit", +++ null, // "wide", +++ "multianewarray", +++ "ifnull", +++ "ifnonnull", +++ "goto_w", +++ "jsr_w", +++ "bytecode 202", // "breakpoint", +++ "bytecode", +++ "try", +++ "endtry", +++ "catch", +++ "var", +++ "endvar", +++ "locals_map", +++ "stack_map" +++ }; +++ +++ /* Opcode Lengths */ +++ private static final int opcLengthsTab[] = { +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 2, +++ 3, +++ 2, +++ 3, +++ 3, +++ 2, +++ 2, +++ 2, +++ 2, +++ 2, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 2, +++ 2, +++ 2, +++ 2, +++ 2, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 3, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 3, +++ 3, +++ 3, +++ 3, +++ 3, +++ 3, +++ 3, +++ 3, +++ 3, +++ 3, +++ 3, +++ 3, +++ 3, +++ 3, +++ 3, +++ 3, +++ 2, +++ 99, +++ 99, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 1, +++ 3, +++ 3, +++ 3, +++ 3, +++ 3, +++ 3, +++ 3, +++ 5, +++ 0, +++ 3, +++ 2, +++ 3, +++ 1, +++ 1, +++ 3, +++ 3, +++ 1, +++ 1, +++ 0, // wide +++ 4, +++ 3, +++ 3, +++ 5, +++ 5, +++ 1, +++ 1, 0, 0, 0, 0, 0 // pseudo +++ }; +++ +++ /* Type codes, used in newarray opcode */ +++ public static final int T_CLASS = 0x00000002; +++ public static final int T_BOOLEAN = 0x00000004; +++ public static final int T_CHAR = 0x00000005; +++ public static final int T_FLOAT = 0x00000006; +++ public static final int T_DOUBLE = 0x00000007; +++ public static final int T_BYTE = 0x00000008; +++ public static final int T_SHORT = 0x00000009; +++ public static final int T_INT = 0x0000000a; +++ public static final int T_LONG = 0x0000000b; +++ +++ private static HashMap mnemocodes = new HashMap(301, 0.5f); +++ private static String opcExtNamesTab[]=new String[128]; +++ private static String opcPrivExtNamesTab[]=new String[128]; +++ +++ private static void defineNonPriv(int opc, String mnem) { +++ mnemocodes.put(opcExtNamesTab[opc] = mnem, opc_nonpriv * 256 + opc); +++ } +++ +++ private static void definePriv(int opc, String mnem) { +++ mnemocodes.put(opcPrivExtNamesTab[opc] = "priv_" + mnem, opc_priv * 256 + opc); +++ } +++ +++ private static void defineExt(int opc, String mnem) { +++ defineNonPriv(opc, mnem); +++ definePriv(opc, mnem); +++ } +++ +++ static { +++ for (int i = 0; i < opc_wide; i++) { +++ mnemocodes.put(opcNamesTab[i], i); +++ } +++ for (int i = opc_wide + 1; i < opcNamesTab.length; i++) { +++ mnemocodes.put(opcNamesTab[i], i); +++ } +++ mnemocodes.put("invokenonvirtual", opc_invokespecial); +++ +++ mnemocodes.put("iload_w", opc_iload_w); +++ mnemocodes.put("lload_w", opc_lload_w); +++ mnemocodes.put("fload_w", opc_fload_w); +++ mnemocodes.put("dload_w", opc_dload_w); +++ mnemocodes.put("aload_w", opc_aload_w); +++ mnemocodes.put("istore_w", opc_istore_w); +++ mnemocodes.put("lstore_w", opc_lstore_w); +++ mnemocodes.put("fstore_w", opc_fstore_w); +++ mnemocodes.put("dstore_w", opc_dstore_w); +++ mnemocodes.put("astore_w", opc_astore_w); +++ mnemocodes.put("ret_w", opc_ret_w); +++ mnemocodes.put("iinc_w", opc_iinc_w); +++ +++ mnemocodes.put("nonpriv", opc_nonpriv); +++ mnemocodes.put("priv", opc_priv); +++ +++ defineExt(0, "load_ubyte"); +++ defineExt(1, "load_byte"); +++ defineExt(2, "load_char"); +++ defineExt(3, "load_short"); +++ defineExt(4, "load_word"); +++ defineExt(10, "load_char_oe"); +++ defineExt(11, "load_short_oe"); +++ defineExt(12, "load_word_oe"); +++ defineExt(16, "ncload_ubyte"); +++ defineExt(17, "ncload_byte"); +++ defineExt(18, "ncload_char"); +++ defineExt(19, "ncload_short"); +++ defineExt(20, "ncload_word"); +++ defineExt(26, "ncload_char_oe"); +++ defineExt(27, "ncload_short_oe"); +++ defineExt(28, "ncload_word_oe"); +++ defineExt(30, "cache_flush"); +++ defineExt(32, "store_byte"); +++ defineExt(34, "store_short"); +++ defineExt(36, "store_word"); +++ defineExt(42, "store_short_oe"); +++ defineExt(44, "store_word_oe"); +++ defineExt(48, "ncstore_byte"); +++ defineExt(50, "ncstore_short"); +++ defineExt(52, "ncstore_word"); +++ defineExt(58, "ncstore_short_oe"); +++ defineExt(60, "ncstore_word_oe"); +++ defineExt(62, "zero_line"); +++ defineNonPriv(5, "ret_from_sub"); +++ defineNonPriv(63, "enter_sync_method"); +++ definePriv(5, "ret_from_trap"); +++ definePriv(6, "read_dcache_tag"); +++ definePriv(7, "read_dcache_data"); +++ definePriv(14, "read_icache_tag"); +++ definePriv(15, "read_icache_data"); +++ definePriv(22, "powerdown"); +++ definePriv(23, "read_scache_data"); +++ definePriv(31, "cache_index_flush"); +++ definePriv(38, "write_dcache_tag"); +++ definePriv(39, "write_dcache_data"); +++ definePriv(46, "write_icache_tag"); +++ definePriv(47, "write_icache_data"); +++ definePriv(54, "reset"); +++ definePriv(55, "write_scache_data"); +++ for (int i = 0; i < 32; i++) { +++ definePriv(i + 64, "read_reg_" + i); +++ } +++ for (int i = 0; i < 32; i++) { +++ definePriv(i + 96, "write_reg_" + i); +++ } +++ } +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/classfile/RuntimeAnnotations_attribute.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/RuntimeAnnotations_attribute.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,61 @@ +++/* +++ * Copyright 2007 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.classfile; +++ +++import java.io.IOException; +++ +++/** +++ * See JVMS3, section 4.8.16 and 4.8.17. +++ * +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public abstract class RuntimeAnnotations_attribute extends Attribute { +++ protected RuntimeAnnotations_attribute(ClassReader cr, int name_index, int length) +++ throws IOException, Annotation.InvalidAnnotation { +++ super(name_index, length); +++ int num_annotations = cr.readUnsignedShort(); +++ annotations = new Annotation[num_annotations]; +++ for (int i = 0; i < annotations.length; i++) +++ annotations[i] = new Annotation(cr); +++ } +++ +++ protected RuntimeAnnotations_attribute(int name_index, Annotation[] annotations) { +++ super(name_index, length(annotations)); +++ this.annotations = annotations; +++ } +++ +++ private static int length(Annotation[] annos) { +++ int n = 2; +++ for (Annotation anno: annos) +++ n += anno.length(); +++ return n; +++ } +++ +++ public final Annotation[] annotations; +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/classfile/RuntimeInvisibleAnnotations_attribute.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/RuntimeInvisibleAnnotations_attribute.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,56 @@ +++/* +++ * Copyright 2007 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.classfile; +++ +++import java.io.IOException; +++ +++/** +++ * See JVMS3, section 4.8.17. +++ * +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class RuntimeInvisibleAnnotations_attribute extends RuntimeAnnotations_attribute { +++ RuntimeInvisibleAnnotations_attribute(ClassReader cr, int name_index, int length) +++ throws IOException, AttributeException { +++ super(cr, name_index, length); +++ } +++ +++ public RuntimeInvisibleAnnotations_attribute(ConstantPool cp, Annotation[] annotations) +++ throws ConstantPoolException { +++ this(cp.getUTF8Index(Attribute.RuntimeInvisibleAnnotations), annotations); +++ } +++ +++ public RuntimeInvisibleAnnotations_attribute(int name_index, Annotation[] annotations) { +++ super(name_index, annotations); +++ } +++ +++ public R accept(Visitor visitor, P p) { +++ return visitor.visitRuntimeInvisibleAnnotations(this, p); +++ } +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/classfile/RuntimeInvisibleParameterAnnotations_attribute.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/RuntimeInvisibleParameterAnnotations_attribute.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,56 @@ +++/* +++ * Copyright 2007 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.classfile; +++ +++import java.io.IOException; +++ +++/** +++ * See JVMS3, section 4.8.18. +++ * +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class RuntimeInvisibleParameterAnnotations_attribute extends RuntimeParameterAnnotations_attribute { +++ RuntimeInvisibleParameterAnnotations_attribute(ClassReader cr, int name_index, int length) +++ throws IOException, Annotation.InvalidAnnotation { +++ super(cr, name_index, length); +++ } +++ +++ public RuntimeInvisibleParameterAnnotations_attribute(ConstantPool cp, Annotation[][] parameter_annotations) +++ throws ConstantPoolException { +++ this(cp.getUTF8Index(Attribute.RuntimeInvisibleParameterAnnotations), parameter_annotations); +++ } +++ +++ public RuntimeInvisibleParameterAnnotations_attribute(int name_index, Annotation[][] parameter_annotations) { +++ super(name_index, parameter_annotations); +++ } +++ +++ public R accept(Visitor visitor, P p) { +++ return visitor.visitRuntimeInvisibleParameterAnnotations(this, p); +++ } +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/classfile/RuntimeParameterAnnotations_attribute.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/RuntimeParameterAnnotations_attribute.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,70 @@ +++/* +++ * Copyright 2007 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.classfile; +++ +++import java.io.IOException; +++ +++/** +++ * See JVMS3, section 4.8.18 and 4.8.19. +++ * +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public abstract class RuntimeParameterAnnotations_attribute extends Attribute { +++ RuntimeParameterAnnotations_attribute(ClassReader cr, int name_index, int length) +++ throws IOException, Annotation.InvalidAnnotation { +++ super(name_index, length); +++ int num_parameters = cr.readUnsignedByte(); +++ parameter_annotations = new Annotation[num_parameters][]; +++ for (int p = 0; p < parameter_annotations.length; p++) { +++ int num_annotations = cr.readUnsignedShort(); +++ Annotation[] annotations = new Annotation[num_annotations]; +++ for (int i = 0; i < num_annotations; i++) +++ annotations[i] = new Annotation(cr); +++ parameter_annotations[p] = annotations; +++ } +++ } +++ +++ protected RuntimeParameterAnnotations_attribute(int name_index, Annotation[][] parameter_annotations) { +++ super(name_index, length(parameter_annotations)); +++ this.parameter_annotations = parameter_annotations; +++ } +++ +++ private static int length(Annotation[][] anno_arrays) { +++ int n = 1; +++ for (Annotation[] anno_array: anno_arrays) { +++ n += 2; +++ for (Annotation anno: anno_array) +++ n += anno.length(); +++ } +++ return n; +++ } +++ +++ public final Annotation[][] parameter_annotations; +++} +++ ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/classfile/RuntimeVisibleAnnotations_attribute.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/RuntimeVisibleAnnotations_attribute.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,56 @@ +++/* +++ * Copyright 2007 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.classfile; +++ +++import java.io.IOException; +++ +++/** +++ * See JVMS3, section 4.8.16. +++ * +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class RuntimeVisibleAnnotations_attribute extends RuntimeAnnotations_attribute { +++ RuntimeVisibleAnnotations_attribute(ClassReader cr, int name_index, int length) +++ throws IOException, Annotation.InvalidAnnotation { +++ super(cr, name_index, length); +++ } +++ +++ public RuntimeVisibleAnnotations_attribute(ConstantPool cp, Annotation[] annotations) +++ throws ConstantPoolException { +++ this(cp.getUTF8Index(Attribute.RuntimeVisibleAnnotations), annotations); +++ } +++ +++ public RuntimeVisibleAnnotations_attribute(int name_index, Annotation[] annotations) { +++ super(name_index, annotations); +++ } +++ +++ public R accept(Visitor visitor, P p) { +++ return visitor.visitRuntimeVisibleAnnotations(this, p); +++ } +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/classfile/RuntimeVisibleParameterAnnotations_attribute.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/RuntimeVisibleParameterAnnotations_attribute.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,56 @@ +++/* +++ * Copyright 2007 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.classfile; +++ +++import java.io.IOException; +++ +++/** +++ * See JVMS3, section 4.8.18. +++ * +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class RuntimeVisibleParameterAnnotations_attribute extends RuntimeParameterAnnotations_attribute { +++ RuntimeVisibleParameterAnnotations_attribute(ClassReader cr, int name_index, int length) +++ throws IOException, Annotation.InvalidAnnotation { +++ super(cr, name_index, length); +++ } +++ +++ public RuntimeVisibleParameterAnnotations_attribute(ConstantPool cp, Annotation[][] parameter_annotations) +++ throws ConstantPoolException { +++ this(cp.getUTF8Index(Attribute.RuntimeVisibleParameterAnnotations), parameter_annotations); +++ } +++ +++ public RuntimeVisibleParameterAnnotations_attribute(int name_index, Annotation[][] parameter_annotations) { +++ super(name_index, parameter_annotations); +++ } +++ +++ public R accept(Visitor visitor, P p) { +++ return visitor.visitRuntimeVisibleParameterAnnotations(this, p); +++ } +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/classfile/Signature.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/Signature.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,275 @@ +++/* +++ * Copyright 2007 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.classfile; +++ +++import java.util.ArrayList; +++import java.util.List; +++ +++/** +++ * See JVMS3 4.4.4. +++ * +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class Signature extends Descriptor { +++ +++ public Signature(int index) { +++ super(index); +++ } +++ +++ public Type getType(ConstantPool constant_pool) throws ConstantPoolException { +++ if (type == null) +++ type = parse(getValue(constant_pool)); +++ return type; +++ } +++ +++ @Override +++ public int getParameterCount(ConstantPool constant_pool) throws ConstantPoolException { +++ Type.MethodType m = (Type.MethodType) getType(constant_pool); +++ return m.argTypes.size(); +++ } +++ +++ @Override +++ public String getParameterTypes(ConstantPool constant_pool) throws ConstantPoolException { +++ Type.MethodType m = (Type.MethodType) getType(constant_pool); +++ StringBuilder sb = new StringBuilder(); +++ sb.append("("); +++ String sep = ""; +++ for (Type argType: m.argTypes) { +++ sb.append(sep); +++ sb.append(argType); +++ sep = ", "; +++ } +++ sb.append(")"); +++ return sb.toString(); +++ } +++ +++ @Override +++ public String getReturnType(ConstantPool constant_pool) throws ConstantPoolException { +++ Type.MethodType m = (Type.MethodType) getType(constant_pool); +++ return m.returnType.toString(); +++ } +++ +++ @Override +++ public String getFieldType(ConstantPool constant_pool) throws ConstantPoolException { +++ return getType(constant_pool).toString(); +++ } +++ +++ private Type parse(String sig) { +++ this.sig = sig; +++ sigp = 0; +++ +++ List typeArgTypes = null; +++ if (sig.charAt(sigp) == '<') +++ typeArgTypes = parseTypeArgTypes(); +++ +++ if (sig.charAt(sigp) == '(') { +++ List argTypes = parseTypeSignatures(')'); +++ Type returnType = parseTypeSignature(); +++ List throwsTypes = null; +++ while (sigp < sig.length() && sig.charAt(sigp) == '^') { +++ sigp++; +++ if (throwsTypes == null) +++ throwsTypes = new ArrayList(); +++ throwsTypes.add(parseTypeSignature()); +++ } +++ return new Type.MethodType(typeArgTypes, argTypes, returnType, throwsTypes); +++ } else { +++ Type t = parseTypeSignature(); +++ if (typeArgTypes == null && sigp == sig.length()) +++ return t; +++ Type superclass = t; +++ List superinterfaces = new ArrayList(); +++ while (sigp < sig.length()) +++ superinterfaces.add(parseTypeSignature()); +++ return new Type.ClassSigType(typeArgTypes, superclass, superinterfaces); +++ +++ } +++ } +++ +++ private Type parseTypeSignature() { +++ switch (sig.charAt(sigp)) { +++ case 'B': +++ sigp++; +++ return new Type.SimpleType("byte"); +++ +++ case 'C': +++ sigp++; +++ return new Type.SimpleType("char"); +++ +++ case 'D': +++ sigp++; +++ return new Type.SimpleType("double"); +++ +++ case 'F': +++ sigp++; +++ return new Type.SimpleType("float"); +++ +++ case 'I': +++ sigp++; +++ return new Type.SimpleType("int"); +++ +++ case 'J': +++ sigp++; +++ return new Type.SimpleType("long"); +++ +++ case 'L': +++ return parseClassTypeSignature(); +++ +++ case 'S': +++ sigp++; +++ return new Type.SimpleType("short"); +++ +++ case 'T': +++ return parseTypeVariableSignature(); +++ +++ case 'V': +++ sigp++; +++ return new Type.SimpleType("void"); +++ +++ case 'Z': +++ sigp++; +++ return new Type.SimpleType("boolean"); +++ +++ case '[': +++ sigp++; +++ return new Type.ArrayType(parseTypeSignature()); +++ +++ case '*': +++ sigp++; +++ return new Type.WildcardType(); +++ +++ case '+': +++ sigp++; +++ return new Type.WildcardType("extends", parseTypeSignature()); +++ +++ case '-': +++ sigp++; +++ return new Type.WildcardType("super", parseTypeSignature()); +++ +++ default: +++ throw new IllegalStateException(debugInfo()); +++ } +++ } +++ +++ private List parseTypeSignatures(char term) { +++ sigp++; +++ List types = new ArrayList(); +++ while (sig.charAt(sigp) != term) +++ types.add(parseTypeSignature()); +++ sigp++; +++ return types; +++ } +++ +++ private Type parseClassTypeSignature() { +++ assert sig.charAt(sigp) == 'L'; +++ sigp++; +++ return parseClassTypeSignatureRest(); +++ } +++ +++ private Type parseClassTypeSignatureRest() { +++ StringBuilder sb = new StringBuilder(); +++ Type t = null; +++ char sigch; +++ while (true) { +++ switch (sigch = sig.charAt(sigp)) { +++ case '/': +++ sigp++; +++ sb.append("."); +++ break; +++ +++ case '.': +++ sigp++; +++ if (t == null) +++ t = new Type.SimpleType(sb.toString()); +++ return new Type.InnerClassType(t, parseClassTypeSignatureRest()); +++ +++ case ';': +++ sigp++; +++ if (t == null) +++ t = new Type.SimpleType(sb.toString()); +++ return t; +++ +++ case '<': +++ List argTypes = parseTypeSignatures('>'); +++ t = new Type.ClassType(sb.toString(), argTypes); +++ break; +++ +++ default: +++ sigp++; +++ sb.append(sigch); +++ break; +++ } +++ } +++ } +++ +++ private List parseTypeArgTypes() { +++ assert sig.charAt(sigp) == '<'; +++ sigp++; +++ List types = null; +++ types = new ArrayList(); +++ while (sig.charAt(sigp) != '>') +++ types.add(parseTypeArgType()); +++ sigp++; +++ return types; +++ } +++ +++ private Type parseTypeArgType() { +++ int sep = sig.indexOf(":", sigp); +++ String name = sig.substring(sigp, sep); +++ Type classBound = null; +++ List interfaceBounds = null; +++ sigp = sep + 1; +++ if (sig.charAt(sigp) != ':') +++ classBound = parseTypeSignature(); +++ while (sig.charAt(sigp) == ':') { +++ sigp++; +++ if (interfaceBounds == null) +++ interfaceBounds = new ArrayList(); +++ interfaceBounds.add(parseTypeSignature()); +++ } +++ return new Type.TypeArgType(name, classBound, interfaceBounds); +++ } +++ +++ private Type parseTypeVariableSignature() { +++ sigp++; +++ int sep = sig.indexOf(';', sigp); +++ Type t = new Type.SimpleType(sig.substring(sigp, sep)); +++ sigp = sep + 1; +++ return t; +++ } +++ +++ private String debugInfo() { +++ return sig.substring(0, sigp) + "!" + sig.charAt(sigp) + "!" + sig.substring(sigp+1); +++ } +++ +++ private String sig; +++ private int sigp; +++ +++ private Type type; +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/classfile/Signature_attribute.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/Signature_attribute.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,67 @@ +++/* +++ * Copyright 2007 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.classfile; +++ +++import java.io.IOException; +++ +++/** +++ * See JVMS3, section 4.8.9. +++ * +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class Signature_attribute extends Attribute { +++ Signature_attribute(ClassReader cr, int name_index, int length) throws IOException { +++ super(name_index, length); +++ signature_index = cr.readUnsignedShort(); +++ } +++ +++ public Signature_attribute(ConstantPool constant_pool, int signature_index) +++ throws ConstantPoolException { +++ this(constant_pool.getUTF8Index(Attribute.Signature), signature_index); +++ } +++ +++ public Signature_attribute(int name_index, int signature_index) { +++ super(name_index, 2); +++ this.signature_index = signature_index; +++ } +++ +++ public String getSignature(ConstantPool constant_pool) throws ConstantPoolException { +++ return constant_pool.getUTF8Value(signature_index); +++ } +++ +++ public Signature getParsedSignature() { +++ return new Signature(signature_index); +++ } +++ +++ public R accept(Visitor visitor, D data) { +++ return visitor.visitSignature(this, data); +++ } +++ +++ public final int signature_index; +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/classfile/SourceDebugExtension_attribute.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/SourceDebugExtension_attribute.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,71 @@ +++/* +++ * Copyright 2007 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.classfile; +++ +++import java.io.ByteArrayInputStream; +++import java.io.DataInputStream; +++import java.io.IOException; +++ +++/** +++ * See JVMS3, section 4.8.15. +++ * +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class SourceDebugExtension_attribute extends Attribute { +++ SourceDebugExtension_attribute(ClassReader cr, int name_index, int length) throws IOException { +++ super(name_index, length); +++ debug_extension = new byte[attribute_length]; +++ cr.readFully(debug_extension); +++ } +++ +++ public SourceDebugExtension_attribute(ConstantPool constant_pool, byte[] debug_extension) +++ throws ConstantPoolException { +++ this(constant_pool.getUTF8Index(Attribute.SourceDebugExtension), debug_extension); +++ } +++ +++ public SourceDebugExtension_attribute(int name_index, byte[] debug_extension) { +++ super(name_index, debug_extension.length); +++ this.debug_extension = debug_extension; +++ } +++ +++ public String getValue() { +++ DataInputStream d = new DataInputStream(new ByteArrayInputStream(debug_extension)); +++ try { +++ return d.readUTF(); +++ } catch (IOException e) { +++ return null; +++ } +++ } +++ +++ public R accept(Visitor visitor, D data) { +++ return visitor.visitSourceDebugExtension(this, data); +++ } +++ +++ public final byte[] debug_extension; +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/classfile/SourceFile_attribute.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/SourceFile_attribute.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,63 @@ +++/* +++ * Copyright 2007 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.classfile; +++ +++import java.io.IOException; +++ +++/** +++ * See JVMS3, section 4.8.10. +++ * +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class SourceFile_attribute extends Attribute { +++ SourceFile_attribute(ClassReader cr, int name_index, int length) throws IOException { +++ super(name_index, length); +++ sourcefile_index = cr.readUnsignedShort(); +++ } +++ +++ public SourceFile_attribute(ConstantPool constant_pool, int sourcefile_index) +++ throws ConstantPoolException { +++ this(constant_pool.getUTF8Index(Attribute.SourceFile), sourcefile_index); +++ } +++ +++ public SourceFile_attribute(int name_index, int sourcefile_index) { +++ super(name_index, 2); +++ this.sourcefile_index = sourcefile_index; +++ } +++ +++ public String getSourceFile(ConstantPool constant_pool) throws ConstantPoolException { +++ return constant_pool.getUTF8Value(sourcefile_index); +++ } +++ +++ public R accept(Visitor visitor, P p) { +++ return visitor.visitSourceFile(this, p); +++ } +++ +++ public final int sourcefile_index; +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/classfile/SourceID_attribute.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/SourceID_attribute.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,61 @@ +++/* +++ * Copyright 2008 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++package com.sun.tools.classfile; +++ +++import java.io.IOException; +++ +++/** +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class SourceID_attribute extends Attribute { +++ +++ SourceID_attribute(ClassReader cr, int name_index, int length) throws IOException { +++ super(name_index, length); +++ sourceID_index = cr.readUnsignedShort(); +++ } +++ +++ public SourceID_attribute(ConstantPool constant_pool, int sourceID_index) +++ throws ConstantPoolException { +++ this(constant_pool.getUTF8Index(Attribute.SourceID), sourceID_index); +++ } +++ +++ public SourceID_attribute(int name_index, int sourceID_index) { +++ super(name_index, 2); +++ this.sourceID_index = sourceID_index; +++ } +++ +++ String getSourceID(ConstantPool constant_pool) throws ConstantPoolException { +++ return constant_pool.getUTF8Value(sourceID_index); +++ } +++ +++ public R accept(Visitor visitor, D data) { +++ return visitor.visitSourceID(this, data); +++ } +++ +++ public final int sourceID_index; +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/classfile/StackMapTable_attribute.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/StackMapTable_attribute.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,349 @@ +++/* +++ * Copyright 2007 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.classfile; +++ +++import java.io.IOException; +++ +++/** +++ * See JVMS3, section 4.8.4. +++ * +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class StackMapTable_attribute extends Attribute { +++ static class InvalidStackMap extends AttributeException { +++ InvalidStackMap(String msg) { +++ super(msg); +++ } +++ } +++ +++ StackMapTable_attribute(ClassReader cr, int name_index, int length) +++ throws IOException, InvalidStackMap { +++ super(name_index, length); +++ number_of_entries = cr.readUnsignedShort(); +++ entries = new stack_map_frame[number_of_entries]; +++ for (int i = 0; i < number_of_entries; i++) +++ entries[i] = stack_map_frame.read(cr); +++ } +++ +++ public StackMapTable_attribute(ConstantPool constant_pool, stack_map_frame[] entries) +++ throws ConstantPoolException { +++ this(constant_pool.getUTF8Index(Attribute.StackMapTable), entries); +++ } +++ +++ public StackMapTable_attribute(int name_index, stack_map_frame[] entries) { +++ super(name_index, length(entries)); +++ this.number_of_entries = entries.length; +++ this.entries = entries; +++ } +++ +++ public R accept(Visitor visitor, D data) { +++ return visitor.visitStackMapTable(this, data); +++ } +++ +++ static int length(stack_map_frame[] entries) { +++ int n = 2; +++ for (stack_map_frame entry: entries) +++ n += entry.length(); +++ return n; +++ } +++ +++ public final int number_of_entries; +++ public final stack_map_frame entries[]; +++ +++ public static abstract class stack_map_frame { +++ static stack_map_frame read(ClassReader cr) +++ throws IOException, InvalidStackMap { +++ int frame_type = cr.readUnsignedByte(); +++ if (frame_type <= 63) +++ return new same_frame(frame_type); +++ else if (frame_type <= 127) +++ return new same_locals_1_stack_item_frame(frame_type, cr); +++ else if (frame_type <= 246) +++ throw new Error("unknown frame_type " + frame_type); +++ else if (frame_type == 247) +++ return new same_locals_1_stack_item_frame_extended(frame_type, cr); +++ else if (frame_type <= 250) +++ return new chop_frame(frame_type, cr); +++ else if (frame_type == 251) +++ return new same_frame_extended(frame_type, cr); +++ else if (frame_type <= 254) +++ return new append_frame(frame_type, cr); +++ else +++ return new full_frame(frame_type, cr); +++ } +++ +++ protected stack_map_frame(int frame_type) { +++ this.frame_type = frame_type; +++ } +++ +++ public int length() { +++ return 1; +++ } +++ +++ public abstract R accept(Visitor visitor, D data); +++ +++ public final int frame_type; +++ +++ public static interface Visitor { +++ R visit_same_frame(same_frame frame, P p); +++ R visit_same_locals_1_stack_item_frame(same_locals_1_stack_item_frame frame, P p); +++ R visit_same_locals_1_stack_item_frame_extended(same_locals_1_stack_item_frame_extended frame, P p); +++ R visit_chop_frame(chop_frame frame, P p); +++ R visit_same_frame_extended(same_frame_extended frame, P p); +++ R visit_append_frame(append_frame frame, P p); +++ R visit_full_frame(full_frame frame, P p); +++ } +++ } +++ +++ public static class same_frame extends stack_map_frame { +++ same_frame(int frame_type) { +++ super(frame_type); +++ } +++ +++ public R accept(Visitor visitor, D data) { +++ return visitor.visit_same_frame(this, data); +++ } +++ } +++ +++ public static class same_locals_1_stack_item_frame extends stack_map_frame { +++ same_locals_1_stack_item_frame(int frame_type, ClassReader cr) +++ throws IOException, InvalidStackMap { +++ super(frame_type); +++ stack = new verification_type_info[1]; +++ stack[0] = verification_type_info.read(cr); +++ } +++ +++ @Override +++ public int length() { +++ return super.length() + stack[0].length(); +++ } +++ +++ public R accept(Visitor visitor, D data) { +++ return visitor.visit_same_locals_1_stack_item_frame(this, data); +++ } +++ +++ public final verification_type_info[] stack; +++ } +++ +++ public static class same_locals_1_stack_item_frame_extended extends stack_map_frame { +++ same_locals_1_stack_item_frame_extended(int frame_type, ClassReader cr) +++ throws IOException, InvalidStackMap { +++ super(frame_type); +++ offset_delta = cr.readUnsignedShort(); +++ stack = new verification_type_info[1]; +++ stack[0] = verification_type_info.read(cr); +++ } +++ +++ @Override +++ public int length() { +++ return super.length() + 2 + stack[0].length(); +++ } +++ +++ public R accept(Visitor visitor, D data) { +++ return visitor.visit_same_locals_1_stack_item_frame_extended(this, data); +++ } +++ +++ public final int offset_delta; +++ public final verification_type_info[] stack; +++ } +++ +++ public static class chop_frame extends stack_map_frame { +++ chop_frame(int frame_type, ClassReader cr) throws IOException { +++ super(frame_type); +++ offset_delta = cr.readUnsignedShort(); +++ } +++ +++ @Override +++ public int length() { +++ return super.length() + 2; +++ } +++ +++ public R accept(Visitor visitor, D data) { +++ return visitor.visit_chop_frame(this, data); +++ } +++ +++ public final int offset_delta; +++ } +++ +++ public static class same_frame_extended extends stack_map_frame { +++ same_frame_extended(int frame_type, ClassReader cr) throws IOException { +++ super(frame_type); +++ offset_delta = cr.readUnsignedShort(); +++ } +++ +++ @Override +++ public int length() { +++ return super.length() + 2; +++ } +++ +++ public R accept(Visitor visitor, D data) { +++ return visitor.visit_same_frame_extended(this, data); +++ } +++ +++ public final int offset_delta; +++ } +++ +++ public static class append_frame extends stack_map_frame { +++ append_frame(int frame_type, ClassReader cr) +++ throws IOException, InvalidStackMap { +++ super(frame_type); +++ offset_delta = cr.readUnsignedShort(); +++ locals = new verification_type_info[frame_type - 251]; +++ for (int i = 0; i < locals.length; i++) +++ locals[i] = verification_type_info.read(cr); +++ } +++ +++ @Override +++ public int length() { +++ int n = super.length() + 2; +++ for (verification_type_info local: locals) +++ n += local.length(); +++ return n; +++ } +++ +++ public R accept(Visitor visitor, D data) { +++ return visitor.visit_append_frame(this, data); +++ } +++ +++ public final int offset_delta; +++ public final verification_type_info[] locals; +++ } +++ +++ public static class full_frame extends stack_map_frame { +++ full_frame(int frame_type, ClassReader cr) +++ throws IOException, InvalidStackMap { +++ super(frame_type); +++ offset_delta = cr.readUnsignedShort(); +++ number_of_locals = cr.readUnsignedShort(); +++ locals = new verification_type_info[number_of_locals]; +++ for (int i = 0; i < locals.length; i++) +++ locals[i] = verification_type_info.read(cr); +++ number_of_stack_items = cr.readUnsignedShort(); +++ stack = new verification_type_info[number_of_stack_items]; +++ for (int i = 0; i < stack.length; i++) +++ stack[i] = verification_type_info.read(cr); +++ } +++ +++ @Override +++ public int length() { +++ int n = super.length() + 2; +++ for (verification_type_info local: locals) +++ n += local.length(); +++ n += 2; +++ for (verification_type_info item: stack) +++ n += item.length(); +++ return n; +++ } +++ +++ public R accept(Visitor visitor, D data) { +++ return visitor.visit_full_frame(this, data); +++ } +++ +++ public final int offset_delta; +++ public final int number_of_locals; +++ public final verification_type_info[] locals; +++ public final int number_of_stack_items; +++ public final verification_type_info[] stack; +++ } +++ +++ public static class verification_type_info { +++ public static final int ITEM_Top = 0; +++ public static final int ITEM_Integer = 1; +++ public static final int ITEM_Float = 2; +++ public static final int ITEM_Long = 4; +++ public static final int ITEM_Double = 3; +++ public static final int ITEM_Null = 5; +++ public static final int ITEM_UninitializedThis = 6; +++ public static final int ITEM_Object = 7; +++ public static final int ITEM_Uninitialized = 8; +++ +++ static verification_type_info read(ClassReader cr) +++ throws IOException, InvalidStackMap { +++ int tag = cr.readUnsignedByte(); +++ switch (tag) { +++ case ITEM_Top: +++ case ITEM_Integer: +++ case ITEM_Float: +++ case ITEM_Long: +++ case ITEM_Double: +++ case ITEM_Null: +++ case ITEM_UninitializedThis: +++ return new verification_type_info(tag); +++ +++ case ITEM_Object: +++ return new Object_variable_info(cr); +++ +++ case ITEM_Uninitialized: +++ return new Uninitialized_variable_info(cr); +++ +++ default: +++ throw new InvalidStackMap("unrecognized verification_type_info tag"); +++ } +++ } +++ +++ verification_type_info(int tag) { +++ this.tag = tag; +++ } +++ +++ public int length() { +++ return 1; +++ } +++ +++ public final int tag; +++ } +++ +++ public static class Object_variable_info extends verification_type_info { +++ Object_variable_info(ClassReader cr) throws IOException { +++ super(ITEM_Object); +++ cpool_index = cr.readUnsignedShort(); +++ } +++ +++ @Override +++ public int length() { +++ return super.length() + 2; +++ } +++ +++ public final int cpool_index; +++ } +++ +++ public static class Uninitialized_variable_info extends verification_type_info { +++ Uninitialized_variable_info(ClassReader cr) throws IOException { +++ super(ITEM_Uninitialized); +++ offset = cr.readUnsignedShort(); +++ } +++ +++ @Override +++ public int length() { +++ return super.length() + 2; +++ } +++ +++ public final int offset; +++ +++ } +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/classfile/StackMap_attribute.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/StackMap_attribute.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,70 @@ +++/* +++ * Copyright 2007 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.classfile; +++ +++import java.io.IOException; +++ +++/** +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class StackMap_attribute extends Attribute { +++ StackMap_attribute(ClassReader cr, int name_index, int length) +++ throws IOException, StackMapTable_attribute.InvalidStackMap { +++ super(name_index, length); +++ number_of_entries = cr.readUnsignedShort(); +++ entries = new stack_map_frame[number_of_entries]; +++ for (int i = 0; i < number_of_entries; i++) +++ entries[i] = new stack_map_frame(cr); +++ } +++ +++ public StackMap_attribute(ConstantPool constant_pool, stack_map_frame[] entries) +++ throws ConstantPoolException { +++ this(constant_pool.getUTF8Index(Attribute.StackMap), entries); +++ } +++ +++ public StackMap_attribute(int name_index, stack_map_frame[] entries) { +++ super(name_index, StackMapTable_attribute.length(entries)); +++ this.number_of_entries = entries.length; +++ this.entries = entries; +++ } +++ +++ public R accept(Visitor visitor, D data) { +++ return visitor.visitStackMap(this, data); +++ } +++ +++ public final int number_of_entries; +++ public final stack_map_frame entries[]; +++ +++ public static class stack_map_frame extends StackMapTable_attribute.full_frame { +++ stack_map_frame(ClassReader cr) +++ throws IOException, StackMapTable_attribute.InvalidStackMap { +++ super(255, cr); +++ } +++ } +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/classfile/Synthetic_attribute.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/Synthetic_attribute.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,55 @@ +++/* +++ * Copyright 2007 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.classfile; +++ +++import java.io.IOException; +++ +++/** +++ * See JVMS3, section 4.8.8. +++ * +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class Synthetic_attribute extends Attribute { +++ Synthetic_attribute(ClassReader cr, int name_index, int length) throws IOException { +++ super(name_index, length); +++ } +++ +++ public Synthetic_attribute(ConstantPool constant_pool) +++ throws ConstantPoolException { +++ this(constant_pool.getUTF8Index(Attribute.Synthetic)); +++ } +++ +++ public Synthetic_attribute(int name_index) { +++ super(name_index, 0); +++ } +++ +++ public R accept(Visitor visitor, D data) { +++ return visitor.visitSynthetic(this, data); +++ } +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/classfile/Type.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/Type.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,232 @@ +++/* +++ * Copyright 2008 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.classfile; +++ +++import java.util.List; +++ +++/* +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class Type { +++ protected Type() { } +++ +++ public boolean isObject() { +++ return false; +++ } +++ +++ protected static void append(StringBuilder sb, String prefix, List types, String suffix) { +++ sb.append(prefix); +++ String sep = ""; +++ for (Type t: types) { +++ sb.append(sep); +++ sb.append(t); +++ sep = ", "; +++ } +++ sb.append(suffix); +++ } +++ +++ protected static void appendIfNotEmpty(StringBuilder sb, String prefix, List types, String suffix) { +++ if (types != null && types.size() > 0) +++ append(sb, prefix, types, suffix); +++ } +++ +++ public static class SimpleType extends Type { +++ public SimpleType(String name) { +++ this.name = name; +++ } +++ +++ @Override +++ public String toString() { +++ return name; +++ } +++ +++ @Override +++ public boolean isObject() { +++ return name.equals("java.lang.Object"); +++ } +++ +++ public final String name; +++ } +++ +++ public static class ArrayType extends Type { +++ public ArrayType(Type elemType) { +++ this.elemType = elemType; +++ } +++ +++ @Override +++ public String toString() { +++ return elemType + "[]"; +++ } +++ +++ public final Type elemType; +++ } +++ +++ public static class MethodType extends Type { +++ public MethodType(List argTypes, Type resultType) { +++ this(null, argTypes, resultType, null); +++ } +++ +++ public MethodType(List typeArgTypes, +++ List argTypes, +++ Type returnType, +++ List throwsTypes) { +++ this.typeArgTypes = typeArgTypes; +++ this.argTypes = argTypes; +++ this.returnType = returnType; +++ this.throwsTypes = throwsTypes; +++ } +++ +++ @Override +++ public String toString() { +++ StringBuilder sb = new StringBuilder(); +++ appendIfNotEmpty(sb, "<", typeArgTypes, "> "); +++ sb.append(returnType); +++ append(sb, " (", argTypes, ")"); +++ appendIfNotEmpty(sb, " throws ", throwsTypes, ""); +++ return sb.toString(); +++ } +++ +++ public final List typeArgTypes; +++ public final List argTypes; +++ public final Type returnType; +++ public final List throwsTypes; +++ } +++ +++ public static class ClassSigType extends Type { +++ public ClassSigType(List typeArgTypes, Type superclassType, List superinterfaceTypes) { +++ this.typeArgTypes = typeArgTypes; +++ this.superclassType = superclassType; +++ this.superinterfaceTypes = superinterfaceTypes; +++ } +++ +++ @Override +++ public String toString() { +++ StringBuilder sb = new StringBuilder(); +++ appendIfNotEmpty(sb, "<", typeArgTypes, ">"); +++ if (superclassType != null && !superclassType.isObject()) { +++ sb.append(" extends "); +++ sb.append(superclassType); +++ } +++ appendIfNotEmpty(sb, " implements ", superinterfaceTypes, ""); +++ return sb.toString(); +++ } +++ +++ public final List typeArgTypes; +++ public final Type superclassType; +++ public final List superinterfaceTypes; +++ } +++ +++ public static class ClassType extends Type { +++ public ClassType(String name, List typeArgs) { +++ this.name = name; +++ this.typeArgs = typeArgs; +++ } +++ +++ @Override +++ public String toString() { +++ StringBuilder sb = new StringBuilder(); +++ sb.append(name); +++ appendIfNotEmpty(sb, "<", typeArgs, ">"); +++ return sb.toString(); +++ } +++ +++ public final String name; +++ public final List typeArgs; +++ } +++ +++ +++ public static class InnerClassType extends Type { +++ public InnerClassType(Type outerType, Type innerType) { +++ this.outerType = outerType; +++ this.innerType = innerType; +++ } +++ +++ @Override +++ public String toString() { +++ return outerType + "." + innerType; +++ } +++ +++ public final Type outerType; +++ public final Type innerType; +++ } +++ +++ public static class TypeArgType extends Type { +++ public TypeArgType(String name, Type classBound, List interfaceBounds) { +++ this.name = name; +++ this.classBound = classBound; +++ this.interfaceBounds = interfaceBounds; +++ } +++ +++ @Override +++ public String toString() { +++ StringBuilder sb = new StringBuilder(); +++ sb.append(name); +++ String sep = " extends "; +++ if (classBound != null && !classBound.isObject()) { +++ sb.append(sep); +++ sb.append(classBound); +++ sep = " & "; +++ } +++ if (interfaceBounds != null) { +++ for (Type bound: interfaceBounds) { +++ sb.append(sep); +++ sb.append(bound); +++ sep = " & "; +++ } +++ } +++ return sb.toString(); +++ } +++ +++ public final String name; +++ public final Type classBound; +++ public final List interfaceBounds; +++ } +++ +++ public static class WildcardType extends Type { +++ public WildcardType() { +++ this(null, null); +++ } +++ +++ public WildcardType(String kind, Type boundType) { +++ this.kind = kind; +++ this.boundType = boundType; +++ } +++ +++ @Override +++ public String toString() { +++ if (kind == null) +++ return "?"; +++ else +++ return "? " + kind + " " + boundType; +++ } +++ +++ public final String kind; +++ public final Type boundType; +++ } +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/classfile/package.html ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/package.html Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,12 @@ +++ +++ +++ +++ +++ +++ +++ +++ A minimalist library to read and write class files into objects closely +++ based on the corresponding definitions in the Java Virtual Machine +++ Specification (JVMS). +++ +++ ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/javap/AnnotationWriter.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/AnnotationWriter.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,114 @@ +++/* +++ * Copyright 2007 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.javap; +++ +++import com.sun.tools.classfile.Annotation; +++import com.sun.tools.classfile.Annotation.Annotation_element_value; +++import com.sun.tools.classfile.Annotation.Array_element_value; +++import com.sun.tools.classfile.Annotation.Class_element_value; +++import com.sun.tools.classfile.Annotation.Enum_element_value; +++import com.sun.tools.classfile.Annotation.Primitive_element_value; +++ +++/** +++ * A writer for writing annotations as text. +++ * +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class AnnotationWriter extends BasicWriter { +++ static AnnotationWriter instance(Context context) { +++ AnnotationWriter instance = context.get(AnnotationWriter.class); +++ if (instance == null) +++ instance = new AnnotationWriter(context); +++ return instance; +++ } +++ +++ protected AnnotationWriter(Context context) { +++ super(context); +++ } +++ +++ public void write(Annotation annot) { +++ print("#" + annot.type_index + "("); +++ for (int i = 0; i < annot.num_element_value_pairs; i++) { +++ if (i > 0) +++ print(","); +++ write(annot.element_value_pairs[i]); +++ } +++ print(")"); +++ } +++ +++ public void write(Annotation.element_value_pair pair) { +++ print("#" + pair.element_name_index + ":"); +++ write(pair.value); +++ } +++ +++ public void write(Annotation.element_value value) { +++ ev_writer.write(value); +++ } +++ +++ element_value_Writer ev_writer = new element_value_Writer(); +++ +++ class element_value_Writer implements Annotation.element_value.Visitor { +++ public void write(Annotation.element_value value) { +++ value.accept(this, null); +++ } +++ +++ public Void visitPrimitive(Primitive_element_value ev, Void p) { +++ print(((char) ev.tag) + "#" + ev.const_value_index); +++ return null; +++ } +++ +++ public Void visitEnum(Enum_element_value ev, Void p) { +++ print(((char) ev.tag) + "#" + ev.type_name_index + ".#" + ev.const_name_index); +++ return null; +++ } +++ +++ public Void visitClass(Class_element_value ev, Void p) { +++ print(((char) ev.tag) + "#" + ev.class_info_index); +++ return null; +++ } +++ +++ public Void visitAnnotation(Annotation_element_value ev, Void p) { +++ print((char) ev.tag); +++ AnnotationWriter.this.write(ev.annotation_value); +++ return null; +++ } +++ +++ public Void visitArray(Array_element_value ev, Void p) { +++ print("["); +++ for (int i = 0; i < ev.num_values; i++) { +++ if (i > 0) +++ print(","); +++ write(ev.values[i]); +++ } +++ print("]"); +++ return null; +++ } +++ +++ } +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/javap/AttributeWriter.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/AttributeWriter.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,679 @@ +++/* +++ * Copyright 2007 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.javap; +++ +++import java.util.Formatter; +++ +++import com.sun.tools.classfile.AccessFlags; +++import com.sun.tools.classfile.AnnotationDefault_attribute; +++import com.sun.tools.classfile.Attribute; +++import com.sun.tools.classfile.Attributes; +++import com.sun.tools.classfile.CharacterRangeTable_attribute; +++import com.sun.tools.classfile.Code_attribute; +++import com.sun.tools.classfile.CompilationID_attribute; +++import com.sun.tools.classfile.ConstantPool; +++import com.sun.tools.classfile.ConstantPoolException; +++import com.sun.tools.classfile.ConstantValue_attribute; +++import com.sun.tools.classfile.DefaultAttribute; +++import com.sun.tools.classfile.Deprecated_attribute; +++import com.sun.tools.classfile.EnclosingMethod_attribute; +++import com.sun.tools.classfile.Exceptions_attribute; +++import com.sun.tools.classfile.Field; +++import com.sun.tools.classfile.InnerClasses_attribute; +++import com.sun.tools.classfile.LineNumberTable_attribute; +++import com.sun.tools.classfile.LocalVariableTable_attribute; +++import com.sun.tools.classfile.LocalVariableTypeTable_attribute; +++import com.sun.tools.classfile.ModuleExportTable_attribute; +++import com.sun.tools.classfile.ModuleMemberTable_attribute; +++import com.sun.tools.classfile.Module_attribute; +++import com.sun.tools.classfile.RuntimeInvisibleAnnotations_attribute; +++import com.sun.tools.classfile.RuntimeInvisibleParameterAnnotations_attribute; +++import com.sun.tools.classfile.RuntimeVisibleAnnotations_attribute; +++import com.sun.tools.classfile.RuntimeVisibleParameterAnnotations_attribute; +++import com.sun.tools.classfile.Signature_attribute; +++import com.sun.tools.classfile.SourceDebugExtension_attribute; +++import com.sun.tools.classfile.SourceFile_attribute; +++import com.sun.tools.classfile.SourceID_attribute; +++import com.sun.tools.classfile.StackMapTable_attribute; +++import com.sun.tools.classfile.StackMap_attribute; +++import com.sun.tools.classfile.Synthetic_attribute; +++ +++import static com.sun.tools.classfile.AccessFlags.*; +++ +++/* +++ * A writer for writing Attributes as text. +++ * +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class AttributeWriter extends BasicWriter +++ implements Attribute.Visitor +++{ +++ static AttributeWriter instance(Context context) { +++ AttributeWriter instance = context.get(AttributeWriter.class); +++ if (instance == null) +++ instance = new AttributeWriter(context); +++ return instance; +++ } +++ +++ protected AttributeWriter(Context context) { +++ super(context); +++ context.put(AttributeWriter.class, this); +++ annotationWriter = AnnotationWriter.instance(context); +++ codeWriter = CodeWriter.instance(context); +++ constantWriter = ConstantWriter.instance(context); +++ options = Options.instance(context); +++ } +++ +++ public void write(Object owner, Attribute attr, ConstantPool constant_pool) { +++ if (attr != null) { +++ // null checks +++ owner.getClass(); +++ constant_pool.getClass(); +++ this.constant_pool = constant_pool; +++ this.owner = owner; +++ attr.accept(this, null); +++ } +++ } +++ +++ public void write(Object owner, Attributes attrs, ConstantPool constant_pool) { +++ if (attrs != null) { +++ // null checks +++ owner.getClass(); +++ constant_pool.getClass(); +++ this.constant_pool = constant_pool; +++ this.owner = owner; +++ for (Attribute attr: attrs) +++ attr.accept(this, null); +++ } +++ } +++ +++ public Void visitDefault(DefaultAttribute attr, Void ignore) { +++ byte[] data = attr.info; +++ int i = 0; +++ int j = 0; +++ print(" "); +++ try { +++ print(attr.getName(constant_pool)); +++ } catch (ConstantPoolException e) { +++ report(e); +++ print("attribute name = #" + attr.attribute_name_index); +++ } +++ print(": "); +++ println("length = 0x" + toHex(attr.info.length)); +++ +++ print(" "); +++ +++ while (i < data.length) { +++ print(toHex(data[i], 2)); +++ +++ j++; +++ if (j == 16) { +++ println(); +++ print(" "); +++ j = 0; +++ } else { +++ print(" "); +++ } +++ i++; +++ } +++ println(); +++ return null; +++ } +++ +++ public Void visitAnnotationDefault(AnnotationDefault_attribute attr, Void ignore) { +++ println(" AnnotationDefault: "); +++ print(" default_value: "); +++ annotationWriter.write(attr.default_value); +++ return null; +++ } +++ +++ public Void visitCharacterRangeTable(CharacterRangeTable_attribute attr, Void ignore) { +++ print(" CharacterRangeTable: "); +++ for (int i = 0; i < attr.character_range_table.length; i++) { +++ CharacterRangeTable_attribute.Entry e = attr.character_range_table[i]; +++ print(" " + e.start_pc + ", " + +++ e.end_pc + ", " + +++ Integer.toHexString(e.character_range_start) + ", " + +++ Integer.toHexString(e.character_range_end) + ", " + +++ Integer.toHexString(e.flags) + +++ "\t// "); +++ print(e.start_pc + ", " + +++ e.end_pc + ", " + +++ (e.character_range_start >> 10) + ":" + (e.character_range_start & 0x3ff) + ", " + +++ (e.character_range_end >> 10) + ":" + (e.character_range_end & 0x3ff)); +++ if ((e.flags & CharacterRangeTable_attribute.CRT_STATEMENT) != 0) +++ print(", statement"); +++ if ((e.flags & CharacterRangeTable_attribute.CRT_BLOCK) != 0) +++ print(", block"); +++ if ((e.flags & CharacterRangeTable_attribute.CRT_ASSIGNMENT) != 0) +++ print(", assignment"); +++ if ((e.flags & CharacterRangeTable_attribute.CRT_FLOW_CONTROLLER) != 0) +++ print(", flow-controller"); +++ if ((e.flags & CharacterRangeTable_attribute.CRT_FLOW_TARGET) != 0) +++ print(", flow-target"); +++ if ((e.flags & CharacterRangeTable_attribute.CRT_INVOKE) != 0) +++ print(", invoke"); +++ if ((e.flags & CharacterRangeTable_attribute.CRT_CREATE) != 0) +++ print(", create"); +++ if ((e.flags & CharacterRangeTable_attribute.CRT_BRANCH_TRUE) != 0) +++ print(", branch-true"); +++ if ((e.flags & CharacterRangeTable_attribute.CRT_BRANCH_FALSE) != 0) +++ print(", branch-false"); +++ +++ +++ +++ } +++ return null; +++ } +++ +++ public Void visitCode(Code_attribute attr, Void ignore) { +++ codeWriter.write(attr, constant_pool); +++ println(); +++ return null; +++ } +++ +++ public Void visitCompilationID(CompilationID_attribute attr, Void ignore) { +++ constantWriter.write(attr.compilationID_index); +++ return null; +++ } +++ +++ public Void visitConstantValue(ConstantValue_attribute attr, Void ignore) { +++ if (options.compat) // BUG 6622216 javap names some attributes incorrectly +++ print(" Constant value: "); +++ else +++ print(" ConstantValue: "); +++ constantWriter.write(attr.constantvalue_index); +++ if (!options.compat) // BUG 6622232 javap gets whitespace confused +++ println(); +++ return null; +++ } +++ +++ public Void visitDeprecated(Deprecated_attribute attr, Void ignore) { +++ if (!(options.compat && owner instanceof Field)) // BUG 6622232 javap gets whitespace confused +++ print(" "); +++ println("Deprecated: true"); +++ return null; +++ } +++ +++ public Void visitEnclosingMethod(EnclosingMethod_attribute attr, Void ignore) { +++ print(" EnclosingMethod: #" + attr.class_index + ".#" + attr.method_index +++ + "\t// " + getJavaClassName(attr)); +++ if (attr.method_index != 0) +++ print("." + getMethodName(attr)); +++ println(); +++ return null; +++ } +++ +++ private String getJavaClassName(EnclosingMethod_attribute a) { +++ try { +++ return getJavaName(a.getClassName(constant_pool)); +++ } catch (ConstantPoolException e) { +++ return report(e); +++ } +++ } +++ +++ private String getMethodName(EnclosingMethod_attribute a) { +++ try { +++ return a.getMethodName(constant_pool); +++ } catch (ConstantPoolException e) { +++ return report(e); +++ } +++ } +++ +++ public Void visitExceptions(Exceptions_attribute attr, Void ignore) { +++ println(" Exceptions: "); +++ print(" throws "); +++ for (int i = 0; i < attr.number_of_exceptions; i++) { +++ if (i > 0) +++ print(", "); +++ print(getJavaException(attr, i)); +++ } +++ if (!options.compat) // BUG 6622232 javap gets whitespace confused +++ println(); +++ return null; +++ } +++ +++ String getJavaException(Exceptions_attribute attr, int index) { +++ try { +++ return getJavaName(attr.getException(index, constant_pool)); +++ } catch (ConstantPoolException e) { +++ return report(e); +++ } +++ } +++ +++ public Void visitInnerClasses(InnerClasses_attribute attr, Void ignore) { +++ boolean first = true; +++ if (options.compat) { +++ writeInnerClassHeader(); +++ first = false; +++ } +++ for (int i = 0 ; i < attr.classes.length; i++) { +++ InnerClasses_attribute.Info info = attr.classes[i]; +++ //access +++ AccessFlags access_flags = info.inner_class_access_flags; +++ if (options.compat) { +++ // BUG 6622215: javap ignores certain relevant access flags +++ access_flags = access_flags.ignore(ACC_STATIC | ACC_PROTECTED | ACC_PRIVATE | ACC_INTERFACE | ACC_SYNTHETIC | ACC_ENUM); +++ // BUG 6622232: javap gets whitespace confused +++ print(" "); +++ } +++ if (options.checkAccess(access_flags)) { +++ if (first) { +++ writeInnerClassHeader(); +++ first = false; +++ } +++ if (!options.compat) // BUG 6622232: javap gets whitespace confused +++ print(" "); +++ for (String name: access_flags.getInnerClassModifiers()) +++ print(name + " "); +++ if (info.inner_name_index!=0) { +++ print("#" + info.inner_name_index + "= "); +++ } +++ print("#" + info.inner_class_info_index); +++ if (info.outer_class_info_index != 0) { +++ print(" of #" + info.outer_class_info_index); +++ } +++ print("; //"); +++ if (info.inner_name_index != 0) { +++ print(getInnerName(constant_pool, info) + "="); +++ } +++ constantWriter.write(info.inner_class_info_index); +++ if (info.outer_class_info_index != 0) { +++ print(" of "); +++ constantWriter.write(info.outer_class_info_index); +++ } +++ println(); +++ } +++ } +++ return null; +++ } +++ +++ String getInnerName(ConstantPool constant_pool, InnerClasses_attribute.Info info) { +++ try { +++ return info.getInnerName(constant_pool); +++ } catch (ConstantPoolException e) { +++ return report(e); +++ } +++ } +++ +++ private void writeInnerClassHeader() { +++ print(" "); +++ if (options.compat) // BUG 6622216: javap names some attributes incorrectly +++ print("InnerClass"); +++ else +++ print("InnerClasses"); +++ println(": "); +++ } +++ +++ public Void visitLineNumberTable(LineNumberTable_attribute attr, Void ignore) { +++ println(" LineNumberTable: "); +++ for (LineNumberTable_attribute.Entry entry: attr.line_number_table) { +++ println(" line " + entry.line_number + ": " + entry.start_pc); +++ } +++ return null; +++ } +++ +++ public Void visitLocalVariableTable(LocalVariableTable_attribute attr, Void ignore) { +++ println(" LocalVariableTable: "); +++ println(" Start Length Slot Name Signature"); +++ +++ for (LocalVariableTable_attribute.Entry entry : attr.local_variable_table) { +++ Formatter formatter = new Formatter(); +++ println(formatter.format("%8d %7d %5d %5s %s", +++ entry.start_pc, entry.length, entry.index, +++ constantWriter.stringValue(entry.name_index), +++ constantWriter.stringValue(entry.descriptor_index))); +++ } +++ return null; +++ } +++ +++ public Void visitLocalVariableTypeTable(LocalVariableTypeTable_attribute attr, Void ignore) { +++ println(" LocalVariableTypeTable: "); +++ println(" Start Length Slot Name Signature"); +++ +++ for (LocalVariableTypeTable_attribute.Entry entry : attr.local_variable_table) { +++ Formatter formatter = new Formatter(); +++ println(formatter.format("%8d %7d %5d %5s %s", +++ entry.start_pc, entry.length, entry.index, +++ constantWriter.stringValue(entry.name_index), +++ constantWriter.stringValue(entry.signature_index))); +++ } +++ return null; +++ } +++ +++ public Void visitModule(Module_attribute attr, Void ignore) { +++ println(" Module: #" + attr.module_name + "\t// " + getModuleName(attr)); +++ return null; +++ } +++ +++ String getModuleName(Module_attribute attr) { +++ try { +++ return attr.getModuleName(constant_pool); +++ } catch (ConstantPoolException e) { +++ return report(e); +++ } +++ } +++ +++ public Void visitModuleExportTable(ModuleExportTable_attribute attr, Void ignore) { +++ println(" ModuleExportTable:"); +++ println(" Types: (" + attr.export_type_table.length + ")"); +++ for (int i = 0; i < attr.export_type_table.length; i++) { +++ println(" #" + attr.export_type_table[i] + "\t// " + getExportTypeName(attr, i)); +++ } +++ return null; +++ } +++ +++ String getExportTypeName(ModuleExportTable_attribute attr, int index) { +++ try { +++ return attr.getExportTypeName(index, constant_pool); +++ } catch (ConstantPoolException e) { +++ return report(e); +++ } +++ } +++ +++ public Void visitModuleMemberTable(ModuleMemberTable_attribute attr, Void ignore) { +++ println(" ModuleMemberTable:"); +++ println(" Packages: (" + attr.package_member_table.length + ")"); +++ for (int i = 0; i < attr.package_member_table.length; i++) { +++ println(" #" + attr.package_member_table[i] + "\t// " + getPackageMemberName(attr, i)); +++ } +++ return null; +++ } +++ +++ String getPackageMemberName(ModuleMemberTable_attribute attr, int index) { +++ try { +++ return attr.getPackageMemberName(index, constant_pool); +++ } catch (ConstantPoolException e) { +++ return report(e); +++ } +++ } +++ +++ public Void visitRuntimeVisibleAnnotations(RuntimeVisibleAnnotations_attribute attr, Void ignore) { +++ println(" RuntimeVisibleAnnotations: "); +++ for (int i = 0; i < attr.annotations.length; i++) { +++ print(" " + i + ": "); +++ annotationWriter.write(attr.annotations[i]); +++ println(); +++ } +++ return null; +++ } +++ +++ public Void visitRuntimeInvisibleAnnotations(RuntimeInvisibleAnnotations_attribute attr, Void ignore) { +++ println(" RuntimeInvisibleAnnotations: "); +++ for (int i = 0; i < attr.annotations.length; i++) { +++ print(" " + i + ": "); +++ annotationWriter.write(attr.annotations[i]); +++ println(); +++ } +++ return null; +++ } +++ +++ public Void visitRuntimeVisibleParameterAnnotations(RuntimeVisibleParameterAnnotations_attribute attr, Void ignore) { +++ println(" RuntimeVisibleParameterAnnotations: "); +++ for (int param = 0; param < attr.parameter_annotations.length; param++) { +++ println(" parameter " + param + ": "); +++ for (int i = 0; i < attr.parameter_annotations[param].length; i++) { +++ print(" " + i + ": "); +++ annotationWriter.write(attr.parameter_annotations[param][i]); +++ println(); +++ } +++ } +++ return null; +++ } +++ +++ public Void visitRuntimeInvisibleParameterAnnotations(RuntimeInvisibleParameterAnnotations_attribute attr, Void ignore) { +++ println(" RuntimeInvisibleParameterAnnotations: "); +++ for (int param = 0; param < attr.parameter_annotations.length; param++) { +++ println(" " + param + ": "); +++ for (int i = 0; i < attr.parameter_annotations[param].length; i++) { +++ print(" " + i + ": "); +++ annotationWriter.write(attr.parameter_annotations[param][i]); +++ println(); +++ } +++ } +++ return null; +++ } +++ +++ public Void visitSignature(Signature_attribute attr, Void ignore) { +++ println(" Signature: #" + attr.signature_index + "\t// " + getSignature(attr)); +++ return null; +++ } +++ +++ String getSignature(Signature_attribute info) { +++ try { +++ return info.getSignature(constant_pool); +++ } catch (ConstantPoolException e) { +++ return report(e); +++ } +++ } +++ +++ public Void visitSourceDebugExtension(SourceDebugExtension_attribute attr, Void ignore) { +++ println(" SourceDebugExtension: " + attr.getValue()); +++ return null; +++ } +++ +++ public Void visitSourceFile(SourceFile_attribute attr, Void ignore) { +++ println(" SourceFile: \"" + getSourceFile(attr) + "\""); +++ return null; +++ } +++ +++ private String getSourceFile(SourceFile_attribute attr) { +++ try { +++ return attr.getSourceFile(constant_pool); +++ } catch (ConstantPoolException e) { +++ return report(e); +++ } +++ } +++ +++ public Void visitSourceID(SourceID_attribute attr, Void ignore) { +++ constantWriter.write(attr.sourceID_index); +++ return null; +++ } +++ +++ public Void visitStackMap(StackMap_attribute attr, Void ignore) { +++ println(" StackMap: number_of_entries = " + attr.number_of_entries); +++ +++ StackMapTableWriter w = new StackMapTableWriter(); +++ for (StackMapTable_attribute.stack_map_frame entry : attr.entries) { +++ w.write(entry); +++ } +++ println(); +++ return null; +++ } +++ +++ public Void visitStackMapTable(StackMapTable_attribute attr, Void ignore) { +++ println(" StackMapTable: number_of_entries = " + attr.number_of_entries); +++ +++ StackMapTableWriter w = new StackMapTableWriter(); +++ for (StackMapTable_attribute.stack_map_frame entry : attr.entries) { +++ w.write(entry); +++ } +++ println(); +++ return null; +++ } +++ +++ class StackMapTableWriter // also handles CLDC StackMap attributes +++ implements StackMapTable_attribute.stack_map_frame.Visitor { +++ public void write(StackMapTable_attribute.stack_map_frame frame) { +++ frame.accept(this, null); +++ } +++ +++ public Void visit_same_frame(StackMapTable_attribute.same_frame frame, Void p) { +++ printHeader(frame); +++ println(" /* same */"); +++ return null; +++ } +++ +++ public Void visit_same_locals_1_stack_item_frame(StackMapTable_attribute.same_locals_1_stack_item_frame frame, Void p) { +++ printHeader(frame); +++ println(" /* same_locals_1_stack_item */"); +++ printMap("stack", frame.stack); +++ return null; +++ } +++ +++ public Void visit_same_locals_1_stack_item_frame_extended(StackMapTable_attribute.same_locals_1_stack_item_frame_extended frame, Void p) { +++ printHeader(frame); +++ println(" /* same_locals_1_stack_item_frame_extended */"); +++ println(" offset_delta = " + frame.offset_delta); +++ printMap("stack", frame.stack); +++ return null; +++ } +++ +++ public Void visit_chop_frame(StackMapTable_attribute.chop_frame frame, Void p) { +++ printHeader(frame); +++ println(" /* chop */"); +++ println(" offset_delta = " + frame.offset_delta); +++ return null; +++ } +++ +++ public Void visit_same_frame_extended(StackMapTable_attribute.same_frame_extended frame, Void p) { +++ printHeader(frame); +++ println(" /* same_frame_extended */"); +++ println(" offset_delta = " + frame.offset_delta); +++ return null; +++ } +++ +++ public Void visit_append_frame(StackMapTable_attribute.append_frame frame, Void p) { +++ printHeader(frame); +++ println(" /* append */"); +++ println(" offset_delta = " + frame.offset_delta); +++ printMap("locals", frame.locals); +++ return null; +++ } +++ +++ public Void visit_full_frame(StackMapTable_attribute.full_frame frame, Void p) { +++ printHeader(frame); +++ if (frame instanceof StackMap_attribute.stack_map_frame) { +++ println(" offset = " + frame.offset_delta); +++ } else { +++ println(" /* full_frame */"); +++ println(" offset_delta = " + frame.offset_delta); +++ } +++ printMap("locals", frame.locals); +++ printMap("stack", frame.stack); +++ return null; +++ } +++ +++ void printHeader(StackMapTable_attribute.stack_map_frame frame) { +++ print(" frame_type = " + frame.frame_type); +++ } +++ +++ void printMap(String name, StackMapTable_attribute.verification_type_info[] map) { +++ print(" " + name + " = ["); +++ for (int i = 0; i < map.length; i++) { +++ StackMapTable_attribute.verification_type_info info = map[i]; +++ int tag = info.tag; +++ switch (tag) { +++ case StackMapTable_attribute.verification_type_info.ITEM_Object: +++ print(" "); +++ constantWriter.write(((StackMapTable_attribute.Object_variable_info) info).cpool_index); +++ break; +++ case StackMapTable_attribute.verification_type_info.ITEM_Uninitialized: +++ print(" " + mapTypeName(tag)); +++ print(" " + ((StackMapTable_attribute.Uninitialized_variable_info) info).offset); +++ break; +++ default: +++ print(" " + mapTypeName(tag)); +++ } +++ print(i == (map.length - 1) ? " " : ","); +++ } +++ println("]"); +++ } +++ +++ String mapTypeName(int tag) { +++ switch (tag) { +++ case StackMapTable_attribute.verification_type_info.ITEM_Top: +++ return "top"; +++ +++ case StackMapTable_attribute.verification_type_info.ITEM_Integer: +++ return "int"; +++ +++ case StackMapTable_attribute.verification_type_info.ITEM_Float: +++ return "float"; +++ +++ case StackMapTable_attribute.verification_type_info.ITEM_Long: +++ return "long"; +++ +++ case StackMapTable_attribute.verification_type_info.ITEM_Double: +++ return "double"; +++ +++ case StackMapTable_attribute.verification_type_info.ITEM_Null: +++ return "null"; +++ +++ case StackMapTable_attribute.verification_type_info.ITEM_UninitializedThis: +++ return "this"; +++ +++ case StackMapTable_attribute.verification_type_info.ITEM_Object: +++ return "CP"; +++ +++ case StackMapTable_attribute.verification_type_info.ITEM_Uninitialized: +++ return "uninitialized"; +++ +++ default: +++ report("unrecognized verification_type_info tag: " + tag); +++ return "[tag:" + tag + "]"; +++ } +++ } +++ } +++ +++ public Void visitSynthetic(Synthetic_attribute attr, Void ignore) { +++ println("Synthetic: true"); +++ return null; +++ } +++ +++ static String getJavaName(String name) { +++ return name.replace('/', '.'); +++ } +++ +++ String toHex(byte b, int w) { +++ if (options.compat) // BUG 6622260: javap prints negative bytes incorrectly in hex +++ return toHex((int) b, w); +++ else +++ return toHex(b & 0xff, w); +++ } +++ +++ static String toHex(int i) { +++ return Integer.toString(i, 16).toUpperCase(); +++ } +++ +++ static String toHex(int i, int w) { +++ String s = Integer.toHexString(i).toUpperCase(); +++ while (s.length() < w) +++ s = "0" + s; +++ return s.toUpperCase(); +++ } +++ +++ private AnnotationWriter annotationWriter; +++ private CodeWriter codeWriter; +++ private ConstantWriter constantWriter; +++ private Options options; +++ +++ private ConstantPool constant_pool; +++ private Object owner; +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/javap/BasicWriter.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/BasicWriter.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,131 @@ +++/* +++ * Copyright 2007 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.javap; +++ +++import java.io.PrintWriter; +++ +++import com.sun.tools.classfile.AttributeException; +++import com.sun.tools.classfile.ConstantPoolException; +++import com.sun.tools.classfile.DescriptorException; +++ +++/* +++ * A writer similar to a PrintWriter but which does not hide exceptions. +++ * The standard print calls are line-buffered; report calls write messages directly. +++ * +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class BasicWriter { +++ protected BasicWriter(Context context) { +++ lineWriter = LineWriter.instance(context); +++ out = context.get(PrintWriter.class); +++ } +++ +++ protected void print(String s) { +++ lineWriter.print(s); +++ } +++ +++ protected void print(Object o) { +++ lineWriter.print(o == null ? null : o.toString()); +++ } +++ +++ protected void println() { +++ lineWriter.println(); +++ } +++ +++ protected void println(String s) { +++ lineWriter.print(s); +++ lineWriter.println(); +++ } +++ +++ protected void println(Object o) { +++ lineWriter.print(o == null ? null : o.toString()); +++ lineWriter.println(); +++ } +++ +++ protected String report(AttributeException e) { +++ out.println("Error: " + e.getMessage()); // i18n? +++ return "???"; +++ } +++ +++ protected String report(ConstantPoolException e) { +++ out.println("Error: " + e.getMessage()); // i18n? +++ return "???"; +++ } +++ +++ protected String report(DescriptorException e) { +++ out.println("Error: " + e.getMessage()); // i18n? +++ return "???"; +++ } +++ +++ protected String report(String msg) { +++ out.println("Error: " + msg); // i18n? +++ return "???"; +++ } +++ +++ private LineWriter lineWriter; +++ private PrintWriter out; +++ +++ private static class LineWriter { +++ static LineWriter instance(Context context) { +++ LineWriter instance = context.get(LineWriter.class); +++ if (instance == null) +++ instance = new LineWriter(context); +++ return instance; +++ } +++ +++ protected LineWriter(Context context) { +++ context.put(LineWriter.class, this); +++ out = context.get(PrintWriter.class); +++ buffer = new StringBuilder(); +++ } +++ +++ protected void print(String s) { +++ if (s == null) +++ s = "null"; +++ for (int i = 0; i < s.length(); i++) { +++ char c = s.charAt(i); +++ if (c == '\n') { +++ println(); +++ } else { +++ buffer.append(c); +++ } +++ } +++ +++ } +++ +++ protected void println() { +++ out.println(buffer); +++ buffer.setLength(0); +++ } +++ +++ private PrintWriter out; +++ private StringBuilder buffer; +++ } +++} +++ ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/javap/ClassWriter.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/ClassWriter.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,488 @@ +++/* +++ * Copyright 2007 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.javap; +++ +++import java.util.Collection; +++import java.util.List; +++ +++import com.sun.tools.classfile.AccessFlags; +++import com.sun.tools.classfile.Attribute; +++import com.sun.tools.classfile.Attributes; +++import com.sun.tools.classfile.ClassFile; +++import com.sun.tools.classfile.Code_attribute; +++import com.sun.tools.classfile.ConstantPool; +++import com.sun.tools.classfile.ConstantPoolException; +++import com.sun.tools.classfile.Descriptor; +++import com.sun.tools.classfile.DescriptorException; +++import com.sun.tools.classfile.Exceptions_attribute; +++import com.sun.tools.classfile.Field; +++import com.sun.tools.classfile.Method; +++import com.sun.tools.classfile.Signature; +++import com.sun.tools.classfile.Signature_attribute; +++import com.sun.tools.classfile.SourceFile_attribute; +++import com.sun.tools.classfile.Type; +++ +++import static com.sun.tools.classfile.AccessFlags.*; +++ +++/* +++ * The main javap class to write the contents of a class file as text. +++ * +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class ClassWriter extends BasicWriter { +++ static ClassWriter instance(Context context) { +++ ClassWriter instance = context.get(ClassWriter.class); +++ if (instance == null) +++ instance = new ClassWriter(context); +++ return instance; +++ } +++ +++ protected ClassWriter(Context context) { +++ super(context); +++ context.put(ClassWriter.class, this); +++ options = Options.instance(context); +++ attrWriter = AttributeWriter.instance(context); +++ codeWriter = CodeWriter.instance(context); +++ constantWriter = ConstantWriter.instance(context); +++ } +++ +++ ClassFile getClassFile() { +++ return classFile; +++ } +++ +++ Method getMethod() { +++ return method; +++ } +++ +++ public void write(ClassFile cf) { +++ classFile = cf; +++ constant_pool = classFile.constant_pool; +++ +++ Attribute sfa = cf.getAttribute(Attribute.SourceFile); +++ if (sfa instanceof SourceFile_attribute) { +++ println("Compiled from \"" + getSourceFile((SourceFile_attribute) sfa) + "\""); +++ } +++ +++ String name = getJavaName(classFile); +++ AccessFlags flags = cf.access_flags; +++ +++ writeModifiers(flags.getClassModifiers()); +++ +++ if (classFile.isClass()) +++ print("class "); +++ else if (classFile.isInterface()) +++ print("interface "); +++ +++ print(name); +++ +++ Signature_attribute sigAttr = getSignature(cf.attributes); +++ if (sigAttr == null) { +++ // use info from class file header +++ if (classFile.isClass()) { +++ if (classFile.super_class != 0 ) { +++ String sn = getJavaSuperclassName(cf); +++ if (!sn.equals("java.lang.Object") || options.compat) { // BUG XXXXXXXX +++ print(" extends "); +++ print(sn); +++ } +++ } +++ } +++ for (int i = 0; i < classFile.interfaces.length; i++) { +++ print(i == 0 ? (classFile.isClass() ? " implements " : " extends ") : ","); +++ print(getJavaInterfaceName(classFile, i)); +++ } +++ } else { +++ try { +++ Type t = sigAttr.getParsedSignature().getType(constant_pool); +++ // The signature parser cannot disambiguate between a +++ // FieldType and a ClassSignatureType that only contains a superclass type. +++ if (t instanceof Type.ClassSigType) +++ print(t); +++ else if (!t.isObject()) { +++ print(" extends "); +++ print(t); +++ } +++ } catch (ConstantPoolException e) { +++ print(report(e)); +++ } +++ } +++ +++ if (options.verbose) { +++ println(); +++ attrWriter.write(cf, cf.attributes, constant_pool); +++ println(" minor version: " + cf.minor_version); +++ println(" major version: " + cf.major_version); +++ if (!options.compat) +++ writeList(" flags: ", flags.getClassFlags(), NEWLINE); +++ constantWriter.writeConstantPool(); +++ println(); +++ } else { +++ if (!options.compat) +++ print(" "); +++ } +++ +++ println("{"); +++ writeFields(); +++ writeMethods(); +++ println("}"); +++ println(); +++ } +++ +++ void writeFields() { +++ for (Field f: classFile.fields) { +++ writeField(f); +++ } +++ } +++ +++ void writeField(Field f) { +++ if (!options.checkAccess(f.access_flags)) +++ return; +++ +++ if (!(options.showLineAndLocalVariableTables +++ || options.showDisassembled +++ || options.verbose +++ || options.showInternalSignatures +++ || options.showAllAttrs)) { +++ print(" "); +++ } +++ +++ AccessFlags flags = f.access_flags; +++ writeModifiers(flags.getFieldModifiers()); +++ Signature_attribute sigAttr = getSignature(f.attributes); +++ if (sigAttr == null) +++ print(getFieldType(f.descriptor)); +++ else { +++ try { +++ Type t = sigAttr.getParsedSignature().getType(constant_pool); +++ print(t); +++ } catch (ConstantPoolException e) { +++ // report error? +++ // fall back on non-generic descriptor +++ print(getFieldType(f.descriptor)); +++ } +++ } +++ print(" "); +++ print(getFieldName(f)); +++ print(";"); +++ println(); +++ +++ if (options.showInternalSignatures) +++ println(" Signature: " + getValue(f.descriptor)); +++ +++ if (options.verbose && !options.compat) +++ writeList(" flags: ", flags.getFieldFlags(), NEWLINE); +++ +++ if (options.showAllAttrs) { +++ for (Attribute attr: f.attributes) +++ attrWriter.write(f, attr, constant_pool); +++ println(); +++ } +++ +++ if (options.showDisassembled || options.showLineAndLocalVariableTables) +++ println(); +++ } +++ +++ void writeMethods() { +++ for (Method m: classFile.methods) +++ writeMethod(m); +++ } +++ +++ void writeMethod(Method m) { +++ if (!options.checkAccess(m.access_flags)) +++ return; +++ +++ method = m; +++ +++ if (!(options.showLineAndLocalVariableTables +++ || options.showDisassembled +++ || options.verbose +++ || options.showInternalSignatures +++ || options.showAllAttrs)) { +++ print(" "); +++ } +++ +++ AccessFlags flags = m.access_flags; +++ +++ Descriptor d; +++ Type.MethodType methodType; +++ List methodExceptions; +++ +++ Signature_attribute sigAttr = getSignature(m.attributes); +++ if (sigAttr == null) { +++ d = m.descriptor; +++ methodType = null; +++ methodExceptions = null; +++ } else { +++ Signature methodSig = sigAttr.getParsedSignature(); +++ d = methodSig; +++ try { +++ methodType = (Type.MethodType) methodSig.getType(constant_pool); +++ methodExceptions = methodType.throwsTypes; +++ if (methodExceptions != null && methodExceptions.size() == 0) +++ methodExceptions = null; +++ } catch (ConstantPoolException e) { +++ // report error? +++ // fall back on standard descriptor +++ methodType = null; +++ methodExceptions = null; +++ } +++ } +++ +++ writeModifiers(flags.getMethodModifiers()); +++ if (methodType != null) { +++ writeListIfNotEmpty("<", methodType.typeArgTypes, "> "); +++ } +++ if (getName(m).equals("")) { +++ print(getJavaName(classFile)); +++ print(getParameterTypes(d, flags)); +++ } else if (getName(m).equals("")) { +++ print("{}"); +++ } else { +++ print(getReturnType(d)); +++ print(" "); +++ print(getName(m)); +++ print(getParameterTypes(d, flags)); +++ } +++ +++ Attribute e_attr = m.attributes.get(Attribute.Exceptions); +++ if (e_attr != null) { // if there are generic exceptions, there must be erased exceptions +++ if (e_attr instanceof Exceptions_attribute) { +++ Exceptions_attribute exceptions = (Exceptions_attribute) e_attr; +++ if (options.compat) { // Bug XXXXXXX whitespace +++ if (!(options.showLineAndLocalVariableTables +++ || options.showDisassembled +++ || options.verbose +++ || options.showInternalSignatures +++ || options.showAllAttrs)) { +++ print(" "); +++ } +++ print(" "); +++ } +++ print(" throws "); +++ if (methodExceptions != null) { // use generic list if available +++ writeList("", methodExceptions, ""); +++ } else { +++ for (int i = 0; i < exceptions.number_of_exceptions; i++) { +++ if (i > 0) +++ print(", "); +++ print(attrWriter.getJavaException(exceptions, i)); +++ } +++ } +++ } else { +++ report("Unexpected or invalid value for Exceptions attribute"); +++ } +++ } +++ +++ print(";"); +++ println(); +++ +++ if (options.showInternalSignatures) +++ println(" Signature: " + getValue(m.descriptor)); +++ +++ if (options.verbose && !options.compat) +++ writeList(" flags: ", flags.getMethodFlags(), NEWLINE); +++ +++ Code_attribute code = null; +++ Attribute c_attr = m.attributes.get(Attribute.Code); +++ if (c_attr != null) { +++ if (c_attr instanceof Code_attribute) +++ code = (Code_attribute) c_attr; +++ else +++ report("Unexpected or invalid value for Code attribute"); +++ } +++ +++ if (options.showDisassembled && !options.showAllAttrs) { +++ if (code != null) { +++ println(" Code:"); +++ codeWriter.writeInstrs(code); +++ codeWriter.writeExceptionTable(code); +++ } +++ println(); +++ } +++ +++ if (options.showLineAndLocalVariableTables) { +++ if (code != null) +++ attrWriter.write(code, code.attributes.get(Attribute.LineNumberTable), constant_pool); +++ println(); +++ if (code != null) +++ attrWriter.write(code, code.attributes.get(Attribute.LocalVariableTable), constant_pool); +++ println(); +++ println(); +++ } +++ +++ if (options.showAllAttrs) { +++ Attribute[] attrs = m.attributes.attrs; +++ for (Attribute attr: attrs) +++ attrWriter.write(m, attr, constant_pool); +++ +++// // the following condition is to mimic old javap +++// if (!(attrs.length > 0 && +++// attrs[attrs.length - 1] instanceof Exceptions_attribute)) +++ println(); +++ } +++ } +++ +++ void writeModifiers(Collection items) { +++ for (Object item: items) { +++ print(item); +++ print(" "); +++ } +++ } +++ +++ void writeList(String prefix, Collection items, String suffix) { +++ print(prefix); +++ String sep = ""; +++ for (Object item: items) { +++ print(sep); +++ print(item); +++ sep = ", "; +++ } +++ print(suffix); +++ } +++ +++ void writeListIfNotEmpty(String prefix, List items, String suffix) { +++ if (items != null && items.size() > 0) +++ writeList(prefix, items, suffix); +++ } +++ +++ Signature_attribute getSignature(Attributes attributes) { +++ if (options.compat) // javap does not recognize recent attributes +++ return null; +++ return (Signature_attribute) attributes.get(Attribute.Signature); +++ } +++ +++ String adjustVarargs(AccessFlags flags, String params) { +++ if (flags.is(ACC_VARARGS) && !options.compat) { +++ int i = params.lastIndexOf("[]"); +++ if (i > 0) +++ return params.substring(0, i) + "..." + params.substring(i+2); +++ } +++ +++ return params; +++ } +++ +++ String getJavaName(ClassFile cf) { +++ try { +++ return getJavaName(cf.getName()); +++ } catch (ConstantPoolException e) { +++ return report(e); +++ } +++ } +++ +++ String getJavaSuperclassName(ClassFile cf) { +++ try { +++ return getJavaName(cf.getSuperclassName()); +++ } catch (ConstantPoolException e) { +++ return report(e); +++ } +++ } +++ +++ String getJavaInterfaceName(ClassFile cf, int index) { +++ try { +++ return getJavaName(cf.getInterfaceName(index)); +++ } catch (ConstantPoolException e) { +++ return report(e); +++ } +++ } +++ +++ String getFieldType(Descriptor d) { +++ try { +++ return d.getFieldType(constant_pool); +++ } catch (ConstantPoolException e) { +++ return report(e); +++ } catch (DescriptorException e) { +++ return report(e); +++ } +++ } +++ +++ String getReturnType(Descriptor d) { +++ try { +++ return d.getReturnType(constant_pool); +++ } catch (ConstantPoolException e) { +++ return report(e); +++ } catch (DescriptorException e) { +++ return report(e); +++ } +++ } +++ +++ String getParameterTypes(Descriptor d, AccessFlags flags) { +++ try { +++ return adjustVarargs(flags, d.getParameterTypes(constant_pool)); +++ } catch (ConstantPoolException e) { +++ return report(e); +++ } catch (DescriptorException e) { +++ return report(e); +++ } +++ } +++ +++ String getValue(Descriptor d) { +++ try { +++ return d.getValue(constant_pool); +++ } catch (ConstantPoolException e) { +++ return report(e); +++ } +++ } +++ +++ String getFieldName(Field f) { +++ try { +++ return f.getName(constant_pool); +++ } catch (ConstantPoolException e) { +++ return report(e); +++ } +++ } +++ +++ String getName(Method m) { +++ try { +++ return m.getName(constant_pool); +++ } catch (ConstantPoolException e) { +++ return report(e); +++ } +++ } +++ +++ static String getJavaName(String name) { +++ return name.replace('/', '.'); +++ } +++ +++ String getSourceFile(SourceFile_attribute attr) { +++ try { +++ return attr.getSourceFile(constant_pool); +++ } catch (ConstantPoolException e) { +++ return report(e); +++ } +++ } +++ +++ private Options options; +++ private AttributeWriter attrWriter; +++ private CodeWriter codeWriter; +++ private ConstantWriter constantWriter; +++ private ClassFile classFile; +++ private ConstantPool constant_pool; +++ private Method method; +++ private static final String NEWLINE = System.getProperty("line.separator", "\n"); +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/javap/CodeWriter.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/CodeWriter.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,344 @@ +++/* +++ * Copyright 2007 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.javap; +++ +++import com.sun.tools.classfile.AccessFlags; +++import com.sun.tools.classfile.Code_attribute; +++import com.sun.tools.classfile.ConstantPool; +++import com.sun.tools.classfile.ConstantPoolException; +++import com.sun.tools.classfile.DescriptorException; +++import com.sun.tools.classfile.Method; +++ +++import static com.sun.tools.classfile.OpCodes.*; +++ +++/* +++ * Write the contents of a Code attribute. +++ * +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++class CodeWriter extends BasicWriter { +++ static CodeWriter instance(Context context) { +++ CodeWriter instance = context.get(CodeWriter.class); +++ if (instance == null) +++ instance = new CodeWriter(context); +++ return instance; +++ } +++ +++ protected CodeWriter(Context context) { +++ super(context); +++ context.put(CodeWriter.class, this); +++ attrWriter = AttributeWriter.instance(context); +++ classWriter = ClassWriter.instance(context); +++ constantWriter = ConstantWriter.instance(context); +++ } +++ +++ void write(Code_attribute attr, ConstantPool constant_pool) { +++ println(" Code:"); +++ writeVerboseHeader(attr, constant_pool); +++ writeInstrs(attr); +++ writeExceptionTable(attr); +++ attrWriter.write(attr, attr.attributes, constant_pool); +++ } +++ +++ public void writeVerboseHeader(Code_attribute attr, ConstantPool constant_pool) { +++ Method method = classWriter.getMethod(); +++ String argCount; +++ try { +++ int n = method.descriptor.getParameterCount(constant_pool); +++ if (!method.access_flags.is(AccessFlags.ACC_STATIC)) +++ ++n; // for 'this' +++ argCount = Integer.toString(n); +++ } catch (ConstantPoolException e) { +++ argCount = report(e); +++ } catch (DescriptorException e) { +++ argCount = report(e); +++ } +++ +++ println(" Stack=" + attr.max_stack + +++ ", Locals=" + attr.max_locals + +++ ", Args_size=" + argCount); +++ +++ } +++ +++ public void writeInstrs(Code_attribute attr) { +++ try { +++ for (int pc = 0; pc < attr.code_length;) { +++ print(" " + pc + ":\t"); +++ pc += writeInstr(attr, pc); +++ println(); +++ } +++ } catch (Code_attribute.InvalidIndex e) { +++ println(report(e)); +++ } +++ } +++ +++ public int writeInstr(Code_attribute attr, int pc) +++ throws Code_attribute.InvalidIndex { +++ String lP = ""; +++ int opcode = attr.getUnsignedByte(pc); +++ int opcode2; +++ String mnem; +++ switch (opcode) { +++ case opc_nonpriv: +++ case opc_priv: { +++ opcode2 = attr.getUnsignedByte(pc + 1); +++ mnem = opcName((opcode << 8) + opcode2); +++ if (mnem == null) { +++ mnem = opcName(opcode) + " " + opcode2; +++ } +++ print(mnem); +++ return 2; +++ } +++ case opc_wide: { +++ opcode2 = attr.getUnsignedByte(pc + 1); +++ mnem = opcName((opcode << 8) + opcode2); +++ if (mnem == null) { +++ print("bytecode " + opcode); +++ return 1; +++ } +++ print(mnem + " " + attr.getUnsignedShort(pc + 2)); +++ if (opcode2 == opc_iinc) { +++ print(", " + attr.getShort(pc + 4)); +++ return 6; +++ } +++ return 4; +++ } +++ } +++ mnem = opcName(opcode); +++ if (mnem == null) { +++ print("bytecode " + opcode); +++ return 1; +++ } +++ if (opcode > opc_jsr_w) { +++ print("bytecode " + opcode); +++ return 1; +++ } +++ print(opcName(opcode)); +++ switch (opcode) { +++ case opc_aload: +++ case opc_astore: +++ case opc_fload: +++ case opc_fstore: +++ case opc_iload: +++ case opc_istore: +++ case opc_lload: +++ case opc_lstore: +++ case opc_dload: +++ case opc_dstore: +++ case opc_ret: +++ print("\t" + attr.getUnsignedByte(pc + 1)); +++ return 2; +++ case opc_iinc: +++ print("\t" + attr.getUnsignedByte(pc + 1) + ", " + attr.getByte(pc + 2)); +++ return 3; +++ case opc_tableswitch: +++ { +++ int tb = align(pc + 1); +++ int default_skip = attr.getInt(tb); +++ int low = attr.getInt(tb + 4); +++ int high = attr.getInt(tb + 8); +++ int count = high - low; +++ print("{ //" + low + " to " + high); +++ for (int i = 0; i <= count; i++) { +++ print("\n\t\t" + (i + low) + ": " + lP + (pc + attr.getInt(tb + 12 + 4 * i)) + ";"); +++ } +++ print("\n\t\tdefault: " + lP + (default_skip + pc) + " }"); +++ return tb - pc + 16 + count * 4; +++ } +++ case opc_lookupswitch: +++ { +++ int tb = align(pc + 1); +++ int default_skip = attr.getInt(tb); +++ int npairs = attr.getInt(tb + 4); +++ print("{ //" + npairs); +++ for (int i = 1; i <= npairs; i++) { +++ print("\n\t\t" + attr.getInt(tb + i * 8) + ": " + lP + (pc + attr.getInt(tb + 4 + i * 8)) + ";"); +++ } +++ print("\n\t\tdefault: " + lP + (default_skip + pc) + " }"); +++ return tb - pc + (npairs + 1) * 8; +++ } +++ case opc_newarray: +++ int type = attr.getUnsignedByte(pc + 1); +++ switch (type) { +++ case T_BOOLEAN: +++ print(" boolean"); +++ break; +++ case T_BYTE: +++ print(" byte"); +++ break; +++ case T_CHAR: +++ print(" char"); +++ break; +++ case T_SHORT: +++ print(" short"); +++ break; +++ case T_INT: +++ print(" int"); +++ break; +++ case T_LONG: +++ print(" long"); +++ break; +++ case T_FLOAT: +++ print(" float"); +++ break; +++ case T_DOUBLE: +++ print(" double"); +++ break; +++ case T_CLASS: +++ print(" class"); +++ break; +++ default: +++ print(" BOGUS TYPE:" + type); +++ } +++ return 2; +++ case opc_anewarray: +++ { +++ int index = attr.getUnsignedShort(pc + 1); +++ print("\t#" + index + "; //"); +++ printConstant(index); +++ return 3; +++ } +++ case opc_sipush: +++ print("\t" + attr.getShort(pc + 1)); +++ return 3; +++ case opc_bipush: +++ print("\t" + attr.getByte(pc + 1)); +++ return 2; +++ case opc_ldc: +++ { +++ int index = attr.getUnsignedByte(pc + 1); +++ print("\t#" + index + "; //"); +++ printConstant(index); +++ return 2; +++ } +++ case opc_ldc_w: +++ case opc_ldc2_w: +++ case opc_instanceof: +++ case opc_checkcast: +++ case opc_new: +++ case opc_putstatic: +++ case opc_getstatic: +++ case opc_putfield: +++ case opc_getfield: +++ case opc_invokevirtual: +++ case opc_invokespecial: +++ case opc_invokestatic: +++ { +++ int index = attr.getUnsignedShort(pc + 1); +++ print("\t#" + index + "; //"); +++ printConstant(index); +++ return 3; +++ } +++ case opc_invokeinterface: +++ { +++ int index = attr.getUnsignedShort(pc + 1); +++ int nargs = attr.getUnsignedByte(pc + 3); +++ print("\t#" + index + ", " + nargs + "; //"); +++ printConstant(index); +++ return 5; +++ } +++ case opc_multianewarray: +++ { +++ int index = attr.getUnsignedShort(pc + 1); +++ int dimensions = attr.getUnsignedByte(pc + 3); +++ print("\t#" + index + ", " + dimensions + "; //"); +++ printConstant(index); +++ return 4; +++ } +++ case opc_jsr: +++ case opc_goto: +++ case opc_ifeq: +++ case opc_ifge: +++ case opc_ifgt: +++ case opc_ifle: +++ case opc_iflt: +++ case opc_ifne: +++ case opc_if_icmpeq: +++ case opc_if_icmpne: +++ case opc_if_icmpge: +++ case opc_if_icmpgt: +++ case opc_if_icmple: +++ case opc_if_icmplt: +++ case opc_if_acmpeq: +++ case opc_if_acmpne: +++ case opc_ifnull: +++ case opc_ifnonnull: +++ print("\t" + lP + (pc + attr.getShort(pc + 1))); +++ return 3; +++ case opc_jsr_w: +++ case opc_goto_w: +++ print("\t" + lP + (pc + attr.getInt(pc + 1))); +++ return 5; +++ default: +++ return 1; +++ } +++ } +++ +++ public void writeExceptionTable(Code_attribute attr) { +++ if (attr.exception_table_langth > 0) { +++ println(" Exception table:"); +++ println(" from to target type"); +++ for (int i = 0; i < attr.exception_table.length; i++) { +++ Code_attribute.Exception_data handler = attr.exception_table[i]; +++ printFixedWidthInt(handler.start_pc, 6); +++ printFixedWidthInt(handler.end_pc, 6); +++ printFixedWidthInt(handler.handler_pc, 6); +++ print(" "); +++ int catch_type = handler.catch_type; +++ if (catch_type == 0) { +++ println("any"); +++ } else { +++ print("Class "); +++ println(constantWriter.stringValue(catch_type)); +++ println(""); +++ } +++ } +++ } +++ +++ } +++ +++ private void printConstant(int index) { +++ constantWriter.write(index); +++ } +++ +++ private void printFixedWidthInt(int n, int width) { +++ String s = String.valueOf(n); +++ for (int i = s.length(); i < width; i++) +++ print(" "); +++ print(s); +++ } +++ +++ private static int align(int n) { +++ return (n + 3) & ~3; +++ } +++ +++ private AttributeWriter attrWriter; +++ private ClassWriter classWriter; +++ private ConstantWriter constantWriter; +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/javap/ConstantWriter.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/ConstantWriter.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,352 @@ +++/* +++ * Copyright 2007 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.javap; +++ +++import com.sun.tools.classfile.ClassFile; +++import com.sun.tools.classfile.ConstantPool; +++import com.sun.tools.classfile.ConstantPoolException; +++ +++import static com.sun.tools.classfile.ConstantPool.*; +++ +++/* +++ * Write a constant pool entry. +++ * +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class ConstantWriter extends BasicWriter { +++ static ConstantWriter instance(Context context) { +++ ConstantWriter instance = context.get(ConstantWriter.class); +++ if (instance == null) +++ instance = new ConstantWriter(context); +++ return instance; +++ } +++ +++ protected ConstantWriter(Context context) { +++ super(context); +++ context.put(ConstantWriter.class, this); +++ classWriter = ClassWriter.instance(context); +++ options = Options.instance(context); +++ } +++ +++ void writeConstantPool() { +++ ConstantPool.Visitor v = new ConstantPool.Visitor() { +++ public Integer visitClass(CONSTANT_Class_info info, Void p) { +++ println("#" + info.name_index + ";\t// " + stringValue(info)); +++ return 1; +++ } +++ +++ public Integer visitDouble(CONSTANT_Double_info info, Void p) { +++ println(stringValue(info) + ";"); +++ return 2; +++ } +++ +++ public Integer visitFieldref(CONSTANT_Fieldref_info info, Void p) { +++ println("#" + info.class_index + ".#" + info.name_and_type_index + ";\t// " + stringValue(info)); +++ return 1; +++ } +++ +++ public Integer visitFloat(CONSTANT_Float_info info, Void p) { +++ println(stringValue(info) + ";"); +++ return 1; +++ } +++ +++ public Integer visitInteger(CONSTANT_Integer_info info, Void p) { +++ println(stringValue(info) + ";"); +++ return 1; +++ } +++ +++ public Integer visitInterfaceMethodref(CONSTANT_InterfaceMethodref_info info, Void p) { +++ println("#" + info.class_index + ".#" + info.name_and_type_index + ";\t// " + stringValue(info)); +++ return 1; +++ } +++ +++ public Integer visitLong(CONSTANT_Long_info info, Void p) { +++ println(stringValue(info) + ";"); +++ return 2; +++ } +++ +++ public Integer visitNameAndType(CONSTANT_NameAndType_info info, Void p) { +++ String tab = (options.compat ? "" : "\t"); // BUG 6622232 javap gets whitespace confused +++ println("#" + info.name_index + ":#" + info.type_index + ";" + tab + "// " + stringValue(info)); +++ return 1; +++ } +++ +++ public Integer visitMethodref(CONSTANT_Methodref_info info, Void p) { +++ println("#" + info.class_index + ".#" + info.name_and_type_index + ";\t// " + stringValue(info)); +++ return 1; +++ } +++ +++ public Integer visitString(CONSTANT_String_info info, Void p) { +++ println("#" + info.string_index + ";\t// " + stringValue(info)); +++ return 1; +++ } +++ +++ public Integer visitUtf8(CONSTANT_Utf8_info info, Void p) { +++ println(stringValue(info) + ";"); +++ return 1; +++ } +++ +++ }; +++ println(" Constant pool:"); +++ ConstantPool constant_pool = classWriter.getClassFile().constant_pool; +++ int cpx = 1; +++ while (cpx < constant_pool.size()) { +++ try { +++ CPInfo cpInfo = constant_pool.get(cpx); +++ print("const #" + cpx + " = " + tagName(cpInfo.getTag()) + "\t"); +++ cpx += cpInfo.accept(v, null); +++ } catch (ConstantPool.InvalidIndex ex) { +++ print("const #" + cpx); // should not happen +++ } +++ } +++ } +++ +++ void write(int cpx) { +++ ClassFile classFile = classWriter.getClassFile(); +++ if (cpx == 0) { +++ print("#0"); +++ return; +++ } +++ +++ CPInfo cpInfo; +++ try { +++ cpInfo = classFile.constant_pool.get(cpx); +++ } catch (ConstantPoolException e) { +++ print("#" + cpx); +++ return; +++ } +++ +++ int tag = cpInfo.getTag(); +++ switch (tag) { +++ case CONSTANT_Methodref: +++ case CONSTANT_InterfaceMethodref: +++ case CONSTANT_Fieldref: +++ // simplify references within this class +++ CPRefInfo ref = (CPRefInfo) cpInfo; +++ try { +++ if (ref.class_index == classFile.this_class) +++ cpInfo = classFile.constant_pool.get(ref.name_and_type_index); +++ } catch (ConstantPool.InvalidIndex e) { +++ // ignore, for now +++ } +++ } +++ print(tagName(tag) + " " + stringValue(cpInfo)); +++ } +++ +++ String tagName(int tag) { +++ switch (tag) { +++ case CONSTANT_Utf8: +++ return "Asciz"; +++ case CONSTANT_Integer: +++ return "int"; +++ case CONSTANT_Float: +++ return "float"; +++ case CONSTANT_Long: +++ return "long"; +++ case CONSTANT_Double: +++ return "double"; +++ case CONSTANT_Class: +++ return "class"; +++ case CONSTANT_String: +++ return "String"; +++ case CONSTANT_Fieldref: +++ return "Field"; +++ case CONSTANT_Methodref: +++ return "Method"; +++ case CONSTANT_InterfaceMethodref: +++ return "InterfaceMethod"; +++ case CONSTANT_NameAndType: +++ return "NameAndType"; +++ default: +++ return "unknown tag"; +++ } +++ } +++ +++ String stringValue(int constant_pool_index) { +++ ClassFile classFile = classWriter.getClassFile(); +++ try { +++ return stringValue(classFile.constant_pool.get(constant_pool_index)); +++ } catch (ConstantPool.InvalidIndex e) { +++ return report(e); +++ } +++ } +++ +++ String stringValue(CPInfo cpInfo) { +++ return stringValueVisitor.visit(cpInfo); +++ } +++ +++ StringValueVisitor stringValueVisitor = new StringValueVisitor(); +++ +++ private class StringValueVisitor implements ConstantPool.Visitor { +++ public String visit(CPInfo info) { +++ return info.accept(this, null); +++ } +++ +++ public String visitClass(CONSTANT_Class_info info, Void p) { +++ return getCheckedName(info); +++ } +++ +++ String getCheckedName(CONSTANT_Class_info info) { +++ try { +++ return checkName(info.getName()); +++ } catch (ConstantPoolException e) { +++ return report(e); +++ } +++ } +++ +++ public String visitDouble(CONSTANT_Double_info info, Void p) { +++ return info.value + "d"; +++ } +++ +++ public String visitFieldref(CONSTANT_Fieldref_info info, Void p) { +++ return visitRef(info, p); +++ } +++ +++ public String visitFloat(CONSTANT_Float_info info, Void p) { +++ return info.value + "f"; +++ } +++ +++ public String visitInteger(CONSTANT_Integer_info info, Void p) { +++ return String.valueOf(info.value); +++ } +++ +++ public String visitInterfaceMethodref(CONSTANT_InterfaceMethodref_info info, Void p) { +++ return visitRef(info, p); +++ } +++ +++ public String visitLong(CONSTANT_Long_info info, Void p) { +++ return info.value + "l"; +++ } +++ +++ public String visitNameAndType(CONSTANT_NameAndType_info info, Void p) { +++ return getCheckedName(info) + ":" + getType(info); +++ } +++ +++ String getCheckedName(CONSTANT_NameAndType_info info) { +++ try { +++ return checkName(info.getName()); +++ } catch (ConstantPoolException e) { +++ return report(e); +++ } +++ } +++ +++ String getType(CONSTANT_NameAndType_info info) { +++ try { +++ return info.getType(); +++ } catch (ConstantPoolException e) { +++ return report(e); +++ } +++ } +++ +++ public String visitMethodref(CONSTANT_Methodref_info info, Void p) { +++ return visitRef(info, p); +++ } +++ +++ public String visitString(CONSTANT_String_info info, Void p) { +++ try { +++ ClassFile classFile = classWriter.getClassFile(); +++ int string_index = info.string_index; +++ return stringValue(classFile.constant_pool.getUTF8Info(string_index)); +++ } catch (ConstantPoolException e) { +++ return report(e); +++ } +++ } +++ +++ public String visitUtf8(CONSTANT_Utf8_info info, Void p) { +++ String s = info.value; +++ StringBuilder sb = new StringBuilder(); +++ for (int i = 0; i < s.length(); i++) { +++ char c = s.charAt(i); +++ switch (c) { +++ case '\t': +++ sb.append('\\').append('t'); +++ break; +++ case '\n': +++ sb.append('\\').append('n'); +++ break; +++ case '\r': +++ sb.append('\\').append('r'); +++ break; +++ case '\"': +++ sb.append('\\').append('\"'); +++ break; +++ default: +++ sb.append(c); +++ } +++ } +++ return sb.toString(); +++ } +++ +++ String visitRef(CPRefInfo info, Void p) { +++ String cn = getCheckedClassName(info); +++ String nat; +++ try { +++ nat = stringValue(info.getNameAndTypeInfo()); +++ } catch (ConstantPoolException e) { +++ nat = report(e); +++ } +++ return cn + "." + nat; +++ } +++ +++ String getCheckedClassName(CPRefInfo info) { +++ try { +++ return checkName(info.getClassName()); +++ } catch (ConstantPoolException e) { +++ return report(e); +++ } +++ } +++ } +++ +++ +++ /* If name is a valid binary name, return it; otherwise quote it. */ +++ private static String checkName(String name) { +++ if (name == null) +++ return "null"; +++ +++ int len = name.length(); +++ if (len == 0) +++ return "\"\""; +++ +++ int cc = '/'; +++ int cp; +++ for (int k = 0; k < len; k += Character.charCount(cp)) { +++ cp = name.codePointAt(k); +++ if ((cc == '/' && !Character.isJavaIdentifierStart(cp)) +++ || (cp != '/' && !Character.isJavaIdentifierPart(cp))) { +++ return "\"" + name + "\""; +++ } +++ cc = cp; +++ } +++ +++ return name; +++ } +++ +++ private ClassWriter classWriter; +++ private Options options; +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/javap/Context.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/Context.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,55 @@ +++/* +++ * Copyright 2007 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.javap; +++ +++import java.util.HashMap; +++import java.util.Map; +++ +++/* +++ * Class from which to put/get shared resources. +++ * +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class Context { +++ public Context() { +++ map = new HashMap, Object>(); +++ } +++ +++ @SuppressWarnings("unchecked") +++ public T get(Class key) { +++ return (T) map.get(key); +++ } +++ +++ @SuppressWarnings("unchecked") +++ public T put(Class key, T value) { +++ return (T) map.put(key, value); +++ } +++ +++ Map, Object> map; +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/javap/DisassemblerTool.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/DisassemblerTool.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,150 @@ +++/* +++ * Copyright 2005-2006 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.javap; //javax.tools; +++ +++import java.io.Writer; +++import java.nio.charset.Charset; +++import java.util.Locale; +++import java.util.concurrent.Callable; +++import javax.tools.DiagnosticListener; +++import javax.tools.JavaFileManager; +++import javax.tools.JavaFileObject; +++import javax.tools.OptionChecker; +++import javax.tools.StandardJavaFileManager; +++import javax.tools.Tool; +++ +++/** +++ * This class is intended to be put in javax.tools. +++ * +++ * @see DiagnosticListener +++ * @see Diagnostic +++ * @see JavaFileManager +++ * @since 1.6 +++ * +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public interface DisassemblerTool extends Tool, OptionChecker { +++ +++ /** +++ * Creates a future for a disassembly task with the given +++ * components and arguments. The task might not have +++ * completed as described in the DissemblerTask interface. +++ * +++ *

If a file manager is provided, it must be able to handle all +++ * locations defined in {@link StandardLocation}. +++ * +++ * @param out a Writer for additional output from the compiler; +++ * use {@code System.err} if {@code null} +++ * @param fileManager a file manager; if {@code null} use the +++ * compiler's standard filemanager +++ * @param diagnosticListener a diagnostic listener; if {@code +++ * null} use the compiler's default method for reporting +++ * diagnostics +++ * @param options compiler options, {@code null} means no options +++ * @param classes class names (for annotation processing), {@code +++ * null} means no class names +++ * @param compilationUnits the compilation units to compile, {@code +++ * null} means no compilation units +++ * @return an object representing the compilation +++ * @throws RuntimeException if an unrecoverable error +++ * occurred in a user supplied component. The +++ * {@linkplain Throwable#getCause() cause} will be the error in +++ * user code. +++ * @throws IllegalArgumentException if any of the given +++ * compilation units are of other kind than +++ * {@linkplain JavaFileObject.Kind#SOURCE source} +++ */ +++ DisassemblerTask getTask(Writer out, +++ JavaFileManager fileManager, +++ DiagnosticListener diagnosticListener, +++ Iterable options, +++ Iterable classes); +++ +++ /** +++ * Gets a new instance of the standard file manager implementation +++ * for this tool. The file manager will use the given diagnostic +++ * listener for producing any non-fatal diagnostics. Fatal errors +++ * will be signalled with the appropriate exceptions. +++ * +++ *

The standard file manager will be automatically reopened if +++ * it is accessed after calls to {@code flush} or {@code close}. +++ * The standard file manager must be usable with other tools. +++ * +++ * @param diagnosticListener a diagnostic listener for non-fatal +++ * diagnostics; if {@code null} use the compiler's default method +++ * for reporting diagnostics +++ * @param locale the locale to apply when formatting diagnostics; +++ * {@code null} means the {@linkplain Locale#getDefault() default locale}. +++ * @param charset the character set used for decoding bytes; if +++ * {@code null} use the platform default +++ * @return the standard file manager +++ */ +++ StandardJavaFileManager getStandardFileManager( +++ DiagnosticListener diagnosticListener, +++ Locale locale, +++ Charset charset); +++ +++ /** +++ * Interface representing a future for a disassembly task. The +++ * task has not yet started. To start the task, call +++ * the {@linkplain #call call} method. +++ * +++ *

Before calling the call method, additional aspects of the +++ * task can be configured, for example, by calling the +++ * {@linkplain #setLocale setLocale} method. +++ */ +++ interface DisassemblerTask extends Callable { +++ +++ /** +++ * Set the locale to be applied when formatting diagnostics and +++ * other localized data. +++ * +++ * @param locale the locale to apply; {@code null} means apply no +++ * locale +++ * @throws IllegalStateException if the task has started +++ */ +++ void setLocale(Locale locale); +++ +++ /** +++ * Performs this compilation task. The compilation may only +++ * be performed once. Subsequent calls to this method throw +++ * IllegalStateException. +++ * +++ * @return true if and only all the files compiled without errors; +++ * false otherwise +++ * +++ * @throws RuntimeException if an unrecoverable error occurred +++ * in a user-supplied component. The +++ * {@linkplain Throwable#getCause() cause} will be the error +++ * in user code. +++ * @throws IllegalStateException if called more than once +++ */ +++ Boolean call(); +++ } +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/javap/InternalError.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/InternalError.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,46 @@ +++/* +++ * Copyright 2007 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.javap; +++ +++/** +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class InternalError extends Error { +++ InternalError(Throwable t, Object... args) { +++ super("Internal error", t); +++ this.args = args; +++ } +++ +++ InternalError(Object... args) { +++ super("Internal error"); +++ this.args = args; +++ } +++ +++ public final Object[] args; +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/javap/JavapFileManager.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/JavapFileManager.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,86 @@ +++/* +++ * Copyright 2007 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.javap; +++ +++import java.io.File; +++import java.io.PrintWriter; +++import java.nio.charset.Charset; +++import javax.tools.Diagnostic; +++import javax.tools.DiagnosticListener; +++import javax.tools.JavaFileObject; +++ +++import com.sun.tools.javac.file.JavacFileManager; +++import com.sun.tools.javac.util.Context; +++import com.sun.tools.javac.util.JCDiagnostic; +++ +++/** +++ * javap's implementation of JavaFileManager. +++ * +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++class JavapFileManager extends JavacFileManager { +++ private JavapFileManager(Context context, Charset charset) { +++ super(context, true, charset); +++ } +++ +++ static JavapFileManager create(final DiagnosticListener dl, PrintWriter log, Options options) { +++ Context javac_context = new Context(); +++ +++ if (dl != null) { +++ // Workaround bug 6625520: javac handles missing entries on classpath badly +++ // Ignore spurious errors for missing files +++ DiagnosticListener wrapper = new DiagnosticListener() { +++ public void report(Diagnostic diagnostic) { +++ if (diagnostic instanceof JCDiagnostic) { +++ JCDiagnostic jcd = (JCDiagnostic) diagnostic; +++ if (jcd.getCode().equals("compiler.err.error.reading.file")) { +++ Object[] args = jcd.getArgs(); +++ if (args.length > 0 && args[0] != null && args[0].toString().length() > 0) { +++ File f = new File(args[0].toString()); +++ if (!f.exists()) +++ return; +++ } +++ } +++ +++ } +++ dl.report(diagnostic); +++ } +++ }; +++ javac_context.put(DiagnosticListener.class, wrapper); +++ } +++ +++ javac_context.put(com.sun.tools.javac.util.Log.outKey, log); +++ +++ return new JavapFileManager(javac_context, null); +++ } +++ +++ void setIgnoreSymbolFile(boolean b) { +++ ignoreSymbolFile = b; +++ } +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/javap/JavapTask.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/JavapTask.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,624 @@ +++/* +++ * Copyright 2007 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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-15301 USA. +++ * +++ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.javap; +++ +++import java.io.EOFException; +++import java.io.FileNotFoundException; +++import java.io.IOException; +++import java.io.OutputStream; +++import java.io.PrintWriter; +++import java.io.StringWriter; +++import java.io.Writer; +++import java.text.MessageFormat; +++import java.util.ArrayList; +++import java.util.Arrays; +++import java.util.HashMap; +++import java.util.Iterator; +++import java.util.List; +++import java.util.Locale; +++import java.util.Map; +++import java.util.MissingResourceException; +++import java.util.ResourceBundle; +++ +++import javax.tools.Diagnostic; +++import javax.tools.DiagnosticListener; +++import javax.tools.JavaFileManager; +++import javax.tools.JavaFileObject; +++import javax.tools.StandardJavaFileManager; +++import javax.tools.StandardLocation; +++ +++import com.sun.tools.classfile.*; +++ +++/** +++ * "Main" class for javap, normally accessed from the command line +++ * via Main, or from JSR199 via DisassemblerTool. +++ * +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class JavapTask implements DisassemblerTool.DisassemblerTask { +++ public class BadArgs extends Exception { +++ static final long serialVersionUID = 8765093759964640721L; +++ BadArgs(String key, Object... args) { +++ super(JavapTask.this.getMessage(key, args)); +++ this.key = key; +++ this.args = args; +++ } +++ +++ BadArgs showUsage(boolean b) { +++ showUsage = b; +++ return this; +++ } +++ +++ final String key; +++ final Object[] args; +++ boolean showUsage; +++ } +++ +++ static abstract class Option { +++ Option(boolean hasArg, String... aliases) { +++ this.hasArg = hasArg; +++ this.aliases = aliases; +++ } +++ +++ boolean matches(String opt) { +++ for (String a: aliases) { +++ if (a.equals(opt)) +++ return true; +++ } +++ return false; +++ } +++ +++ boolean ignoreRest() { +++ return false; +++ } +++ +++ abstract void process(JavapTask task, String opt, String arg) throws BadArgs; +++ +++ final boolean hasArg; +++ final String[] aliases; +++ } +++ +++ static Option[] recognizedOptions = { +++ +++ new Option(false, "-help", "--help", "-?") { +++ void process(JavapTask task, String opt, String arg) { +++ task.options.help = true; +++ } +++ }, +++ +++ new Option(false, "-version") { +++ void process(JavapTask task, String opt, String arg) { +++ task.options.version = true; +++ } +++ }, +++ +++ new Option(false, "-fullversion") { +++ void process(JavapTask task, String opt, String arg) { +++ task.options.fullVersion = true; +++ } +++ }, +++ +++ new Option(false, "-v", "-verbose", "-all") { +++ void process(JavapTask task, String opt, String arg) { +++ task.options.verbose = true; +++ task.options.showFlags = true; +++ task.options.showAllAttrs = true; +++ } +++ }, +++ +++ new Option(false, "-l") { +++ void process(JavapTask task, String opt, String arg) { +++ task.options.showLineAndLocalVariableTables = true; +++ } +++ }, +++ +++ new Option(false, "-public") { +++ void process(JavapTask task, String opt, String arg) { +++ task.options.showAccess = AccessFlags.ACC_PUBLIC; +++ } +++ }, +++ +++ new Option(false, "-protected") { +++ void process(JavapTask task, String opt, String arg) { +++ task.options.showAccess = AccessFlags.ACC_PROTECTED; +++ } +++ }, +++ +++ new Option(false, "-package") { +++ void process(JavapTask task, String opt, String arg) { +++ task.options.showAccess = 0; +++ } +++ }, +++ +++ new Option(false, "-p", "-private") { +++ void process(JavapTask task, String opt, String arg) { +++ task.options.showAccess = AccessFlags.ACC_PRIVATE; +++ } +++ }, +++ +++ new Option(false, "-c") { +++ void process(JavapTask task, String opt, String arg) { +++ task.options.showDisassembled = true; +++ } +++ }, +++ +++ new Option(false, "-s") { +++ void process(JavapTask task, String opt, String arg) { +++ task.options.showInternalSignatures = true; +++ } +++ }, +++ +++// new Option(false, "-all") { +++// void process(JavapTask task, String opt, String arg) { +++// task.options.showAllAttrs = true; +++// } +++// }, +++ +++ new Option(false, "-h") { +++ void process(JavapTask task, String opt, String arg) throws BadArgs { +++ throw task.new BadArgs("err.h.not.supported"); +++ } +++ }, +++ +++ new Option(false, "-verify", "-verify-verbose") { +++ void process(JavapTask task, String opt, String arg) throws BadArgs { +++ throw task.new BadArgs("err.verify.not.supported"); +++ } +++ }, +++ +++ new Option(false, "-Xold") { +++ void process(JavapTask task, String opt, String arg) throws BadArgs { +++ // -Xold is only supported as first arg when invoked from +++ // command line; this is handled in Main,main +++ throw task.new BadArgs("err.Xold.not.supported.here"); +++ } +++ }, +++ +++ new Option(false, "-Xnew") { +++ void process(JavapTask task, String opt, String arg) throws BadArgs { +++ // ignore: this _is_ the new version +++ } +++ }, +++ +++ new Option(false, "-XDcompat") { +++ void process(JavapTask task, String opt, String arg) { +++ task.options.compat = true; +++ } +++ }, +++ +++ new Option(false, "-XDjsr277") { +++ void process(JavapTask task, String opt, String arg) { +++ task.options.jsr277 = true; +++ } +++ }, +++ +++ new Option(false, "-XDignore.symbol.file") { +++ void process(JavapTask task, String opt, String arg) { +++ task.options.ignoreSymbolFile = true; +++ } +++ } +++ +++ }; +++ +++ JavapTask() { +++ context = new Context(); +++ options = Options.instance(context); +++ } +++ +++ JavapTask(Writer out, +++ JavaFileManager fileManager, +++ DiagnosticListener diagnosticListener, +++ Iterable options, +++ Iterable classes) { +++ this(); +++ this.log = getPrintWriterForWriter(out); +++ this.fileManager = fileManager; +++ this.diagnosticListener = diagnosticListener; +++ +++ try { +++ handleOptions(options, false); +++ } catch (BadArgs e) { +++ throw new IllegalArgumentException(e.getMessage()); +++ } +++ +++ this.classes = new ArrayList(); +++ for (String classname: classes) { +++ classname.getClass(); // null-check +++ this.classes.add(classname); +++ } +++ } +++ +++ public void setLocale(Locale locale) { +++ if (locale == null) +++ locale = Locale.getDefault(); +++ task_locale = locale; +++ } +++ +++ public void setLog(PrintWriter log) { +++ this.log = log; +++ } +++ +++ public void setLog(OutputStream s) { +++ setLog(getPrintWriterForStream(s)); +++ } +++ +++ private static PrintWriter getPrintWriterForStream(OutputStream s) { +++ return new PrintWriter(s, true); +++ } +++ +++ private static PrintWriter getPrintWriterForWriter(Writer w) { +++ if (w == null) +++ return getPrintWriterForStream(null); +++ else if (w instanceof PrintWriter) +++ return (PrintWriter) w; +++ else +++ return new PrintWriter(w, true); +++ } +++ +++ public void setDiagnosticListener(DiagnosticListener dl) { +++ diagnosticListener = dl; +++ } +++ +++ public void setDiagnosticListener(OutputStream s) { +++ setDiagnosticListener(getDiagnosticListenerForStream(s)); +++ } +++ +++ private DiagnosticListener getDiagnosticListenerForStream(OutputStream s) { +++ return getDiagnosticListenerForWriter(getPrintWriterForStream(s)); +++ } +++ +++ private DiagnosticListener getDiagnosticListenerForWriter(Writer w) { +++ final PrintWriter pw = getPrintWriterForWriter(w); +++ return new DiagnosticListener () { +++ public void report(Diagnostic diagnostic) { +++ if (diagnostic.getKind() == Diagnostic.Kind.ERROR) { +++ pw.print(getMessage("err.prefix")); +++ pw.print(" "); +++ } +++ pw.println(diagnostic.getMessage(null)); +++ } +++ }; +++ } +++ +++ int run(String[] args) { +++ try { +++ handleOptions(args); +++ boolean ok = run(); +++ return ok ? 0 : 1; +++ } catch (BadArgs e) { +++ diagnosticListener.report(createDiagnostic(e.key, e.args)); +++ return 1; +++ } catch (InternalError e) { +++ Object[] e_args; +++ if (e.getCause() == null) +++ e_args = e.args; +++ else { +++ e_args = new Object[e.args.length + 1]; +++ e_args[0] = e.getCause(); +++ System.arraycopy(e.args, 0, e_args, 1, e.args.length); +++ } +++ diagnosticListener.report(createDiagnostic("err.internal.error", e_args)); +++ return 1; +++ } finally { +++ log.flush(); +++ } +++ } +++ +++ public void handleOptions(String[] args) throws BadArgs { +++ handleOptions(Arrays.asList(args), true); +++ } +++ +++ private void handleOptions(Iterable args, boolean allowClasses) throws BadArgs { +++ if (log == null) { +++ log = getPrintWriterForStream(System.out); +++ if (diagnosticListener == null) +++ diagnosticListener = getDiagnosticListenerForStream(System.err); +++ } else { +++ if (diagnosticListener == null) +++ diagnosticListener = getDiagnosticListenerForWriter(log); +++ } +++ +++ +++ if (fileManager == null) +++ fileManager = getDefaultFileManager(diagnosticListener, log); +++ +++ Iterator iter = args.iterator(); +++ if (!iter.hasNext()) +++ options.help = true; +++ +++ while (iter.hasNext()) { +++ String arg = iter.next(); +++ if (arg.startsWith("-")) +++ handleOption(arg, iter); +++ else if (allowClasses) { +++ if (classes == null) +++ classes = new ArrayList(); +++ classes.add(arg); +++ while (iter.hasNext()) +++ classes.add(iter.next()); +++ } else +++ throw new BadArgs("err.unknown.option", arg).showUsage(true); +++ } +++ +++ if (options.ignoreSymbolFile && fileManager instanceof JavapFileManager) +++ ((JavapFileManager) fileManager).setIgnoreSymbolFile(true); +++ +++ if ((classes == null || classes.size() == 0) && +++ !(options.help || options.version || options.fullVersion)) { +++ throw new BadArgs("err.no.classes.specified"); +++ } +++ } +++ +++ private void handleOption(String name, Iterator rest) throws BadArgs { +++ for (Option o: recognizedOptions) { +++ if (o.matches(name)) { +++ if (o.hasArg) { +++ if (rest.hasNext()) +++ o.process(this, name, rest.next()); +++ else +++ throw new BadArgs("err.missing.arg", name).showUsage(true); +++ } else +++ o.process(this, name, null); +++ +++ if (o.ignoreRest()) { +++ while (rest.hasNext()) +++ rest.next(); +++ } +++ return; +++ } +++ } +++ +++ if (fileManager.handleOption(name, rest)) +++ return; +++ +++ throw new BadArgs("err.unknown.option", name).showUsage(true); +++ } +++ +++ public Boolean call() { +++ return run(); +++ } +++ +++ public boolean run() { +++ if (options.help) +++ showHelp(); +++ +++ if (options.version || options.fullVersion) +++ showVersion(options.fullVersion); +++ +++ if (classes == null || classes.size() == 0) +++ return true; +++ +++ context.put(PrintWriter.class, log); +++ ClassWriter classWriter = ClassWriter.instance(context); +++ +++ boolean ok = true; +++ +++ for (String className: classes) { +++ JavaFileObject fo; +++ try { +++ if (className.endsWith(".class")) { +++ if (fileManager instanceof StandardJavaFileManager) { +++ StandardJavaFileManager sfm = (StandardJavaFileManager) fileManager; +++ fo = sfm.getJavaFileObjects(className).iterator().next(); +++ } else { +++ diagnosticListener.report(createDiagnostic("err.not.standard.file.manager", className)); +++ ok = false; +++ continue; +++ } +++ } else { +++ fo = getClassFileObject(className); +++ if (fo == null) { +++ // see if it is an inner class, by replacing dots to $, starting from the right +++ String cn = className; +++ int lastDot; +++ while (fo == null && (lastDot = cn.lastIndexOf(".")) != -1) { +++ cn = cn.substring(0, lastDot) + "$" + cn.substring(lastDot + 1); +++ fo = getClassFileObject(cn); +++ } +++ } +++ if (fo == null) { +++ diagnosticListener.report(createDiagnostic("err.class.not.found", className)); +++ ok = false; +++ continue; +++ } +++ } +++ Attribute.Factory attributeFactory = new Attribute.Factory(); +++ attributeFactory.setCompat(options.compat); +++ attributeFactory.setJSR277(options.jsr277); +++ ClassFile cf = ClassFile.read(fo.openInputStream(), attributeFactory); +++ classWriter.write(cf); +++ } catch (ConstantPoolException e) { +++ diagnosticListener.report(createDiagnostic("err.bad.constant.pool", className, e.getLocalizedMessage())); +++ ok = false; +++ } catch (EOFException e) { +++ diagnosticListener.report(createDiagnostic("err.end.of.file", className)); +++ ok = false; +++ } catch (FileNotFoundException e) { +++ diagnosticListener.report(createDiagnostic("err.file.not.found", e.getLocalizedMessage())); +++ ok = false; +++ } catch (IOException e) { +++ //e.printStackTrace(); +++ Object msg = e.getLocalizedMessage(); +++ if (msg == null) +++ msg = e; +++ diagnosticListener.report(createDiagnostic("err.ioerror", className, msg)); +++ ok = false; +++ } catch (Throwable t) { +++ StringWriter sw = new StringWriter(); +++ PrintWriter pw = new PrintWriter(sw); +++ t.printStackTrace(pw); +++ pw.close(); +++ diagnosticListener.report(createDiagnostic("err.crash", t.toString(), sw.toString())); +++ } +++ } +++ +++ return ok; +++ } +++ +++ private JavaFileManager getDefaultFileManager(final DiagnosticListener dl, PrintWriter log) { +++ return JavapFileManager.create(dl, log, options); +++ } +++ +++ private JavaFileObject getClassFileObject(String className) throws IOException { +++ JavaFileObject fo; +++ fo = fileManager.getJavaFileForInput(StandardLocation.PLATFORM_CLASS_PATH, className, JavaFileObject.Kind.CLASS); +++ if (fo == null) +++ fo = fileManager.getJavaFileForInput(StandardLocation.CLASS_PATH, className, JavaFileObject.Kind.CLASS); +++ return fo; +++ } +++ +++ private void showHelp() { +++ log.println(getMessage("main.usage", progname)); +++ for (Option o: recognizedOptions) { +++ String name = o.aliases[0].substring(1); // there must always be at least one name +++ if (name.startsWith("X") || name.equals("fullversion") || name.equals("h") || name.equals("verify")) +++ continue; +++ log.println(getMessage("main.opt." + name)); +++ } +++ String[] fmOptions = { "-classpath", "-bootclasspath" }; +++ for (String o: fmOptions) { +++ if (fileManager.isSupportedOption(o) == -1) +++ continue; +++ String name = o.substring(1); +++ log.println(getMessage("main.opt." + name)); +++ } +++ +++ } +++ +++ private void showVersion(boolean full) { +++ log.println(version(full ? "full" : "release")); +++ } +++ +++ private static final String versionRBName = "com.sun.tools.javap.resources.version"; +++ private static ResourceBundle versionRB; +++ +++ private String version(String key) { +++ // key=version: mm.nn.oo[-milestone] +++ // key=full: mm.mm.oo[-milestone]-build +++ if (versionRB == null) { +++ try { +++ versionRB = ResourceBundle.getBundle(versionRBName); +++ } catch (MissingResourceException e) { +++ return getMessage("version.resource.missing", System.getProperty("java.version")); +++ } +++ } +++ try { +++ return versionRB.getString(key); +++ } +++ catch (MissingResourceException e) { +++ return getMessage("version.unknown", System.getProperty("java.version")); +++ } +++ } +++ +++ private Diagnostic createDiagnostic(final String key, final Object... args) { +++ return new Diagnostic() { +++ public Kind getKind() { +++ return Diagnostic.Kind.ERROR; +++ } +++ +++ public JavaFileObject getSource() { +++ return null; +++ } +++ +++ public long getPosition() { +++ return Diagnostic.NOPOS; +++ } +++ +++ public long getStartPosition() { +++ return Diagnostic.NOPOS; +++ } +++ +++ public long getEndPosition() { +++ return Diagnostic.NOPOS; +++ } +++ +++ public long getLineNumber() { +++ return Diagnostic.NOPOS; +++ } +++ +++ public long getColumnNumber() { +++ return Diagnostic.NOPOS; +++ } +++ +++ public String getCode() { +++ return key; +++ } +++ +++ public String getMessage(Locale locale) { +++ return JavapTask.this.getMessage(locale, key, args); +++ } +++ +++ }; +++ +++ } +++ +++ private String getMessage(String key, Object... args) { +++ return getMessage(task_locale, key, args); +++ } +++ +++ private String getMessage(Locale locale, String key, Object... args) { +++ if (bundles == null) { +++ // could make this a HashMap> +++ // and for efficiency, keep a hard reference to the bundle for the task +++ // locale +++ bundles = new HashMap(); +++ } +++ +++ if (locale == null) +++ locale = Locale.getDefault(); +++ +++ ResourceBundle b = bundles.get(locale); +++ if (b == null) { +++ try { +++ b = ResourceBundle.getBundle("com.sun.tools.javap.resources.javap", locale); +++ bundles.put(locale, b); +++ } catch (MissingResourceException e) { +++ throw new InternalError("Cannot find javap resource bundle for locale " + locale); +++ } +++ } +++ +++ try { +++ return MessageFormat.format(b.getString(key), args); +++ } catch (MissingResourceException e) { +++ throw new InternalError(e, key); +++ } +++ } +++ +++ Context context; +++ JavaFileManager fileManager; +++ PrintWriter log; +++ DiagnosticListener diagnosticListener; +++ List classes; +++ Options options; +++ //ResourceBundle bundle; +++ Locale task_locale; +++ Map bundles; +++ +++ private static final String progname = "javap"; +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/javap/Main.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/Main.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,68 @@ +++/* +++ * Copyright 2007 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.javap; +++ +++import java.io.PrintWriter; +++ +++/** +++ * Main entry point. +++ * +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class Main { +++ /** +++ * Main entry point for the launcher. +++ * Note: This method calls System.exit. +++ * @param args command line arguments +++ */ +++ public static void main(String[] args) { +++ if (args.length >= 1 && args[0].equals("-Xold")) { +++ String[] nArgs = new String[args.length - 1]; +++ System.arraycopy(args, 1, nArgs, 0, nArgs.length); +++ sun.tools.javap.Main.main(args); // calls System.exit +++ System.exit(1); +++ } +++ +++ JavapTask t = new JavapTask(); +++ int rc = t.run(args); +++ System.exit(rc); +++ } +++ +++ /** +++ * Entry point that does not call System.exit. +++ * @param args command line arguments +++ * @param out output stream +++ * @return an exit code. 0 means success, non-zero means an error occurred. +++ */ +++ public static int run(String[] args, PrintWriter out) { +++ JavapTask t = new JavapTask(); +++ t.setLog(out); +++ return t.run(args); +++ } +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/javap/Options.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/Options.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,84 @@ +++/* +++ * Copyright 2007 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.javap; +++ +++import com.sun.tools.classfile.AccessFlags; +++ +++/* +++ * Provides access to javap's options, set via the command line +++ * or JSR 199 API. +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class Options { +++ public static Options instance(Context context) { +++ Options instance = context.get(Options.class); +++ if (instance == null) +++ instance = new Options(context); +++ return instance; +++ } +++ +++ protected Options(Context context) { +++ context.put(Options.class, this); +++ } +++ +++ /** +++ * Checks access of class, field or method. +++ */ +++ public boolean checkAccess(AccessFlags flags){ +++ +++ boolean isPublic = flags.is(AccessFlags.ACC_PUBLIC); +++ boolean isProtected = flags.is(AccessFlags.ACC_PROTECTED); +++ boolean isPrivate = flags.is(AccessFlags.ACC_PRIVATE); +++ boolean isPackage = !(isPublic || isProtected || isPrivate); +++ +++ if ((showAccess == AccessFlags.ACC_PUBLIC) && (isProtected || isPrivate || isPackage)) +++ return false; +++ else if ((showAccess == AccessFlags.ACC_PROTECTED) && (isPrivate || isPackage)) +++ return false; +++ else if ((showAccess == 0) && (isPrivate)) +++ return false; +++ else +++ return true; +++ } +++ +++ public boolean help; +++ public boolean verbose; +++ public boolean version; +++ public boolean fullVersion; +++ public boolean showFlags; +++ public boolean showLineAndLocalVariableTables; +++ public int showAccess; +++ public boolean showDisassembled; +++ public boolean showInternalSignatures; +++ public boolean showAllAttrs; +++ +++ public boolean compat; // bug-for-bug compatibility mode with old javap +++ public boolean jsr277; +++ public boolean ignoreSymbolFile; // file manager should ignore ct.sym +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/javap/overview.html ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/overview.html Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,10 @@ +++ +++ +++ +++ javap: class file disassembler +++ +++ +++ +++ Javap is a class file disassembler. +++ +++ ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/javap/package.html ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/package.html Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,10 @@ +++ +++ +++ +++ +++ +++ +++ +++ Classes to dump class files in text format. +++ +++ ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/javap/resources/javap.properties ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/resources/javap.properties Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,62 @@ +++ +++err.prefix=Error: +++ +++err.bad.constant.pool=error while reading constant pool for {0}: {1} +++err.class.not.found=class not found: {0} +++err.crash=A serious internal error has occurred: {0}\nPlease file a bug report, and include the following information:\n{1} +++err.end.of.file=unexpected end of file while reading {0} +++err.file.not.found=file not found: {0} +++err.h.not.supported=-h is no longer available - use the 'javah' program +++err.internal.error=internal error: {0} {1} {2} +++err.ioerror=IO error reading {0}: {1} +++err.missing.arg=no value given for {0} +++err.no.classes.specified=no classes specified +++err.not.standard.file.manager=can only specify class files when using a standard file manager +++err.unknown.option=unknown option: {0} +++err.verify.not.supported=-verify not supported +++err.Xold.not.supported.here=-Xold must be given as the first option +++ +++main.usage=\ +++Usage: {0} \n\ +++where possible options include: +++ +++ +++main.opt.help=\ +++\ -help --help -? Print this usage message +++ +++main.opt.version=\ +++\ -version Version information +++ +++main.opt.v=\ +++\ -v -verbose Print additional information +++ +++main.opt.l=\ +++\ -l Print line number and local variable tables +++ +++main.opt.public=\ +++\ -public Show only public classes and members +++ +++main.opt.protected=\ +++\ -protected Show protected/public classes and members +++ +++main.opt.package=\ +++\ -package Show package/protected/public classes\n\ +++\ and members (default) +++ +++main.opt.p=\ +++\ -p -private Show all classes and members +++ +++main.opt.c=\ +++\ -c Disassemble the code +++ +++main.opt.s=\ +++\ -s Print internal type signatures +++ +++main.opt.classpath=\ +++\ -classpath Specify where to find user class files +++ +++main.opt.bootclasspath=\ +++\ -bootclasspath Override location of bootstrap class files +++ +++ +++ ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/com/sun/tools/javap/resources/version.properties-template ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/resources/version.properties-template Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,28 @@ +++# +++# Copyright 2007-2008 Sun Microsystems, Inc. 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. Sun designates this +++# particular file as subject to the "Classpath" exception as provided +++# by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++# CA 95054 USA or visit www.sun.com if you need additional information or +++# have any questions. +++# +++ +++jdk=$(JDK_VERSION) +++full=$(FULL_VERSION) +++release=$(RELEASE) ++diff -r 8e38c8fe0a0b -r bfd7bb421825 src/share/classes/sun/tools/javap/Main.java ++--- openjdk/langtools/src/share/classes/sun/tools/javap/Main.java Fri Oct 04 12:22:34 2013 -0400 +++++ openjdk/langtools/src/share/classes/sun/tools/javap/Main.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -49,6 +49,12 @@ ++ } ++ ++ public static void main(String argv[]) { +++ // unless first arg is -Xold, use new javap +++ if (!(argv.length >= 1 && argv[0].equals("-Xold"))) { +++ com.sun.tools.javap.Main.main(argv); +++ return; +++ } +++ ++ entry(argv); ++ if (errorOccurred) { ++ System.exit(1); ++@@ -178,6 +184,8 @@ ++ } ++ } else if (arg.equals("-all")) { ++ env.showallAttr = true; +++ } else if (arg.equals("-Xold")) { +++ // ignore: this is old javap ++ } else { ++ error("invalid flag: " + arg); ++ usage(); ++diff -r 8e38c8fe0a0b -r bfd7bb421825 test/tools/javap/4870651/T4870651.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/test/tools/javap/4870651/T4870651.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,81 @@ +++/* +++ * Copyright 2008 Sun Microsystems, Inc. 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. +++ * +++ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++/* +++ * @test +++ * @bug 4870651 +++ * @summary javap should recognize generics, varargs, enum +++ * @build T4870651 Test +++ * @run main T4870651 +++ */ +++ +++import java.io.*; +++ +++public class T4870651 { +++ public static void main(String[] args) throws Exception { +++ new T4870651().run(); +++ } +++ +++ public void run() throws IOException { +++ verify("Test", +++ "class Test, U extends java.lang.Comparable>", +++ "v1(java.lang.String...)"); +++ +++ verify("Test$Enum", +++ "flags: ACC_FINAL, ACC_SUPER, ACC_ENUM", +++ "flags: ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_ENUM"); +++ +++ if (errors > 0) +++ throw new Error(errors + " found."); +++ } +++ +++ String javap(String className) { +++ String testClasses = System.getProperty("test.classes", "."); +++ StringWriter sw = new StringWriter(); +++ PrintWriter out = new PrintWriter(sw); +++ String[] args = { "-classpath", testClasses, "-v", className }; +++ int rc = com.sun.tools.javap.Main.run(args, out); +++ if (rc != 0) +++ throw new Error("javap failed. rc=" + rc); +++ out.close(); +++ String output = sw.toString(); +++ System.out.println("class " + className); +++ System.out.println(output); +++ return output; +++ } +++ +++ void verify(String className, String... expects) { +++ String output = javap(className); +++ for (String expect: expects) { +++ if (output.indexOf(expect)< 0) +++ error(expect + " not found"); +++ } +++ } +++ +++ void error(String msg) { +++ System.err.println(msg); +++ errors++; +++ } +++ +++ int errors; +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 test/tools/javap/4870651/Test.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/test/tools/javap/4870651/Test.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,76 @@ +++/* +++ * Copyright 2008 Sun Microsystems, Inc. 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. +++ * +++ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++import java.util.*; +++ +++abstract class Test,U extends Comparable> { +++ T t; +++ +++ Test(T t) { } +++ Test(G g, int i) { } +++ +++ Test(String... args) { } +++ Test(int i, Object[]... args) { } +++ abstract void v1(String... args); +++ abstract void v2(int i, String[]... args); +++ +++ abstract void a1(int x); +++ abstract void a2(int[] x); +++ abstract void a3(T x); +++ abstract void a4(T[] x); +++ +++ abstract int r1(); +++ abstract int[] r2(); +++ abstract T r3(); +++ abstract T[] r4(); +++ +++ abstract void ga1(int x); +++ abstract void ga2(int[] x); +++ abstract void ga3(G x); +++ abstract void ga4(G[] x); +++ +++ abstract int gr1(); +++ abstract int[] gr2(); +++ abstract G gr3(); +++ abstract G[] gr4(); +++ +++ abstract void ge() throws G; +++ +++ abstract void w(List l); +++ abstract void we(List l); +++ abstract void ws(List l); +++ +++ abstract void t1() throws Error; +++ abstract void t2() throws E; +++ abstract void t3() throws E,Error; +++ +++ abstract void i1(Test x); +++ abstract void i3(Test.Inner x); +++ +++ class Inner { } +++ class Inner2 extends Inner { } +++ +++ class Simple { } +++ +++ enum Enum { e1, e2, e3 } +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 test/tools/javap/ListTest.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/test/tools/javap/ListTest.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,147 @@ +++/* +++ * Copyright 2008 Sun Microsystems, Inc. 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. +++ * +++ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++import java.io.*; +++import java.util.*; +++import javax.tools.*; +++ +++/* +++ * @test +++ * @bug 6439940 +++ * @summary Cleanup javap implementation +++ * @run main/othervm ListTest +++ */ +++public class ListTest { +++ public static void main(String[] args) throws Exception { +++ new ListTest().run(); +++ } +++ +++ ListTest() { +++ String v = System.getProperty("view.cmd"); +++ // v = "/opt/teamware/7.7/bin/filemerge -r"; +++ if (v != null) { +++ viewResults = true; +++ viewCmd = Arrays.asList(v.split(" +")); +++ } +++ } +++ +++ void run() throws Exception { +++ StandardLocation[] locs = new StandardLocation[] { +++ StandardLocation.PLATFORM_CLASS_PATH, +++ StandardLocation.CLASS_PATH, +++ }; +++ +++ int count = 0; +++ int pass = 0; +++ for (StandardLocation loc: locs) { +++ for (String testClassName: list(loc)) { +++ count++; +++ if (test(testClassName)) +++ pass++; +++ } +++ } +++ +++ if (pass < count) +++ throw new Error(pass + "/" + count + " test cases passed"); +++ } +++ +++ Iterable list(StandardLocation loc) throws IOException { +++ JavaCompiler compiler = ToolProvider.getSystemJavaCompiler(); +++ StandardJavaFileManager sfm = compiler.getStandardFileManager(null, null, null); +++ Set kinds = Collections.singleton(JavaFileObject.Kind.CLASS); +++ +++ List list = new ArrayList(); +++ for (JavaFileObject fo: sfm.list(loc, testPackage, kinds, true)) { +++ //System.err.println(com.sun.tools.javac.util.Old199.getPath(fo)); +++ list.add(sfm.inferBinaryName(loc, fo)); +++ } +++ return list; +++ } +++ +++ boolean test(String testClassName) throws Exception { +++ String[] args = new String[options.size() + 1]; +++ options.toArray(args); +++ args[args.length - 1] = testClassName; +++ String oldOut = runOldJavap(args); +++ String newOut = runNewJavap(args); +++ boolean ok = oldOut.equals(newOut); +++ System.err.println((ok ? "pass" : "FAIL") + ": " + testClassName); +++ if (!ok && viewResults) +++ view(oldOut, newOut); +++ return ok; +++ } +++ +++ String runOldJavap(String[] args) { +++ //System.err.println("OLD: " + Arrays.asList(args)); +++ PrintStream oldOut = System.out; +++ ByteArrayOutputStream out = new ByteArrayOutputStream(); +++ System.setOut(new PrintStream(out)); +++ try { +++ sun.tools.javap.Main.entry(args); +++ } finally { +++ System.setOut(oldOut); +++ } +++ return out.toString(); +++ } +++ +++ String runNewJavap(String[] args) { +++ String[] nArgs = new String[args.length + 2]; +++ nArgs[0] = "-XDcompat"; +++ nArgs[1] = "-XDignore.symbol.file"; +++ System.arraycopy(args, 0, nArgs, 2, args.length); +++ //System.err.println("NEW: " + Arrays.asList(nArgs)); +++ StringWriter out = new StringWriter(); +++ com.sun.tools.javap.Main.run(nArgs, new PrintWriter(out, true)); +++ return out.toString(); +++ } +++ +++ File write(String text, String suffix) throws IOException { +++ File f = File.createTempFile("ListTest", suffix); +++ FileWriter out = new FileWriter(f); +++ out.write(text); +++ out.close(); +++ return f; +++ } +++ +++ void view(String oldOut, String newOut) throws Exception { +++ File oldFile = write(oldOut, "old"); +++ File newFile = write(newOut, "new"); +++ List cmd = new ArrayList(); +++ cmd.addAll(viewCmd); +++ cmd.add(oldFile.getPath()); +++ cmd.add(newFile.getPath()); +++ Process p = new ProcessBuilder(cmd).redirectErrorStream(true).start(); +++ p.getOutputStream().close(); +++ String line; +++ BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream())); +++ while ((line = in.readLine()) != null) +++ System.err.println(line); +++ in.close(); +++ p.waitFor(); +++ } +++ +++ String testPackage = "java.lang"; +++ List options = Arrays.asList("-v"); +++ boolean viewResults; +++ List viewCmd; +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 test/tools/javap/OptionTest.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/test/tools/javap/OptionTest.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,143 @@ +++/* +++ * Copyright 2007 Sun Microsystems, Inc. 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. +++ * +++ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++import java.io.*; +++import java.util.*; +++ +++/* +++ * @test +++ * @bug 6439940 +++ * @summary Cleanup javap implementation +++ * @run main/othervm OptionTest +++ */ +++public class OptionTest { +++ public static void main(String[] args) throws Exception { +++ new OptionTest().run(); +++ } +++ +++ OptionTest() { +++ String v = System.getProperty("view.cmd"); +++ if (v != null) { +++ viewResults = true; +++ viewCmd = Arrays.asList(v.split(" +")); +++ } +++ } +++ +++ +++ void run() throws Exception { +++ int count = 0; +++ int pass = 0; +++ // try combinations of options and compare old javap against new javap +++ for (int i = 0; i < (1<<8); i++) { +++ List options = new ArrayList(); +++ if ((i & 0x01) != 0) +++ options.add("-c"); +++ if ((i & 0x02) != 0) +++ options.add("-l"); +++ if ((i & 0x04) != 0) +++ options.add("-public"); +++ if ((i & 0x08) != 0) +++ options.add("-protected"); +++ if ((i & 0x10) != 0) +++ options.add("-package"); +++ if ((i & 0x20) != 0) +++ options.add("-private"); +++ if ((i & 0x40) != 0) +++ options.add("-s"); +++ if ((i & 0x80) != 0) +++ options.add("-verbose"); +++ count++; +++ if (test(options)) +++ pass++; +++ } +++ +++ if (pass < count) +++ throw new Error(pass + "/" + count + " test cases passed"); +++ } +++ +++ boolean test(List options) throws Exception { +++ String[] args = new String[options.size() + 1]; +++ options.toArray(args); +++ args[args.length - 1] = testClassName; +++ String oldOut = runOldJavap(args); +++ String newOut = runNewJavap(args); +++ boolean ok = oldOut.equals(newOut); +++ System.err.println((ok ? "pass" : "FAIL") + ": " + options); +++ if (!ok && viewResults) +++ view(oldOut, newOut); +++ return ok; +++ } +++ +++ String runOldJavap(String[] args) { +++ //System.err.println("OLD: " + Arrays.asList(args)); +++ PrintStream oldOut = System.out; +++ ByteArrayOutputStream out = new ByteArrayOutputStream(); +++ System.setOut(new PrintStream(out)); +++ try { +++ sun.tools.javap.Main.entry(args); +++ } finally { +++ System.setOut(oldOut); +++ } +++ return out.toString(); +++ } +++ +++ String runNewJavap(String[] args) { +++ String[] nArgs = new String[args.length + 2]; +++ nArgs[0] = "-XDcompat"; +++ nArgs[1] = "-XDignore.symbol.file"; +++ System.arraycopy(args, 0, nArgs, 2, args.length); +++ //System.err.println("NEW: " + Arrays.asList(nArgs)); +++ StringWriter out = new StringWriter(); +++ com.sun.tools.javap.Main.run(nArgs, new PrintWriter(out, true)); +++ return out.toString(); +++ } +++ +++ File write(String text, String suffix) throws IOException { +++ File f = File.createTempFile("OptionTest", suffix); +++ FileWriter out = new FileWriter(f); +++ out.write(text); +++ out.close(); +++ return f; +++ } +++ +++ void view(String oldOut, String newOut) throws Exception { +++ File oldFile = write(oldOut, "old"); +++ File newFile = write(newOut, "new"); +++ List cmd = new ArrayList(); +++ cmd.addAll(viewCmd); +++ cmd.add(oldFile.getPath()); +++ cmd.add(newFile.getPath()); +++ Process p = new ProcessBuilder(cmd).redirectErrorStream(true).start(); +++ p.getOutputStream().close(); +++ String line; +++ BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream())); +++ while ((line = in.readLine()) != null) +++ System.err.println(line); +++ in.close(); +++ p.waitFor(); +++ } +++ +++ String testClassName = "java.lang.SecurityManager"; +++ boolean viewResults; +++ List viewCmd; +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 test/tools/javap/T4075403.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/test/tools/javap/T4075403.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,73 @@ +++/* +++ * Copyright 2008 Sun Microsystems, Inc. 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. +++ * +++ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++/* +++ * @test +++ * @bug 4075403 +++ * @summary Use javap to inquire about a specific inner class +++ */ +++ +++ +++import java.io.*; +++ +++public class T4075403 { +++ public static void main(String[] args) throws Exception { +++ new T4075403().run(); +++ } +++ +++ public void run() throws IOException { +++ +++ File javaFile = writeTestFile(); +++ File classFile = compileTestFile(javaFile); +++ javap("Outer.Inner"); +++ } +++ +++ File writeTestFile() throws IOException { +++ File f = new File("Outer.java"); +++ PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(f))); +++ out.println("class Outer { "); +++ out.println(" class Inner { }"); +++ out.println("}"); +++ out.close(); +++ return f; +++ } +++ +++ File compileTestFile(File f) { +++ int rc = com.sun.tools.javac.Main.compile(new String[] { "-g", f.getPath() }); +++ if (rc != 0) +++ throw new Error("compilation failed. rc=" + rc); +++ String path = f.getPath(); +++ return new File(path.substring(0, path.length() - 5) + ".class"); +++ } +++ +++ String javap(String className) { +++ StringWriter sw = new StringWriter(); +++ PrintWriter out = new PrintWriter(sw); +++ int rc = com.sun.tools.javap.Main.run(new String[] { "-classpath", ".", className }, out); +++ if (rc != 0) +++ throw new Error("javap failed. rc=" + rc); +++ out.close(); +++ System.out.println(sw.toString()); +++ return sw.toString(); +++ } +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 test/tools/javap/T4459541.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/test/tools/javap/T4459541.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,112 @@ +++/* +++ * Copyright 2008 Sun Microsystems, Inc. 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. +++ * +++ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++/* +++ * @test +++ * @bug 4459541 +++ * @summary "javap -l" shows line numbers as signed short; they should be unsigned. +++ */ +++ +++import java.io.*; +++ +++public class T4459541 { +++ public static void main(String[] args) throws Exception { +++ new T4459541().run(); +++ } +++ +++ public void run() throws IOException { +++ File javaFile = writeTestFile(); +++ File classFile = compileTestFile(javaFile); +++ String output = javap(classFile); +++ verify(output); +++ } +++ +++ File writeTestFile() throws IOException { +++ File f = new File("Test.java"); +++ out = new PrintWriter(new BufferedWriter(new FileWriter(f))); +++ println("class Test {"); +++ println("void begin(int i) {"); +++ println("i++;"); +++ println("i++;"); +++ println("}"); +++ while (line < 32750) +++ println("// " + line); +++ println("void before_32767(int i) {"); +++ println("i++;"); +++ println("i++;"); +++ println("}"); +++ while (line < 32768-4) +++ println("// " + line); +++ println("void straddle_32768(int i) {"); +++ while (line < 32768+4) +++ println("i++;"); +++ println("}"); +++ while (line < 65520) +++ println("// " + line); +++ println("void between_32768_and_65536(int i) {"); +++ println("i++;"); +++ println("i++;"); +++ println("}"); +++ while (line < 65536-4) +++ println("// " + line); +++ println("void straddle_65536(int i) {"); +++ while (line < 65536+4) +++ println("i++;"); +++ println("}"); +++ println("}"); +++ out.close(); +++ return f; +++ } +++ +++ File compileTestFile(File f) { +++ int rc = com.sun.tools.javac.Main.compile(new String[] { f.getPath() }); +++ if (rc != 0) +++ throw new Error("compilation failed. rc=" + rc); +++ String path = f.getPath(); +++ return new File(path.substring(0, path.length() - 5) + ".class"); +++ } +++ +++ String javap(File f) { +++ StringWriter sw = new StringWriter(); +++ PrintWriter out = new PrintWriter(sw); +++ int rc = com.sun.tools.javap.Main.run(new String[] { "-l", f.getPath() }, out); +++ if (rc != 0) +++ throw new Error("javap failed. rc=" + rc); +++ out.close(); +++ return sw.toString(); +++ } +++ +++ void verify(String output) { +++ System.out.println(output); +++ if (output.indexOf("-") >= 0) +++ throw new Error("- found in output"); +++ } +++ +++ void println(String text) { +++ out.println(text); +++ line++; +++ } +++ +++ PrintWriter out; +++ int line = 1; +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 test/tools/javap/T4501660.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/test/tools/javap/T4501660.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,76 @@ +++/* +++ * Copyright 2008 Sun Microsystems, Inc. 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. +++ * +++ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++/* +++ * @test +++ * @bug 4501660 +++ * @summary change diagnostic of -help as 'print this help message and exit' +++ * (actually, verify -help does not cause premature exit) +++ */ +++ +++import java.io.*; +++import java.util.zip.*; +++ +++public class T4501660 { +++ public static void main(String[] args) throws Exception { +++ new T4501660().run(); +++ } +++ +++ public void run() throws IOException { +++ String testClasses = System.getProperty("test.classes", "."); +++ String output = javap("-classpath", testClasses, "-help", "T4501660"); +++ verify(output, +++ "-public", "-protected", "-private", // check -help output is present +++ "class T4501660" // check class output is present +++ ); +++ +++ if (errors > 0) +++ throw new Error(errors + " found."); +++ } +++ +++ String javap(String... args) { +++ StringWriter sw = new StringWriter(); +++ PrintWriter out = new PrintWriter(sw); +++ //sun.tools.javap.Main.entry(args); +++ int rc = com.sun.tools.javap.Main.run(args, out); +++ if (rc != 0) +++ throw new Error("javap failed. rc=" + rc); +++ out.close(); +++ System.out.println(sw); +++ return sw.toString(); +++ } +++ +++ void verify(String output, String... expects) { +++ for (String expect: expects) { +++ if (output.indexOf(expect)< 0) +++ error(expect + " not found"); +++ } +++ } +++ +++ void error(String msg) { +++ System.err.println(msg); +++ errors++; +++ } +++ +++ int errors; +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 test/tools/javap/T4876942.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/test/tools/javap/T4876942.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,70 @@ +++/* +++ * Copyright 2008 Sun Microsystems, Inc. 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. +++ * +++ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++/* +++ * @test +++ * @bug 4876942 +++ * @summary javap invoked without args does not print help screen +++ */ +++ +++import java.io.*; +++import java.util.zip.*; +++ +++public class T4876942 { +++ public static void main(String[] args) throws Exception { +++ new T4876942().run(); +++ } +++ +++ public void run() throws IOException { +++ String output = javap(); +++ verify(output, "-public", "-protected", "-private"); // check that some of the options are listed +++ +++ if (errors > 0) +++ throw new Error(errors + " found."); +++ } +++ +++ String javap(String... args) { +++ StringWriter sw = new StringWriter(); +++ PrintWriter out = new PrintWriter(sw); +++ //sun.tools.javap.Main.entry(args); +++ int rc = com.sun.tools.javap.Main.run(args, out); +++ if (rc != 0) +++ throw new Error("javap failed. rc=" + rc); +++ out.close(); +++ return sw.toString(); +++ } +++ +++ void verify(String output, String... expects) { +++ for (String expect: expects) { +++ if (output.indexOf(expect)< 0) +++ error(expect + " not found"); +++ } +++ } +++ +++ void error(String msg) { +++ System.err.println(msg); +++ errors++; +++ } +++ +++ int errors; +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 test/tools/javap/T4880663.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/test/tools/javap/T4880663.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,88 @@ +++/* +++ * Copyright 2008 Sun Microsystems, Inc. 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. +++ * +++ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++/* +++ * @test +++ * @bug 4880663 +++ * @summary javap could output whitespace between class name and opening brace +++ */ +++ +++ +++import java.io.*; +++ +++public class T4880663 { +++ public static void main(String[] args) throws Exception { +++ new T4880663().run(); +++ } +++ +++ public void run() throws IOException { +++ File javaFile = writeTestFile(); +++ File classFile = compileTestFile(javaFile); +++ verify(classFile, "class Test {"); +++ +++ if (errors > 0) +++ throw new Error(errors + " found."); +++ } +++ +++ File writeTestFile() throws IOException { +++ File f = new File("Test.java"); +++ PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(f))); +++ out.println("class Test { }"); +++ out.close(); +++ return f; +++ } +++ +++ File compileTestFile(File f) { +++ int rc = com.sun.tools.javac.Main.compile(new String[] { "-g", f.getPath() }); +++ if (rc != 0) +++ throw new Error("compilation failed. rc=" + rc); +++ String path = f.getPath(); +++ return new File(path.substring(0, path.length() - 5) + ".class"); +++ } +++ +++ String javap(File classFile) { +++ StringWriter sw = new StringWriter(); +++ PrintWriter out = new PrintWriter(sw); +++ int rc = com.sun.tools.javap.Main.run(new String[] { classFile.getPath() }, out); +++ if (rc != 0) +++ throw new Error("javap failed. rc=" + rc); +++ out.close(); +++ System.out.println(sw.toString()); +++ return sw.toString(); +++ } +++ +++ void verify(File classFile, String... expects) { +++ String output = javap(classFile); +++ for (String expect: expects) { +++ if (output.indexOf(expect)< 0) +++ error(expect + " not found"); +++ } +++ } +++ +++ void error(String msg) { +++ System.err.println(msg); +++ errors++; +++ } +++ +++ int errors; +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 test/tools/javap/T4975569.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/test/tools/javap/T4975569.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,94 @@ +++/* +++ * Copyright 2008 Sun Microsystems, Inc. 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. +++ * +++ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++/* +++ * @test +++ * @bug 4975569 6622215 +++ * @summary javap doesn't print new flag bits +++ */ +++ +++import java.io.*; +++import java.util.*; +++ +++public class T4975569 +++{ +++ public static void main(String... args) { +++ new T4975569().run(); +++ } +++ +++ void run() { +++ verify("T4975569$Anno", "flags: ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION"); +++ verify("T4975569$E", "flags: ACC_FINAL, ACC_SUPER, ACC_ENUM"); +++ verify("T4975569$S", "flags: ACC_BRIDGE, ACC_SYNTHETIC", +++ "InnerClasses: \n static"); +++ verify("T4975569$V", "void m(java.lang.String...)", +++ "flags: ACC_VARARGS"); +++ verify("T4975569$Prot", "InnerClasses: \n protected"); +++ //verify("T4975569$Priv", "InnerClasses"); +++ if (errors > 0) +++ throw new Error(errors + " found."); +++ } +++ +++ void verify(String className, String... expects) { +++ String output = javap(className); +++ for (String expect: expects) { +++ if (output.indexOf(expect)< 0) +++ error(expect + " not found"); +++ } +++ } +++ +++ void error(String msg) { +++ System.err.println(msg); +++ errors++; +++ } +++ +++ int errors; +++ +++ String javap(String className) { +++ String testClasses = System.getProperty("test.classes", "."); +++ StringWriter sw = new StringWriter(); +++ PrintWriter out = new PrintWriter(sw); +++ String[] args = { "-v", "-classpath", testClasses, className }; +++ int rc = com.sun.tools.javap.Main.run(args, out); +++ if (rc != 0) +++ throw new Error("javap failed. rc=" + rc); +++ out.close(); +++ String output = sw.toString(); +++ System.out.println("class " + className); +++ System.out.println(output); +++ return output; +++ } +++ +++ List x() { return null; }; +++ +++ class V { void m(String... args) { } } +++ enum E { e; } +++ @interface Anno { } +++ static class S extends T4975569 { +++ ArrayList x() { return null; } +++ } +++ +++ protected class Prot { } +++ //private class Priv { int i; } +++} +++ ++diff -r 8e38c8fe0a0b -r bfd7bb421825 test/tools/javap/T6271787.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/test/tools/javap/T6271787.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,90 @@ +++/* +++ * Copyright 2008 Sun Microsystems, Inc. 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. +++ * +++ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++/* +++ * @test +++ * @bug 6271787 +++ * @summary javap dumps LocalVariableTypeTable attribute in hex, needs to print a table +++ */ +++ +++import java.io.*; +++ +++public class T6271787 { +++ public static void main(String[] args) throws Exception { +++ new T6271787().run(); +++ } +++ +++ public void run() throws IOException { +++ File javaFile = writeTestFile(); +++ File classFile = compileTestFile(javaFile); +++ +++ verify(classFile, +++ "LocalVariableTypeTable:", +++ "0 5 0 this LTest;" // should consider decoding this in javap +++ ); +++ +++ if (errors > 0) +++ throw new Error(errors + " found."); +++ } +++ +++ File writeTestFile() throws IOException { +++ File f = new File("Test.java"); +++ PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(f))); +++ out.println("class Test { }"); +++ out.close(); +++ return f; +++ } +++ +++ File compileTestFile(File f) { +++ int rc = com.sun.tools.javac.Main.compile(new String[] { "-g", f.getPath() }); +++ if (rc != 0) +++ throw new Error("compilation failed. rc=" + rc); +++ String path = f.getPath(); +++ return new File(path.substring(0, path.length() - 5) + ".class"); +++ } +++ +++ String javap(File f) { +++ StringWriter sw = new StringWriter(); +++ PrintWriter out = new PrintWriter(sw); +++ int rc = com.sun.tools.javap.Main.run(new String[] { "-v", f.getPath() }, out); +++ if (rc != 0) +++ throw new Error("javap failed. rc=" + rc); +++ out.close(); +++ return sw.toString(); +++ } +++ +++ void verify(File classFile, String... expects) { +++ String output = javap(classFile); +++ for (String expect: expects) { +++ if (output.indexOf(expect)< 0) +++ error(expect + " not found"); +++ } +++ } +++ +++ void error(String msg) { +++ System.err.println(msg); +++ errors++; +++ } +++ +++ int errors; +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 test/tools/javap/T6474890.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/test/tools/javap/T6474890.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,95 @@ +++/* +++ * Copyright 2008 Sun Microsystems, Inc. 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. +++ * +++ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++/* +++ * @test +++ * @bug 6474890 +++ * @summary javap does not open .zip files in -classpath +++ */ +++ +++import java.io.*; +++import java.util.zip.*; +++ +++public class T6474890 { +++ public static void main(String[] args) throws Exception { +++ new T6474890().run(); +++ } +++ +++ public void run() throws IOException { +++ File classDir = new File("classes"); +++ classDir.mkdir(); +++ +++ String className = "Test"; +++ File javaFile = writeTestFile(className); +++ compileTestFile(classDir, javaFile); +++ +++ File zipFile = zip(classDir, new File(classDir + ".zip")); +++ javap("-classpath", zipFile.getPath(), className); +++ +++ File jarFile = zip(classDir, new File(classDir + ".jar")); +++ javap("-classpath", zipFile.getPath(), className); +++ } +++ +++ File writeTestFile(String name) throws IOException { +++ File f = new File(name + ".java"); +++ PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(f))); +++ out.println("class " + name + " { }"); +++ out.close(); +++ return f; +++ } +++ +++ void compileTestFile(File classDir, File file) { +++ int rc = com.sun.tools.javac.Main.compile( +++ new String[] { "-d", classDir.getPath(), file.getPath() }); +++ if (rc != 0) +++ throw new Error("compilation failed. rc=" + rc); +++ } +++ +++ File zip(File dir, File zipFile) throws IOException { +++ ZipOutputStream zipOut = new ZipOutputStream(new FileOutputStream(zipFile)); +++ for (File file: dir.listFiles()) { +++ if (file.isFile()) { +++ byte[] data = new byte[(int) file.length()]; +++ DataInputStream in = new DataInputStream(new FileInputStream(file)); +++ in.readFully(data); +++ in.close(); +++ zipOut.putNextEntry(new ZipEntry(file.getName())); +++ zipOut.write(data, 0, data.length); +++ zipOut.closeEntry(); +++ } +++ } +++ zipOut.close(); +++ return zipFile; +++ } +++ +++ String javap(String... args) { +++ StringWriter sw = new StringWriter(); +++ PrintWriter out = new PrintWriter(sw); +++ //sun.tools.javap.Main.entry(args); +++ int rc = com.sun.tools.javap.Main.run(args, out); +++ if (rc != 0) +++ throw new Error("javap failed. rc=" + rc); +++ out.close(); +++ return sw.toString(); +++ } +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 test/tools/javap/T6587786.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/test/tools/javap/T6587786.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,52 @@ +++/* +++ * Copyright 2008 Sun Microsystems, Inc. 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. +++ * +++ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++/* +++ * @test +++ * @bug 6587786 +++ * @summary Javap throws error : "ERROR:Could not find " for JRE classes +++ */ +++ +++import java.io.*; +++ +++public class T6587786 { +++ public static void main(String[] args) throws Exception { +++ new T6587786().run(); +++ } +++ +++ public void run() throws IOException { +++ javap("com.sun.javadoc.Doc", "com.sun.crypto.provider.ai"); +++ javap("com.sun.crypto.provider.ai", "com.sun.javadoc.ClassDoc"); +++ } +++ +++ void javap(String... args) { +++ StringWriter sw = new StringWriter(); +++ PrintWriter out = new PrintWriter(sw); +++ //sun.tools.javap.Main.entry(args); +++ int rc = com.sun.tools.javap.Main.run(args, out); +++ if (rc != 0) +++ throw new Error("javap failed. rc=" + rc); +++ out.close(); +++ System.out.println(sw.toString()); +++ } +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 test/tools/javap/T6622216.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/test/tools/javap/T6622216.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,77 @@ +++/* +++ * Copyright 2008 Sun Microsystems, Inc. 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. +++ * +++ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++/* +++ * @test +++ * @bug 6622216 +++ * @summary javap names some attributes incorrectly +++ */ +++ +++import java.io.*; +++ +++public class T6622216 { +++ public static void main(String[] args) throws Exception { +++ new T6622216().run(); +++ } +++ +++ public void run() throws IOException { +++ File javaFile = writeTestFile(); +++ File classFile = compileTestFile(javaFile); +++ String output = javap(classFile); +++ verify(output); +++ } +++ +++ File writeTestFile() throws IOException { +++ File f = new File("Outer.java"); +++ PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(f))); +++ out.println("class Outer {"); +++ out.println(" class Inner { }"); +++ out.println("}"); +++ out.close(); +++ return f; +++ } +++ +++ File compileTestFile(File f) { +++ int rc = com.sun.tools.javac.Main.compile(new String[] { f.getPath() }); +++ if (rc != 0) +++ throw new Error("compilation failed. rc=" + rc); +++ String path = f.getPath(); +++ return new File(path.substring(0, path.length() - 5) + ".class"); +++ } +++ +++ String javap(File f) { +++ StringWriter sw = new StringWriter(); +++ PrintWriter out = new PrintWriter(sw); +++ int rc = com.sun.tools.javap.Main.run(new String[] { "-v", f.getPath() }, out); +++ if (rc != 0) +++ throw new Error("javap failed. rc=" + rc); +++ out.close(); +++ return sw.toString(); +++ } +++ +++ void verify(String output) { +++ System.out.println(output); +++ if (output.indexOf("InnerClasses") == -1) +++ throw new Error("InnerClasses not found in output"); +++ } +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 test/tools/javap/T6622232.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/test/tools/javap/T6622232.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,97 @@ +++/* +++ * Copyright 2008 Sun Microsystems, Inc. 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. +++ * +++ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++/* +++ * @test +++ * @bug 6622232 +++ * @summary javap gets whitespace confused +++ */ +++ +++import java.io.*; +++ +++public class T6622232 { +++ public static void main(String[] args) throws Exception { +++ new T6622232().run(); +++ } +++ +++ public void run() throws IOException { +++ File javaFile = writeTestFile(); +++ File classFile = compileTestFile(javaFile); +++ String output = javap(classFile); +++ +++ // these are all examples of bad whitespace from old javap +++ verifyNot(output, +++ "\\Q Constant value: int 3Deprecated: true\\E", +++ "^Deprecated: true", +++ "\\Q throws java.lang.Exception, java.lang.Error Deprecated: true\\E" +++ ); +++ +++ if (errors > 0) +++ throw new Error(errors + " found."); +++ } +++ +++ File writeTestFile() throws IOException { +++ File f = new File("Test.java"); +++ PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(f))); +++ out.println("class Test { "); +++ out.println(" @Deprecated static final int f1 = 3;"); +++ out.println(" @Deprecated int f2;"); +++ out.println(" @Deprecated void m() throws Exception, Error { }"); +++ out.println("}"); +++ out.close(); +++ return f; +++ } +++ +++ File compileTestFile(File f) { +++ int rc = com.sun.tools.javac.Main.compile(new String[] { "-g", f.getPath() }); +++ if (rc != 0) +++ throw new Error("compilation failed. rc=" + rc); +++ String path = f.getPath(); +++ return new File(path.substring(0, path.length() - 5) + ".class"); +++ } +++ +++ String javap(File f) { +++ StringWriter sw = new StringWriter(); +++ PrintWriter out = new PrintWriter(sw); +++ int rc = com.sun.tools.javap.Main.run(new String[] { "-v", f.getPath() }, out); +++ if (rc != 0) +++ throw new Error("javap failed. rc=" + rc); +++ out.close(); +++ System.out.println(sw.toString()); +++ return sw.toString(); +++ } +++ +++ void verifyNot(String output, String... unexpects) { +++ for (String unexpect: unexpects) { +++ if (output.matches(unexpect)) +++ error(unexpect + " unexpectedly found"); +++ } +++ } +++ +++ void error(String msg) { +++ System.err.println(msg); +++ errors++; +++ } +++ +++ int errors; +++} ++diff -r 8e38c8fe0a0b -r bfd7bb421825 test/tools/javap/T6622260.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/test/tools/javap/T6622260.java Tue Oct 22 01:03:49 2013 +0100 ++@@ -0,0 +1,197 @@ +++/* +++ * Copyright 2008 Sun Microsystems, Inc. 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. +++ * +++ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++/* +++ * @test +++ * @bug 6622260 +++ * @summary javap prints negative bytes incorrectly in hex +++ */ +++ +++import java.io.*; +++ +++public class T6622260 { +++ public static void main(String[] args) throws Exception { +++ new T6622260().run(); +++ } +++ +++ public void run() throws IOException { +++ File javaFile = writeTestFile(); +++ File classFile = compileTestFile(javaFile); +++ modifyClassFile(classFile); +++ String output = javap(classFile); +++ verify(output); +++ } +++ +++ File writeTestFile() throws IOException { +++ File f = new File("Test.java"); +++ PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(f))); +++ out.println("@Deprecated class Test { int f; void m() { } }"); +++ out.close(); +++ return f; +++ } +++ +++ File compileTestFile(File f) { +++ int rc = com.sun.tools.javac.Main.compile(new String[] { f.getPath() }); +++ if (rc != 0) +++ throw new Error("compilation failed. rc=" + rc); +++ String path = f.getPath(); +++ return new File(path.substring(0, path.length() - 5) + ".class"); +++ } +++ +++ void modifyClassFile(File f) throws IOException { +++ String newAttributeName = "NonstandardAttribute"; +++ byte[] newAttributeData = { 0, 1, 2, 127, (byte)128, (byte)129, (byte)254, (byte)255 }; +++ +++ DataInputStream in = new DataInputStream(new FileInputStream(f)); +++ byte[] data = new byte[(int) f.length()]; +++ in.readFully(data); +++ in.close(); +++ +++ in = new DataInputStream(new ByteArrayInputStream(data)); +++ in.skipBytes(4); // magic +++ in.skipBytes(2); // minor +++ in.skipBytes(2); // minor +++ +++ int constantPoolPos = data.length - in.available(); +++ int constant_pool_count = skipConstantPool(in); +++ +++ int flagsPos = data.length - in.available(); +++ in.skipBytes(2); // access_flags +++ in.skipBytes(2); // this_class +++ in.skipBytes(2); // super_class +++ +++ int interfaces_count = in.readUnsignedShort(); +++ in.skipBytes(interfaces_count * 2); +++ +++ int field_count = in.readUnsignedShort(); +++ for (int i = 0; i < field_count; i++) { +++ in.skipBytes(6); // access_flags, name_index, descriptor_index +++ skipAttributes(in); +++ } +++ +++ int method_count = in.readUnsignedShort(); +++ for (int i = 0; i < method_count; i++) { +++ in.skipBytes(6); // access_flags, name_index, descriptor_index +++ skipAttributes(in); +++ } +++ +++ int classAttributesPos = data.length - in.available(); +++ int attributes_count = in.readUnsignedShort(); +++ +++ f.renameTo(new File(f.getPath() + ".BAK")); +++ DataOutputStream out = new DataOutputStream(new FileOutputStream(f)); +++ +++ // copy head +++ out.write(data, 0, constantPoolPos); +++ +++ // copy constant pool, adding in name of new attribute +++ out.writeShort(constant_pool_count + 1); +++ out.write(data, constantPoolPos + 2, flagsPos - constantPoolPos - 2); +++ out.write(1); // CONSTANT_Utf8 +++ out.writeUTF(newAttributeName); +++ +++ // copy flags, class, superclass, interfaces, fields and methods +++ out.write(data, flagsPos, classAttributesPos - flagsPos); +++ +++ // copy class attributes, adding in new attribute +++ out.writeShort(attributes_count + 1); +++ out.write(data, classAttributesPos + 2, data.length - classAttributesPos - 2); +++ out.writeShort(constant_pool_count); // index of new attribute name +++ out.writeInt(newAttributeData.length); +++ out.write(newAttributeData); +++ out.close(); +++ } +++ +++ int skipConstantPool(DataInputStream in) throws IOException { +++ int constant_pool_count = in.readUnsignedShort(); +++ for (int i = 1; i < constant_pool_count; i++) { +++ int tag = in.readUnsignedByte(); +++ switch (tag) { +++ case 1: // CONSTANT_Utf8 +++ int length = in.readUnsignedShort(); +++ in.skipBytes(length); // bytes +++ break; +++ +++ case 3: // CONSTANT_Integer +++ case 4: // CONSTANT_Float +++ in.skipBytes(4); // bytes +++ break; +++ +++ case 5: // CONSTANT_Long +++ case 6: // CONSTANT_Double +++ in.skipBytes(8); // high_bytes, low_bytes +++ break; +++ +++ case 7: // CONSTANT_Class +++ in.skipBytes(2); // name_index +++ break; +++ +++ case 8: // CONSTANT_String +++ in.skipBytes(2); // string_index +++ break; +++ +++ case 9: // CONSTANT_FieldRef +++ case 10: // CONSTANT_Methodref +++ case 11: // CONSTANT_InterfaceMethodref +++ in.skipBytes(4); // class_index, name_and_type_index +++ break; +++ +++ case 12: // CONSTANT_NameAndType +++ in.skipBytes(4); // name_index, descriptor_index +++ break; +++ +++ default: +++ throw new Error("constant pool tag: " + tag); +++ } +++ } +++ return constant_pool_count; +++ } +++ +++ int skipAttributes(DataInputStream in) throws IOException { +++ int attributes_count = in.readUnsignedShort(); +++ for (int i = 0; i < attributes_count; i++) { +++ in.skipBytes(2); // attribute_name_index; +++ int length = in.readInt(); +++ in.skipBytes(length); // info +++ } +++ return attributes_count; +++ } +++ +++ String javap(File f) { +++ StringWriter sw = new StringWriter(); +++ PrintWriter out = new PrintWriter(sw); +++ int rc = com.sun.tools.javap.Main.run(new String[] { "-v", f.getPath() }, out); +++ if (rc != 0) +++ throw new Error("javap failed. rc=" + rc); +++ out.close(); +++ return sw.toString(); +++ } +++ +++ void verify(String output) { +++ System.out.println(output); +++ if (output.indexOf("-") >= 0) +++ throw new Error("- found in output"); +++ if (output.indexOf("FFFFFF") >= 0) +++ throw new Error("FFFFFF found in output"); +++ } +++} +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/4111861-static_fields.patch openjdk-6-6b27-1.12.6/patches/openjdk/4111861-static_fields.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/4111861-static_fields.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/4111861-static_fields.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,280 @@ ++# HG changeset patch ++# User jjg ++# Date 1217887742 25200 ++# Mon Aug 04 15:09:02 2008 -0700 ++# Node ID 6134c146043a3e9dd12ee73ca32ce56ac1c95e3a ++# Parent 17dfaebe23044c48bcd5ed0730ce2358543ac459 ++4111861: static final field contents are not displayed ++Reviewed-by: ksrini ++ ++diff -r 17dfaebe2304 -r 6134c146043a src/share/classes/com/sun/tools/javap/ClassWriter.java ++--- openjdk/langtools/src/share/classes/com/sun/tools/javap/ClassWriter.java Tue May 19 11:43:50 2009 -0700 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/ClassWriter.java Mon Aug 04 15:09:02 2008 -0700 ++@@ -35,6 +35,7 @@ ++ import com.sun.tools.classfile.Code_attribute; ++ import com.sun.tools.classfile.ConstantPool; ++ import com.sun.tools.classfile.ConstantPoolException; +++import com.sun.tools.classfile.ConstantValue_attribute; ++ import com.sun.tools.classfile.Descriptor; ++ import com.sun.tools.classfile.DescriptorException; ++ import com.sun.tools.classfile.Exceptions_attribute; ++@@ -189,6 +190,14 @@ ++ } ++ print(" "); ++ print(getFieldName(f)); +++ if (options.showConstants && !options.compat) { // BUG 4111861 print static final field contents +++ Attribute a = f.attributes.get(Attribute.ConstantValue); +++ if (a instanceof ConstantValue_attribute) { +++ print(" = "); +++ ConstantValue_attribute cv = (ConstantValue_attribute) a; +++ print(getConstantValue(f.descriptor, cv.constantvalue_index)); +++ } +++ } ++ print(";"); ++ println(); ++ ++@@ -485,6 +494,81 @@ ++ } ++ } ++ +++ /** +++ * Get the value of an entry in the constant pool as a Java constant. +++ * Characters and booleans are represented by CONSTANT_Intgere entries. +++ * Character and string values are processed to escape characters outside +++ * the basic printable ASCII set. +++ * @param d the descriptor, giving the expected type of the constant +++ * @param index the index of the value in the constant pool +++ * @return a printable string containing the value of the constant. +++ */ +++ String getConstantValue(Descriptor d, int index) { +++ try { +++ ConstantPool.CPInfo cpInfo = constant_pool.get(index); +++ +++ switch (cpInfo.getTag()) { +++ case ConstantPool.CONSTANT_Integer: { +++ ConstantPool.CONSTANT_Integer_info info = +++ (ConstantPool.CONSTANT_Integer_info) cpInfo; +++ String t = d.getValue(constant_pool); +++ if (t.equals("C")) { // character +++ return getConstantCharValue((char) info.value); +++ } else if (t.equals("Z")) { // boolean +++ return String.valueOf(info.value == 1); +++ } else { // other: assume integer +++ return String.valueOf(info.value); +++ } +++ } +++ +++ case ConstantPool.CONSTANT_String: { +++ ConstantPool.CONSTANT_String_info info = +++ (ConstantPool.CONSTANT_String_info) cpInfo; +++ return getConstantStringValue(info.getString()); +++ } +++ +++ default: +++ return constantWriter.stringValue(cpInfo); +++ } +++ } catch (ConstantPoolException e) { +++ return "#" + index; +++ } +++ } +++ +++ private String getConstantCharValue(char c) { +++ StringBuilder sb = new StringBuilder(); +++ sb.append('\''); +++ sb.append(esc(c, '\'')); +++ sb.append('\''); +++ return sb.toString(); +++ } +++ +++ private String getConstantStringValue(String s) { +++ StringBuilder sb = new StringBuilder(); +++ sb.append("\""); +++ for (int i = 0; i < s.length(); i++) { +++ sb.append(esc(s.charAt(i), '"')); +++ } +++ sb.append("\""); +++ return sb.toString(); +++ } +++ +++ private String esc(char c, char quote) { +++ if (32 <= c && c <= 126 && c != quote) +++ return String.valueOf(c); +++ else switch (c) { +++ case '\b': return "\\b"; +++ case '\n': return "\\n"; +++ case '\t': return "\\t"; +++ case '\f': return "\\f"; +++ case '\r': return "\\r"; +++ case '\\': return "\\\\"; +++ case '\'': return "\\'"; +++ case '\"': return "\\\""; +++ default: return String.format("\\u%04x", (int) c); +++ } +++ } +++ ++ private Options options; ++ private AttributeWriter attrWriter; ++ private CodeWriter codeWriter; ++diff -r 17dfaebe2304 -r 6134c146043a src/share/classes/com/sun/tools/javap/JavapTask.java ++--- openjdk/langtools/src/share/classes/com/sun/tools/javap/JavapTask.java Tue May 19 11:43:50 2009 -0700 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/JavapTask.java Mon Aug 04 15:09:02 2008 -0700 ++@@ -222,6 +222,12 @@ ++ void process(JavapTask task, String opt, String arg) { ++ task.options.ignoreSymbolFile = true; ++ } +++ }, +++ +++ new Option(false, "-constants") { +++ void process(JavapTask task, String opt, String arg) { +++ task.options.showConstants = true; +++ } ++ } ++ ++ }; ++diff -r 17dfaebe2304 -r 6134c146043a src/share/classes/com/sun/tools/javap/Options.java ++--- openjdk/langtools/src/share/classes/com/sun/tools/javap/Options.java Tue May 19 11:43:50 2009 -0700 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/Options.java Mon Aug 04 15:09:02 2008 -0700 ++@@ -77,6 +77,7 @@ ++ public boolean showDisassembled; ++ public boolean showInternalSignatures; ++ public boolean showAllAttrs; +++ public boolean showConstants; ++ ++ public boolean compat; // bug-for-bug compatibility mode with old javap ++ public boolean jsr277; ++diff -r 17dfaebe2304 -r 6134c146043a src/share/classes/com/sun/tools/javap/resources/javap.properties ++--- openjdk/langtools/src/share/classes/com/sun/tools/javap/resources/javap.properties Tue May 19 11:43:50 2009 -0700 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/resources/javap.properties Mon Aug 04 15:09:02 2008 -0700 ++@@ -58,5 +58,9 @@ ++ main.opt.bootclasspath=\ ++ \ -bootclasspath Override location of bootstrap class files ++ +++main.opt.constants=\ +++\ -constants Show static final constants ++ ++ +++ +++ ++diff -r 17dfaebe2304 -r 6134c146043a test/tools/javap/4111861/A.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/test/tools/javap/4111861/A.java Mon Aug 04 15:09:02 2008 -0700 ++@@ -0,0 +1,14 @@ +++class A { +++ public static final int i = 42; +++ public static final boolean b = true; +++ public static final float f = 1.0f; +++ public static final double d = 1.0d; +++ public static final short s = 1; +++ public static final long l = 1l; +++ public static final char cA = 'A'; +++ public static final char c0 = '\u0000'; +++ public static final char cn = '\n'; +++ public static final char cq1 = '\''; +++ public static final char cq2 = '"'; +++ public static final java.lang.String t1 = "abc \u0000 \f\n\r\t'\""; +++} ++diff -r 17dfaebe2304 -r 6134c146043a test/tools/javap/4111861/T4111861.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/test/tools/javap/4111861/T4111861.java Mon Aug 04 15:09:02 2008 -0700 ++@@ -0,0 +1,101 @@ +++/* +++ * Copyright 2008 Sun Microsystems, Inc. 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. +++ * +++ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++import java.io.*; +++ +++/* +++ * @test +++ * @bug 4111861 +++ * @summary static final field contents are not displayed +++ */ +++public class T4111861 { +++ public static void main(String... args) throws Exception { +++ new T4111861().run(); +++ } +++ +++ void run() throws Exception { +++ File testSrc = new File(System.getProperty("test.src", ".")); +++ File a_java = new File(testSrc, "A.java"); +++ javac("-d", ".", a_java.getPath()); +++ +++ String out = javap("-classpath", ".", "-constants", "A"); +++ +++ String a = read(a_java); +++ +++ if (!filter(out).equals(filter(read(a_java)))) { +++ System.out.println(out); +++ throw new Exception("unexpected output"); +++ } +++ } +++ +++ String javac(String... args) throws Exception { +++ StringWriter sw = new StringWriter(); +++ PrintWriter pw = new PrintWriter(sw); +++ int rc = com.sun.tools.javac.Main.compile(args, pw); +++ if (rc != 0) +++ throw new Exception("javac failed, rc=" + rc); +++ return sw.toString(); +++ } +++ +++ String javap(String... args) throws Exception { +++ StringWriter sw = new StringWriter(); +++ PrintWriter pw = new PrintWriter(sw); +++ int rc = com.sun.tools.javap.Main.run(args, pw); +++ if (rc != 0) +++ throw new Exception("javap failed, rc=" + rc); +++ return sw.toString(); +++ } +++ +++ String read(File f) throws IOException { +++ StringBuilder sb = new StringBuilder(); +++ BufferedReader in = new BufferedReader(new FileReader(f)); +++ try { +++ String line; +++ while ((line = in.readLine()) != null) { +++ sb.append(line); +++ sb.append('\n'); +++ } +++ } finally { +++ in.close(); +++ } +++ return sb.toString(); +++ } +++ +++ // return those lines beginning "public static final" +++ String filter(String s) throws IOException { +++ StringBuilder sb = new StringBuilder(); +++ BufferedReader in = new BufferedReader(new StringReader(s)); +++ try { +++ String line; +++ while ((line = in.readLine()) != null) { +++ if (line.indexOf("public static final") > 0) { +++ sb.append(line); +++ sb.append('\n'); +++ } +++ } +++ } finally { +++ in.close(); +++ } +++ return sb.toString(); +++ } +++} +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/4501661-disallow_mixing.patch openjdk-6-6b27-1.12.6/patches/openjdk/4501661-disallow_mixing.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/4501661-disallow_mixing.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/4501661-disallow_mixing.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,222 @@ ++# HG changeset patch ++# User jjg ++# Date 1215565579 25200 ++# Tue Jul 08 18:06:19 2008 -0700 ++# Node ID 8f5d8429b3f18ee4c9820ac1fb597f63c55911f3 ++# Parent 4f38abed863c89ee101a3af495e7293df04a4a0e ++4501661: disallow mixing -public, -private, and -protected options at the same time ++Reviewed-by: ksrini ++ ++diff -r 4f38abed863c -r 8f5d8429b3f1 src/share/classes/com/sun/tools/javap/JavapTask.java ++--- openjdk/langtools/src/share/classes/com/sun/tools/javap/JavapTask.java Sat Aug 08 17:56:37 2009 -0700 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/JavapTask.java Tue Jul 08 18:06:19 2008 -0700 ++@@ -145,24 +145,31 @@ ++ ++ new Option(false, "-public") { ++ void process(JavapTask task, String opt, String arg) { +++ task.options.accessOptions.add(opt); ++ task.options.showAccess = AccessFlags.ACC_PUBLIC; ++ } ++ }, ++ ++ new Option(false, "-protected") { ++ void process(JavapTask task, String opt, String arg) { +++ task.options.accessOptions.add(opt); ++ task.options.showAccess = AccessFlags.ACC_PROTECTED; ++ } ++ }, ++ ++ new Option(false, "-package") { ++ void process(JavapTask task, String opt, String arg) { +++ task.options.accessOptions.add(opt); ++ task.options.showAccess = 0; ++ } ++ }, ++ ++ new Option(false, "-p", "-private") { ++ void process(JavapTask task, String opt, String arg) { +++ if (!task.options.accessOptions.contains("-p") && +++ !task.options.accessOptions.contains("-private")) { +++ task.options.accessOptions.add(opt); +++ } ++ task.options.showAccess = AccessFlags.ACC_PRIVATE; ++ } ++ }, ++@@ -422,6 +429,16 @@ ++ throw new BadArgs("err.unknown.option", arg).showUsage(true); ++ } ++ +++ if (!options.compat && options.accessOptions.size() > 1) { +++ StringBuilder sb = new StringBuilder(); +++ for (String opt: options.accessOptions) { +++ if (sb.length() > 0) +++ sb.append(" "); +++ sb.append(opt); +++ } +++ throw new BadArgs("err.incompatible.options", sb); +++ } +++ ++ if (options.ignoreSymbolFile && fileManager instanceof JavapFileManager) ++ ((JavapFileManager) fileManager).setIgnoreSymbolFile(true); ++ ++diff -r 4f38abed863c -r 8f5d8429b3f1 src/share/classes/com/sun/tools/javap/Options.java ++--- openjdk/langtools/src/share/classes/com/sun/tools/javap/Options.java Sat Aug 08 17:56:37 2009 -0700 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/Options.java Tue Jul 08 18:06:19 2008 -0700 ++@@ -25,6 +25,8 @@ ++ ++ package com.sun.tools.javap; ++ +++import java.util.HashSet; +++import java.util.Set; ++ import com.sun.tools.classfile.AccessFlags; ++ ++ /* ++@@ -74,6 +76,7 @@ ++ public boolean showFlags; ++ public boolean showLineAndLocalVariableTables; ++ public int showAccess; +++ public Set accessOptions = new HashSet(); ++ public boolean showDisassembled; ++ public boolean showInternalSignatures; ++ public boolean showAllAttrs; ++diff -r 4f38abed863c -r 8f5d8429b3f1 src/share/classes/com/sun/tools/javap/resources/javap.properties ++--- openjdk/langtools/src/share/classes/com/sun/tools/javap/resources/javap.properties Sat Aug 08 17:56:37 2009 -0700 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/resources/javap.properties Tue Jul 08 18:06:19 2008 -0700 ++@@ -7,6 +7,7 @@ ++ err.end.of.file=unexpected end of file while reading {0} ++ err.file.not.found=file not found: {0} ++ err.h.not.supported=-h is no longer available - use the 'javah' program +++err.incompatible.options=bad combination of options: {0} ++ err.internal.error=internal error: {0} {1} {2} ++ err.ioerror=IO error reading {0}: {1} ++ err.missing.arg=no value given for {0} ++diff -r 4f38abed863c -r 8f5d8429b3f1 test/tools/javap/T4501661.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/test/tools/javap/T4501661.java Tue Jul 08 18:06:19 2008 -0700 ++@@ -0,0 +1,126 @@ +++/* +++ * Copyright 2008 Sun Microsystems, Inc. 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. +++ * +++ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++import java.io.*; +++import java.util.*; +++ +++/* +++ * @test +++ * @bug 4501661 +++ * @summary disallow mixing -public, -private, and -protected +++ */ +++public class T4501661 { +++ public static void main(String... args) throws Exception { +++ new T4501661().run(); +++ } +++ +++ void run() throws Exception { +++ File javaFile = writeTestFile(); +++ File classFile = compileTestFile(javaFile); +++ boolean[] values = { false, true }; +++ for (boolean priv: values) { +++ for (boolean prot: values) { +++ for (boolean publ: values) { +++ test(priv, prot, publ, classFile); +++ } +++ } +++ } +++ +++ if (errors > 0) +++ throw new Exception(errors + " errors found"); +++ } +++ +++ void test(boolean priv, boolean prot, boolean publ, File classFile) { +++ List args = new ArrayList(); +++ if (priv) +++ args.add("-private"); +++ if (prot) +++ args.add("-protected"); +++ if (publ) +++ args.add("-public"); +++ boolean expectOK = (args.size() <= 1); +++ args.add(classFile.getPath()); +++ String out = javap(args, expectOK); +++ if (out == null) +++ return; +++ if (!priv && !prot && !publ) +++ checkNone(out, "private"); +++ if (prot) +++ checkNone(out, "private", "package"); +++ if (publ) +++ checkNone(out, "private", "package", "protected"); +++ } +++ +++ File writeTestFile() throws IOException { +++ File f = new File("Test.java"); +++ PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(f))); +++ out.println("abstract class Test { "); +++ out.println(" public void public_m() { }"); +++ out.println(" protected void protected_m() { }"); +++ out.println(" private void private_m() { }"); +++ out.println(" void package_m() { }"); +++ out.println("}"); +++ out.close(); +++ return f; +++ } +++ +++ File compileTestFile(File f) { +++ int rc = com.sun.tools.javac.Main.compile(new String[] { "-g", f.getPath() }); +++ if (rc != 0) +++ throw new Error("compilation failed. rc=" + rc); +++ String path = f.getPath(); +++ return new File(path.substring(0, path.length() - 5) + ".class"); +++ } +++ +++ String javap(List args, boolean expectOK) { +++ StringWriter sw = new StringWriter(); +++ PrintWriter pw = new PrintWriter(sw); +++ int rc = com.sun.tools.javap.Main.run(args.toArray(new String[args.size()]), pw); +++ System.err.println(args); +++ System.err.println(sw); +++ if (expectOK) { +++ if (rc == 0) +++ return sw.toString(); +++ else +++ error("javap failed unexpectedly; rc=" + rc + "\n" + sw); +++ } else { +++ if (rc == 0) +++ error("javap succeeded unexpectedly"); +++ } +++ return null; +++ } +++ +++ void checkNone(String log, String... words) { +++ for (String word: words) { +++ if (log.indexOf(word) != -1) +++ error("\"" + word + "\" unexpectedly found in output"); +++ } +++ } +++ +++ void error(String msg) { +++ System.err.println("error: " + msg); +++ errors++; +++ } +++ +++ int errors; +++} +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/4884240-javap_additional_option.patch openjdk-6-6b27-1.12.6/patches/openjdk/4884240-javap_additional_option.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/4884240-javap_additional_option.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/4884240-javap_additional_option.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,288 @@ ++# HG changeset patch ++# User jjg ++# Date 1217897655 25200 ++# Mon Aug 04 17:54:15 2008 -0700 ++# Node ID dca34170f5f80bf30228c12a647b3f1a492b3eeb ++# Parent 6134c146043a3e9dd12ee73ca32ce56ac1c95e3a ++4884240: additional option required for javap ++Reviewed-by: ksrini ++ ++diff -r 6134c146043a -r dca34170f5f8 src/share/classes/com/sun/tools/javap/ClassWriter.java ++--- openjdk/langtools/src/share/classes/com/sun/tools/javap/ClassWriter.java Mon Aug 04 15:09:02 2008 -0700 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/ClassWriter.java Mon Aug 04 17:54:15 2008 -0700 ++@@ -25,6 +25,7 @@ ++ ++ package com.sun.tools.javap; ++ +++import java.net.URI; ++ import java.util.Collection; ++ import java.util.List; ++ ++@@ -46,6 +47,8 @@ ++ import com.sun.tools.classfile.SourceFile_attribute; ++ import com.sun.tools.classfile.Type; ++ +++import java.text.DateFormat; +++import java.util.Date; ++ import static com.sun.tools.classfile.AccessFlags.*; ++ ++ /* ++@@ -73,6 +76,23 @@ ++ constantWriter = ConstantWriter.instance(context); ++ } ++ +++ void setDigest(String name, byte[] digest) { +++ this.digestName = name; +++ this.digest = digest; +++ } +++ +++ void setFile(URI uri) { +++ this.uri = uri; +++ } +++ +++ void setFileSize(int size) { +++ this.size = size; +++ } +++ +++ void setLastModified(long lastModified) { +++ this.lastModified = lastModified; +++ } +++ ++ ClassFile getClassFile() { ++ return classFile; ++ } ++@@ -85,6 +105,32 @@ ++ classFile = cf; ++ constant_pool = classFile.constant_pool; ++ +++ if ((options.sysInfo || options.verbose) && !options.compat) { +++ if (uri != null) { +++ if (uri.getScheme().equals("file")) +++ println("Classfile " + uri.getPath()); +++ else +++ println("Classfile " + uri); +++ } +++ if (lastModified != -1) { +++ Date lm = new Date(lastModified); +++ DateFormat df = DateFormat.getDateInstance(); +++ if (size > 0) { +++ println("Last modified " + df.format(lm) + "; size " + size + " bytes"); +++ } else { +++ println("Last modified " + df.format(lm)); +++ } +++ } else if (size > 0) { +++ println("Size " + size + " bytes"); +++ } +++ if (digestName != null && digest != null) { +++ StringBuilder sb = new StringBuilder(); +++ for (byte b: digest) +++ sb.append(String.format("%02x", b)); +++ println(digestName + " checksum " + sb); +++ } +++ } +++ ++ Attribute sfa = cf.getAttribute(Attribute.SourceFile); ++ if (sfa instanceof SourceFile_attribute) { ++ println("Compiled from \"" + getSourceFile((SourceFile_attribute) sfa) + "\""); ++@@ -574,6 +620,11 @@ ++ private CodeWriter codeWriter; ++ private ConstantWriter constantWriter; ++ private ClassFile classFile; +++ private URI uri; +++ private long lastModified; +++ private String digestName; +++ private byte[] digest; +++ private int size; ++ private ConstantPool constant_pool; ++ private Method method; ++ private static final String NEWLINE = System.getProperty("line.separator", "\n"); ++diff -r 6134c146043a -r dca34170f5f8 src/share/classes/com/sun/tools/javap/JavapTask.java ++--- openjdk/langtools/src/share/classes/com/sun/tools/javap/JavapTask.java Mon Aug 04 15:09:02 2008 -0700 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/JavapTask.java Mon Aug 04 17:54:15 2008 -0700 ++@@ -27,11 +27,15 @@ ++ ++ import java.io.EOFException; ++ import java.io.FileNotFoundException; +++import java.io.FilterInputStream; +++import java.io.InputStream; ++ import java.io.IOException; ++ import java.io.OutputStream; ++ import java.io.PrintWriter; ++ import java.io.StringWriter; ++ import java.io.Writer; +++import java.security.DigestInputStream; +++import java.security.MessageDigest; ++ import java.text.MessageFormat; ++ import java.util.ArrayList; ++ import java.util.Arrays; ++@@ -192,6 +196,12 @@ ++ } ++ }, ++ +++ new Option(false, "-sysinfo") { +++ void process(JavapTask task, String opt, String arg) { +++ task.options.sysInfo = true; +++ } +++ }, +++ ++ new Option(false, "-Xold") { ++ void process(JavapTask task, String opt, String arg) throws BadArgs { ++ // -Xold is only supported as first arg when invoked from ++@@ -457,8 +467,27 @@ ++ Attribute.Factory attributeFactory = new Attribute.Factory(); ++ attributeFactory.setCompat(options.compat); ++ attributeFactory.setJSR277(options.jsr277); ++- ClassFile cf = ClassFile.read(fo.openInputStream(), attributeFactory); +++ +++ InputStream in = fo.openInputStream(); +++ SizeInputStream sizeIn = null; +++ MessageDigest md = null; +++ if (options.sysInfo || options.verbose) { +++ md = MessageDigest.getInstance("MD5"); +++ in = new DigestInputStream(in, md); +++ in = sizeIn = new SizeInputStream(in); +++ } +++ +++ ClassFile cf = ClassFile.read(in, attributeFactory); +++ +++ if (options.sysInfo || options.verbose) { +++ classWriter.setFile(fo.toUri()); +++ classWriter.setLastModified(fo.getLastModified()); +++ classWriter.setDigest("MD5", md.digest()); +++ classWriter.setFileSize(sizeIn.size()); +++ } +++ ++ classWriter.write(cf); +++ ++ } catch (ConstantPoolException e) { ++ diagnosticListener.report(createDiagnostic("err.bad.constant.pool", className, e.getLocalizedMessage())); ++ ok = false; ++@@ -628,4 +657,31 @@ ++ Map bundles; ++ ++ private static final String progname = "javap"; +++ +++ private static class SizeInputStream extends FilterInputStream { +++ SizeInputStream(InputStream in) { +++ super(in); +++ } +++ +++ int size() { +++ return size; +++ } +++ +++ @Override +++ public int read(byte[] buf, int offset, int length) throws IOException { +++ int n = super.read(buf, offset, length); +++ if (n > 0) +++ size += n; +++ return n; +++ } +++ +++ @Override +++ public int read() throws IOException { +++ int b = super.read(); +++ size += 1; +++ return b; +++ } +++ +++ private int size; +++ } ++ } ++diff -r 6134c146043a -r dca34170f5f8 src/share/classes/com/sun/tools/javap/Options.java ++--- openjdk/langtools/src/share/classes/com/sun/tools/javap/Options.java Mon Aug 04 15:09:02 2008 -0700 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/Options.java Mon Aug 04 17:54:15 2008 -0700 ++@@ -78,6 +78,7 @@ ++ public boolean showInternalSignatures; ++ public boolean showAllAttrs; ++ public boolean showConstants; +++ public boolean sysInfo; ++ ++ public boolean compat; // bug-for-bug compatibility mode with old javap ++ public boolean jsr277; ++diff -r 6134c146043a -r dca34170f5f8 src/share/classes/com/sun/tools/javap/resources/javap.properties ++--- openjdk/langtools/src/share/classes/com/sun/tools/javap/resources/javap.properties Mon Aug 04 15:09:02 2008 -0700 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/resources/javap.properties Mon Aug 04 17:54:15 2008 -0700 ++@@ -62,5 +62,6 @@ ++ \ -constants Show static final constants ++ ++ ++- ++- +++main.opt.sysinfo=\ +++\ -sysinfo Show system info (path, size, date, MD5 hash)\n\ +++\ of class being processed ++diff -r 6134c146043a -r dca34170f5f8 test/tools/javap/T4884240.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/test/tools/javap/T4884240.java Mon Aug 04 17:54:15 2008 -0700 ++@@ -0,0 +1,56 @@ +++/* +++ * Copyright 2008 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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-15301 USA. +++ * +++ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++/* +++ * @test +++ * @bug 4884240 +++ * @summary additional option required for javap +++ */ +++ +++import java.io.*; +++ +++public class T4884240 { +++ public static void main(String... args) throws Exception { +++ new T4884240().run(); +++ } +++ +++ public void run() throws Exception { +++ StringWriter sw = new StringWriter(); +++ PrintWriter pw = new PrintWriter(sw); +++ String[] args = { "-sysinfo", "java.lang.Object" }; +++ int rc = com.sun.tools.javap.Main.run(args, pw); +++ if (rc != 0) +++ throw new Exception("unexpected return code: " + rc); +++ pw.close(); +++ String[] lines = sw.toString().split("\n"); +++ if (lines.length < 3 +++ || !lines[0].startsWith("Classfile") +++ || !lines[1].startsWith("Last modified") +++ || !lines[2].startsWith("MD5")) { +++ System.out.println(sw); +++ throw new Exception("unexpected output"); +++ } +++ } +++} ++diff -r 6134c146043a -r dca34170f5f8 test/tools/javap/T6622260.java ++--- openjdk/langtools/test/tools/javap/T6622260.java Mon Aug 04 15:09:02 2008 -0700 +++++ openjdk/langtools/test/tools/javap/T6622260.java Mon Aug 04 17:54:15 2008 -0700 ++@@ -189,6 +189,10 @@ ++ ++ void verify(String output) { ++ System.out.println(output); +++ if (output.startsWith("Classfile")) { +++ // make sure to ignore filename +++ output = output.substring(output.indexOf('\n')); +++ } ++ if (output.indexOf("-") >= 0) ++ throw new Error("- found in output"); ++ if (output.indexOf("FFFFFF") >= 0) +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/6708729-javap_makefile_update.patch openjdk-6-6b27-1.12.6/patches/openjdk/6708729-javap_makefile_update.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/6708729-javap_makefile_update.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/6708729-javap_makefile_update.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,59 @@ ++# HG changeset patch ++# User jjg ++# Date 1212524896 25200 ++# Tue Jun 03 13:28:16 2008 -0700 ++# Node ID 566f427de7079a0ed32c2f625c952dcc45c348e3 ++# Parent d206cb658a9907c7842c8920f141b3c4eb5efc1f ++6708729: update jdk Makefiles for new javap ++Reviewed-by: ohair ++ ++diff -r d206cb658a99 -r 566f427de707 make/common/Release.gmk ++--- openjdk/jdk/make/common/Release.gmk Mon Oct 21 18:05:56 2013 +0100 +++++ openjdk/jdk/make/common/Release.gmk Tue Jun 03 13:28:16 2008 -0700 ++@@ -357,6 +357,7 @@ ++ com/sun/jarsigner \ ++ com/sun/mirror \ ++ com/sun/source \ +++ com/sun/tools/classfile \ ++ com/sun/tools/doclets \ ++ com/sun/tools/example/debug/expr \ ++ com/sun/tools/example/debug/tty \ ++@@ -366,6 +367,7 @@ ++ com/sun/tools/javadoc \ ++ com/sun/tools/apt \ ++ com/sun/tools/javah \ +++ com/sun/tools/javap \ ++ com/sun/tools/corba \ ++ com/sun/tools/internal/xjc \ ++ com/sun/tools/internal/ws \ ++@@ -558,6 +560,8 @@ ++ $(ECHO) "sun/tools/java/" >> $@ ++ $(ECHO) "sun/tools/javac/" >> $@ ++ $(ECHO) "sun/tools/javap/" >> $@ +++ $(ECHO) "com/sun/tools/classfile/" >> $@ +++ $(ECHO) "com/sun/tools/javap/" >> $@ ++ $(ECHO) "sun/tools/jconsole/" >> $@ ++ $(ECHO) "sun/tools/jps/" >> $@ ++ $(ECHO) "sun/tools/jstat/" >> $@ ++diff -r d206cb658a99 -r 566f427de707 make/common/internal/Defs-langtools.gmk ++--- openjdk/jdk/make/common/internal/Defs-langtools.gmk Mon Oct 21 18:05:56 2013 +0100 +++++ openjdk/jdk/make/common/internal/Defs-langtools.gmk Tue Jun 03 13:28:16 2008 -0700 ++@@ -31,13 +31,15 @@ ++ javax/tools ++ ++ IMPORT_TOOLS_PACKAGES += \ +++ com/sun/javadoc \ ++ com/sun/mirror \ ++ com/sun/source \ ++ com/sun/tools/apt \ +++ com/sun/tools/classfile \ +++ com/sun/tools/doclets \ ++ com/sun/tools/javac \ +++ com/sun/tools/javadoc \ ++ com/sun/tools/javah \ ++- com/sun/tools/javadoc \ ++- com/sun/tools/doclets \ ++- com/sun/javadoc \ +++ com/sun/tools/javap \ ++ sun/tools/javap ++ +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/6715767-javap_crash.patch openjdk-6-6b27-1.12.6/patches/openjdk/6715767-javap_crash.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/6715767-javap_crash.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/6715767-javap_crash.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,135 @@ ++# HG changeset patch ++# User jjg ++# Date 1213833188 25200 ++# Wed Jun 18 16:53:08 2008 -0700 ++# Node ID c9b0fee44d446f902102462387c40ca9d1020b6e ++# Parent 3cbaa3d49584846d4fd8459edeb696b02de5499b ++6715767: javap on java.lang.ClassLoader crashes ++Reviewed-by: ksrini ++ ++diff -r 3cbaa3d49584 -r c9b0fee44d44 src/share/classes/com/sun/tools/classfile/ConstantPool.java ++--- openjdk/langtools/src/share/classes/com/sun/tools/classfile/ConstantPool.java Thu Oct 24 02:40:06 2013 +0100 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/ConstantPool.java Wed Jun 18 16:53:08 2008 -0700 ++@@ -153,7 +153,7 @@ ++ break; ++ ++ case CONSTANT_String: ++- pool[i] = new CONSTANT_String_info(cr); +++ pool[i] = new CONSTANT_String_info(this, cr); ++ break; ++ ++ case CONSTANT_Utf8: ++@@ -509,7 +509,8 @@ ++ } ++ ++ public static class CONSTANT_String_info extends CPInfo { ++- CONSTANT_String_info(ClassReader cr) throws IOException { +++ CONSTANT_String_info(ConstantPool cp, ClassReader cr) throws IOException { +++ super(cp); ++ string_index = cr.readUnsignedShort(); ++ } ++ ++diff -r 3cbaa3d49584 -r c9b0fee44d44 src/share/classes/com/sun/tools/javap/AttributeWriter.java ++--- openjdk/langtools/src/share/classes/com/sun/tools/javap/AttributeWriter.java Thu Oct 24 02:40:06 2013 +0100 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/AttributeWriter.java Wed Jun 18 16:53:08 2008 -0700 ++@@ -259,7 +259,7 @@ ++ return null; ++ } ++ ++- String getJavaException(Exceptions_attribute attr, int index) { +++ private String getJavaException(Exceptions_attribute attr, int index) { ++ try { ++ return getJavaName(attr.getException(index, constant_pool)); ++ } catch (ConstantPoolException e) { ++diff -r 3cbaa3d49584 -r c9b0fee44d44 src/share/classes/com/sun/tools/javap/ClassWriter.java ++--- openjdk/langtools/src/share/classes/com/sun/tools/javap/ClassWriter.java Thu Oct 24 02:40:06 2013 +0100 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/ClassWriter.java Wed Jun 18 16:53:08 2008 -0700 ++@@ -291,7 +291,7 @@ ++ for (int i = 0; i < exceptions.number_of_exceptions; i++) { ++ if (i > 0) ++ print(", "); ++- print(attrWriter.getJavaException(exceptions, i)); +++ print(getJavaException(exceptions, i)); ++ } ++ } ++ } else { ++@@ -441,6 +441,14 @@ ++ } ++ } ++ +++ String getJavaException(Exceptions_attribute attr, int index) { +++ try { +++ return getJavaName(attr.getException(index, constant_pool)); +++ } catch (ConstantPoolException e) { +++ return report(e); +++ } +++ } +++ ++ String getValue(Descriptor d) { ++ try { ++ return d.getValue(constant_pool); ++diff -r 3cbaa3d49584 -r c9b0fee44d44 src/share/classes/com/sun/tools/javap/JavapTask.java ++--- openjdk/langtools/src/share/classes/com/sun/tools/javap/JavapTask.java Thu Oct 24 02:40:06 2013 +0100 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/JavapTask.java Wed Jun 18 16:53:08 2008 -0700 ++@@ -475,6 +475,7 @@ ++ t.printStackTrace(pw); ++ pw.close(); ++ diagnosticListener.report(createDiagnostic("err.crash", t.toString(), sw.toString())); +++ ok = false; ++ } ++ } ++ ++diff -r 3cbaa3d49584 -r c9b0fee44d44 test/tools/javap/T6715767.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/test/tools/javap/T6715767.java Wed Jun 18 16:53:08 2008 -0700 ++@@ -0,0 +1,50 @@ +++/* +++ * Copyright 2008 Sun Microsystems, Inc. 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. +++ * +++ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++/* +++ * @test +++ * @bug 6715767 +++ * @summary javap on java.lang.ClassLoader crashes +++ */ +++ +++import java.io.*; +++ +++public class T6715767 { +++ public static void main(String... args) throws Exception { +++ new T6715767().run(); +++ } +++ +++ void run() throws Exception { +++ StringWriter sw = new StringWriter(); +++ PrintWriter pw = new PrintWriter(sw); +++ String[] args = { "java.lang.ClassLoader" }; +++ int rc = com.sun.tools.javap.Main.run(args, pw); +++ if (rc != 0 || +++ sw.toString().indexOf("at com.sun.tools.javap.JavapTask.run") != -1) { +++ System.err.println("rc: " + rc); +++ System.err.println("log:\n" + sw); +++ throw new Exception("unexpected result"); +++ } +++ } +++} +++ +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/6819246-javap_instruction_decoding.patch openjdk-6-6b27-1.12.6/patches/openjdk/6819246-javap_instruction_decoding.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/6819246-javap_instruction_decoding.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/6819246-javap_instruction_decoding.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,2065 @@ ++# HG changeset patch ++# User jjg ++# Date 1382578806 -3600 ++# Thu Oct 24 02:40:06 2013 +0100 ++# Node ID 3cbaa3d49584846d4fd8459edeb696b02de5499b ++# Parent bfd7bb4218253bac4f57abbc90b987f16e4b7f6c ++6819246: improve support for decoding instructions in classfile library ++Reviewed-by: ksrini ++ ++diff -r bfd7bb421825 -r 3cbaa3d49584 src/share/classes/com/sun/tools/classfile/Code_attribute.java ++--- openjdk/langtools/src/share/classes/com/sun/tools/classfile/Code_attribute.java Tue Oct 22 01:03:49 2013 +0100 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/Code_attribute.java Thu Oct 24 02:40:06 2013 +0100 ++@@ -26,6 +26,8 @@ ++ package com.sun.tools.classfile; ++ ++ import java.io.IOException; +++import java.util.Iterator; +++import java.util.NoSuchElementException; ++ ++ /** ++ * See JVMS3, section 4.8.3. ++@@ -99,6 +101,39 @@ ++ return visitor.visitCode(this, data); ++ } ++ +++ public Iterable getInstructions() { +++ return new Iterable() { +++ public Iterator iterator() { +++ return new Iterator() { +++ +++ public boolean hasNext() { +++ return (next != null); +++ } +++ +++ public Instruction next() { +++ if (next == null) +++ throw new NoSuchElementException(); +++ +++ current = next; +++ pc += current.length(); +++ next = (pc < code.length ? new Instruction(code, pc) : null); +++ return current; +++ } +++ +++ public void remove() { +++ throw new UnsupportedOperationException("Not supported."); +++ } +++ +++ Instruction current = null; +++ int pc = 0; +++ Instruction next = new Instruction(code, pc); +++ +++ }; +++ } +++ +++ }; +++ } +++ ++ public final int max_stack; ++ public final int max_locals; ++ public final int code_length; ++diff -r bfd7bb421825 -r 3cbaa3d49584 src/share/classes/com/sun/tools/classfile/Instruction.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/Instruction.java Thu Oct 24 02:40:06 2013 +0100 ++@@ -0,0 +1,339 @@ +++/* +++ * Copyright 2009 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.classfile; +++ +++/** +++ * See JVMS3, chapter 6. +++ * +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ * +++ * @see Code_attribute#getInstructions +++ */ +++public class Instruction { +++ /** The kind of an instruction, as determined by the position, size and +++ * types of its operands. */ +++ public static enum Kind { +++ /** Opcode is not followed by any operands. */ +++ NO_OPERANDS(1), +++ /** Opcode is followed by a byte indicating a type. */ +++ ATYPE(2), +++ /** Opcode is followed by a 2-byte branch offset. */ +++ BRANCH(3), +++ /** Opcode is followed by a 4-byte branch offset. */ +++ BRANCH_W(5), +++ /** Opcode is followed by a signed byte value. */ +++ BYTE(2), +++ /** Opcode is followed by a 1-byte index into the constant pool. */ +++ CPREF(2), +++ /** Opcode is followed by a 2-byte index into the constant pool. */ +++ CPREF_W(3), +++ /** Opcode is followed by a 2-byte index into the constant pool, +++ * an unsigned byte value. */ +++ CPREF_W_UBYTE(4), +++ /** Opcode is followed by a 2-byte index into the constant pool., +++ * an unsigned byte value, and a zero byte. */ +++ CPREF_W_UBYTE_ZERO(5), +++ /** Opcode is followed by variable number of operands, depending +++ * on the instruction.*/ +++ DYNAMIC(-1), +++ /** Opcode is followed by a 1-byte reference to a local variable. */ +++ LOCAL(2), +++ /** Opcode is followed by a 1-byte reference to a local variable, +++ * and a signed byte value. */ +++ LOCAL_BYTE(3), +++ /** Opcode is followed by a signed short value. */ +++ SHORT(3), +++ /** Wide opcode is not followed by any operands. */ +++ WIDE_NO_OPERANDS(2), +++ /** Wide opcode is followed by a 2-byte index into the constant pool. */ +++ WIDE_CPREF_W(4), +++ /** Wide opcode is followed by a 2-byte index into the constant pool, +++ * and a signed short value. */ +++ WIDE_CPREF_W_SHORT(6), +++ /** Opcode was not recognized. */ +++ UNKNOWN(1); +++ +++ Kind(int length) { +++ this.length = length; +++ } +++ +++ /** The length, in bytes, of this kind of instruction, or -1 is the +++ * length depends on the specific instruction. */ +++ public final int length; +++ }; +++ +++ /** A utility visitor to help decode the operands of an instruction. +++ * @see Instruction#accept */ +++ public interface KindVisitor { +++ /** See {@link Kind#NO_OPERANDS}, {@link Kind#WIDE_NO_OPERANDS}. */ +++ R visitNoOperands(Instruction instr, P p); +++ /** See {@link Kind#ATYPE}. */ +++ R visitArrayType(Instruction instr, TypeKind kind, P p); +++ /** See {@link Kind#BRANCH}, {@link Kind#BRANCH_W}. */ +++ R visitBranch(Instruction instr, int offset, P p); +++ /** See {@link Kind#CPREF}, {@link Kind#CPREF_W}, {@link Kind#WIDE_CPREF_W}. */ +++ R visitConstantPoolRef(Instruction instr, int index, P p); +++ /** See {@link Kind#CPREF_W_UBYTE}, {@link Kind#CPREF_W_UBYTE_ZERO}, {@link Kind#WIDE_CPREF_W_SHORT}. */ +++ R visitConstantPoolRefAndValue(Instruction instr, int index, int value, P p); +++ /** See {@link Kind#LOCAL}. */ +++ R visitLocal(Instruction instr, int index, P p); +++ /** See {@link Kind#LOCAL_UBYTE}. */ +++ R visitLocalAndValue(Instruction instr, int index, int value, P p); +++ /** See {@link Kind#DYNAMIC}. */ +++ R visitLookupSwitch(Instruction instr, int default_, int npairs, int[] matches, int[] offsets); +++ /** See {@link Kind#DYNAMIC}. */ +++ R visitTableSwitch(Instruction instr, int default_, int low, int high, int[] offsets); +++ /** See {@link Kind#BYTE}, {@link Kind#SHORT}. */ +++ R visitValue(Instruction instr, int value, P p); +++ /** Instruction is unrecognized. */ +++ R visitUnknown(Instruction instr, P p); +++ +++ } +++ +++ /** The kind of primitive array type to create. +++ * See JVMS chapter 6, newarray. */ +++ public static enum TypeKind { +++ T_BOOLEAN(4, "boolean"), +++ T_CHAR(5, "char"), +++ T_FLOAT(6, "float"), +++ T_DOUBLE(7, "double"), +++ T_BYTE(8, "byte"), +++ T_SHORT(9, "short"), +++ T_INT (10, "int"), +++ T_LONG (11, "long"); +++ TypeKind(int value, String name) { +++ this.value = value; +++ this.name = name; +++ } +++ +++ public static TypeKind get(int value) { +++ switch (value) { +++ case 4: return T_BOOLEAN; +++ case 5: return T_CHAR; +++ case 6: return T_FLOAT; +++ case 7: return T_DOUBLE; +++ case 8: return T_BYTE; +++ case 9: return T_SHORT; +++ case 10: return T_INT; +++ case 11: return T_LONG; +++ default: return null; +++ } +++ } +++ +++ public final int value; +++ public final String name; +++ } +++ +++ /** An instruction is defined by its position in a bytecode array. */ +++ public Instruction(byte[] bytes, int pc) { +++ this.bytes = bytes; +++ this.pc = pc; +++ } +++ +++ /** Get the position of the instruction within the bytecode array. */ +++ public int getPC() { +++ return pc; +++ } +++ +++ /** Get a byte value, relative to the start of this instruction. */ +++ public int getByte(int offset) { +++ return bytes[pc + offset]; +++ } +++ +++ /** Get an unsigned byte value, relative to the start of this instruction. */ +++ public int getUnsignedByte(int offset) { +++ return getByte(offset) & 0xff; +++ } +++ +++ /** Get a 2-byte value, relative to the start of this instruction. */ +++ public int getShort(int offset) { +++ return (getByte(offset) << 8) | getUnsignedByte(offset + 1); +++ } +++ +++ /** Get a unsigned 2-byte value, relative to the start of this instruction. */ +++ public int getUnsignedShort(int offset) { +++ return getShort(offset) & 0xFFFF; +++ } +++ +++ /** Get a 4-byte value, relative to the start of this instruction. */ +++ public int getInt(int offset) { +++ return (getShort(offset) << 16) | (getUnsignedShort(offset + 2)); +++ } +++ +++ /** Get the Opcode for this instruction, or null if the instruction is +++ * unrecognized. */ +++ public Opcode getOpcode() { +++ int b = getUnsignedByte(0); +++ switch (b) { +++ case Opcode.NONPRIV: +++ case Opcode.PRIV: +++ case Opcode.WIDE: +++ return Opcode.get(b, getUnsignedByte(1)); +++ } +++ return Opcode.get(b); +++ } +++ +++ /** Get the mnemonic for this instruction, or a default string if the +++ * instruction is unrecognized. */ +++ public String getMnemonic() { +++ Opcode opcode = getOpcode(); +++ if (opcode == null) +++ return "bytecode " + getUnsignedByte(0); +++ else +++ return opcode.toString().toLowerCase(); +++ } +++ +++ /** Get the length, in bytes, of this instruction, including the opcode +++ * and all its operands. */ +++ public int length() { +++ Opcode opcode = getOpcode(); +++ if (opcode == null) +++ return 1; +++ +++ switch (opcode) { +++ case TABLESWITCH: { +++ int pad = align(pc + 1) - pc; +++ int low = getInt(pad + 4); +++ int high = getInt(pad + 8); +++ return pad + 12 + 4 * (high - low + 1); +++ } +++ case LOOKUPSWITCH: { +++ int pad = align(pc + 1) - pc; +++ int npairs = getInt(pad + 4); +++ return pad + 8 + 8 * npairs; +++ +++ } +++ default: +++ return opcode.kind.length; +++ } +++ } +++ +++ /** Get the {@link Kind} of this instruction. */ +++ public Kind getKind() { +++ Opcode opcode = getOpcode(); +++ return (opcode != null ? opcode.kind : Kind.UNKNOWN); +++ } +++ +++ /** Invoke a method on the visitor according to the kind of this +++ * instruction, passing in the decoded operands for the instruction. */ +++ public R accept(KindVisitor visitor, P p) { +++ switch (getKind()) { +++ case NO_OPERANDS: +++ return visitor.visitNoOperands(this, p); +++ +++ case ATYPE: +++ return visitor.visitArrayType( +++ this, TypeKind.get(getUnsignedByte(1)), p); +++ +++ case BRANCH: +++ return visitor.visitBranch(this, getShort(1), p); +++ +++ case BRANCH_W: +++ return visitor.visitBranch(this, getInt(1), p); +++ +++ case BYTE: +++ return visitor.visitValue(this, getByte(1), p); +++ +++ case CPREF: +++ return visitor.visitConstantPoolRef(this, getUnsignedByte(1), p); +++ +++ case CPREF_W: +++ return visitor.visitConstantPoolRef(this, getUnsignedShort(1), p); +++ +++ case CPREF_W_UBYTE: +++ case CPREF_W_UBYTE_ZERO: +++ return visitor.visitConstantPoolRefAndValue( +++ this, getUnsignedShort(1), getUnsignedByte(3), p); +++ +++ case DYNAMIC: { +++ switch (getOpcode()) { +++ case TABLESWITCH: { +++ int pad = align(pc + 1) - pc; +++ int default_ = getInt(pad); +++ int low = getInt(pad + 4); +++ int high = getInt(pad + 8); +++ int[] values = new int[high - low + 1]; +++ for (int i = 0; i < values.length; i++) +++ values[i] = getInt(pad + 12 + 4 * i); +++ return visitor.visitTableSwitch( +++ this, default_, low, high, values); +++ } +++ case LOOKUPSWITCH: { +++ int pad = align(pc + 1) - pc; +++ int default_ = getInt(pad); +++ int npairs = getInt(pad + 4); +++ int[] matches = new int[npairs]; +++ int[] offsets = new int[npairs]; +++ for (int i = 0; i < npairs; i++) { +++ matches[i] = getInt(pad + 8 + i * 8); +++ offsets[i] = getInt(pad + 12 + i * 8); +++ } +++ return visitor.visitLookupSwitch( +++ this, default_, npairs, matches, offsets); +++ } +++ default: +++ throw new IllegalStateException(); +++ } +++ } +++ +++ case LOCAL: +++ return visitor.visitLocal(this, getUnsignedByte(1), p); +++ +++ case LOCAL_BYTE: +++ return visitor.visitLocalAndValue( +++ this, getUnsignedByte(1), getByte(2), p); +++ +++ case SHORT: +++ return visitor.visitValue(this, getShort(1), p); +++ +++ case WIDE_NO_OPERANDS: +++ return visitor.visitNoOperands(this, p); +++ +++ case WIDE_CPREF_W: +++ return visitor.visitConstantPoolRef(this, getUnsignedShort(2), p); +++ +++ case WIDE_CPREF_W_SHORT: +++ return visitor.visitConstantPoolRefAndValue( +++ this, getUnsignedShort(2), getUnsignedByte(4), p); +++ +++ case UNKNOWN: +++ return visitor.visitUnknown(this, p); +++ +++ default: +++ throw new IllegalStateException(); +++ } +++ } +++ +++ private static int align(int n) { +++ return (n + 3) & ~3; +++ } +++ +++ private byte[] bytes; +++ private int pc; +++} ++diff -r bfd7bb421825 -r 3cbaa3d49584 src/share/classes/com/sun/tools/classfile/OpCodes.java ++--- openjdk/langtools/src/share/classes/com/sun/tools/classfile/OpCodes.java Tue Oct 22 01:03:49 2013 +0100 +++++ /dev/null Thu Jan 01 00:00:00 1970 +0000 ++@@ -1,868 +0,0 @@ ++-/* ++- * Copyright 2007 Sun Microsystems, Inc. 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. Sun designates this ++- * particular file as subject to the "Classpath" exception as provided ++- * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, ++- * CA 95054 USA or visit www.sun.com if you need additional information or ++- * have any questions. ++- */ ++- ++-package com.sun.tools.classfile; ++- ++-import java.util.HashMap; ++- ++-/** ++- * See JVMS3, section 6. ++- * ++- *

This is NOT part of any API supported by Sun Microsystems. If ++- * you write code that depends on this, you do so at your own risk. ++- * This code and its internal interfaces are subject to change or ++- * deletion without notice. ++- */ ++-public class OpCodes { ++- ++- public static int opcLength(int opc) throws IllegalArgumentException { ++- switch (opc >> 8) { ++- case 0: ++- return opcLengthsTab[opc]; ++- case opc_wide: ++- switch (opc & 0xFF) { ++- case opc_aload: ++- case opc_astore: ++- case opc_fload: ++- case opc_fstore: ++- case opc_iload: ++- case opc_istore: ++- case opc_lload: ++- case opc_lstore: ++- case opc_dload: ++- case opc_dstore: ++- case opc_ret: ++- return 4; ++- case opc_iinc: ++- return 6; ++- default: ++- throw new IllegalArgumentException(); ++- } ++- case opc_nonpriv: ++- case opc_priv: ++- return 2; ++- default: ++- throw new IllegalArgumentException(); ++- } ++- } ++- ++- public static String opcName(int opc) { ++- try { ++- switch (opc >> 8) { ++- case 0: ++- return opcNamesTab[opc]; ++- case opc_wide: ++- { ++- String mnem = opcNamesTab[opc & 0xFF] + "_w"; ++- if (mnemocodes.get(mnem) == null) { ++- return null; // non-existent opcode ++- } ++- return mnem; ++- } ++- case opc_nonpriv: ++- return opcExtNamesTab[opc & 0xFF]; ++- case opc_priv: ++- return opcPrivExtNamesTab[opc & 0xFF]; ++- default: ++- return null; ++- } ++- } catch (ArrayIndexOutOfBoundsException e) { ++- switch (opc) { ++- case opc_nonpriv: ++- return "nonpriv"; ++- case opc_priv: ++- return "priv"; ++- default: ++- return null; ++- } ++- } ++- } ++- ++- /* Opcodes */ ++- public static final int opc_dead = -2; ++- public static final int opc_label = -1; ++- public static final int opc_nop = 0; ++- public static final int opc_aconst_null = 1; ++- public static final int opc_iconst_m1 = 2; ++- public static final int opc_iconst_0 = 3; ++- public static final int opc_iconst_1 = 4; ++- public static final int opc_iconst_2 = 5; ++- public static final int opc_iconst_3 = 6; ++- public static final int opc_iconst_4 = 7; ++- public static final int opc_iconst_5 = 8; ++- public static final int opc_lconst_0 = 9; ++- public static final int opc_lconst_1 = 10; ++- public static final int opc_fconst_0 = 11; ++- public static final int opc_fconst_1 = 12; ++- public static final int opc_fconst_2 = 13; ++- public static final int opc_dconst_0 = 14; ++- public static final int opc_dconst_1 = 15; ++- public static final int opc_bipush = 16; ++- public static final int opc_sipush = 17; ++- public static final int opc_ldc = 18; ++- public static final int opc_ldc_w = 19; ++- public static final int opc_ldc2_w = 20; ++- public static final int opc_iload = 21; ++- public static final int opc_lload = 22; ++- public static final int opc_fload = 23; ++- public static final int opc_dload = 24; ++- public static final int opc_aload = 25; ++- public static final int opc_iload_0 = 26; ++- public static final int opc_iload_1 = 27; ++- public static final int opc_iload_2 = 28; ++- public static final int opc_iload_3 = 29; ++- public static final int opc_lload_0 = 30; ++- public static final int opc_lload_1 = 31; ++- public static final int opc_lload_2 = 32; ++- public static final int opc_lload_3 = 33; ++- public static final int opc_fload_0 = 34; ++- public static final int opc_fload_1 = 35; ++- public static final int opc_fload_2 = 36; ++- public static final int opc_fload_3 = 37; ++- public static final int opc_dload_0 = 38; ++- public static final int opc_dload_1 = 39; ++- public static final int opc_dload_2 = 40; ++- public static final int opc_dload_3 = 41; ++- public static final int opc_aload_0 = 42; ++- public static final int opc_aload_1 = 43; ++- public static final int opc_aload_2 = 44; ++- public static final int opc_aload_3 = 45; ++- public static final int opc_iaload = 46; ++- public static final int opc_laload = 47; ++- public static final int opc_faload = 48; ++- public static final int opc_daload = 49; ++- public static final int opc_aaload = 50; ++- public static final int opc_baload = 51; ++- public static final int opc_caload = 52; ++- public static final int opc_saload = 53; ++- public static final int opc_istore = 54; ++- public static final int opc_lstore = 55; ++- public static final int opc_fstore = 56; ++- public static final int opc_dstore = 57; ++- public static final int opc_astore = 58; ++- public static final int opc_istore_0 = 59; ++- public static final int opc_istore_1 = 60; ++- public static final int opc_istore_2 = 61; ++- public static final int opc_istore_3 = 62; ++- public static final int opc_lstore_0 = 63; ++- public static final int opc_lstore_1 = 64; ++- public static final int opc_lstore_2 = 65; ++- public static final int opc_lstore_3 = 66; ++- public static final int opc_fstore_0 = 67; ++- public static final int opc_fstore_1 = 68; ++- public static final int opc_fstore_2 = 69; ++- public static final int opc_fstore_3 = 70; ++- public static final int opc_dstore_0 = 71; ++- public static final int opc_dstore_1 = 72; ++- public static final int opc_dstore_2 = 73; ++- public static final int opc_dstore_3 = 74; ++- public static final int opc_astore_0 = 75; ++- public static final int opc_astore_1 = 76; ++- public static final int opc_astore_2 = 77; ++- public static final int opc_astore_3 = 78; ++- public static final int opc_iastore = 79; ++- public static final int opc_lastore = 80; ++- public static final int opc_fastore = 81; ++- public static final int opc_dastore = 82; ++- public static final int opc_aastore = 83; ++- public static final int opc_bastore = 84; ++- public static final int opc_castore = 85; ++- public static final int opc_sastore = 86; ++- public static final int opc_pop = 87; ++- public static final int opc_pop2 = 88; ++- public static final int opc_dup = 89; ++- public static final int opc_dup_x1 = 90; ++- public static final int opc_dup_x2 = 91; ++- public static final int opc_dup2 = 92; ++- public static final int opc_dup2_x1 = 93; ++- public static final int opc_dup2_x2 = 94; ++- public static final int opc_swap = 95; ++- public static final int opc_iadd = 96; ++- public static final int opc_ladd = 97; ++- public static final int opc_fadd = 98; ++- public static final int opc_dadd = 99; ++- public static final int opc_isub = 100; ++- public static final int opc_lsub = 101; ++- public static final int opc_fsub = 102; ++- public static final int opc_dsub = 103; ++- public static final int opc_imul = 104; ++- public static final int opc_lmul = 105; ++- public static final int opc_fmul = 106; ++- public static final int opc_dmul = 107; ++- public static final int opc_idiv = 108; ++- public static final int opc_ldiv = 109; ++- public static final int opc_fdiv = 110; ++- public static final int opc_ddiv = 111; ++- public static final int opc_irem = 112; ++- public static final int opc_lrem = 113; ++- public static final int opc_frem = 114; ++- public static final int opc_drem = 115; ++- public static final int opc_ineg = 116; ++- public static final int opc_lneg = 117; ++- public static final int opc_fneg = 118; ++- public static final int opc_dneg = 119; ++- public static final int opc_ishl = 120; ++- public static final int opc_lshl = 121; ++- public static final int opc_ishr = 122; ++- public static final int opc_lshr = 123; ++- public static final int opc_iushr = 124; ++- public static final int opc_lushr = 125; ++- public static final int opc_iand = 126; ++- public static final int opc_land = 127; ++- public static final int opc_ior = 128; ++- public static final int opc_lor = 129; ++- public static final int opc_ixor = 130; ++- public static final int opc_lxor = 131; ++- public static final int opc_iinc = 132; ++- public static final int opc_i2l = 133; ++- public static final int opc_i2f = 134; ++- public static final int opc_i2d = 135; ++- public static final int opc_l2i = 136; ++- public static final int opc_l2f = 137; ++- public static final int opc_l2d = 138; ++- public static final int opc_f2i = 139; ++- public static final int opc_f2l = 140; ++- public static final int opc_f2d = 141; ++- public static final int opc_d2i = 142; ++- public static final int opc_d2l = 143; ++- public static final int opc_d2f = 144; ++- public static final int opc_i2b = 145; ++- public static final int opc_int2byte = 145; ++- public static final int opc_i2c = 146; ++- public static final int opc_int2char = 146; ++- public static final int opc_i2s = 147; ++- public static final int opc_int2short = 147; ++- public static final int opc_lcmp = 148; ++- public static final int opc_fcmpl = 149; ++- public static final int opc_fcmpg = 150; ++- public static final int opc_dcmpl = 151; ++- public static final int opc_dcmpg = 152; ++- public static final int opc_ifeq = 153; ++- public static final int opc_ifne = 154; ++- public static final int opc_iflt = 155; ++- public static final int opc_ifge = 156; ++- public static final int opc_ifgt = 157; ++- public static final int opc_ifle = 158; ++- public static final int opc_if_icmpeq = 159; ++- public static final int opc_if_icmpne = 160; ++- public static final int opc_if_icmplt = 161; ++- public static final int opc_if_icmpge = 162; ++- public static final int opc_if_icmpgt = 163; ++- public static final int opc_if_icmple = 164; ++- public static final int opc_if_acmpeq = 165; ++- public static final int opc_if_acmpne = 166; ++- public static final int opc_goto = 167; ++- public static final int opc_jsr = 168; ++- public static final int opc_ret = 169; ++- public static final int opc_tableswitch = 170; ++- public static final int opc_lookupswitch = 171; ++- public static final int opc_ireturn = 172; ++- public static final int opc_lreturn = 173; ++- public static final int opc_freturn = 174; ++- public static final int opc_dreturn = 175; ++- public static final int opc_areturn = 176; ++- public static final int opc_return = 177; ++- public static final int opc_getstatic = 178; ++- public static final int opc_putstatic = 179; ++- public static final int opc_getfield = 180; ++- public static final int opc_putfield = 181; ++- public static final int opc_invokevirtual = 182; ++- public static final int opc_invokenonvirtual = 183; ++- public static final int opc_invokespecial = 183; ++- public static final int opc_invokestatic = 184; ++- public static final int opc_invokeinterface = 185; ++-// public static final int opc_xxxunusedxxx = 186; ++- public static final int opc_new = 187; ++- public static final int opc_newarray = 188; ++- public static final int opc_anewarray = 189; ++- public static final int opc_arraylength = 190; ++- public static final int opc_athrow = 191; ++- public static final int opc_checkcast = 192; ++- public static final int opc_instanceof = 193; ++- public static final int opc_monitorenter = 194; ++- public static final int opc_monitorexit = 195; ++- public static final int opc_wide = 196; ++- public static final int opc_multianewarray = 197; ++- public static final int opc_ifnull = 198; ++- public static final int opc_ifnonnull = 199; ++- public static final int opc_goto_w = 200; ++- public static final int opc_jsr_w = 201; ++- ++- /* Pseudo-instructions */ ++- public static final int opc_bytecode = 203; ++- public static final int opc_try = 204; ++- public static final int opc_endtry = 205; ++- public static final int opc_catch = 206; ++- public static final int opc_var = 207; ++- public static final int opc_endvar = 208; ++- public static final int opc_localsmap = 209; ++- public static final int opc_stackmap = 210; ++- ++- /* PicoJava prefixes */ ++- public static final int opc_nonpriv = 254; ++- public static final int opc_priv = 255; ++- ++- /* Wide instructions */ ++- public static final int opc_iload_w = (opc_wide << 8 ) | opc_iload; ++- public static final int opc_lload_w = (opc_wide << 8 ) | opc_lload; ++- public static final int opc_fload_w = (opc_wide << 8 ) | opc_fload; ++- public static final int opc_dload_w = (opc_wide << 8 ) | opc_dload; ++- public static final int opc_aload_w = (opc_wide << 8 ) | opc_aload; ++- public static final int opc_istore_w = (opc_wide << 8 ) | opc_istore; ++- public static final int opc_lstore_w = (opc_wide << 8 ) | opc_lstore; ++- public static final int opc_fstore_w = (opc_wide << 8 ) | opc_fstore; ++- public static final int opc_dstore_w = (opc_wide << 8 ) | opc_dstore; ++- public static final int opc_astore_w = (opc_wide << 8 ) | opc_astore; ++- public static final int opc_ret_w = (opc_wide << 8 ) | opc_ret; ++- public static final int opc_iinc_w = (opc_wide << 8 ) | opc_iinc; ++- ++- /* Opcode Names */ ++- private static final String opcNamesTab[] = { ++- "nop", ++- "aconst_null", ++- "iconst_m1", ++- "iconst_0", ++- "iconst_1", ++- "iconst_2", ++- "iconst_3", ++- "iconst_4", ++- "iconst_5", ++- "lconst_0", ++- "lconst_1", ++- "fconst_0", ++- "fconst_1", ++- "fconst_2", ++- "dconst_0", ++- "dconst_1", ++- "bipush", ++- "sipush", ++- "ldc", ++- "ldc_w", ++- "ldc2_w", ++- "iload", ++- "lload", ++- "fload", ++- "dload", ++- "aload", ++- "iload_0", ++- "iload_1", ++- "iload_2", ++- "iload_3", ++- "lload_0", ++- "lload_1", ++- "lload_2", ++- "lload_3", ++- "fload_0", ++- "fload_1", ++- "fload_2", ++- "fload_3", ++- "dload_0", ++- "dload_1", ++- "dload_2", ++- "dload_3", ++- "aload_0", ++- "aload_1", ++- "aload_2", ++- "aload_3", ++- "iaload", ++- "laload", ++- "faload", ++- "daload", ++- "aaload", ++- "baload", ++- "caload", ++- "saload", ++- "istore", ++- "lstore", ++- "fstore", ++- "dstore", ++- "astore", ++- "istore_0", ++- "istore_1", ++- "istore_2", ++- "istore_3", ++- "lstore_0", ++- "lstore_1", ++- "lstore_2", ++- "lstore_3", ++- "fstore_0", ++- "fstore_1", ++- "fstore_2", ++- "fstore_3", ++- "dstore_0", ++- "dstore_1", ++- "dstore_2", ++- "dstore_3", ++- "astore_0", ++- "astore_1", ++- "astore_2", ++- "astore_3", ++- "iastore", ++- "lastore", ++- "fastore", ++- "dastore", ++- "aastore", ++- "bastore", ++- "castore", ++- "sastore", ++- "pop", ++- "pop2", ++- "dup", ++- "dup_x1", ++- "dup_x2", ++- "dup2", ++- "dup2_x1", ++- "dup2_x2", ++- "swap", ++- "iadd", ++- "ladd", ++- "fadd", ++- "dadd", ++- "isub", ++- "lsub", ++- "fsub", ++- "dsub", ++- "imul", ++- "lmul", ++- "fmul", ++- "dmul", ++- "idiv", ++- "ldiv", ++- "fdiv", ++- "ddiv", ++- "irem", ++- "lrem", ++- "frem", ++- "drem", ++- "ineg", ++- "lneg", ++- "fneg", ++- "dneg", ++- "ishl", ++- "lshl", ++- "ishr", ++- "lshr", ++- "iushr", ++- "lushr", ++- "iand", ++- "land", ++- "ior", ++- "lor", ++- "ixor", ++- "lxor", ++- "iinc", ++- "i2l", ++- "i2f", ++- "i2d", ++- "l2i", ++- "l2f", ++- "l2d", ++- "f2i", ++- "f2l", ++- "f2d", ++- "d2i", ++- "d2l", ++- "d2f", ++- "i2b", ++- "i2c", ++- "i2s", ++- "lcmp", ++- "fcmpl", ++- "fcmpg", ++- "dcmpl", ++- "dcmpg", ++- "ifeq", ++- "ifne", ++- "iflt", ++- "ifge", ++- "ifgt", ++- "ifle", ++- "if_icmpeq", ++- "if_icmpne", ++- "if_icmplt", ++- "if_icmpge", ++- "if_icmpgt", ++- "if_icmple", ++- "if_acmpeq", ++- "if_acmpne", ++- "goto", ++- "jsr", ++- "ret", ++- "tableswitch", ++- "lookupswitch", ++- "ireturn", ++- "lreturn", ++- "freturn", ++- "dreturn", ++- "areturn", ++- "return", ++- "getstatic", ++- "putstatic", ++- "getfield", ++- "putfield", ++- "invokevirtual", ++- "invokespecial", // was "invokenonvirtual", ++- "invokestatic", ++- "invokeinterface", ++- "bytecode 186", //"xxxunusedxxx", ++- "new", ++- "newarray", ++- "anewarray", ++- "arraylength", ++- "athrow", ++- "checkcast", ++- "instanceof", ++- "monitorenter", ++- "monitorexit", ++- null, // "wide", ++- "multianewarray", ++- "ifnull", ++- "ifnonnull", ++- "goto_w", ++- "jsr_w", ++- "bytecode 202", // "breakpoint", ++- "bytecode", ++- "try", ++- "endtry", ++- "catch", ++- "var", ++- "endvar", ++- "locals_map", ++- "stack_map" ++- }; ++- ++- /* Opcode Lengths */ ++- private static final int opcLengthsTab[] = { ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 2, ++- 3, ++- 2, ++- 3, ++- 3, ++- 2, ++- 2, ++- 2, ++- 2, ++- 2, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 2, ++- 2, ++- 2, ++- 2, ++- 2, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 3, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 3, ++- 3, ++- 3, ++- 3, ++- 3, ++- 3, ++- 3, ++- 3, ++- 3, ++- 3, ++- 3, ++- 3, ++- 3, ++- 3, ++- 3, ++- 3, ++- 2, ++- 99, ++- 99, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 1, ++- 3, ++- 3, ++- 3, ++- 3, ++- 3, ++- 3, ++- 3, ++- 5, ++- 0, ++- 3, ++- 2, ++- 3, ++- 1, ++- 1, ++- 3, ++- 3, ++- 1, ++- 1, ++- 0, // wide ++- 4, ++- 3, ++- 3, ++- 5, ++- 5, ++- 1, ++- 1, 0, 0, 0, 0, 0 // pseudo ++- }; ++- ++- /* Type codes, used in newarray opcode */ ++- public static final int T_CLASS = 0x00000002; ++- public static final int T_BOOLEAN = 0x00000004; ++- public static final int T_CHAR = 0x00000005; ++- public static final int T_FLOAT = 0x00000006; ++- public static final int T_DOUBLE = 0x00000007; ++- public static final int T_BYTE = 0x00000008; ++- public static final int T_SHORT = 0x00000009; ++- public static final int T_INT = 0x0000000a; ++- public static final int T_LONG = 0x0000000b; ++- ++- private static HashMap mnemocodes = new HashMap(301, 0.5f); ++- private static String opcExtNamesTab[]=new String[128]; ++- private static String opcPrivExtNamesTab[]=new String[128]; ++- ++- private static void defineNonPriv(int opc, String mnem) { ++- mnemocodes.put(opcExtNamesTab[opc] = mnem, opc_nonpriv * 256 + opc); ++- } ++- ++- private static void definePriv(int opc, String mnem) { ++- mnemocodes.put(opcPrivExtNamesTab[opc] = "priv_" + mnem, opc_priv * 256 + opc); ++- } ++- ++- private static void defineExt(int opc, String mnem) { ++- defineNonPriv(opc, mnem); ++- definePriv(opc, mnem); ++- } ++- ++- static { ++- for (int i = 0; i < opc_wide; i++) { ++- mnemocodes.put(opcNamesTab[i], i); ++- } ++- for (int i = opc_wide + 1; i < opcNamesTab.length; i++) { ++- mnemocodes.put(opcNamesTab[i], i); ++- } ++- mnemocodes.put("invokenonvirtual", opc_invokespecial); ++- ++- mnemocodes.put("iload_w", opc_iload_w); ++- mnemocodes.put("lload_w", opc_lload_w); ++- mnemocodes.put("fload_w", opc_fload_w); ++- mnemocodes.put("dload_w", opc_dload_w); ++- mnemocodes.put("aload_w", opc_aload_w); ++- mnemocodes.put("istore_w", opc_istore_w); ++- mnemocodes.put("lstore_w", opc_lstore_w); ++- mnemocodes.put("fstore_w", opc_fstore_w); ++- mnemocodes.put("dstore_w", opc_dstore_w); ++- mnemocodes.put("astore_w", opc_astore_w); ++- mnemocodes.put("ret_w", opc_ret_w); ++- mnemocodes.put("iinc_w", opc_iinc_w); ++- ++- mnemocodes.put("nonpriv", opc_nonpriv); ++- mnemocodes.put("priv", opc_priv); ++- ++- defineExt(0, "load_ubyte"); ++- defineExt(1, "load_byte"); ++- defineExt(2, "load_char"); ++- defineExt(3, "load_short"); ++- defineExt(4, "load_word"); ++- defineExt(10, "load_char_oe"); ++- defineExt(11, "load_short_oe"); ++- defineExt(12, "load_word_oe"); ++- defineExt(16, "ncload_ubyte"); ++- defineExt(17, "ncload_byte"); ++- defineExt(18, "ncload_char"); ++- defineExt(19, "ncload_short"); ++- defineExt(20, "ncload_word"); ++- defineExt(26, "ncload_char_oe"); ++- defineExt(27, "ncload_short_oe"); ++- defineExt(28, "ncload_word_oe"); ++- defineExt(30, "cache_flush"); ++- defineExt(32, "store_byte"); ++- defineExt(34, "store_short"); ++- defineExt(36, "store_word"); ++- defineExt(42, "store_short_oe"); ++- defineExt(44, "store_word_oe"); ++- defineExt(48, "ncstore_byte"); ++- defineExt(50, "ncstore_short"); ++- defineExt(52, "ncstore_word"); ++- defineExt(58, "ncstore_short_oe"); ++- defineExt(60, "ncstore_word_oe"); ++- defineExt(62, "zero_line"); ++- defineNonPriv(5, "ret_from_sub"); ++- defineNonPriv(63, "enter_sync_method"); ++- definePriv(5, "ret_from_trap"); ++- definePriv(6, "read_dcache_tag"); ++- definePriv(7, "read_dcache_data"); ++- definePriv(14, "read_icache_tag"); ++- definePriv(15, "read_icache_data"); ++- definePriv(22, "powerdown"); ++- definePriv(23, "read_scache_data"); ++- definePriv(31, "cache_index_flush"); ++- definePriv(38, "write_dcache_tag"); ++- definePriv(39, "write_dcache_data"); ++- definePriv(46, "write_icache_tag"); ++- definePriv(47, "write_icache_data"); ++- definePriv(54, "reset"); ++- definePriv(55, "write_scache_data"); ++- for (int i = 0; i < 32; i++) { ++- definePriv(i + 64, "read_reg_" + i); ++- } ++- for (int i = 0; i < 32; i++) { ++- definePriv(i + 96, "write_reg_" + i); ++- } ++- } ++-} ++diff -r bfd7bb421825 -r 3cbaa3d49584 src/share/classes/com/sun/tools/classfile/Opcode.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/Opcode.java Thu Oct 24 02:40:06 2013 +0100 ++@@ -0,0 +1,472 @@ +++/* +++ * Copyright 2009 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.classfile; +++ +++import static com.sun.tools.classfile.Instruction.Kind.*; +++import static com.sun.tools.classfile.Opcode.Set.*; +++ +++/** +++ * See JVMS3, chapter 6. +++ * +++ *

In addition to providing all the standard opcodes defined in JVMS, +++ * this class also provides legacy support for the PicoJava extensions. +++ * +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public enum Opcode { +++ NOP(0x0), +++ ACONST_NULL(0x1), +++ ICONST_M1(0x2), +++ ICONST_0(0x3), +++ ICONST_1(0x4), +++ ICONST_2(0x5), +++ ICONST_3(0x6), +++ ICONST_4(0x7), +++ ICONST_5(0x8), +++ LCONST_0(0x9), +++ LCONST_1(0xa), +++ FCONST_0(0xb), +++ FCONST_1(0xc), +++ FCONST_2(0xd), +++ DCONST_0(0xe), +++ DCONST_1(0xf), +++ BIPUSH(0x10, BYTE), +++ SIPUSH(0x11, SHORT), +++ LDC(0x12, CPREF), +++ LDC_W(0x13, CPREF_W), +++ LDC2_W(0x14, CPREF_W), +++ ILOAD(0x15, LOCAL), +++ LLOAD(0x16, LOCAL), +++ FLOAD(0x17, LOCAL), +++ DLOAD(0x18, LOCAL), +++ ALOAD(0x19, LOCAL), +++ ILOAD_0(0x1a), +++ ILOAD_1(0x1b), +++ ILOAD_2(0x1c), +++ ILOAD_3(0x1d), +++ LLOAD_0(0x1e), +++ LLOAD_1(0x1f), +++ LLOAD_2(0x20), +++ LLOAD_3(0x21), +++ FLOAD_0(0x22), +++ FLOAD_1(0x23), +++ FLOAD_2(0x24), +++ FLOAD_3(0x25), +++ DLOAD_0(0x26), +++ DLOAD_1(0x27), +++ DLOAD_2(0x28), +++ DLOAD_3(0x29), +++ ALOAD_0(0x2a), +++ ALOAD_1(0x2b), +++ ALOAD_2(0x2c), +++ ALOAD_3(0x2d), +++ IALOAD(0x2e), +++ LALOAD(0x2f), +++ FALOAD(0x30), +++ DALOAD(0x31), +++ AALOAD(0x32), +++ BALOAD(0x33), +++ CALOAD(0x34), +++ SALOAD(0x35), +++ ISTORE(0x36, LOCAL), +++ LSTORE(0x37, LOCAL), +++ FSTORE(0x38, LOCAL), +++ DSTORE(0x39, LOCAL), +++ ASTORE(0x3a, LOCAL), +++ ISTORE_0(0x3b), +++ ISTORE_1(0x3c), +++ ISTORE_2(0x3d), +++ ISTORE_3(0x3e), +++ LSTORE_0(0x3f), +++ LSTORE_1(0x40), +++ LSTORE_2(0x41), +++ LSTORE_3(0x42), +++ FSTORE_0(0x43), +++ FSTORE_1(0x44), +++ FSTORE_2(0x45), +++ FSTORE_3(0x46), +++ DSTORE_0(0x47), +++ DSTORE_1(0x48), +++ DSTORE_2(0x49), +++ DSTORE_3(0x4a), +++ ASTORE_0(0x4b), +++ ASTORE_1(0x4c), +++ ASTORE_2(0x4d), +++ ASTORE_3(0x4e), +++ IASTORE(0x4f), +++ LASTORE(0x50), +++ FASTORE(0x51), +++ DASTORE(0x52), +++ AASTORE(0x53), +++ BASTORE(0x54), +++ CASTORE(0x55), +++ SASTORE(0x56), +++ POP(0x57), +++ POP2(0x58), +++ DUP(0x59), +++ DUP_X1(0x5a), +++ DUP_X2(0x5b), +++ DUP2(0x5c), +++ DUP2_X1(0x5d), +++ DUP2_X2(0x5e), +++ SWAP(0x5f), +++ IADD(0x60), +++ LADD(0x61), +++ FADD(0x62), +++ DADD(0x63), +++ ISUB(0x64), +++ LSUB(0x65), +++ FSUB(0x66), +++ DSUB(0x67), +++ IMUL(0x68), +++ LMUL(0x69), +++ FMUL(0x6a), +++ DMUL(0x6b), +++ IDIV(0x6c), +++ LDIV(0x6d), +++ FDIV(0x6e), +++ DDIV(0x6f), +++ IREM(0x70), +++ LREM(0x71), +++ FREM(0x72), +++ DREM(0x73), +++ INEG(0x74), +++ LNEG(0x75), +++ FNEG(0x76), +++ DNEG(0x77), +++ ISHL(0x78), +++ LSHL(0x79), +++ ISHR(0x7a), +++ LSHR(0x7b), +++ IUSHR(0x7c), +++ LUSHR(0x7d), +++ IAND(0x7e), +++ LAND(0x7f), +++ IOR(0x80), +++ LOR(0x81), +++ IXOR(0x82), +++ LXOR(0x83), +++ IINC(0x84, LOCAL_BYTE), +++ I2L(0x85), +++ I2F(0x86), +++ I2D(0x87), +++ L2I(0x88), +++ L2F(0x89), +++ L2D(0x8a), +++ F2I(0x8b), +++ F2L(0x8c), +++ F2D(0x8d), +++ D2I(0x8e), +++ D2L(0x8f), +++ D2F(0x90), +++ I2B(0x91), +++ I2C(0x92), +++ I2S(0x93), +++ LCMP(0x94), +++ FCMPL(0x95), +++ FCMPG(0x96), +++ DCMPL(0x97), +++ DCMPG(0x98), +++ IFEQ(0x99, BRANCH), +++ IFNE(0x9a, BRANCH), +++ IFLT(0x9b, BRANCH), +++ IFGE(0x9c, BRANCH), +++ IFGT(0x9d, BRANCH), +++ IFLE(0x9e, BRANCH), +++ IF_ICMPEQ(0x9f, BRANCH), +++ IF_ICMPNE(0xa0, BRANCH), +++ IF_ICMPLT(0xa1, BRANCH), +++ IF_ICMPGE(0xa2, BRANCH), +++ IF_ICMPGT(0xa3, BRANCH), +++ IF_ICMPLE(0xa4, BRANCH), +++ IF_ACMPEQ(0xa5, BRANCH), +++ IF_ACMPNE(0xa6, BRANCH), +++ GOTO(0xa7, BRANCH), +++ JSR(0xa8, BRANCH), +++ RET(0xa9, LOCAL), +++ TABLESWITCH(0xaa, DYNAMIC), +++ LOOKUPSWITCH(0xab, DYNAMIC), +++ IRETURN(0xac), +++ LRETURN(0xad), +++ FRETURN(0xae), +++ DRETURN(0xaf), +++ ARETURN(0xb0), +++ RETURN(0xb1), +++ GETSTATIC(0xb2, CPREF_W), +++ PUTSTATIC(0xb3, CPREF_W), +++ GETFIELD(0xb4, CPREF_W), +++ PUTFIELD(0xb5, CPREF_W), +++ INVOKEVIRTUAL(0xb6, CPREF_W), +++ INVOKESPECIAL(0xb7, CPREF_W), +++ INVOKESTATIC(0xb8, CPREF_W), +++ INVOKEINTERFACE(0xb9, CPREF_W_UBYTE_ZERO), +++ // unused 0xba +++ NEW(0xbb, CPREF_W), +++ NEWARRAY(0xbc, ATYPE), +++ ANEWARRAY(0xbd, CPREF_W), +++ ARRAYLENGTH(0xbe), +++ ATHROW(0xbf), +++ CHECKCAST(0xc0, CPREF_W), +++ INSTANCEOF(0xc1, CPREF_W), +++ MONITORENTER(0xc2), +++ MONITOREXIT(0xc3), +++ // wide 0xc4 +++ MULTIANEWARRAY(0xc5, CPREF_W_UBYTE), +++ IFNULL(0xc6, BRANCH), +++ IFNONNULL(0xc7, BRANCH), +++ GOTO_W(0xc8, BRANCH_W), +++ JSR_W(0xc9, BRANCH_W), +++ // impdep 0xfe: PicoJava nonpriv +++ // impdep 0xff: Picojava priv +++ +++ // wide opcodes +++ ILOAD_W(0xc415, WIDE_CPREF_W), +++ LLOAD_W(0xc416, WIDE_CPREF_W), +++ FLOAD_W(0xc417, WIDE_CPREF_W), +++ DLOAD_W(0xc418, WIDE_CPREF_W), +++ ALOAD_W(0xc419, WIDE_CPREF_W), +++ ISTORE_W(0xc436, WIDE_CPREF_W), +++ LSTORE_W(0xc437, WIDE_CPREF_W), +++ FSTORE_W(0xc438, WIDE_CPREF_W), +++ DSTORE_W(0xc439, WIDE_CPREF_W), +++ ASTORE_W(0xc43a, WIDE_CPREF_W), +++ IINC_W(0xc484, WIDE_CPREF_W_SHORT), +++ RET_W(0xc4a9, WIDE_CPREF_W), +++ +++ // PicoJava nonpriv instructions +++ LOAD_UBYTE(PICOJAVA, 0xfe00), +++ LOAD_BYTE(PICOJAVA, 0xfe01), +++ LOAD_CHAR(PICOJAVA, 0xfe02), +++ LOAD_SHORT(PICOJAVA, 0xfe03), +++ LOAD_WORD(PICOJAVA, 0xfe04), +++ RET_FROM_SUB(PICOJAVA, 0xfe05), +++ LOAD_CHAR_OE(PICOJAVA, 0xfe0a), +++ LOAD_SHORT_OE(PICOJAVA, 0xfe0b), +++ LOAD_WORD_OE(PICOJAVA, 0xfe0c), +++ NCLOAD_UBYTE(PICOJAVA, 0xfe10), +++ NCLOAD_BYTE(PICOJAVA, 0xfe11), +++ NCLOAD_CHAR(PICOJAVA, 0xfe12), +++ NCLOAD_SHORT(PICOJAVA, 0xfe13), +++ NCLOAD_WORD(PICOJAVA, 0xfe14), +++ NCLOAD_CHAR_OE(PICOJAVA, 0xfe1a), +++ NCLOAD_SHORT_OE(PICOJAVA, 0xfe1b), +++ NCLOAD_WORD_OE(PICOJAVA, 0xfe1c), +++ CACHE_FLUSH(PICOJAVA, 0xfe1e), +++ STORE_BYTE(PICOJAVA, 0xfe20), +++ STORE_SHORT(PICOJAVA, 0xfe22), +++ STORE_WORD(PICOJAVA, 0xfe24), +++ STORE_SHORT_OE(PICOJAVA, 0xfe2a), +++ STORE_WORD_OE(PICOJAVA, 0xfe2c), +++ NCSTORE_BYTE(PICOJAVA, 0xfe30), +++ NCSTORE_SHORT(PICOJAVA, 0xfe32), +++ NCSTORE_WORD(PICOJAVA, 0xfe34), +++ NCSTORE_SHORT_OE(PICOJAVA, 0xfe3a), +++ NCSTORE_WORD_OE(PICOJAVA, 0xfe3c), +++ ZERO_LINE(PICOJAVA, 0xfe3e), +++ ENTER_SYNC_METHOD(PICOJAVA, 0xfe3f), +++ +++ // PicoJava priv instructions +++ PRIV_LOAD_UBYTE(PICOJAVA, 0xff00), +++ PRIV_LOAD_BYTE(PICOJAVA, 0xff01), +++ PRIV_LOAD_CHAR(PICOJAVA, 0xff02), +++ PRIV_LOAD_SHORT(PICOJAVA, 0xff03), +++ PRIV_LOAD_WORD(PICOJAVA, 0xff04), +++ PRIV_RET_FROM_TRAP(PICOJAVA, 0xff05), +++ PRIV_READ_DCACHE_TAG(PICOJAVA, 0xff06), +++ PRIV_READ_DCACHE_DATA(PICOJAVA, 0xff07), +++ PRIV_LOAD_CHAR_OE(PICOJAVA, 0xff0a), +++ PRIV_LOAD_SHORT_OE(PICOJAVA, 0xff0b), +++ PRIV_LOAD_WORD_OE(PICOJAVA, 0xff0c), +++ PRIV_READ_ICACHE_TAG(PICOJAVA, 0xff0e), +++ PRIV_READ_ICACHE_DATA(PICOJAVA, 0xff0f), +++ PRIV_NCLOAD_UBYTE(PICOJAVA, 0xff10), +++ PRIV_NCLOAD_BYTE(PICOJAVA, 0xff11), +++ PRIV_NCLOAD_CHAR(PICOJAVA, 0xff12), +++ PRIV_NCLOAD_SHORT(PICOJAVA, 0xff13), +++ PRIV_NCLOAD_WORD(PICOJAVA, 0xff14), +++ PRIV_POWERDOWN(PICOJAVA, 0xff16), +++ PRIV_READ_SCACHE_DATA(PICOJAVA, 0xff17), +++ PRIV_NCLOAD_CHAR_OE(PICOJAVA, 0xff1a), +++ PRIV_NCLOAD_SHORT_OE(PICOJAVA, 0xff1b), +++ PRIV_NCLOAD_WORD_OE(PICOJAVA, 0xff1c), +++ PRIV_CACHE_FLUSH(PICOJAVA, 0xff1e), +++ PRIV_CACHE_INDEX_FLUSH(PICOJAVA, 0xff1f), +++ PRIV_STORE_BYTE(PICOJAVA, 0xff20), +++ PRIV_STORE_SHORT(PICOJAVA, 0xff22), +++ PRIV_STORE_WORD(PICOJAVA, 0xff24), +++ PRIV_WRITE_DCACHE_TAG(PICOJAVA, 0xff26), +++ PRIV_WRITE_DCACHE_DATA(PICOJAVA, 0xff27), +++ PRIV_STORE_SHORT_OE(PICOJAVA, 0xff2a), +++ PRIV_STORE_WORD_OE(PICOJAVA, 0xff2c), +++ PRIV_WRITE_ICACHE_TAG(PICOJAVA, 0xff2e), +++ PRIV_WRITE_ICACHE_DATA(PICOJAVA, 0xff2f), +++ PRIV_NCSTORE_BYTE(PICOJAVA, 0xff30), +++ PRIV_NCSTORE_SHORT(PICOJAVA, 0xff32), +++ PRIV_NCSTORE_WORD(PICOJAVA, 0xff34), +++ PRIV_RESET(PICOJAVA, 0xff36), +++ PRIV_WRITE_SCACHE_DATA(PICOJAVA, 0xff37), +++ PRIV_NCSTORE_SHORT_OE(PICOJAVA, 0xff3a), +++ PRIV_NCSTORE_WORD_OE(PICOJAVA, 0xff3c), +++ PRIV_ZERO_LINE(PICOJAVA, 0xff3e), +++ PRIV_READ_REG_0(PICOJAVA, 0xff40), +++ PRIV_READ_REG_1(PICOJAVA, 0xff41), +++ PRIV_READ_REG_2(PICOJAVA, 0xff42), +++ PRIV_READ_REG_3(PICOJAVA, 0xff43), +++ PRIV_READ_REG_4(PICOJAVA, 0xff44), +++ PRIV_READ_REG_5(PICOJAVA, 0xff45), +++ PRIV_READ_REG_6(PICOJAVA, 0xff46), +++ PRIV_READ_REG_7(PICOJAVA, 0xff47), +++ PRIV_READ_REG_8(PICOJAVA, 0xff48), +++ PRIV_READ_REG_9(PICOJAVA, 0xff49), +++ PRIV_READ_REG_10(PICOJAVA, 0xff4a), +++ PRIV_READ_REG_11(PICOJAVA, 0xff4b), +++ PRIV_READ_REG_12(PICOJAVA, 0xff4c), +++ PRIV_READ_REG_13(PICOJAVA, 0xff4d), +++ PRIV_READ_REG_14(PICOJAVA, 0xff4e), +++ PRIV_READ_REG_15(PICOJAVA, 0xff4f), +++ PRIV_READ_REG_16(PICOJAVA, 0xff50), +++ PRIV_READ_REG_17(PICOJAVA, 0xff51), +++ PRIV_READ_REG_18(PICOJAVA, 0xff52), +++ PRIV_READ_REG_19(PICOJAVA, 0xff53), +++ PRIV_READ_REG_20(PICOJAVA, 0xff54), +++ PRIV_READ_REG_21(PICOJAVA, 0xff55), +++ PRIV_READ_REG_22(PICOJAVA, 0xff56), +++ PRIV_READ_REG_23(PICOJAVA, 0xff57), +++ PRIV_READ_REG_24(PICOJAVA, 0xff58), +++ PRIV_READ_REG_25(PICOJAVA, 0xff59), +++ PRIV_READ_REG_26(PICOJAVA, 0xff5a), +++ PRIV_READ_REG_27(PICOJAVA, 0xff5b), +++ PRIV_READ_REG_28(PICOJAVA, 0xff5c), +++ PRIV_READ_REG_29(PICOJAVA, 0xff5d), +++ PRIV_READ_REG_30(PICOJAVA, 0xff5e), +++ PRIV_READ_REG_31(PICOJAVA, 0xff5f), +++ PRIV_WRITE_REG_0(PICOJAVA, 0xff60), +++ PRIV_WRITE_REG_1(PICOJAVA, 0xff61), +++ PRIV_WRITE_REG_2(PICOJAVA, 0xff62), +++ PRIV_WRITE_REG_3(PICOJAVA, 0xff63), +++ PRIV_WRITE_REG_4(PICOJAVA, 0xff64), +++ PRIV_WRITE_REG_5(PICOJAVA, 0xff65), +++ PRIV_WRITE_REG_6(PICOJAVA, 0xff66), +++ PRIV_WRITE_REG_7(PICOJAVA, 0xff67), +++ PRIV_WRITE_REG_8(PICOJAVA, 0xff68), +++ PRIV_WRITE_REG_9(PICOJAVA, 0xff69), +++ PRIV_WRITE_REG_10(PICOJAVA, 0xff6a), +++ PRIV_WRITE_REG_11(PICOJAVA, 0xff6b), +++ PRIV_WRITE_REG_12(PICOJAVA, 0xff6c), +++ PRIV_WRITE_REG_13(PICOJAVA, 0xff6d), +++ PRIV_WRITE_REG_14(PICOJAVA, 0xff6e), +++ PRIV_WRITE_REG_15(PICOJAVA, 0xff6f), +++ PRIV_WRITE_REG_16(PICOJAVA, 0xff70), +++ PRIV_WRITE_REG_17(PICOJAVA, 0xff71), +++ PRIV_WRITE_REG_18(PICOJAVA, 0xff72), +++ PRIV_WRITE_REG_19(PICOJAVA, 0xff73), +++ PRIV_WRITE_REG_20(PICOJAVA, 0xff74), +++ PRIV_WRITE_REG_21(PICOJAVA, 0xff75), +++ PRIV_WRITE_REG_22(PICOJAVA, 0xff76), +++ PRIV_WRITE_REG_23(PICOJAVA, 0xff77), +++ PRIV_WRITE_REG_24(PICOJAVA, 0xff78), +++ PRIV_WRITE_REG_25(PICOJAVA, 0xff79), +++ PRIV_WRITE_REG_26(PICOJAVA, 0xff7a), +++ PRIV_WRITE_REG_27(PICOJAVA, 0xff7b), +++ PRIV_WRITE_REG_28(PICOJAVA, 0xff7c), +++ PRIV_WRITE_REG_29(PICOJAVA, 0xff7d), +++ PRIV_WRITE_REG_30(PICOJAVA, 0xff7e), +++ PRIV_WRITE_REG_31(PICOJAVA, 0xff7f); +++ +++ Opcode(int opcode) { +++ this(STANDARD, opcode, NO_OPERANDS); +++ } +++ +++ Opcode(int opcode, Instruction.Kind kind) { +++ this(STANDARD, opcode, kind); +++ } +++ +++ Opcode(Set set, int opcode) { +++ this(set, opcode, (set == STANDARD ? NO_OPERANDS : WIDE_NO_OPERANDS)); +++ } +++ +++ Opcode(Set set, int opcode, Instruction.Kind kind) { +++ this.set = set; +++ this.opcode = opcode; +++ this.kind = kind; +++ } +++ +++ public final Set set; +++ public final int opcode; +++ public final Instruction.Kind kind; +++ +++ /** Get the Opcode for a simple standard 1-byte opcode. */ +++ public static Opcode get(int opcode) { +++ return stdOpcodes[opcode]; +++ } +++ +++ /** Get the Opcode for 1- or 2-byte opcode. */ +++ public static Opcode get(int opcodePrefix, int opcode) { +++ Opcode[] block = getOpcodeBlock(opcodePrefix); +++ return (block == null ? null : block[opcode]); +++ } +++ +++ private static Opcode[] getOpcodeBlock(int opcodePrefix) { +++ switch (opcodePrefix) { +++ case 0: +++ return stdOpcodes; +++ case WIDE: +++ return wideOpcodes; +++ case NONPRIV: +++ return nonPrivOpcodes; +++ case PRIV: +++ return privOpcodes; +++ default: +++ return null; +++ } +++ +++ } +++ +++ private static Opcode[] stdOpcodes = new Opcode[256]; +++ private static Opcode[] wideOpcodes = new Opcode[256]; +++ private static Opcode[] nonPrivOpcodes = new Opcode[256]; +++ private static Opcode[] privOpcodes = new Opcode[256]; +++ static { +++ for (Opcode o: values()) +++ getOpcodeBlock(o.opcode >> 8)[o.opcode & 0xff] = o; +++ } +++ +++ /** The byte prefix for the wide instructions. */ +++ public static final int WIDE = 0xc4; +++ /** The byte prefix for the PicoJava nonpriv instructions. */ +++ public static final int NONPRIV = 0xfe; +++ /** The byte prefix for the PicoJava priv instructions. */ +++ public static final int PRIV = 0xff; +++ +++ public enum Set { +++ /** Standard opcodes. */ +++ STANDARD, +++ /** Legacy support for PicoJava opcodes. */ +++ PICOJAVA }; +++} ++diff -r bfd7bb421825 -r 3cbaa3d49584 src/share/classes/com/sun/tools/javap/CodeWriter.java ++--- openjdk/langtools/src/share/classes/com/sun/tools/javap/CodeWriter.java Tue Oct 22 01:03:49 2013 +0100 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/CodeWriter.java Thu Oct 24 02:40:06 2013 +0100 ++@@ -30,9 +30,12 @@ ++ import com.sun.tools.classfile.ConstantPool; ++ import com.sun.tools.classfile.ConstantPoolException; ++ import com.sun.tools.classfile.DescriptorException; +++import com.sun.tools.classfile.Instruction; +++import com.sun.tools.classfile.Instruction.TypeKind; ++ import com.sun.tools.classfile.Method; +++import com.sun.tools.classfile.Opcode; ++ ++-import static com.sun.tools.classfile.OpCodes.*; +++//import static com.sun.tools.classfile.OpCodes.*; ++ ++ /* ++ * Write the contents of a Code attribute. ++@@ -87,218 +90,92 @@ ++ } ++ ++ public void writeInstrs(Code_attribute attr) { ++- try { ++- for (int pc = 0; pc < attr.code_length;) { ++- print(" " + pc + ":\t"); ++- pc += writeInstr(attr, pc); ++- println(); +++ for (Instruction instr: attr.getInstructions()) { +++ try { +++ writeInstr(instr); +++ } catch (ArrayIndexOutOfBoundsException e) { +++ println(report("error at or after byte " + instr.getPC())); +++ break; ++ } ++- } catch (Code_attribute.InvalidIndex e) { ++- println(report(e)); ++ } ++ } ++ ++- public int writeInstr(Code_attribute attr, int pc) ++- throws Code_attribute.InvalidIndex { ++- String lP = ""; ++- int opcode = attr.getUnsignedByte(pc); ++- int opcode2; ++- String mnem; ++- switch (opcode) { ++- case opc_nonpriv: ++- case opc_priv: { ++- opcode2 = attr.getUnsignedByte(pc + 1); ++- mnem = opcName((opcode << 8) + opcode2); ++- if (mnem == null) { ++- mnem = opcName(opcode) + " " + opcode2; ++- } ++- print(mnem); ++- return 2; +++ public void writeInstr(Instruction instr) { +++ print(" " + instr.getPC() + ":\t"); +++ print(instr.getMnemonic()); +++ instr.accept(instructionPrinter, null); +++ println(); +++ } +++ // where +++ Instruction.KindVisitor instructionPrinter = +++ new Instruction.KindVisitor() { +++ +++ public Void visitNoOperands(Instruction instr, Void p) { +++ return null; +++ } +++ +++ public Void visitArrayType(Instruction instr, TypeKind kind, Void p) { +++ print(" " + kind.name); +++ return null; +++ } +++ +++ public Void visitBranch(Instruction instr, int offset, Void p) { +++ print("\t" + (instr.getPC() + offset)); +++ return null; +++ } +++ +++ public Void visitConstantPoolRef(Instruction instr, int index, Void p) { +++ print("\t#" + index + "; //"); +++ printConstant(index); +++ return null; +++ } +++ +++ public Void visitConstantPoolRefAndValue(Instruction instr, int index, int value, Void p) { +++ print("\t#" + index + ", " + value + "; //"); +++ printConstant(index); +++ return null; +++ } +++ +++ public Void visitLocal(Instruction instr, int index, Void p) { +++ print("\t" + index); +++ return null; +++ } +++ +++ public Void visitLocalAndValue(Instruction instr, int index, int value, Void p) { +++ print("\t" + index + ", " + value); +++ return null; +++ } +++ +++ public Void visitLookupSwitch(Instruction instr, int default_, int npairs, int[] matches, int[] offsets) { +++ int pc = instr.getPC(); +++ print("{ //" + npairs); +++ for (int i = 0; i < npairs; i++) { +++ print("\n\t\t" + matches[i] + ": " + (pc + offsets[i]) + ";"); ++ } ++- case opc_wide: { ++- opcode2 = attr.getUnsignedByte(pc + 1); ++- mnem = opcName((opcode << 8) + opcode2); ++- if (mnem == null) { ++- print("bytecode " + opcode); ++- return 1; ++- } ++- print(mnem + " " + attr.getUnsignedShort(pc + 2)); ++- if (opcode2 == opc_iinc) { ++- print(", " + attr.getShort(pc + 4)); ++- return 6; ++- } ++- return 4; +++ print("\n\t\tdefault: " + (pc + default_) + " }"); +++ return null; +++ } +++ +++ public Void visitTableSwitch(Instruction instr, int default_, int low, int high, int[] offsets) { +++ int pc = instr.getPC(); +++ print("{ //" + low + " to " + high); +++ for (int i = 0; i < offsets.length; i++) { +++ print("\n\t\t" + (low + i) + ": " + (pc + offsets[i]) + ";"); ++ } +++ print("\n\t\tdefault: " + (pc + default_) + " }"); +++ return null; ++ } ++- mnem = opcName(opcode); ++- if (mnem == null) { ++- print("bytecode " + opcode); ++- return 1; +++ +++ public Void visitValue(Instruction instr, int value, Void p) { +++ print("\t" + value); +++ return null; ++ } ++- if (opcode > opc_jsr_w) { ++- print("bytecode " + opcode); ++- return 1; +++ +++ public Void visitUnknown(Instruction instr, Void p) { +++ return null; ++ } ++- print(opcName(opcode)); ++- switch (opcode) { ++- case opc_aload: ++- case opc_astore: ++- case opc_fload: ++- case opc_fstore: ++- case opc_iload: ++- case opc_istore: ++- case opc_lload: ++- case opc_lstore: ++- case opc_dload: ++- case opc_dstore: ++- case opc_ret: ++- print("\t" + attr.getUnsignedByte(pc + 1)); ++- return 2; ++- case opc_iinc: ++- print("\t" + attr.getUnsignedByte(pc + 1) + ", " + attr.getByte(pc + 2)); ++- return 3; ++- case opc_tableswitch: ++- { ++- int tb = align(pc + 1); ++- int default_skip = attr.getInt(tb); ++- int low = attr.getInt(tb + 4); ++- int high = attr.getInt(tb + 8); ++- int count = high - low; ++- print("{ //" + low + " to " + high); ++- for (int i = 0; i <= count; i++) { ++- print("\n\t\t" + (i + low) + ": " + lP + (pc + attr.getInt(tb + 12 + 4 * i)) + ";"); ++- } ++- print("\n\t\tdefault: " + lP + (default_skip + pc) + " }"); ++- return tb - pc + 16 + count * 4; ++- } ++- case opc_lookupswitch: ++- { ++- int tb = align(pc + 1); ++- int default_skip = attr.getInt(tb); ++- int npairs = attr.getInt(tb + 4); ++- print("{ //" + npairs); ++- for (int i = 1; i <= npairs; i++) { ++- print("\n\t\t" + attr.getInt(tb + i * 8) + ": " + lP + (pc + attr.getInt(tb + 4 + i * 8)) + ";"); ++- } ++- print("\n\t\tdefault: " + lP + (default_skip + pc) + " }"); ++- return tb - pc + (npairs + 1) * 8; ++- } ++- case opc_newarray: ++- int type = attr.getUnsignedByte(pc + 1); ++- switch (type) { ++- case T_BOOLEAN: ++- print(" boolean"); ++- break; ++- case T_BYTE: ++- print(" byte"); ++- break; ++- case T_CHAR: ++- print(" char"); ++- break; ++- case T_SHORT: ++- print(" short"); ++- break; ++- case T_INT: ++- print(" int"); ++- break; ++- case T_LONG: ++- print(" long"); ++- break; ++- case T_FLOAT: ++- print(" float"); ++- break; ++- case T_DOUBLE: ++- print(" double"); ++- break; ++- case T_CLASS: ++- print(" class"); ++- break; ++- default: ++- print(" BOGUS TYPE:" + type); ++- } ++- return 2; ++- case opc_anewarray: ++- { ++- int index = attr.getUnsignedShort(pc + 1); ++- print("\t#" + index + "; //"); ++- printConstant(index); ++- return 3; ++- } ++- case opc_sipush: ++- print("\t" + attr.getShort(pc + 1)); ++- return 3; ++- case opc_bipush: ++- print("\t" + attr.getByte(pc + 1)); ++- return 2; ++- case opc_ldc: ++- { ++- int index = attr.getUnsignedByte(pc + 1); ++- print("\t#" + index + "; //"); ++- printConstant(index); ++- return 2; ++- } ++- case opc_ldc_w: ++- case opc_ldc2_w: ++- case opc_instanceof: ++- case opc_checkcast: ++- case opc_new: ++- case opc_putstatic: ++- case opc_getstatic: ++- case opc_putfield: ++- case opc_getfield: ++- case opc_invokevirtual: ++- case opc_invokespecial: ++- case opc_invokestatic: ++- { ++- int index = attr.getUnsignedShort(pc + 1); ++- print("\t#" + index + "; //"); ++- printConstant(index); ++- return 3; ++- } ++- case opc_invokeinterface: ++- { ++- int index = attr.getUnsignedShort(pc + 1); ++- int nargs = attr.getUnsignedByte(pc + 3); ++- print("\t#" + index + ", " + nargs + "; //"); ++- printConstant(index); ++- return 5; ++- } ++- case opc_multianewarray: ++- { ++- int index = attr.getUnsignedShort(pc + 1); ++- int dimensions = attr.getUnsignedByte(pc + 3); ++- print("\t#" + index + ", " + dimensions + "; //"); ++- printConstant(index); ++- return 4; ++- } ++- case opc_jsr: ++- case opc_goto: ++- case opc_ifeq: ++- case opc_ifge: ++- case opc_ifgt: ++- case opc_ifle: ++- case opc_iflt: ++- case opc_ifne: ++- case opc_if_icmpeq: ++- case opc_if_icmpne: ++- case opc_if_icmpge: ++- case opc_if_icmpgt: ++- case opc_if_icmple: ++- case opc_if_icmplt: ++- case opc_if_acmpeq: ++- case opc_if_acmpne: ++- case opc_ifnull: ++- case opc_ifnonnull: ++- print("\t" + lP + (pc + attr.getShort(pc + 1))); ++- return 3; ++- case opc_jsr_w: ++- case opc_goto_w: ++- print("\t" + lP + (pc + attr.getInt(pc + 1))); ++- return 5; ++- default: ++- return 1; ++- } ++- } +++ }; +++ ++ ++ public void writeExceptionTable(Code_attribute attr) { ++ if (attr.exception_table_langth > 0) { +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/6824493-experimental.patch openjdk-6-6b27-1.12.6/patches/openjdk/6824493-experimental.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/6824493-experimental.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/6824493-experimental.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,1304 @@ ++# HG changeset patch ++# User jjg ++# Date 1242759054 25200 ++# Tue May 19 11:50:54 2009 -0700 ++# Node ID 4b55db11179d066331b829ca5c4722c33287deea ++# Parent 8f5d8429b3f18ee4c9820ac1fb597f63c55911f3 ++6824493: experimental support for additional info for instructions ++Reviewed-by: mcimadamore ++ ++diff -r 8f5d8429b3f1 -r 4b55db11179d src/share/classes/com/sun/tools/classfile/StackMapTable_attribute.java ++--- openjdk/langtools/src/share/classes/com/sun/tools/classfile/StackMapTable_attribute.java Tue Jul 08 18:06:19 2008 -0700 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/StackMapTable_attribute.java Tue May 19 11:50:54 2009 -0700 ++@@ -106,6 +106,8 @@ ++ return 1; ++ } ++ +++ public abstract int getOffsetDelta(); +++ ++ public abstract R accept(Visitor visitor, D data); ++ ++ public final int frame_type; ++@@ -129,6 +131,10 @@ ++ public R accept(Visitor visitor, D data) { ++ return visitor.visit_same_frame(this, data); ++ } +++ +++ public int getOffsetDelta() { +++ return frame_type; +++ } ++ } ++ ++ public static class same_locals_1_stack_item_frame extends stack_map_frame { ++@@ -148,6 +154,10 @@ ++ return visitor.visit_same_locals_1_stack_item_frame(this, data); ++ } ++ +++ public int getOffsetDelta() { +++ return frame_type - 64; +++ } +++ ++ public final verification_type_info[] stack; ++ } ++ ++@@ -169,6 +179,10 @@ ++ return visitor.visit_same_locals_1_stack_item_frame_extended(this, data); ++ } ++ +++ public int getOffsetDelta() { +++ return offset_delta; +++ } +++ ++ public final int offset_delta; ++ public final verification_type_info[] stack; ++ } ++@@ -188,6 +202,10 @@ ++ return visitor.visit_chop_frame(this, data); ++ } ++ +++ public int getOffsetDelta() { +++ return offset_delta; +++ } +++ ++ public final int offset_delta; ++ } ++ ++@@ -206,6 +224,10 @@ ++ return visitor.visit_same_frame_extended(this, data); ++ } ++ +++ public int getOffsetDelta() { +++ return offset_delta; +++ } +++ ++ public final int offset_delta; ++ } ++ ++@@ -231,6 +253,10 @@ ++ return visitor.visit_append_frame(this, data); ++ } ++ +++ public int getOffsetDelta() { +++ return offset_delta; +++ } +++ ++ public final int offset_delta; ++ public final verification_type_info[] locals; ++ } ++@@ -265,6 +291,10 @@ ++ return visitor.visit_full_frame(this, data); ++ } ++ +++ public int getOffsetDelta() { +++ return offset_delta; +++ } +++ ++ public final int offset_delta; ++ public final int number_of_locals; ++ public final verification_type_info[] locals; ++@@ -307,7 +337,7 @@ ++ } ++ } ++ ++- verification_type_info(int tag) { +++ protected verification_type_info(int tag) { ++ this.tag = tag; ++ } ++ ++diff -r 8f5d8429b3f1 -r 4b55db11179d src/share/classes/com/sun/tools/javap/BasicWriter.java ++--- openjdk/langtools/src/share/classes/com/sun/tools/javap/BasicWriter.java Tue Jul 08 18:06:19 2008 -0700 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/BasicWriter.java Tue May 19 11:50:54 2009 -0700 ++@@ -44,6 +44,9 @@ ++ protected BasicWriter(Context context) { ++ lineWriter = LineWriter.instance(context); ++ out = context.get(PrintWriter.class); +++ messages = context.get(Messages.class); +++ if (messages == null) +++ throw new AssertionError(); ++ } ++ ++ protected void print(String s) { ++@@ -100,8 +103,26 @@ ++ return "???"; ++ } ++ +++ protected String space(int w) { +++ if (w < spaces.length && spaces[w] != null) +++ return spaces[w]; +++ +++ StringBuilder sb = new StringBuilder(); +++ for (int i = 0; i < w; i++) +++ sb.append(" "); +++ +++ String s = sb.toString(); +++ if (w < spaces.length) +++ spaces[w] = s; +++ +++ return s; +++ } +++ +++ private String[] spaces = new String[80]; +++ ++ private LineWriter lineWriter; ++ private PrintWriter out; +++ protected Messages messages; ++ ++ private static class LineWriter { ++ static LineWriter instance(Context context) { ++diff -r 8f5d8429b3f1 -r 4b55db11179d src/share/classes/com/sun/tools/javap/ClassWriter.java ++--- openjdk/langtools/src/share/classes/com/sun/tools/javap/ClassWriter.java Tue Jul 08 18:06:19 2008 -0700 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/ClassWriter.java Tue May 19 11:50:54 2009 -0700 ++@@ -26,7 +26,9 @@ ++ package com.sun.tools.javap; ++ ++ import java.net.URI; +++import java.text.DateFormat; ++ import java.util.Collection; +++import java.util.Date; ++ import java.util.List; ++ ++ import com.sun.tools.classfile.AccessFlags; ++@@ -47,8 +49,6 @@ ++ import com.sun.tools.classfile.SourceFile_attribute; ++ import com.sun.tools.classfile.Type; ++ ++-import java.text.DateFormat; ++-import java.util.Date; ++ import static com.sun.tools.classfile.AccessFlags.*; ++ ++ /* ++diff -r 8f5d8429b3f1 -r 4b55db11179d src/share/classes/com/sun/tools/javap/CodeWriter.java ++--- openjdk/langtools/src/share/classes/com/sun/tools/javap/CodeWriter.java Tue Jul 08 18:06:19 2008 -0700 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/CodeWriter.java Tue May 19 11:50:54 2009 -0700 ++@@ -25,6 +25,9 @@ ++ ++ package com.sun.tools.javap; ++ +++import java.util.ArrayList; +++import java.util.List; +++ ++ import com.sun.tools.classfile.AccessFlags; ++ import com.sun.tools.classfile.Code_attribute; ++ import com.sun.tools.classfile.ConstantPool; ++@@ -33,9 +36,6 @@ ++ import com.sun.tools.classfile.Instruction; ++ import com.sun.tools.classfile.Instruction.TypeKind; ++ import com.sun.tools.classfile.Method; ++-import com.sun.tools.classfile.Opcode; ++- ++-//import static com.sun.tools.classfile.OpCodes.*; ++ ++ /* ++ * Write the contents of a Code attribute. ++@@ -59,6 +59,12 @@ ++ attrWriter = AttributeWriter.instance(context); ++ classWriter = ClassWriter.instance(context); ++ constantWriter = ConstantWriter.instance(context); +++ sourceWriter = SourceWriter.instance(context); +++ tryBlockWriter = TryBlockWriter.instance(context); +++ stackMapWriter = StackMapWriter.instance(context); +++ localVariableTableWriter = LocalVariableTableWriter.instance(context); +++ localVariableTypeTableWriter = LocalVariableTypeTableWriter.instance(context); +++ options = Options.instance(context); ++ } ++ ++ void write(Code_attribute attr, ConstantPool constant_pool) { ++@@ -92,14 +98,21 @@ ++ } ++ ++ public void writeInstrs(Code_attribute attr) { +++ List detailWriters = getDetailWriters(attr); +++ ++ for (Instruction instr: attr.getInstructions()) { ++ try { +++ for (InstructionDetailWriter w: detailWriters) +++ w.writeDetails(instr); ++ writeInstr(instr); ++ } catch (ArrayIndexOutOfBoundsException e) { ++ println(report("error at or after byte " + instr.getPC())); ++ break; ++ } ++ } +++ +++ for (InstructionDetailWriter w: detailWriters) +++ w.flush(); ++ } ++ ++ public void writeInstr(Instruction instr) { ++@@ -213,11 +226,45 @@ ++ constantWriter.write(index); ++ } ++ ++- private static int align(int n) { ++- return (n + 3) & ~3; +++ private List getDetailWriters(Code_attribute attr) { +++ List detailWriters = +++ new ArrayList(); +++ if (options.details.contains(InstructionDetailWriter.Kind.SOURCE)) { +++ sourceWriter.reset(classWriter.getClassFile(), attr); +++ detailWriters.add(sourceWriter); +++ } +++ +++ if (options.details.contains(InstructionDetailWriter.Kind.LOCAL_VARS)) { +++ localVariableTableWriter.reset(attr); +++ detailWriters.add(localVariableTableWriter); +++ } +++ +++ if (options.details.contains(InstructionDetailWriter.Kind.LOCAL_VAR_TYPES)) { +++ localVariableTypeTableWriter.reset(attr); +++ detailWriters.add(localVariableTypeTableWriter); +++ } +++ +++ if (options.details.contains(InstructionDetailWriter.Kind.STACKMAPS)) { +++ stackMapWriter.reset(attr); +++ stackMapWriter.writeInitialDetails(); +++ detailWriters.add(stackMapWriter); +++ } +++ +++ if (options.details.contains(InstructionDetailWriter.Kind.TRY_BLOCKS)) { +++ tryBlockWriter.reset(attr); +++ detailWriters.add(tryBlockWriter); +++ } +++ +++ return detailWriters; ++ } ++ ++ private AttributeWriter attrWriter; ++ private ClassWriter classWriter; ++ private ConstantWriter constantWriter; +++ private LocalVariableTableWriter localVariableTableWriter; +++ private LocalVariableTypeTableWriter localVariableTypeTableWriter; +++ private SourceWriter sourceWriter; +++ private StackMapWriter stackMapWriter; +++ private TryBlockWriter tryBlockWriter; +++ private Options options; ++ } ++diff -r 8f5d8429b3f1 -r 4b55db11179d src/share/classes/com/sun/tools/javap/InstructionDetailWriter.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/InstructionDetailWriter.java Tue May 19 11:50:54 2009 -0700 ++@@ -0,0 +1,57 @@ +++/* +++ * Copyright 2009 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.javap; +++ +++import com.sun.tools.classfile.Instruction; +++ +++ +++/* +++ * Write additional details for an instruction. +++ * +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public abstract class InstructionDetailWriter extends BasicWriter { +++ public enum Kind { +++ LOCAL_VARS("localVariables"), +++ LOCAL_VAR_TYPES("localVariableTypes"), +++ SOURCE("source"), +++ STACKMAPS("stackMaps"), +++ TRY_BLOCKS("tryBlocks"); +++ Kind(String option) { +++ this.option = option; +++ } +++ final String option; +++ } +++ InstructionDetailWriter(Context context) { +++ super(context); +++ } +++ +++ abstract void writeDetails(Instruction instr); +++ void flush() { } +++} ++diff -r 8f5d8429b3f1 -r 4b55db11179d src/share/classes/com/sun/tools/javap/JavapTask.java ++--- openjdk/langtools/src/share/classes/com/sun/tools/javap/JavapTask.java Tue Jul 08 18:06:19 2008 -0700 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/JavapTask.java Tue May 19 11:50:54 2009 -0700 ++@@ -40,6 +40,7 @@ ++ import java.text.MessageFormat; ++ import java.util.ArrayList; ++ import java.util.Arrays; +++import java.util.EnumSet; ++ import java.util.HashMap; ++ import java.util.Iterator; ++ import java.util.List; ++@@ -66,7 +67,7 @@ ++ * This code and its internal interfaces are subject to change or ++ * deletion without notice. ++ */ ++-public class JavapTask implements DisassemblerTool.DisassemblerTask { +++public class JavapTask implements DisassemblerTool.DisassemblerTask, Messages { ++ public class BadArgs extends Exception { ++ static final long serialVersionUID = 8765093759964640721L; ++ BadArgs(String key, Object... args) { ++@@ -242,6 +243,56 @@ ++ } ++ }, ++ +++ new Option(false, "-XDdetails") { +++ void process(JavapTask task, String opt, String arg) { +++ task.options.details = EnumSet.allOf(InstructionDetailWriter.Kind.class); +++ } +++ +++ }, +++ +++ new Option(false, "-XDdetails:") { +++ @Override +++ boolean matches(String opt) { +++ int sep = opt.indexOf(":"); +++ return sep != -1 && super.matches(opt.substring(0, sep + 1)); +++ } +++ +++ void process(JavapTask task, String opt, String arg) throws BadArgs { +++ int sep = opt.indexOf(":"); +++ for (String v: opt.substring(sep + 1).split("[,: ]+")) { +++ if (!handleArg(task, v)) +++ throw task.new BadArgs("err.invalid.arg.for.option", v); +++ } +++ } +++ +++ boolean handleArg(JavapTask task, String arg) { +++ if (arg.length() == 0) +++ return true; +++ +++ if (arg.equals("all")) { +++ task.options.details = EnumSet.allOf(InstructionDetailWriter.Kind.class); +++ return true; +++ } +++ +++ boolean on = true; +++ if (arg.startsWith("-")) { +++ on = false; +++ arg = arg.substring(1); +++ } +++ +++ for (InstructionDetailWriter.Kind k: InstructionDetailWriter.Kind.values()) { +++ if (arg.equalsIgnoreCase(k.option)) { +++ if (on) +++ task.options.details.add(k); +++ else +++ task.options.details.remove(k); +++ return true; +++ } +++ } +++ return false; +++ } +++ }, +++ ++ new Option(false, "-constants") { ++ void process(JavapTask task, String opt, String arg) { ++ task.options.showConstants = true; ++@@ -284,6 +335,7 @@ ++ ++ public JavapTask() { ++ context = new Context(); +++ context.put(Messages.class, this); ++ options = Options.instance(context); ++ attributeFactory = new Attribute.Factory(); ++ } ++@@ -489,6 +541,8 @@ ++ ++ context.put(PrintWriter.class, log); ++ ClassWriter classWriter = ClassWriter.instance(context); +++ SourceWriter sourceWriter = SourceWriter.instance(context); +++ sourceWriter.setFileManager(fileManager); ++ ++ boolean ok = true; ++ ++@@ -749,11 +803,11 @@ ++ ++ } ++ ++- private String getMessage(String key, Object... args) { +++ public String getMessage(String key, Object... args) { ++ return getMessage(task_locale, key, args); ++ } ++ ++- private String getMessage(Locale locale, String key, Object... args) { +++ public String getMessage(Locale locale, String key, Object... args) { ++ if (bundles == null) { ++ // could make this a HashMap> ++ // and for efficiency, keep a hard reference to the bundle for the task ++diff -r 8f5d8429b3f1 -r 4b55db11179d src/share/classes/com/sun/tools/javap/Messages.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/Messages.java Tue May 19 11:50:54 2009 -0700 ++@@ -0,0 +1,42 @@ +++/* +++ * Copyright 2007-2009 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.javap; +++ +++import java.util.Locale; +++ +++/** +++ * Access to javap messages. +++ * +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public interface Messages { +++ String getMessage(String key, Object... args); +++ +++ String getMessage(Locale locale, String key, Object... args); +++} ++diff -r 8f5d8429b3f1 -r 4b55db11179d src/share/classes/com/sun/tools/javap/Options.java ++--- openjdk/langtools/src/share/classes/com/sun/tools/javap/Options.java Tue Jul 08 18:06:19 2008 -0700 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/Options.java Tue May 19 11:50:54 2009 -0700 ++@@ -25,8 +25,10 @@ ++ ++ package com.sun.tools.javap; ++ +++import java.util.EnumSet; ++ import java.util.HashSet; ++ import java.util.Set; +++ ++ import com.sun.tools.classfile.AccessFlags; ++ ++ /* ++@@ -77,6 +79,7 @@ ++ public boolean showLineAndLocalVariableTables; ++ public int showAccess; ++ public Set accessOptions = new HashSet(); +++ public Set details = EnumSet.noneOf(InstructionDetailWriter.Kind.class); ++ public boolean showDisassembled; ++ public boolean showInternalSignatures; ++ public boolean showAllAttrs; ++diff -r 8f5d8429b3f1 -r 4b55db11179d src/share/classes/com/sun/tools/javap/SourceWriter.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/SourceWriter.java Tue May 19 11:50:54 2009 -0700 ++@@ -0,0 +1,207 @@ +++/* +++ * Copyright 2009 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.javap; +++ +++import java.io.BufferedReader; +++import java.io.IOException; +++import java.io.StringReader; +++import java.util.ArrayList; +++import java.util.List; +++import java.util.Set; +++import java.util.SortedMap; +++import java.util.SortedSet; +++import java.util.TreeMap; +++import java.util.TreeSet; +++import javax.tools.JavaFileManager; +++import javax.tools.JavaFileManager.Location; +++import javax.tools.JavaFileObject; +++import javax.tools.StandardLocation; +++ +++import com.sun.tools.classfile.Attribute; +++import com.sun.tools.classfile.ClassFile; +++import com.sun.tools.classfile.Code_attribute; +++import com.sun.tools.classfile.ConstantPoolException; +++import com.sun.tools.classfile.Instruction; +++import com.sun.tools.classfile.LineNumberTable_attribute; +++import com.sun.tools.classfile.SourceFile_attribute; +++ +++ +++/** +++ * Annotate instructions with source code. +++ * +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class SourceWriter extends InstructionDetailWriter { +++ static SourceWriter instance(Context context) { +++ SourceWriter instance = context.get(SourceWriter.class); +++ if (instance == null) +++ instance = new SourceWriter(context); +++ return instance; +++ } +++ +++ protected SourceWriter(Context context) { +++ super(context); +++ context.put(SourceWriter.class, this); +++ } +++ +++ void setFileManager(JavaFileManager fileManager) { +++ this.fileManager = fileManager; +++ } +++ +++ public void reset(ClassFile cf, Code_attribute attr) { +++ setSource(cf); +++ setLineMap(attr); +++ } +++ +++ public void writeDetails(Instruction instr) { +++ String indent = space(40); // could get from Options? +++ Set lines = lineMap.get(instr.getPC()); +++ if (lines != null) { +++ for (int line: lines) { +++ print(indent); +++ print(String.format(" %4d ", line)); +++ if (line < sourceLines.length) +++ print(sourceLines[line]); +++ println(); +++ int nextLine = nextLine(line); +++ for (int i = line + 1; i < nextLine; i++) { +++ print(indent); +++ print(String.format("(%4d)", i)); +++ if (i < sourceLines.length) +++ print(sourceLines[i]); +++ println(); +++ } +++ } +++ } +++ +++ } +++ +++ private void setLineMap(Code_attribute attr) { +++ SortedMap> map = +++ new TreeMap>(); +++ SortedSet allLines = new TreeSet(); +++ for (Attribute a: attr.attributes) { +++ if (a instanceof LineNumberTable_attribute) { +++ LineNumberTable_attribute t = (LineNumberTable_attribute) a; +++ for (LineNumberTable_attribute.Entry e: t.line_number_table) { +++ int start_pc = e.start_pc; +++ int line = e.line_number; +++ SortedSet pcLines = map.get(start_pc); +++ if (pcLines == null) { +++ pcLines = new TreeSet(); +++ map.put(start_pc, pcLines); +++ } +++ pcLines.add(line); +++ allLines.add(line); +++ } +++ } +++ } +++ lineMap = map; +++ lineList = new ArrayList(allLines); +++ } +++ +++ private void setSource(ClassFile cf) { +++ if (cf != classFile) { +++ classFile = cf; +++ sourceLines = splitLines(readSource(cf)); +++ } +++ } +++ +++ private String readSource(ClassFile cf) { +++ Location location; +++ if (fileManager.hasLocation((StandardLocation.SOURCE_PATH))) +++ location = StandardLocation.SOURCE_PATH; +++ else +++ location = StandardLocation.CLASS_PATH; +++ +++ // Guess the source file for a class from the package name for this +++ // class and the base of the source file. This avoids having to read +++ // additional classes to determine the outmost class from any +++ // InnerClasses and EnclosingMethod attributes. +++ try { +++ String className = cf.getName(); +++ SourceFile_attribute sf = +++ (SourceFile_attribute) cf.attributes.get(Attribute.SourceFile); +++ if (sf == null) { +++ report(messages.getMessage("err.no.SourceFile.attribute")); +++ return null; +++ } +++ String sourceFile = sf.getSourceFile(cf.constant_pool); +++ String fileBase = sourceFile.endsWith(".java") +++ ? sourceFile.substring(0, sourceFile.length() - 5) : sourceFile; +++ int sep = className.lastIndexOf("/"); +++ String pkgName = (sep == -1 ? "" : className.substring(0, sep+1)); +++ String topClassName = (pkgName + fileBase).replace('/', '.'); +++ JavaFileObject fo = +++ fileManager.getJavaFileForInput(location, +++ topClassName, +++ JavaFileObject.Kind.SOURCE); +++ if (fo == null) { +++ report(messages.getMessage("err.source.file.not.found")); +++ return null; +++ } +++ return fo.getCharContent(true).toString(); +++ } catch (ConstantPoolException e) { +++ report(e); +++ return null; +++ } catch (IOException e) { +++ report(e.getLocalizedMessage()); +++ return null; +++ } +++ } +++ +++ private static String[] splitLines(String text) { +++ if (text == null) +++ return new String[0]; +++ +++ List lines = new ArrayList(); +++ lines.add(""); // dummy line 0 +++ try { +++ BufferedReader r = new BufferedReader(new StringReader(text)); +++ String line; +++ while ((line = r.readLine()) != null) +++ lines.add(line); +++ } catch (IOException ignore) { +++ } +++ return lines.toArray(new String[lines.size()]); +++ } +++ +++ private int nextLine(int line) { +++ int i = lineList.indexOf(line); +++ if (i == -1 || i == lineList.size() - 1) +++ return - 1; +++ return lineList.get(i + 1); +++ } +++ +++ private JavaFileManager fileManager; +++ private ClassFile classFile; +++ private SortedMap> lineMap; +++ private List lineList; +++ private String[] sourceLines; +++} ++diff -r 8f5d8429b3f1 -r 4b55db11179d src/share/classes/com/sun/tools/javap/StackMapWriter.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/StackMapWriter.java Tue May 19 11:50:54 2009 -0700 ++@@ -0,0 +1,291 @@ +++/* +++ * Copyright 2009 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.javap; +++ +++import com.sun.tools.classfile.AccessFlags; +++import java.util.HashMap; +++import java.util.Map; +++ +++import com.sun.tools.classfile.Attribute; +++import com.sun.tools.classfile.Code_attribute; +++import com.sun.tools.classfile.ConstantPool; +++import com.sun.tools.classfile.ConstantPoolException; +++import com.sun.tools.classfile.Descriptor; +++import com.sun.tools.classfile.Descriptor.InvalidDescriptor; +++import com.sun.tools.classfile.Instruction; +++import com.sun.tools.classfile.Method; +++import com.sun.tools.classfile.StackMapTable_attribute; +++import com.sun.tools.classfile.StackMapTable_attribute.*; +++ +++import static com.sun.tools.classfile.StackMapTable_attribute.verification_type_info.*; +++ +++/** +++ * Annotate instructions with stack map. +++ * +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class StackMapWriter extends InstructionDetailWriter { +++ static StackMapWriter instance(Context context) { +++ StackMapWriter instance = context.get(StackMapWriter.class); +++ if (instance == null) +++ instance = new StackMapWriter(context); +++ return instance; +++ } +++ +++ protected StackMapWriter(Context context) { +++ super(context); +++ context.put(StackMapWriter.class, this); +++ classWriter = ClassWriter.instance(context); +++ } +++ +++ public void reset(Code_attribute attr) { +++ setStackMap((StackMapTable_attribute) attr.attributes.get(Attribute.StackMapTable)); +++ } +++ +++ void setStackMap(StackMapTable_attribute attr) { +++ if (attr == null) { +++ map = null; +++ return; +++ } +++ +++ Method m = classWriter.getMethod(); +++ Descriptor d = m.descriptor; +++ String[] args; +++ try { +++ ConstantPool cp = classWriter.getClassFile().constant_pool; +++ String argString = d.getParameterTypes(cp); +++ args = argString.substring(1, argString.length() - 1).split("[, ]+"); +++ } catch (ConstantPoolException e) { +++ return; +++ } catch (InvalidDescriptor e) { +++ return; +++ } +++ boolean isStatic = m.access_flags.is(AccessFlags.ACC_STATIC); +++ +++ verification_type_info[] initialLocals = new verification_type_info[(isStatic ? 0 : 1) + args.length]; +++ if (!isStatic) +++ initialLocals[0] = new CustomVerificationTypeInfo("this"); +++ for (int i = 0; i < args.length; i++) { +++ initialLocals[(isStatic ? 0 : 1) + i] = +++ new CustomVerificationTypeInfo(args[i].replace(".", "/")); +++ } +++ +++ map = new HashMap(); +++ StackMapBuilder builder = new StackMapBuilder(); +++ +++ // using -1 as the pc for the initial frame effectively compensates for +++ // the difference in behavior for the first stack map frame (where the +++ // pc offset is just offset_delta) compared to subsequent frames (where +++ // the pc offset is always offset_delta+1). +++ int pc = -1; +++ +++ map.put(pc, new StackMap(initialLocals, empty)); +++ +++ for (int i = 0; i < attr.entries.length; i++) +++ pc = attr.entries[i].accept(builder, pc); +++ } +++ +++ public void writeInitialDetails() { +++ writeDetails(-1); +++ } +++ +++ public void writeDetails(Instruction instr) { +++ writeDetails(instr.getPC()); +++ } +++ +++ private void writeDetails(int pc) { +++ if (map == null) +++ return; +++ +++ StackMap m = map.get(pc); +++ if (m != null) { +++ print("StackMap locals: ", m.locals); +++ print("StackMap stack: ", m.stack); +++ } +++ +++ } +++ +++ void print(String label, verification_type_info[] entries) { +++ print(label); +++ for (int i = 0; i < entries.length; i++) { +++ print(" "); +++ print(entries[i]); +++ } +++ println(); +++ } +++ +++ void print(verification_type_info entry) { +++ if (entry == null) { +++ print("ERROR"); +++ return; +++ } +++ +++ switch (entry.tag) { +++ case -1: +++ print(((CustomVerificationTypeInfo) entry).text); +++ break; +++ +++ case ITEM_Top: +++ print("top"); +++ break; +++ +++ case ITEM_Integer: +++ print("int"); +++ break; +++ +++ case ITEM_Float: +++ print("float"); +++ break; +++ +++ case ITEM_Long: +++ print("long"); +++ break; +++ +++ case ITEM_Double: +++ print("double"); +++ break; +++ +++ case ITEM_Null: +++ print("null"); +++ break; +++ +++ case ITEM_UninitializedThis: +++ print("uninit_this"); +++ break; +++ +++ case ITEM_Object: +++ try { +++ ConstantPool cp = classWriter.getClassFile().constant_pool; +++ ConstantPool.CONSTANT_Class_info class_info = cp.getClassInfo(((Object_variable_info) entry).cpool_index); +++ print(cp.getUTF8Value(class_info.name_index)); +++ } catch (ConstantPoolException e) { +++ print("??"); +++ } +++ break; +++ +++ case ITEM_Uninitialized: +++ print(((Uninitialized_variable_info) entry).offset); +++ break; +++ } +++ +++ } +++ +++ private Map map; +++ private ClassWriter classWriter; +++ +++ class StackMapBuilder +++ implements StackMapTable_attribute.stack_map_frame.Visitor { +++ +++ public Integer visit_same_frame(same_frame frame, Integer pc) { +++ int new_pc = pc + frame.getOffsetDelta() + 1; +++ StackMap m = map.get(pc); +++ assert (m != null); +++ map.put(new_pc, m); +++ return new_pc; +++ } +++ +++ public Integer visit_same_locals_1_stack_item_frame(same_locals_1_stack_item_frame frame, Integer pc) { +++ int new_pc = pc + frame.getOffsetDelta() + 1; +++ StackMap prev = map.get(pc); +++ assert (prev != null); +++ StackMap m = new StackMap(prev.locals, frame.stack); +++ map.put(new_pc, m); +++ return new_pc; +++ } +++ +++ public Integer visit_same_locals_1_stack_item_frame_extended(same_locals_1_stack_item_frame_extended frame, Integer pc) { +++ int new_pc = pc + frame.getOffsetDelta() + 1; +++ StackMap prev = map.get(pc); +++ assert (prev != null); +++ StackMap m = new StackMap(prev.locals, frame.stack); +++ map.put(new_pc, m); +++ return new_pc; +++ } +++ +++ public Integer visit_chop_frame(chop_frame frame, Integer pc) { +++ int new_pc = pc + frame.getOffsetDelta() + 1; +++ StackMap prev = map.get(pc); +++ assert (prev != null); +++ int k = 251 - frame.frame_type; +++ verification_type_info[] new_locals = new verification_type_info[prev.locals.length - k]; +++ System.arraycopy(prev.locals, 0, new_locals, 0, new_locals.length); +++ StackMap m = new StackMap(new_locals, empty); +++ map.put(new_pc, m); +++ return new_pc; +++ } +++ +++ public Integer visit_same_frame_extended(same_frame_extended frame, Integer pc) { +++ int new_pc = pc + frame.getOffsetDelta(); +++ StackMap m = map.get(pc); +++ assert (m != null); +++ map.put(new_pc, m); +++ return new_pc; +++ } +++ +++ public Integer visit_append_frame(append_frame frame, Integer pc) { +++ int new_pc = pc + frame.getOffsetDelta() + 1; +++ StackMap prev = map.get(pc); +++ assert (prev != null); +++ verification_type_info[] new_locals = new verification_type_info[prev.locals.length + frame.locals.length]; +++ System.arraycopy(prev.locals, 0, new_locals, 0, prev.locals.length); +++ System.arraycopy(frame.locals, 0, new_locals, prev.locals.length, frame.locals.length); +++ StackMap m = new StackMap(new_locals, empty); +++ map.put(new_pc, m); +++ return new_pc; +++ } +++ +++ public Integer visit_full_frame(full_frame frame, Integer pc) { +++ int new_pc = pc + frame.getOffsetDelta() + 1; +++ StackMap m = new StackMap(frame.locals, frame.stack); +++ map.put(new_pc, m); +++ return new_pc; +++ } +++ +++ } +++ +++ class StackMap { +++ StackMap(verification_type_info[] locals, verification_type_info[] stack) { +++ this.locals = locals; +++ this.stack = stack; +++ } +++ +++ private final verification_type_info[] locals; +++ private final verification_type_info[] stack; +++ } +++ +++ class CustomVerificationTypeInfo extends verification_type_info { +++ public CustomVerificationTypeInfo(String text) { +++ super(-1); +++ this.text = text; +++ } +++ private String text; +++ } +++ +++ private final verification_type_info[] empty = { }; +++} ++diff -r 8f5d8429b3f1 -r 4b55db11179d src/share/classes/com/sun/tools/javap/TryBlockWriter.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/TryBlockWriter.java Tue May 19 11:50:54 2009 -0700 ++@@ -0,0 +1,142 @@ +++/* +++ * Copyright 2009 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.javap; +++ +++import com.sun.tools.classfile.Code_attribute; +++import com.sun.tools.classfile.Code_attribute.Exception_data; +++import com.sun.tools.classfile.Instruction; +++import java.util.ArrayList; +++import java.util.HashMap; +++import java.util.List; +++import java.util.ListIterator; +++import java.util.Map; +++ +++/** +++ * Annotate instructions with details about try blocks. +++ * +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class TryBlockWriter extends InstructionDetailWriter { +++ public enum NoteKind { +++ START("try") { +++ public boolean match(Exception_data entry, int pc) { +++ return (pc == entry.start_pc); +++ } +++ }, +++ END("end try") { +++ public boolean match(Exception_data entry, int pc) { +++ return (pc == entry.end_pc); +++ } +++ }, +++ HANDLER("catch") { +++ public boolean match(Exception_data entry, int pc) { +++ return (pc == entry.handler_pc); +++ } +++ }; +++ NoteKind(String text) { +++ this.text = text; +++ } +++ public abstract boolean match(Exception_data entry, int pc); +++ public final String text; +++ }; +++ +++ static TryBlockWriter instance(Context context) { +++ TryBlockWriter instance = context.get(TryBlockWriter.class); +++ if (instance == null) +++ instance = new TryBlockWriter(context); +++ return instance; +++ } +++ +++ protected TryBlockWriter(Context context) { +++ super(context); +++ context.put(TryBlockWriter.class, this); +++ constantWriter = ConstantWriter.instance(context); +++ } +++ +++ public void reset(Code_attribute attr) { +++ indexMap = new HashMap(); +++ pcMap = new HashMap>(); +++ for (int i = 0; i < attr.exception_table.length; i++) { +++ Exception_data entry = attr.exception_table[i]; +++ indexMap.put(entry, i); +++ put(entry.start_pc, entry); +++ put(entry.end_pc, entry); +++ put(entry.handler_pc, entry); +++ } +++ } +++ +++ public void writeDetails(Instruction instr) { +++ writeTrys(instr, NoteKind.END); +++ writeTrys(instr, NoteKind.START); +++ writeTrys(instr, NoteKind.HANDLER); +++ } +++ +++ public void writeTrys(Instruction instr, NoteKind kind) { +++ String indent = space(2); // get from Options? +++ int pc = instr.getPC(); +++ List entries = pcMap.get(pc); +++ if (entries != null) { +++ for (ListIterator iter = +++ entries.listIterator(kind == NoteKind.END ? entries.size() : 0); +++ kind == NoteKind.END ? iter.hasPrevious() : iter.hasNext() ; ) { +++ Exception_data entry = +++ kind == NoteKind.END ? iter.previous() : iter.next(); +++ if (kind.match(entry, pc)) { +++ print(indent); +++ print(kind.text); +++ print("["); +++ print(indexMap.get(entry)); +++ print("] "); +++ if (entry.catch_type == 0) +++ print("finally"); +++ else { +++ print("#" + entry.catch_type); +++ print(" // "); +++ constantWriter.write(entry.catch_type); +++ } +++ println(); +++ } +++ } +++ } +++ } +++ +++ private void put(int pc, Exception_data entry) { +++ List list = pcMap.get(pc); +++ if (list == null) { +++ list = new ArrayList(); +++ pcMap.put(pc, list); +++ } +++ if (!list.contains(entry)) +++ list.add(entry); +++ } +++ +++ private Map> pcMap; +++ private Map indexMap; +++ private ConstantWriter constantWriter; +++} ++diff -r 8f5d8429b3f1 -r 4b55db11179d src/share/classes/com/sun/tools/javap/resources/javap.properties ++--- openjdk/langtools/src/share/classes/com/sun/tools/javap/resources/javap.properties Tue Jul 08 18:06:19 2008 -0700 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/resources/javap.properties Tue May 19 11:50:54 2009 -0700 ++@@ -9,6 +9,7 @@ ++ err.h.not.supported=-h is no longer available - use the 'javah' program ++ err.incompatible.options=bad combination of options: {0} ++ err.internal.error=internal error: {0} {1} {2} +++err.invalid.arg.for.option=invalid argument for option: {0} ++ err.ioerror=IO error reading {0}: {1} ++ err.missing.arg=no value given for {0} ++ err.no.classes.specified=no classes specified ++@@ -16,6 +17,8 @@ ++ err.unknown.option=unknown option: {0} ++ err.verify.not.supported=-verify not supported ++ err.Xold.not.supported.here=-Xold must be given as the first option +++err.no.SourceFile.attribute=no SourceFile attribute +++err.source.file.not.found=source file not found ++ ++ main.usage=\ ++ Usage: {0} \n\ ++diff -r 8f5d8429b3f1 -r 4b55db11179d test/tools/javap/T6824493.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/test/tools/javap/T6824493.java Tue May 19 11:50:54 2009 -0700 ++@@ -0,0 +1,116 @@ +++/* +++ * Copyright 2009 Sun Microsystems, Inc. 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. +++ * +++ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++import java.io.*; +++import java.util.*; +++ +++/* +++ * @test +++ * @bug 6824493 +++ * @summary experimental support for additional info for instructions +++ * @compile -g T6824493.java +++ * @run main T6824493 +++ */ +++public class T6824493 { +++ public static void main(String... args) { +++ new T6824493().run(); +++ } +++ +++ void run() { +++ // for each of the options, we run javap and check for some +++ // marker strings in the output that generally indicate the +++ // presence of the expected output, without being as specific +++ // as a full golden file test. +++ test("-XDdetails:source", +++ "for (int i = 0; i < 10; i++) {", +++ "System.out.println(s + i);"); +++ +++ test("-XDdetails:tryBlocks", +++ "try[0]", +++ "end try[0]", +++ "catch[0]"); +++ +++ test("-XDdetails:stackMaps", +++ "StackMap locals: this java/lang/String int", +++ "StackMap stack: java/lang/Throwable"); +++ +++ test("-XDdetails:localVariables", +++ "start local 3 // java.util.List list", +++ "end local 3 // java.util.List list"); +++ +++ test("-XDdetails:localVariableTypes", +++ "start generic local 3 // java.util.List list", +++ "end generic local 3 // java.util.List list"); +++ +++ if (errors > 0) +++ throw new Error(errors + " errors found"); +++ } +++ +++ void test(String option, String... expect) { +++ String[] args = { +++ "-c", +++ "-classpath", +++ testSrc + File.pathSeparator + testClasses, +++ option, +++ "Test" +++ }; +++ StringWriter sw = new StringWriter(); +++ PrintWriter pw = new PrintWriter(sw); +++ int rc = com.sun.tools.javap.Main.run(args, pw); +++ if (rc != 0) { +++ error("unexpected return code from javap: " + rc); +++ return; +++ } +++ +++ String out = sw.toString(); +++ System.out.println(out); +++ for (String e: expect) { +++ if (!out.contains(e)) +++ error("Not found: " + e); +++ } +++ } +++ +++ void error(String msg) { +++ System.err.println("Error: " + msg); +++ errors++; +++ } +++ +++ private int errors; +++ private String testSrc = System.getProperty("test.src", "."); +++ private String testClasses = System.getProperty("test.classes", "."); +++} +++ +++class Test { +++ void m(String s) { +++ for (int i = 0; i < 10; i++) { +++ try { +++ List list = null; +++ System.out.println(s + i); +++ } catch (NullPointerException e) { +++ System.out.println("catch NPE"); +++ } finally { +++ System.out.println("finally"); +++ } +++ } +++ } +++} +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/6841419-classfile_iterator.patch openjdk-6-6b27-1.12.6/patches/openjdk/6841419-classfile_iterator.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/6841419-classfile_iterator.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/6841419-classfile_iterator.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,142 @@ ++# HG changeset patch ++# User jjg ++# Date 1242758630 25200 ++# Tue May 19 11:43:50 2009 -0700 ++# Node ID 17dfaebe23044c48bcd5ed0730ce2358543ac459 ++# Parent 00870be9028f778a169bf9b843a994ec44258c22 ++6841419: classfile: add constant pool iterator ++Reviewed-by: mcimadamore ++ ++diff -r 00870be9028f -r 17dfaebe2304 src/share/classes/com/sun/tools/classfile/ClassTranslator.java ++--- openjdk/langtools/src/share/classes/com/sun/tools/classfile/ClassTranslator.java Tue May 19 11:33:13 2009 -0700 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/ClassTranslator.java Tue May 19 11:43:50 2009 -0700 ++@@ -95,7 +95,7 @@ ++ if (cp2 == null) { ++ ConstantPool.CPInfo[] pool2 = new ConstantPool.CPInfo[cp.size()]; ++ boolean eq = true; ++- for (int i = 0; i < cp.size(); i++) { +++ for (int i = 0; i < cp.size(); ) { ++ ConstantPool.CPInfo cpInfo; ++ try { ++ cpInfo = cp.get(i); ++@@ -107,11 +107,7 @@ ++ pool2[i] = cpInfo2; ++ if (cpInfo.getTag() != cpInfo2.getTag()) ++ throw new IllegalStateException(); ++- switch (cpInfo.getTag()) { ++- case ConstantPool.CONSTANT_Double: ++- case ConstantPool.CONSTANT_Long: ++- i += 1; ++- } +++ i += cpInfo.size(); ++ } ++ ++ if (eq) ++diff -r 00870be9028f -r 17dfaebe2304 src/share/classes/com/sun/tools/classfile/ClassWriter.java ++--- openjdk/langtools/src/share/classes/com/sun/tools/classfile/ClassWriter.java Tue May 19 11:33:13 2009 -0700 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/ClassWriter.java Tue May 19 11:43:50 2009 -0700 ++@@ -118,13 +118,8 @@ ++ ConstantPool pool = classFile.constant_pool; ++ int size = pool.size(); ++ out.writeShort(size); ++- try { ++- for (int i = 1; i < size; ) { ++- i += constantPoolWriter.write(pool.get(i), out); ++- } ++- } catch (ConstantPoolException e) { ++- throw new Error(e); // ?? ++- } +++ for (CPInfo cpInfo: pool.entries()) +++ constantPoolWriter.write(cpInfo, out); ++ } ++ ++ protected void writeFields() throws IOException { ++diff -r 00870be9028f -r 17dfaebe2304 src/share/classes/com/sun/tools/classfile/ConstantPool.java ++--- openjdk/langtools/src/share/classes/com/sun/tools/classfile/ConstantPool.java Tue May 19 11:33:13 2009 -0700 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/ConstantPool.java Tue May 19 11:43:50 2009 -0700 ++@@ -26,6 +26,7 @@ ++ package com.sun.tools.classfile; ++ ++ import java.io.IOException; +++import java.util.Iterator; ++ ++ /** ++ * See JVMS3, section 4.5. ++@@ -219,6 +220,40 @@ ++ throw new EntryNotFound(value); ++ } ++ +++ public Iterable entries() { +++ return new Iterable() { +++ public Iterator iterator() { +++ return new Iterator() { +++ +++ public boolean hasNext() { +++ return next < pool.length; +++ } +++ +++ public CPInfo next() { +++ current = pool[next]; +++ switch (current.getTag()) { +++ case CONSTANT_Double: +++ case CONSTANT_Long: +++ next += 2; +++ break; +++ default: +++ next += 1; +++ } +++ return current; +++ } +++ +++ public void remove() { +++ throw new UnsupportedOperationException(); +++ } +++ +++ private CPInfo current; +++ private int next = 1; +++ +++ }; +++ } +++ }; +++ } +++ ++ private CPInfo[] pool; ++ ++ public interface Visitor { ++@@ -246,6 +281,12 @@ ++ ++ public abstract int getTag(); ++ +++ /** The number of slots in the constant pool used by this entry. +++ * 2 for CONSTANT_Double and CONSTANT_Long; 1 for everything else. */ +++ public int size() { +++ return 1; +++ } +++ ++ public abstract R accept(Visitor visitor, D data); ++ ++ protected final ConstantPool cp; ++@@ -346,6 +387,11 @@ ++ } ++ ++ @Override +++ public int size() { +++ return 2; +++ } +++ +++ @Override ++ public String toString() { ++ return "CONSTANT_Double_info[value: " + value + "]"; ++ } ++@@ -459,6 +505,11 @@ ++ } ++ ++ @Override +++ public int size() { +++ return 2; +++ } +++ +++ @Override ++ public String toString() { ++ return "CONSTANT_Long_info[value: " + value + "]"; ++ } +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/6841420-classfile_methods.patch openjdk-6-6b27-1.12.6/patches/openjdk/6841420-classfile_methods.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/6841420-classfile_methods.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/6841420-classfile_methods.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,34 @@ ++# HG changeset patch ++# User jjg ++# Date 1242757993 25200 ++# Tue May 19 11:33:13 2009 -0700 ++# Node ID 00870be9028f778a169bf9b843a994ec44258c22 ++# Parent c9b0fee44d446f902102462387c40ca9d1020b6e ++6841420: classfile: add new methods to ConstantClassInfo ++Reviewed-by: mcimadamore ++Contributed-by: kevin.t.looney@sun.com ++ ++diff -r c9b0fee44d44 -r 00870be9028f src/share/classes/com/sun/tools/classfile/ConstantPool.java ++--- openjdk/langtools/src/share/classes/com/sun/tools/classfile/ConstantPool.java Wed Jun 18 16:53:08 2008 -0700 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/ConstantPool.java Tue May 19 11:33:13 2009 -0700 ++@@ -306,6 +306,20 @@ ++ return cp.getUTF8Value(name_index); ++ } ++ +++ public String getBaseName() throws ConstantPoolException { +++ String name = getName(); +++ int index = name.indexOf("[L") + 1; +++ return name.substring(index); +++ } +++ +++ public int getDimensionCount() throws ConstantPoolException { +++ String name = getName(); +++ int count = 0; +++ while (name.charAt(count) == '[') +++ count++; +++ return count; +++ } +++ ++ @Override ++ public String toString() { ++ return "CONSTANT_Class_info[name_index: " + name_index + "]"; +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/6843013-missing_experimental.patch openjdk-6-6b27-1.12.6/patches/openjdk/6843013-missing_experimental.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/6843013-missing_experimental.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/6843013-missing_experimental.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,334 @@ ++# HG changeset patch ++# User jjg ++# Date 1242766380 25200 ++# Tue May 19 13:53:00 2009 -0700 ++# Node ID a7567fdabf3eae2c495726e6c25e2364e175261f ++# Parent 4b55db11179d066331b829ca5c4722c33287deea ++6843013: missing files in fix for 6824493 ++Reviewed-by: darcy ++ ++diff -r 4b55db11179d -r a7567fdabf3e src/share/classes/com/sun/tools/javap/LocalVariableTableWriter.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/LocalVariableTableWriter.java Tue May 19 13:53:00 2009 -0700 ++@@ -0,0 +1,158 @@ +++/* +++ * Copyright 2009 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.javap; +++ +++import com.sun.tools.classfile.Attribute; +++import com.sun.tools.classfile.Code_attribute; +++import com.sun.tools.classfile.ConstantPool; +++import com.sun.tools.classfile.ConstantPoolException; +++import com.sun.tools.classfile.Descriptor; +++import com.sun.tools.classfile.Descriptor.InvalidDescriptor; +++import com.sun.tools.classfile.Instruction; +++import com.sun.tools.classfile.LocalVariableTable_attribute; +++import java.util.ArrayList; +++import java.util.HashMap; +++import java.util.List; +++import java.util.ListIterator; +++import java.util.Map; +++ +++/** +++ * Annotate instructions with details about local variables. +++ * +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class LocalVariableTableWriter extends InstructionDetailWriter { +++ public enum NoteKind { +++ START("start") { +++ public boolean match(LocalVariableTable_attribute.Entry entry, int pc) { +++ return (pc == entry.start_pc); +++ } +++ }, +++ END("end") { +++ public boolean match(LocalVariableTable_attribute.Entry entry, int pc) { +++ return (pc == entry.start_pc + entry.length); +++ } +++ }; +++ NoteKind(String text) { +++ this.text = text; +++ } +++ public abstract boolean match(LocalVariableTable_attribute.Entry entry, int pc); +++ public final String text; +++ }; +++ +++ static LocalVariableTableWriter instance(Context context) { +++ LocalVariableTableWriter instance = context.get(LocalVariableTableWriter.class); +++ if (instance == null) +++ instance = new LocalVariableTableWriter(context); +++ return instance; +++ } +++ +++ protected LocalVariableTableWriter(Context context) { +++ super(context); +++ context.put(LocalVariableTableWriter.class, this); +++ classWriter = ClassWriter.instance(context); +++ } +++ +++ public void reset(Code_attribute attr) { +++ codeAttr = attr; +++ pcMap = new HashMap>(); +++ LocalVariableTable_attribute lvt = +++ (LocalVariableTable_attribute) (attr.attributes.get(Attribute.LocalVariableTable)); +++ if (lvt == null) +++ return; +++ +++ for (int i = 0; i < lvt.local_variable_table.length; i++) { +++ LocalVariableTable_attribute.Entry entry = lvt.local_variable_table[i]; +++ put(entry.start_pc, entry); +++ put(entry.start_pc + entry.length, entry); +++ } +++ } +++ +++ public void writeDetails(Instruction instr) { +++ int pc = instr.getPC(); +++ writeLocalVariables(pc, NoteKind.END); +++ writeLocalVariables(pc, NoteKind.START); +++ } +++ +++ @Override +++ public void flush() { +++ int pc = codeAttr.code_length; +++ writeLocalVariables(pc, NoteKind.END); +++ } +++ +++ public void writeLocalVariables(int pc, NoteKind kind) { +++ ConstantPool constant_pool = classWriter.getClassFile().constant_pool; +++ String indent = space(2); // get from Options? +++ List entries = pcMap.get(pc); +++ if (entries != null) { +++ for (ListIterator iter = +++ entries.listIterator(kind == NoteKind.END ? entries.size() : 0); +++ kind == NoteKind.END ? iter.hasPrevious() : iter.hasNext() ; ) { +++ LocalVariableTable_attribute.Entry entry = +++ kind == NoteKind.END ? iter.previous() : iter.next(); +++ if (kind.match(entry, pc)) { +++ print(indent); +++ print(kind.text); +++ print(" local "); +++ print(entry.index); +++ print(" // "); +++ Descriptor d = new Descriptor(entry.descriptor_index); +++ try { +++ print(d.getFieldType(constant_pool)); +++ } catch (InvalidDescriptor e) { +++ print(report(e)); +++ } catch (ConstantPoolException e) { +++ print(report(e)); +++ } +++ print(" "); +++ try { +++ print(constant_pool.getUTF8Value(entry.name_index)); +++ } catch (ConstantPoolException e) { +++ print(report(e)); +++ } +++ println(); +++ } +++ } +++ } +++ } +++ +++ private void put(int pc, LocalVariableTable_attribute.Entry entry) { +++ List list = pcMap.get(pc); +++ if (list == null) { +++ list = new ArrayList(); +++ pcMap.put(pc, list); +++ } +++ if (!list.contains(entry)) +++ list.add(entry); +++ } +++ +++ private ClassWriter classWriter; +++ private Code_attribute codeAttr; +++ private Map> pcMap; +++} ++diff -r 4b55db11179d -r a7567fdabf3e src/share/classes/com/sun/tools/javap/LocalVariableTypeTableWriter.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/LocalVariableTypeTableWriter.java Tue May 19 13:53:00 2009 -0700 ++@@ -0,0 +1,159 @@ +++/* +++ * Copyright 2009 Sun Microsystems, Inc. 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. Sun designates this +++ * particular file as subject to the "Classpath" exception as provided +++ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++package com.sun.tools.javap; +++ +++import com.sun.tools.classfile.Attribute; +++import com.sun.tools.classfile.Code_attribute; +++import com.sun.tools.classfile.ConstantPool; +++import com.sun.tools.classfile.ConstantPoolException; +++import com.sun.tools.classfile.Descriptor; +++import com.sun.tools.classfile.Descriptor.InvalidDescriptor; +++import com.sun.tools.classfile.Instruction; +++import com.sun.tools.classfile.LocalVariableTypeTable_attribute; +++import com.sun.tools.classfile.Signature; +++import java.util.ArrayList; +++import java.util.HashMap; +++import java.util.List; +++import java.util.ListIterator; +++import java.util.Map; +++ +++/** +++ * Annotate instructions with details about local variables. +++ * +++ *

This is NOT part of any API supported by Sun Microsystems. If +++ * you write code that depends on this, you do so at your own risk. +++ * This code and its internal interfaces are subject to change or +++ * deletion without notice. +++ */ +++public class LocalVariableTypeTableWriter extends InstructionDetailWriter { +++ public enum NoteKind { +++ START("start") { +++ public boolean match(LocalVariableTypeTable_attribute.Entry entry, int pc) { +++ return (pc == entry.start_pc); +++ } +++ }, +++ END("end") { +++ public boolean match(LocalVariableTypeTable_attribute.Entry entry, int pc) { +++ return (pc == entry.start_pc + entry.length); +++ } +++ }; +++ NoteKind(String text) { +++ this.text = text; +++ } +++ public abstract boolean match(LocalVariableTypeTable_attribute.Entry entry, int pc); +++ public final String text; +++ }; +++ +++ static LocalVariableTypeTableWriter instance(Context context) { +++ LocalVariableTypeTableWriter instance = context.get(LocalVariableTypeTableWriter.class); +++ if (instance == null) +++ instance = new LocalVariableTypeTableWriter(context); +++ return instance; +++ } +++ +++ protected LocalVariableTypeTableWriter(Context context) { +++ super(context); +++ context.put(LocalVariableTypeTableWriter.class, this); +++ classWriter = ClassWriter.instance(context); +++ } +++ +++ public void reset(Code_attribute attr) { +++ codeAttr = attr; +++ pcMap = new HashMap>(); +++ LocalVariableTypeTable_attribute lvt = +++ (LocalVariableTypeTable_attribute) (attr.attributes.get(Attribute.LocalVariableTypeTable)); +++ if (lvt == null) +++ return; +++ +++ for (int i = 0; i < lvt.local_variable_table.length; i++) { +++ LocalVariableTypeTable_attribute.Entry entry = lvt.local_variable_table[i]; +++ put(entry.start_pc, entry); +++ put(entry.start_pc + entry.length, entry); +++ } +++ } +++ +++ public void writeDetails(Instruction instr) { +++ int pc = instr.getPC(); +++ writeLocalVariables(pc, NoteKind.END); +++ writeLocalVariables(pc, NoteKind.START); +++ } +++ +++ @Override +++ public void flush() { +++ int pc = codeAttr.code_length; +++ writeLocalVariables(pc, NoteKind.END); +++ } +++ +++ public void writeLocalVariables(int pc, NoteKind kind) { +++ ConstantPool constant_pool = classWriter.getClassFile().constant_pool; +++ String indent = space(2); // get from Options? +++ List entries = pcMap.get(pc); +++ if (entries != null) { +++ for (ListIterator iter = +++ entries.listIterator(kind == NoteKind.END ? entries.size() : 0); +++ kind == NoteKind.END ? iter.hasPrevious() : iter.hasNext() ; ) { +++ LocalVariableTypeTable_attribute.Entry entry = +++ kind == NoteKind.END ? iter.previous() : iter.next(); +++ if (kind.match(entry, pc)) { +++ print(indent); +++ print(kind.text); +++ print(" generic local "); +++ print(entry.index); +++ print(" // "); +++ Descriptor d = new Signature(entry.signature_index); +++ try { +++ print(d.getFieldType(constant_pool)); +++ } catch (InvalidDescriptor e) { +++ print(report(e)); +++ } catch (ConstantPoolException e) { +++ print(report(e)); +++ } +++ print(" "); +++ try { +++ print(constant_pool.getUTF8Value(entry.name_index)); +++ } catch (ConstantPoolException e) { +++ print(report(e)); +++ } +++ println(); +++ } +++ } +++ } +++ } +++ +++ private void put(int pc, LocalVariableTypeTable_attribute.Entry entry) { +++ List list = pcMap.get(pc); +++ if (list == null) { +++ list = new ArrayList(); +++ pcMap.put(pc, list); +++ } +++ if (!list.contains(entry)) +++ list.add(entry); +++ } +++ +++ private ClassWriter classWriter; +++ private Code_attribute codeAttr; +++ private Map> pcMap; +++} +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/6852856-javap_subclasses.patch openjdk-6-6b27-1.12.6/patches/openjdk/6852856-javap_subclasses.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/6852856-javap_subclasses.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/6852856-javap_subclasses.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,508 @@ ++# HG changeset patch ++# User jjg ++# Date 1382677646 -3600 ++# Fri Oct 25 06:07:26 2013 +0100 ++# Node ID a22d1b683f15e7f67d7d3de84f7c866a65c42552 ++# Parent dca34170f5f80bf30228c12a647b3f1a492b3eeb ++6852856: javap changes to facilitate subclassing javap for variants ++Reviewed-by: mcimadamore ++ ++diff -r dca34170f5f8 -r a22d1b683f15 src/share/classes/com/sun/tools/classfile/AccessFlags.java ++--- openjdk/langtools/src/share/classes/com/sun/tools/classfile/AccessFlags.java Mon Aug 04 17:54:15 2008 -0700 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/AccessFlags.java Fri Oct 25 06:07:26 2013 +0100 ++@@ -58,7 +58,7 @@ ++ public static final int ACC_ENUM = 0x4000; // class, inner, field ++ public static final int ACC_MODULE = 0x8000; // class, inner, field, method ++ ++- private static enum Type { Class, InnerClass, Field, Method}; +++ public static enum Kind { Class, InnerClass, Field, Method}; ++ ++ AccessFlags(ClassReader cr) throws IOException { ++ this(cr.readUnsignedShort()); ++@@ -87,11 +87,11 @@ ++ ++ public Set getClassModifiers() { ++ int f = ((flags & ACC_INTERFACE) != 0 ? flags & ~ACC_ABSTRACT : flags); ++- return getModifiers(f, classModifiers, Type.Class); +++ return getModifiers(f, classModifiers, Kind.Class); ++ } ++ ++ public Set getClassFlags() { ++- return getFlags(classFlags, Type.Class); +++ return getFlags(classFlags, Kind.Class); ++ } ++ ++ private static final int[] innerClassModifiers = { ++@@ -106,11 +106,11 @@ ++ ++ public Set getInnerClassModifiers() { ++ int f = ((flags & ACC_INTERFACE) != 0 ? flags & ~ACC_ABSTRACT : flags); ++- return getModifiers(f, innerClassModifiers, Type.InnerClass); +++ return getModifiers(f, innerClassModifiers, Kind.InnerClass); ++ } ++ ++ public Set getInnerClassFlags() { ++- return getFlags(innerClassFlags, Type.InnerClass); +++ return getFlags(innerClassFlags, Kind.InnerClass); ++ } ++ ++ private static final int[] fieldModifiers = { ++@@ -124,11 +124,11 @@ ++ }; ++ ++ public Set getFieldModifiers() { ++- return getModifiers(fieldModifiers, Type.Field); +++ return getModifiers(fieldModifiers, Kind.Field); ++ } ++ ++ public Set getFieldFlags() { ++- return getFlags(fieldFlags, Type.Field); +++ return getFlags(fieldFlags, Kind.Field); ++ } ++ ++ private static final int[] methodModifiers = { ++@@ -143,18 +143,18 @@ ++ }; ++ ++ public Set getMethodModifiers() { ++- return getModifiers(methodModifiers, Type.Method); +++ return getModifiers(methodModifiers, Kind.Method); ++ } ++ ++ public Set getMethodFlags() { ++- return getFlags(methodFlags, Type.Method); +++ return getFlags(methodFlags, Kind.Method); ++ } ++ ++- private Set getModifiers(int[] modifierFlags, Type t) { +++ private Set getModifiers(int[] modifierFlags, Kind t) { ++ return getModifiers(flags, modifierFlags, t); ++ } ++ ++- private static Set getModifiers(int flags, int[] modifierFlags, Type t) { +++ private static Set getModifiers(int flags, int[] modifierFlags, Kind t) { ++ Set s = new LinkedHashSet(); ++ for (int m: modifierFlags) { ++ if ((flags & m) != 0) ++@@ -163,7 +163,7 @@ ++ return s; ++ } ++ ++- private Set getFlags(int[] expectedFlags, Type t) { +++ private Set getFlags(int[] expectedFlags, Kind t) { ++ Set s = new LinkedHashSet(); ++ int f = flags; ++ for (int e: expectedFlags) { ++@@ -180,7 +180,7 @@ ++ return s; ++ } ++ ++- private static String flagToModifier(int flag, Type t) { +++ private static String flagToModifier(int flag, Kind t) { ++ switch (flag) { ++ case ACC_PUBLIC: ++ return "public"; ++@@ -195,7 +195,7 @@ ++ case ACC_SYNCHRONIZED: ++ return "synchronized"; ++ case 0x80: ++- return (t == Type.Field ? "transient" : null); +++ return (t == Kind.Field ? "transient" : null); ++ case ACC_VOLATILE: ++ return "volatile"; ++ case ACC_NATIVE: ++@@ -211,7 +211,7 @@ ++ } ++ } ++ ++- private static String flagToName(int flag, Type t) { +++ private static String flagToName(int flag, Kind t) { ++ switch (flag) { ++ case ACC_PUBLIC: ++ return "ACC_PUBLIC"; ++@@ -224,11 +224,11 @@ ++ case ACC_FINAL: ++ return "ACC_FINAL"; ++ case 0x20: ++- return (t == Type.Class ? "ACC_SUPER" : "ACC_SYNCHRONIZED"); +++ return (t == Kind.Class ? "ACC_SUPER" : "ACC_SYNCHRONIZED"); ++ case 0x40: ++- return (t == Type.Field ? "ACC_VOLATILE" : "ACC_BRIDGE"); +++ return (t == Kind.Field ? "ACC_VOLATILE" : "ACC_BRIDGE"); ++ case 0x80: ++- return (t == Type.Field ? "ACC_TRANSIENT" : "ACC_VARARGS"); +++ return (t == Kind.Field ? "ACC_TRANSIENT" : "ACC_VARARGS"); ++ case ACC_NATIVE: ++ return "ACC_NATIVE"; ++ case ACC_INTERFACE: ++@@ -250,5 +250,5 @@ ++ } ++ } ++ ++- final int flags; +++ public final int flags; ++ } ++diff -r dca34170f5f8 -r a22d1b683f15 src/share/classes/com/sun/tools/classfile/ConstantPool.java ++--- openjdk/langtools/src/share/classes/com/sun/tools/classfile/ConstantPool.java Mon Aug 04 17:54:15 2008 -0700 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/ConstantPool.java Fri Oct 25 06:07:26 2013 +0100 ++@@ -569,6 +569,11 @@ ++ return visitor.visitNameAndType(this, data); ++ } ++ +++ @Override +++ public String toString() { +++ return "CONSTANT_NameAndType_info[name_index: " + name_index + ", type_index: " + type_index + "]"; +++ } +++ ++ public final int name_index; ++ public final int type_index; ++ } ++@@ -596,6 +601,11 @@ ++ return visitor.visitString(this, data); ++ } ++ +++ @Override +++ public String toString() { +++ return "CONSTANT_String_info[class_index: " + string_index + "]"; +++ } +++ ++ public final int string_index; ++ } ++ ++@@ -614,7 +624,19 @@ ++ ++ @Override ++ public String toString() { ++- return "CONSTANT_Utf8_info[value: " + value + "]"; +++ if (value.length() < 32 && isPrintableAscii(value)) +++ return "CONSTANT_Utf8_info[value: \"" + value + "\"]"; +++ else +++ return "CONSTANT_Utf8_info[value: (" + value.length() + " chars)]"; +++ } +++ +++ static boolean isPrintableAscii(String s) { +++ for (int i = 0; i < s.length(); i++) { +++ char c = s.charAt(i); +++ if (c < 32 || c >= 127) +++ return false; +++ } +++ return true; ++ } ++ ++ public R accept(Visitor visitor, D data) { ++diff -r dca34170f5f8 -r a22d1b683f15 src/share/classes/com/sun/tools/javap/AttributeWriter.java ++--- openjdk/langtools/src/share/classes/com/sun/tools/javap/AttributeWriter.java Mon Aug 04 17:54:15 2008 -0700 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/AttributeWriter.java Fri Oct 25 06:07:26 2013 +0100 ++@@ -74,7 +74,7 @@ ++ public class AttributeWriter extends BasicWriter ++ implements Attribute.Visitor ++ { ++- static AttributeWriter instance(Context context) { +++ public static AttributeWriter instance(Context context) { ++ AttributeWriter instance = context.get(AttributeWriter.class); ++ if (instance == null) ++ instance = new AttributeWriter(context); ++diff -r dca34170f5f8 -r a22d1b683f15 src/share/classes/com/sun/tools/javap/ClassWriter.java ++--- openjdk/langtools/src/share/classes/com/sun/tools/javap/ClassWriter.java Mon Aug 04 17:54:15 2008 -0700 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/ClassWriter.java Fri Oct 25 06:07:26 2013 +0100 ++@@ -93,17 +93,25 @@ ++ this.lastModified = lastModified; ++ } ++ ++- ClassFile getClassFile() { +++ protected ClassFile getClassFile() { ++ return classFile; ++ } ++ ++- Method getMethod() { +++ protected void setClassFile(ClassFile cf) { +++ classFile = cf; +++ constant_pool = classFile.constant_pool; +++ } +++ +++ protected Method getMethod() { ++ return method; ++ } ++ +++ protected void setMethod(Method m) { +++ method = m; +++ } +++ ++ public void write(ClassFile cf) { ++- classFile = cf; ++- constant_pool = classFile.constant_pool; +++ setClassFile(cf); ++ ++ if ((options.sysInfo || options.verbose) && !options.compat) { ++ if (uri != null) { ++@@ -201,13 +209,13 @@ ++ println(); ++ } ++ ++- void writeFields() { +++ protected void writeFields() { ++ for (Field f: classFile.fields) { ++ writeField(f); ++ } ++ } ++ ++- void writeField(Field f) { +++ protected void writeField(Field f) { ++ if (!options.checkAccess(f.access_flags)) ++ return; ++ ++@@ -263,12 +271,12 @@ ++ println(); ++ } ++ ++- void writeMethods() { +++ protected void writeMethods() { ++ for (Method m: classFile.methods) ++ writeMethod(m); ++ } ++ ++- void writeMethod(Method m) { +++ protected void writeMethod(Method m) { ++ if (!options.checkAccess(m.access_flags)) ++ return; ++ ++diff -r dca34170f5f8 -r a22d1b683f15 src/share/classes/com/sun/tools/javap/ConstantWriter.java ++--- openjdk/langtools/src/share/classes/com/sun/tools/javap/ConstantWriter.java Mon Aug 04 17:54:15 2008 -0700 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/ConstantWriter.java Fri Oct 25 06:07:26 2013 +0100 ++@@ -40,7 +40,7 @@ ++ * deletion without notice. ++ */ ++ public class ConstantWriter extends BasicWriter { ++- static ConstantWriter instance(Context context) { +++ public static ConstantWriter instance(Context context) { ++ ConstantWriter instance = context.get(ConstantWriter.class); ++ if (instance == null) ++ instance = new ConstantWriter(context); ++@@ -54,7 +54,12 @@ ++ options = Options.instance(context); ++ } ++ ++- void writeConstantPool() { +++ protected void writeConstantPool() { +++ ConstantPool constant_pool = classWriter.getClassFile().constant_pool; +++ writeConstantPool(constant_pool); +++ } +++ +++ protected void writeConstantPool(ConstantPool constant_pool) { ++ ConstantPool.Visitor v = new ConstantPool.Visitor() { ++ public Integer visitClass(CONSTANT_Class_info info, Void p) { ++ println("#" + info.name_index + ";\t// " + stringValue(info)); ++@@ -114,7 +119,6 @@ ++ ++ }; ++ println(" Constant pool:"); ++- ConstantPool constant_pool = classWriter.getClassFile().constant_pool; ++ int cpx = 1; ++ while (cpx < constant_pool.size()) { ++ try { ++@@ -127,7 +131,7 @@ ++ } ++ } ++ ++- void write(int cpx) { +++ protected void write(int cpx) { ++ ClassFile classFile = classWriter.getClassFile(); ++ if (cpx == 0) { ++ print("#0"); ++diff -r dca34170f5f8 -r a22d1b683f15 src/share/classes/com/sun/tools/javap/JavapTask.java ++--- openjdk/langtools/src/share/classes/com/sun/tools/javap/JavapTask.java Mon Aug 04 17:54:15 2008 -0700 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/JavapTask.java Fri Oct 25 06:07:26 2013 +0100 ++@@ -36,6 +36,7 @@ ++ import java.io.Writer; ++ import java.security.DigestInputStream; ++ import java.security.MessageDigest; +++import java.security.NoSuchAlgorithmException; ++ import java.text.MessageFormat; ++ import java.util.ArrayList; ++ import java.util.Arrays; ++@@ -242,20 +243,27 @@ ++ ++ }; ++ ++- JavapTask() { +++ public JavapTask() { ++ context = new Context(); ++ options = Options.instance(context); +++ attributeFactory = new Attribute.Factory(); ++ } ++ ++- JavapTask(Writer out, +++ public JavapTask(Writer out, +++ JavaFileManager fileManager, +++ DiagnosticListener diagnosticListener) { +++ this(); +++ this.log = getPrintWriterForWriter(out); +++ this.fileManager = fileManager; +++ this.diagnosticListener = diagnosticListener; +++ } +++ +++ public JavapTask(Writer out, ++ JavaFileManager fileManager, ++ DiagnosticListener diagnosticListener, ++ Iterable options, ++ Iterable classes) { ++- this(); ++- this.log = getPrintWriterForWriter(out); ++- this.fileManager = fileManager; ++- this.diagnosticListener = diagnosticListener; +++ this(out, fileManager, diagnosticListener); ++ ++ try { ++ handleOptions(options, false); ++@@ -464,29 +472,10 @@ ++ continue; ++ } ++ } ++- Attribute.Factory attributeFactory = new Attribute.Factory(); ++ attributeFactory.setCompat(options.compat); ++ attributeFactory.setJSR277(options.jsr277); ++ ++- InputStream in = fo.openInputStream(); ++- SizeInputStream sizeIn = null; ++- MessageDigest md = null; ++- if (options.sysInfo || options.verbose) { ++- md = MessageDigest.getInstance("MD5"); ++- in = new DigestInputStream(in, md); ++- in = sizeIn = new SizeInputStream(in); ++- } ++- ++- ClassFile cf = ClassFile.read(in, attributeFactory); ++- ++- if (options.sysInfo || options.verbose) { ++- classWriter.setFile(fo.toUri()); ++- classWriter.setLastModified(fo.getLastModified()); ++- classWriter.setDigest("MD5", md.digest()); ++- classWriter.setFileSize(sizeIn.size()); ++- } ++- ++- classWriter.write(cf); +++ write(read(fo)); ++ ++ } catch (ConstantPoolException e) { ++ diagnosticListener.report(createDiagnostic("err.bad.constant.pool", className, e.getLocalizedMessage())); ++@@ -517,6 +506,103 @@ ++ return ok; ++ } ++ +++ public static class ClassFileInfo { +++ ClassFileInfo(JavaFileObject fo, ClassFile cf, byte[] digest, int size) { +++ this.fo = fo; +++ this.cf = cf; +++ this.digest = digest; +++ this.size = size; +++ } +++ public final JavaFileObject fo; +++ public final ClassFile cf; +++ public final byte[] digest; +++ public final int size; +++ } +++ +++ public ClassFileInfo read(JavaFileObject fo) throws IOException, ConstantPoolException { +++ InputStream in = fo.openInputStream(); +++ try { +++ SizeInputStream sizeIn = null; +++ MessageDigest md = null; +++ if (options.sysInfo || options.verbose) { +++ try { +++ md = MessageDigest.getInstance("MD5"); +++ } catch (NoSuchAlgorithmException ignore) { +++ } +++ in = new DigestInputStream(in, md); +++ in = sizeIn = new SizeInputStream(in); +++ } +++ +++ ClassFile cf = ClassFile.read(in, attributeFactory); +++ byte[] digest = (md == null) ? null : md.digest(); +++ int size = (sizeIn == null) ? -1 : sizeIn.size(); +++ return new ClassFileInfo(fo, cf, digest, size); +++ } finally { +++ in.close(); +++ } +++ } +++ +++ public void write(ClassFileInfo info) { +++ ClassWriter classWriter = ClassWriter.instance(context); +++ if (options.sysInfo || options.verbose) { +++ classWriter.setFile(info.fo.toUri()); +++ classWriter.setLastModified(info.fo.getLastModified()); +++ classWriter.setDigest("MD5", info.digest); +++ classWriter.setFileSize(info.size); +++ } +++ +++ classWriter.write(info.cf); +++ } +++ +++ protected void setClassFile(ClassFile classFile) { +++ ClassWriter classWriter = ClassWriter.instance(context); +++ classWriter.setClassFile(classFile); +++ } +++ +++ protected void setMethod(Method enclosingMethod) { +++ ClassWriter classWriter = ClassWriter.instance(context); +++ classWriter.setMethod(enclosingMethod); +++ } +++ +++ protected void write(Attribute value) { +++ AttributeWriter attrWriter = AttributeWriter.instance(context); +++ ClassWriter classWriter = ClassWriter.instance(context); +++ ClassFile cf = classWriter.getClassFile(); +++ attrWriter.write(cf, value, cf.constant_pool); +++ } +++ +++ protected void write(Attributes attrs) { +++ AttributeWriter attrWriter = AttributeWriter.instance(context); +++ ClassWriter classWriter = ClassWriter.instance(context); +++ ClassFile cf = classWriter.getClassFile(); +++ attrWriter.write(cf, attrs, cf.constant_pool); +++ } +++ +++ protected void write(ConstantPool constant_pool) { +++ ConstantWriter constantWriter = ConstantWriter.instance(context); +++ constantWriter.writeConstantPool(constant_pool); +++ } +++ +++ protected void write(ConstantPool constant_pool, int value) { +++ ConstantWriter constantWriter = ConstantWriter.instance(context); +++ constantWriter.write(value); +++ } +++ +++ protected void write(ConstantPool.CPInfo value) { +++ ConstantWriter constantWriter = ConstantWriter.instance(context); +++ constantWriter.println(value); +++ } +++ +++ protected void write(Field value) { +++ ClassWriter classWriter = ClassWriter.instance(context); +++ classWriter.writeField(value); +++ } +++ +++ protected void write(Method value) { +++ ClassWriter classWriter = ClassWriter.instance(context); +++ classWriter.writeMethod(value); +++ } +++ ++ private JavaFileManager getDefaultFileManager(final DiagnosticListener dl, PrintWriter log) { ++ return JavapFileManager.create(dl, log, options); ++ } ++@@ -646,7 +732,7 @@ ++ } ++ } ++ ++- Context context; +++ protected Context context; ++ JavaFileManager fileManager; ++ PrintWriter log; ++ DiagnosticListener diagnosticListener; ++@@ -655,6 +741,7 @@ ++ //ResourceBundle bundle; ++ Locale task_locale; ++ Map bundles; +++ protected Attribute.Factory attributeFactory; ++ ++ private static final String progname = "javap"; ++ +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/6867671-javap_whitespace.patch openjdk-6-6b27-1.12.6/patches/openjdk/6867671-javap_whitespace.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/6867671-javap_whitespace.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/6867671-javap_whitespace.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,1041 @@ ++# HG changeset patch ++# User jjg ++# Date 1382678228 -3600 ++# Fri Oct 25 06:17:08 2013 +0100 ++# Node ID db86275eb3f82caf87fbe6c162dc776cb5ed85dc ++# Parent a22d1b683f15e7f67d7d3de84f7c866a65c42552 ++6867671: javap whitespace formatting issues ++Reviewed-by: mcimadamore ++ ++diff -r a22d1b683f15 -r db86275eb3f8 src/share/classes/com/sun/tools/javap/AttributeWriter.java ++--- openjdk/langtools/src/share/classes/com/sun/tools/javap/AttributeWriter.java Fri Oct 25 06:07:26 2013 +0100 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/AttributeWriter.java Fri Oct 25 06:17:08 2013 +0100 ++@@ -41,7 +41,6 @@ ++ import com.sun.tools.classfile.Deprecated_attribute; ++ import com.sun.tools.classfile.EnclosingMethod_attribute; ++ import com.sun.tools.classfile.Exceptions_attribute; ++-import com.sun.tools.classfile.Field; ++ import com.sun.tools.classfile.InnerClasses_attribute; ++ import com.sun.tools.classfile.LineNumberTable_attribute; ++ import com.sun.tools.classfile.LocalVariableTable_attribute; ++@@ -147,22 +146,26 @@ ++ } ++ ++ public Void visitAnnotationDefault(AnnotationDefault_attribute attr, Void ignore) { ++- println(" AnnotationDefault: "); ++- print(" default_value: "); +++ println("AnnotationDefault:"); +++ indent(+1); +++ print("default_value: "); ++ annotationWriter.write(attr.default_value); +++ indent(-1); ++ return null; ++ } ++ ++ public Void visitCharacterRangeTable(CharacterRangeTable_attribute attr, Void ignore) { ++- print(" CharacterRangeTable: "); +++ println("CharacterRangeTable:"); +++ indent(+1); ++ for (int i = 0; i < attr.character_range_table.length; i++) { ++ CharacterRangeTable_attribute.Entry e = attr.character_range_table[i]; ++ print(" " + e.start_pc + ", " + ++ e.end_pc + ", " + ++ Integer.toHexString(e.character_range_start) + ", " + ++ Integer.toHexString(e.character_range_end) + ", " + ++- Integer.toHexString(e.flags) + ++- "\t// "); +++ Integer.toHexString(e.flags)); +++ tab(); +++ print("// "); ++ print(e.start_pc + ", " + ++ e.end_pc + ", " + ++ (e.character_range_start >> 10) + ":" + (e.character_range_start & 0x3ff) + ", " + ++@@ -185,16 +188,13 @@ ++ print(", branch-true"); ++ if ((e.flags & CharacterRangeTable_attribute.CRT_BRANCH_FALSE) != 0) ++ print(", branch-false"); ++- ++- ++- ++ } +++ indent(-1); ++ return null; ++ } ++ ++ public Void visitCode(Code_attribute attr, Void ignore) { ++ codeWriter.write(attr, constant_pool); ++- println(); ++ return null; ++ } ++ ++@@ -205,25 +205,23 @@ ++ ++ public Void visitConstantValue(ConstantValue_attribute attr, Void ignore) { ++ if (options.compat) // BUG 6622216 javap names some attributes incorrectly ++- print(" Constant value: "); +++ print("Constant value: "); ++ else ++- print(" ConstantValue: "); +++ print("ConstantValue: "); ++ constantWriter.write(attr.constantvalue_index); ++- if (!options.compat) // BUG 6622232 javap gets whitespace confused ++- println(); +++ println(); ++ return null; ++ } ++ ++ public Void visitDeprecated(Deprecated_attribute attr, Void ignore) { ++- if (!(options.compat && owner instanceof Field)) // BUG 6622232 javap gets whitespace confused ++- print(" "); ++ println("Deprecated: true"); ++ return null; ++ } ++ ++ public Void visitEnclosingMethod(EnclosingMethod_attribute attr, Void ignore) { ++- print(" EnclosingMethod: #" + attr.class_index + ".#" + attr.method_index ++- + "\t// " + getJavaClassName(attr)); +++ print("EnclosingMethod: #" + attr.class_index + ".#" + attr.method_index); +++ tab(); +++ print("// " + getJavaClassName(attr)); ++ if (attr.method_index != 0) ++ print("." + getMethodName(attr)); ++ println(); ++@@ -247,15 +245,16 @@ ++ } ++ ++ public Void visitExceptions(Exceptions_attribute attr, Void ignore) { ++- println(" Exceptions: "); ++- print(" throws "); +++ println("Exceptions:"); +++ indent(+1); +++ print("throws "); ++ for (int i = 0; i < attr.number_of_exceptions; i++) { ++ if (i > 0) ++ print(", "); ++ print(getJavaException(attr, i)); ++ } ++- if (!options.compat) // BUG 6622232 javap gets whitespace confused ++- println(); +++ println(); +++ indent(-1); ++ return null; ++ } ++ ++@@ -288,8 +287,7 @@ ++ writeInnerClassHeader(); ++ first = false; ++ } ++- if (!options.compat) // BUG 6622232: javap gets whitespace confused ++- print(" "); +++ print(" "); ++ for (String name: access_flags.getInnerClassModifiers()) ++ print(name + " "); ++ if (info.inner_name_index!=0) { ++@@ -311,6 +309,8 @@ ++ println(); ++ } ++ } +++ if (!first) +++ indent(-1); ++ return null; ++ } ++ ++@@ -323,26 +323,28 @@ ++ } ++ ++ private void writeInnerClassHeader() { ++- print(" "); ++ if (options.compat) // BUG 6622216: javap names some attributes incorrectly ++ print("InnerClass"); ++ else ++ print("InnerClasses"); ++ println(": "); +++ indent(+1); ++ } ++ ++ public Void visitLineNumberTable(LineNumberTable_attribute attr, Void ignore) { ++- println(" LineNumberTable: "); +++ println("LineNumberTable:"); +++ indent(+1); ++ for (LineNumberTable_attribute.Entry entry: attr.line_number_table) { ++- println(" line " + entry.line_number + ": " + entry.start_pc); +++ println("line " + entry.line_number + ": " + entry.start_pc); ++ } +++ indent(-1); ++ return null; ++ } ++ ++ public Void visitLocalVariableTable(LocalVariableTable_attribute attr, Void ignore) { ++- println(" LocalVariableTable: "); ++- println(" Start Length Slot Name Signature"); ++- +++ println("LocalVariableTable:"); +++ indent(+1); +++ println("Start Length Slot Name Signature"); ++ for (LocalVariableTable_attribute.Entry entry : attr.local_variable_table) { ++ Formatter formatter = new Formatter(); ++ println(formatter.format("%8d %7d %5d %5s %s", ++@@ -350,25 +352,28 @@ ++ constantWriter.stringValue(entry.name_index), ++ constantWriter.stringValue(entry.descriptor_index))); ++ } +++ indent(-1); ++ return null; ++ } ++ ++ public Void visitLocalVariableTypeTable(LocalVariableTypeTable_attribute attr, Void ignore) { ++- println(" LocalVariableTypeTable: "); ++- println(" Start Length Slot Name Signature"); ++- +++ println("LocalVariableTypeTable:"); +++ indent(+1); +++ println("Start Length Slot Name Signature"); ++ for (LocalVariableTypeTable_attribute.Entry entry : attr.local_variable_table) { ++- Formatter formatter = new Formatter(); ++- println(formatter.format("%8d %7d %5d %5s %s", +++ println(String.format("%5d %7d %5d %5s %s", ++ entry.start_pc, entry.length, entry.index, ++ constantWriter.stringValue(entry.name_index), ++ constantWriter.stringValue(entry.signature_index))); ++ } +++ indent(-1); ++ return null; ++ } ++ ++ public Void visitModule(Module_attribute attr, Void ignore) { ++- println(" Module: #" + attr.module_name + "\t// " + getModuleName(attr)); +++ print("Module: #" + attr.module_name); +++ tab(); +++ println("// " + getModuleName(attr)); ++ return null; ++ } ++ ++@@ -381,11 +386,15 @@ ++ } ++ ++ public Void visitModuleExportTable(ModuleExportTable_attribute attr, Void ignore) { ++- println(" ModuleExportTable:"); ++- println(" Types: (" + attr.export_type_table.length + ")"); +++ println("ModuleExportTable:"); +++ indent(+1); +++ println("Types: (" + attr.export_type_table.length + ")"); ++ for (int i = 0; i < attr.export_type_table.length; i++) { ++- println(" #" + attr.export_type_table[i] + "\t// " + getExportTypeName(attr, i)); +++ print("#" + attr.export_type_table[i]); +++ tab(); +++ println("// " + getExportTypeName(attr, i)); ++ } +++ indent(-1); ++ return null; ++ } ++ ++@@ -398,11 +407,15 @@ ++ } ++ ++ public Void visitModuleMemberTable(ModuleMemberTable_attribute attr, Void ignore) { ++- println(" ModuleMemberTable:"); ++- println(" Packages: (" + attr.package_member_table.length + ")"); +++ println("ModuleMemberTable:"); +++ indent(+1); +++ println("Packages: (" + attr.package_member_table.length + ")"); ++ for (int i = 0; i < attr.package_member_table.length; i++) { ++- println(" #" + attr.package_member_table[i] + "\t// " + getPackageMemberName(attr, i)); +++ print("#" + attr.package_member_table[i]); +++ tab(); +++ println("// " + getPackageMemberName(attr, i)); ++ } +++ indent(-1); ++ return null; ++ } ++ ++@@ -415,53 +428,67 @@ ++ } ++ ++ public Void visitRuntimeVisibleAnnotations(RuntimeVisibleAnnotations_attribute attr, Void ignore) { ++- println(" RuntimeVisibleAnnotations: "); +++ println("RuntimeVisibleAnnotations:"); +++ indent(+1); ++ for (int i = 0; i < attr.annotations.length; i++) { ++- print(" " + i + ": "); +++ print(i + ": "); ++ annotationWriter.write(attr.annotations[i]); ++ println(); ++ } +++ indent(-1); ++ return null; ++ } ++ ++ public Void visitRuntimeInvisibleAnnotations(RuntimeInvisibleAnnotations_attribute attr, Void ignore) { ++- println(" RuntimeInvisibleAnnotations: "); +++ println("RuntimeInvisibleAnnotations:"); +++ indent(+1); ++ for (int i = 0; i < attr.annotations.length; i++) { ++- print(" " + i + ": "); +++ print(i + ": "); ++ annotationWriter.write(attr.annotations[i]); ++ println(); ++ } +++ indent(-1); ++ return null; ++ } ++ ++ public Void visitRuntimeVisibleParameterAnnotations(RuntimeVisibleParameterAnnotations_attribute attr, Void ignore) { ++- println(" RuntimeVisibleParameterAnnotations: "); +++ println("RuntimeVisibleParameterAnnotations:"); +++ indent(+1); ++ for (int param = 0; param < attr.parameter_annotations.length; param++) { ++- println(" parameter " + param + ": "); +++ println("parameter " + param + ": "); +++ indent(+1); ++ for (int i = 0; i < attr.parameter_annotations[param].length; i++) { ++- print(" " + i + ": "); +++ print(i + ": "); ++ annotationWriter.write(attr.parameter_annotations[param][i]); ++ println(); ++ } +++ indent(-1); ++ } +++ indent(-1); ++ return null; ++ } ++ ++ public Void visitRuntimeInvisibleParameterAnnotations(RuntimeInvisibleParameterAnnotations_attribute attr, Void ignore) { ++- println(" RuntimeInvisibleParameterAnnotations: "); +++ println("RuntimeInvisibleParameterAnnotations:"); +++ indent(+1); ++ for (int param = 0; param < attr.parameter_annotations.length; param++) { ++- println(" " + param + ": "); +++ println(param + ": "); +++ indent(+1); ++ for (int i = 0; i < attr.parameter_annotations[param].length; i++) { ++- print(" " + i + ": "); +++ print(i + ": "); ++ annotationWriter.write(attr.parameter_annotations[param][i]); ++ println(); ++ } +++ indent(-1); ++ } +++ indent(-1); ++ return null; ++ } ++ ++ public Void visitSignature(Signature_attribute attr, Void ignore) { ++- println(" Signature: #" + attr.signature_index + "\t// " + getSignature(attr)); +++ print("Signature: #" + attr.signature_index); +++ tab(); +++ println("// " + getSignature(attr)); ++ return null; ++ } ++ ++@@ -474,12 +501,12 @@ ++ } ++ ++ public Void visitSourceDebugExtension(SourceDebugExtension_attribute attr, Void ignore) { ++- println(" SourceDebugExtension: " + attr.getValue()); +++ println("SourceDebugExtension: " + attr.getValue()); ++ return null; ++ } ++ ++ public Void visitSourceFile(SourceFile_attribute attr, Void ignore) { ++- println(" SourceFile: \"" + getSourceFile(attr) + "\""); +++ println("SourceFile: \"" + getSourceFile(attr) + "\""); ++ return null; ++ } ++ ++@@ -497,24 +524,26 @@ ++ } ++ ++ public Void visitStackMap(StackMap_attribute attr, Void ignore) { ++- println(" StackMap: number_of_entries = " + attr.number_of_entries); ++- +++ println("StackMap: number_of_entries = " + attr.number_of_entries); +++ indent(+1); ++ StackMapTableWriter w = new StackMapTableWriter(); ++ for (StackMapTable_attribute.stack_map_frame entry : attr.entries) { ++ w.write(entry); ++ } ++ println(); +++ indent(-1); ++ return null; ++ } ++ ++ public Void visitStackMapTable(StackMapTable_attribute attr, Void ignore) { ++- println(" StackMapTable: number_of_entries = " + attr.number_of_entries); ++- +++ println("StackMapTable: number_of_entries = " + attr.number_of_entries); +++ indent(+1); ++ StackMapTableWriter w = new StackMapTableWriter(); ++ for (StackMapTable_attribute.stack_map_frame entry : attr.entries) { ++ w.write(entry); ++ } ++ println(); +++ indent(-1); ++ return null; ++ } ++ ++@@ -533,29 +562,37 @@ ++ public Void visit_same_locals_1_stack_item_frame(StackMapTable_attribute.same_locals_1_stack_item_frame frame, Void p) { ++ printHeader(frame); ++ println(" /* same_locals_1_stack_item */"); +++ indent(+1); ++ printMap("stack", frame.stack); +++ indent(-1); ++ return null; ++ } ++ ++ public Void visit_same_locals_1_stack_item_frame_extended(StackMapTable_attribute.same_locals_1_stack_item_frame_extended frame, Void p) { ++ printHeader(frame); ++ println(" /* same_locals_1_stack_item_frame_extended */"); ++- println(" offset_delta = " + frame.offset_delta); +++ indent(+1); +++ println("offset_delta = " + frame.offset_delta); ++ printMap("stack", frame.stack); +++ indent(-1); ++ return null; ++ } ++ ++ public Void visit_chop_frame(StackMapTable_attribute.chop_frame frame, Void p) { ++ printHeader(frame); ++ println(" /* chop */"); ++- println(" offset_delta = " + frame.offset_delta); +++ indent(+1); +++ println("offset_delta = " + frame.offset_delta); +++ indent(-1); ++ return null; ++ } ++ ++ public Void visit_same_frame_extended(StackMapTable_attribute.same_frame_extended frame, Void p) { ++ printHeader(frame); ++ println(" /* same_frame_extended */"); ++- println(" offset_delta = " + frame.offset_delta); +++ indent(+1); +++ println("offset_delta = " + frame.offset_delta); +++ indent(-1); ++ return null; ++ } ++ ++@@ -570,13 +607,16 @@ ++ public Void visit_full_frame(StackMapTable_attribute.full_frame frame, Void p) { ++ printHeader(frame); ++ if (frame instanceof StackMap_attribute.stack_map_frame) { ++- println(" offset = " + frame.offset_delta); +++ indent(+1); +++ println(" offset = " + frame.offset_delta); ++ } else { ++ println(" /* full_frame */"); ++- println(" offset_delta = " + frame.offset_delta); +++ indent(+1); +++ println("offset_delta = " + frame.offset_delta); ++ } ++ printMap("locals", frame.locals); ++ printMap("stack", frame.stack); +++ indent(-1); ++ return null; ++ } ++ ++@@ -585,7 +625,7 @@ ++ } ++ ++ void printMap(String name, StackMapTable_attribute.verification_type_info[] map) { ++- print(" " + name + " = ["); +++ print(name + " = ["); ++ for (int i = 0; i < map.length; i++) { ++ StackMapTable_attribute.verification_type_info info = map[i]; ++ int tag = info.tag; ++diff -r a22d1b683f15 -r db86275eb3f8 src/share/classes/com/sun/tools/javap/BasicWriter.java ++--- openjdk/langtools/src/share/classes/com/sun/tools/javap/BasicWriter.java Fri Oct 25 06:07:26 2013 +0100 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/BasicWriter.java Fri Oct 25 06:17:08 2013 +0100 ++@@ -68,6 +68,18 @@ ++ lineWriter.println(); ++ } ++ +++ protected void indent(int delta) { +++ lineWriter.indent(delta); +++ } +++ +++ protected void tab() { +++ lineWriter.tab(); +++ } +++ +++ protected void setPendingNewline(boolean b) { +++ lineWriter.pendingNewline = b; +++ } +++ ++ protected String report(AttributeException e) { ++ out.println("Error: " + e.getMessage()); // i18n? ++ return "???"; ++@@ -101,19 +113,30 @@ ++ ++ protected LineWriter(Context context) { ++ context.put(LineWriter.class, this); +++ Options options = Options.instance(context); +++ indentWidth = options.indentWidth; +++ tabColumn = options.tabColumn; ++ out = context.get(PrintWriter.class); ++ buffer = new StringBuilder(); ++ } ++ ++ protected void print(String s) { +++ if (pendingNewline) { +++ println(); +++ pendingNewline = false; +++ } ++ if (s == null) ++ s = "null"; ++ for (int i = 0; i < s.length(); i++) { ++ char c = s.charAt(i); ++- if (c == '\n') { ++- println(); ++- } else { ++- buffer.append(c); +++ switch (c) { +++ case '\n': +++ println(); +++ break; +++ default: +++ if (buffer.length() == 0) +++ indent(); +++ buffer.append(c); ++ } ++ } ++ ++@@ -124,8 +147,31 @@ ++ buffer.setLength(0); ++ } ++ +++ protected void indent(int delta) { +++ indentCount += delta; +++ } +++ +++ protected void tab() { +++ if (buffer.length() == 0) +++ indent(); +++ space(indentCount * indentWidth + tabColumn - buffer.length()); +++ } +++ +++ private void indent() { +++ space(indentCount * indentWidth); +++ } +++ +++ private void space(int n) { +++ for (int i = 0; i < n; i++) +++ buffer.append(' '); +++ } +++ ++ private PrintWriter out; ++ private StringBuilder buffer; +++ private int indentCount; +++ private int indentWidth; +++ private int tabColumn; +++ private boolean pendingNewline; ++ } ++ } ++ ++diff -r a22d1b683f15 -r db86275eb3f8 src/share/classes/com/sun/tools/javap/ClassWriter.java ++--- openjdk/langtools/src/share/classes/com/sun/tools/javap/ClassWriter.java Fri Oct 25 06:07:26 2013 +0100 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/ClassWriter.java Fri Oct 25 06:17:08 2013 +0100 ++@@ -120,6 +120,7 @@ ++ else ++ println("Classfile " + uri); ++ } +++ indent(+1); ++ if (lastModified != -1) { ++ Date lm = new Date(lastModified); ++ DateFormat df = DateFormat.getDateInstance(); ++@@ -144,6 +145,10 @@ ++ println("Compiled from \"" + getSourceFile((SourceFile_attribute) sfa) + "\""); ++ } ++ +++ if ((options.sysInfo || options.verbose) && !options.compat) { +++ indent(-1); +++ } +++ ++ String name = getJavaName(classFile); ++ AccessFlags flags = cf.access_flags; ++ ++@@ -190,23 +195,24 @@ ++ ++ if (options.verbose) { ++ println(); +++ indent(+1); ++ attrWriter.write(cf, cf.attributes, constant_pool); ++- println(" minor version: " + cf.minor_version); ++- println(" major version: " + cf.major_version); +++ println("minor version: " + cf.minor_version); +++ println("major version: " + cf.major_version); ++ if (!options.compat) ++- writeList(" flags: ", flags.getClassFlags(), NEWLINE); +++ writeList("flags: ", flags.getClassFlags(), NEWLINE); +++ indent(-1); ++ constantWriter.writeConstantPool(); ++- println(); ++ } else { ++- if (!options.compat) ++- print(" "); +++ print(" "); ++ } ++ ++ println("{"); +++ indent(+1); ++ writeFields(); ++ writeMethods(); +++ indent(-1); ++ println("}"); ++- println(); ++ } ++ ++ protected void writeFields() { ++@@ -219,14 +225,6 @@ ++ if (!options.checkAccess(f.access_flags)) ++ return; ++ ++- if (!(options.showLineAndLocalVariableTables ++- || options.showDisassembled ++- || options.verbose ++- || options.showInternalSignatures ++- || options.showAllAttrs)) { ++- print(" "); ++- } ++- ++ AccessFlags flags = f.access_flags; ++ writeModifiers(flags.getFieldModifiers()); ++ Signature_attribute sigAttr = getSignature(f.attributes); ++@@ -255,11 +253,13 @@ ++ print(";"); ++ println(); ++ +++ indent(+1); +++ ++ if (options.showInternalSignatures) ++- println(" Signature: " + getValue(f.descriptor)); +++ println("Signature: " + getValue(f.descriptor)); ++ ++ if (options.verbose && !options.compat) ++- writeList(" flags: ", flags.getFieldFlags(), NEWLINE); +++ writeList("flags: ", flags.getFieldFlags(), NEWLINE); ++ ++ if (options.showAllAttrs) { ++ for (Attribute attr: f.attributes) ++@@ -267,6 +267,8 @@ ++ println(); ++ } ++ +++ indent(-1); +++ ++ if (options.showDisassembled || options.showLineAndLocalVariableTables) ++ println(); ++ } ++@@ -274,6 +276,7 @@ ++ protected void writeMethods() { ++ for (Method m: classFile.methods) ++ writeMethod(m); +++ setPendingNewline(false); ++ } ++ ++ protected void writeMethod(Method m) { ++@@ -282,14 +285,6 @@ ++ ++ method = m; ++ ++- if (!(options.showLineAndLocalVariableTables ++- || options.showDisassembled ++- || options.verbose ++- || options.showInternalSignatures ++- || options.showAllAttrs)) { ++- print(" "); ++- } ++- ++ AccessFlags flags = m.access_flags; ++ ++ Descriptor d; ++@@ -337,16 +332,6 @@ ++ if (e_attr != null) { // if there are generic exceptions, there must be erased exceptions ++ if (e_attr instanceof Exceptions_attribute) { ++ Exceptions_attribute exceptions = (Exceptions_attribute) e_attr; ++- if (options.compat) { // Bug XXXXXXX whitespace ++- if (!(options.showLineAndLocalVariableTables ++- || options.showDisassembled ++- || options.verbose ++- || options.showInternalSignatures ++- || options.showAllAttrs)) { ++- print(" "); ++- } ++- print(" "); ++- } ++ print(" throws "); ++ if (methodExceptions != null) { // use generic list if available ++ writeList("", methodExceptions, ""); ++@@ -362,14 +347,17 @@ ++ } ++ } ++ ++- print(";"); ++- println(); +++ println(";"); ++ ++- if (options.showInternalSignatures) ++- println(" Signature: " + getValue(m.descriptor)); +++ indent(+1); ++ ++- if (options.verbose && !options.compat) ++- writeList(" flags: ", flags.getMethodFlags(), NEWLINE); +++ if (options.showInternalSignatures) { +++ println("Signature: " + getValue(m.descriptor)); +++ } +++ +++ if (options.verbose && !options.compat) { +++ writeList("flags: ", flags.getMethodFlags(), NEWLINE); +++ } ++ ++ Code_attribute code = null; ++ Attribute c_attr = m.attributes.get(Attribute.Code); ++@@ -382,33 +370,35 @@ ++ ++ if (options.showDisassembled && !options.showAllAttrs) { ++ if (code != null) { ++- println(" Code:"); +++ println("Code:"); ++ codeWriter.writeInstrs(code); ++ codeWriter.writeExceptionTable(code); ++ } ++- println(); ++ } ++ ++ if (options.showLineAndLocalVariableTables) { ++- if (code != null) +++ if (code != null) { ++ attrWriter.write(code, code.attributes.get(Attribute.LineNumberTable), constant_pool); ++- println(); ++- if (code != null) ++ attrWriter.write(code, code.attributes.get(Attribute.LocalVariableTable), constant_pool); ++- println(); ++- println(); +++ } ++ } ++ ++ if (options.showAllAttrs) { ++ Attribute[] attrs = m.attributes.attrs; ++ for (Attribute attr: attrs) ++ attrWriter.write(m, attr, constant_pool); +++ } ++ ++-// // the following condition is to mimic old javap ++-// if (!(attrs.length > 0 && ++-// attrs[attrs.length - 1] instanceof Exceptions_attribute)) ++- println(); ++- } +++ indent(-1); +++ +++ // set pendingNewline to write a newline before the next method (if any) +++ // if a separator is desired +++ setPendingNewline( +++ options.showDisassembled || +++ options.showAllAttrs || +++ options.showInternalSignatures || +++ options.showLineAndLocalVariableTables || +++ options.verbose); ++ } ++ ++ void writeModifiers(Collection items) { ++diff -r a22d1b683f15 -r db86275eb3f8 src/share/classes/com/sun/tools/javap/CodeWriter.java ++--- openjdk/langtools/src/share/classes/com/sun/tools/javap/CodeWriter.java Fri Oct 25 06:07:26 2013 +0100 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/CodeWriter.java Fri Oct 25 06:17:08 2013 +0100 ++@@ -62,11 +62,13 @@ ++ } ++ ++ void write(Code_attribute attr, ConstantPool constant_pool) { ++- println(" Code:"); +++ println("Code:"); +++ indent(+1); ++ writeVerboseHeader(attr, constant_pool); ++ writeInstrs(attr); ++ writeExceptionTable(attr); ++ attrWriter.write(attr, attr.attributes, constant_pool); +++ indent(-1); ++ } ++ ++ public void writeVerboseHeader(Code_attribute attr, ConstantPool constant_pool) { ++@@ -83,9 +85,9 @@ ++ argCount = report(e); ++ } ++ ++- println(" Stack=" + attr.max_stack + ++- ", Locals=" + attr.max_locals + ++- ", Args_size=" + argCount); +++ println("stack=" + attr.max_stack + +++ ", locals=" + attr.max_locals + +++ ", args_size=" + argCount); ++ ++ } ++ ++@@ -101,8 +103,7 @@ ++ } ++ ++ public void writeInstr(Instruction instr) { ++- print(" " + instr.getPC() + ":\t"); ++- print(instr.getMnemonic()); +++ print(String.format("%4d: %-12s ", instr.getPC(), instr.getMnemonic())); ++ instr.accept(instructionPrinter, null); ++ println(); ++ } ++@@ -120,54 +121,62 @@ ++ } ++ ++ public Void visitBranch(Instruction instr, int offset, Void p) { ++- print("\t" + (instr.getPC() + offset)); +++ print((instr.getPC() + offset)); ++ return null; ++ } ++ ++ public Void visitConstantPoolRef(Instruction instr, int index, Void p) { ++- print("\t#" + index + "; //"); +++ print("#" + index + ";"); +++ tab(); +++ print("// "); ++ printConstant(index); ++ return null; ++ } ++ ++ public Void visitConstantPoolRefAndValue(Instruction instr, int index, int value, Void p) { ++- print("\t#" + index + ", " + value + "; //"); +++ print("#" + index + ", " + value + ";"); +++ tab(); +++ print("// "); ++ printConstant(index); ++ return null; ++ } ++ ++ public Void visitLocal(Instruction instr, int index, Void p) { ++- print("\t" + index); +++ print(index); ++ return null; ++ } ++ ++ public Void visitLocalAndValue(Instruction instr, int index, int value, Void p) { ++- print("\t" + index + ", " + value); +++ print(index + ", " + value); ++ return null; ++ } ++ ++ public Void visitLookupSwitch(Instruction instr, int default_, int npairs, int[] matches, int[] offsets) { ++ int pc = instr.getPC(); ++- print("{ //" + npairs); +++ print("{ // " + npairs); +++ indent(+1); ++ for (int i = 0; i < npairs; i++) { ++- print("\n\t\t" + matches[i] + ": " + (pc + offsets[i]) + ";"); +++ print("\n" + matches[i] + ": " + (pc + offsets[i]) + ";"); ++ } ++- print("\n\t\tdefault: " + (pc + default_) + " }"); +++ print("\ndefault: " + (pc + default_) + " }"); +++ indent(-1); ++ return null; ++ } ++ ++ public Void visitTableSwitch(Instruction instr, int default_, int low, int high, int[] offsets) { ++ int pc = instr.getPC(); ++ print("{ //" + low + " to " + high); +++ indent(+1); ++ for (int i = 0; i < offsets.length; i++) { ++- print("\n\t\t" + (low + i) + ": " + (pc + offsets[i]) + ";"); +++ print("\n" + (low + i) + ": " + (pc + offsets[i]) + ";"); ++ } ++- print("\n\t\tdefault: " + (pc + default_) + " }"); +++ print("\ndefault: " + (pc + default_) + " }"); +++ indent(-1); ++ return null; ++ } ++ ++ public Void visitValue(Instruction instr, int value, Void p) { ++- print("\t" + value); +++ print(value); ++ return null; ++ } ++ ++@@ -179,13 +188,13 @@ ++ ++ public void writeExceptionTable(Code_attribute attr) { ++ if (attr.exception_table_langth > 0) { ++- println(" Exception table:"); ++- println(" from to target type"); +++ println("Exception table:"); +++ indent(+1); +++ println(" from to target type"); ++ for (int i = 0; i < attr.exception_table.length; i++) { ++ Code_attribute.Exception_data handler = attr.exception_table[i]; ++- printFixedWidthInt(handler.start_pc, 6); ++- printFixedWidthInt(handler.end_pc, 6); ++- printFixedWidthInt(handler.handler_pc, 6); +++ print(String.format(" %5d %5d %5d", +++ handler.start_pc, handler.end_pc, handler.handler_pc)); ++ print(" "); ++ int catch_type = handler.catch_type; ++ if (catch_type == 0) { ++@@ -193,9 +202,9 @@ ++ } else { ++ print("Class "); ++ println(constantWriter.stringValue(catch_type)); ++- println(""); ++ } ++ } +++ indent(-1); ++ } ++ ++ } ++@@ -204,13 +213,6 @@ ++ constantWriter.write(index); ++ } ++ ++- private void printFixedWidthInt(int n, int width) { ++- String s = String.valueOf(n); ++- for (int i = s.length(); i < width; i++) ++- print(" "); ++- print(s); ++- } ++- ++ private static int align(int n) { ++ return (n + 3) & ~3; ++ } ++diff -r a22d1b683f15 -r db86275eb3f8 src/share/classes/com/sun/tools/javap/ConstantWriter.java ++--- openjdk/langtools/src/share/classes/com/sun/tools/javap/ConstantWriter.java Fri Oct 25 06:07:26 2013 +0100 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/ConstantWriter.java Fri Oct 25 06:17:08 2013 +0100 ++@@ -62,7 +62,9 @@ ++ protected void writeConstantPool(ConstantPool constant_pool) { ++ ConstantPool.Visitor v = new ConstantPool.Visitor() { ++ public Integer visitClass(CONSTANT_Class_info info, Void p) { ++- println("#" + info.name_index + ";\t// " + stringValue(info)); +++ print("#" + info.name_index + ";"); +++ tab(); +++ println("// " + stringValue(info)); ++ return 1; ++ } ++ ++@@ -72,7 +74,9 @@ ++ } ++ ++ public Integer visitFieldref(CONSTANT_Fieldref_info info, Void p) { ++- println("#" + info.class_index + ".#" + info.name_and_type_index + ";\t// " + stringValue(info)); +++ print("#" + info.class_index + ".#" + info.name_and_type_index + ";"); +++ tab(); +++ println("// " + stringValue(info)); ++ return 1; ++ } ++ ++@@ -87,7 +91,9 @@ ++ } ++ ++ public Integer visitInterfaceMethodref(CONSTANT_InterfaceMethodref_info info, Void p) { ++- println("#" + info.class_index + ".#" + info.name_and_type_index + ";\t// " + stringValue(info)); +++ print("#" + info.class_index + ".#" + info.name_and_type_index + ";"); +++ tab(); +++ println("// " + stringValue(info)); ++ return 1; ++ } ++ ++@@ -97,18 +103,23 @@ ++ } ++ ++ public Integer visitNameAndType(CONSTANT_NameAndType_info info, Void p) { ++- String tab = (options.compat ? "" : "\t"); // BUG 6622232 javap gets whitespace confused ++- println("#" + info.name_index + ":#" + info.type_index + ";" + tab + "// " + stringValue(info)); +++ print("#" + info.name_index + ":#" + info.type_index + ";"); +++ tab(); +++ println("// " + stringValue(info)); ++ return 1; ++ } ++ ++ public Integer visitMethodref(CONSTANT_Methodref_info info, Void p) { ++- println("#" + info.class_index + ".#" + info.name_and_type_index + ";\t// " + stringValue(info)); +++ print("#" + info.class_index + ".#" + info.name_and_type_index + ";"); +++ tab(); +++ println("// " + stringValue(info)); ++ return 1; ++ } ++ ++ public Integer visitString(CONSTANT_String_info info, Void p) { ++- println("#" + info.string_index + ";\t// " + stringValue(info)); +++ print("#" + info.string_index + ";"); +++ tab(); +++ println("// " + stringValue(info)); ++ return 1; ++ } ++ ++@@ -118,17 +129,21 @@ ++ } ++ ++ }; ++- println(" Constant pool:"); +++ println("Constant pool:"); +++ indent(+1); +++ int width = String.valueOf(constant_pool.size()).length() + 1; ++ int cpx = 1; ++ while (cpx < constant_pool.size()) { +++ print(String.format("const %" + width + "s", ("#" + cpx))); ++ try { ++ CPInfo cpInfo = constant_pool.get(cpx); ++- print("const #" + cpx + " = " + tagName(cpInfo.getTag()) + "\t"); +++ print(String.format(" = %-15s ", tagName(cpInfo.getTag()))); ++ cpx += cpInfo.accept(v, null); ++ } catch (ConstantPool.InvalidIndex ex) { ++- print("const #" + cpx); // should not happen +++ // should not happen ++ } ++ } +++ indent(-1); ++ } ++ ++ protected void write(int cpx) { ++diff -r a22d1b683f15 -r db86275eb3f8 src/share/classes/com/sun/tools/javap/JavapTask.java ++--- openjdk/langtools/src/share/classes/com/sun/tools/javap/JavapTask.java Fri Oct 25 06:07:26 2013 +0100 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/JavapTask.java Fri Oct 25 06:17:08 2013 +0100 ++@@ -239,6 +239,38 @@ ++ void process(JavapTask task, String opt, String arg) { ++ task.options.showConstants = true; ++ } +++ }, +++ +++ new Option(false, "-XDindent:") { +++ @Override +++ boolean matches(String opt) { +++ int sep = opt.indexOf(":"); +++ return sep != -1 && super.matches(opt.substring(0, sep + 1)); +++ } +++ +++ void process(JavapTask task, String opt, String arg) throws BadArgs { +++ int sep = opt.indexOf(":"); +++ try { +++ task.options.indentWidth = Integer.valueOf(opt.substring(sep + 1)); +++ } catch (NumberFormatException e) { +++ } +++ } +++ }, +++ +++ new Option(false, "-XDtab:") { +++ @Override +++ boolean matches(String opt) { +++ int sep = opt.indexOf(":"); +++ return sep != -1 && super.matches(opt.substring(0, sep + 1)); +++ } +++ +++ void process(JavapTask task, String opt, String arg) throws BadArgs { +++ int sep = opt.indexOf(":"); +++ try { +++ task.options.tabColumn = Integer.valueOf(opt.substring(sep + 1)); +++ } catch (NumberFormatException e) { +++ } +++ } ++ } ++ ++ }; ++diff -r a22d1b683f15 -r db86275eb3f8 src/share/classes/com/sun/tools/javap/Options.java ++--- openjdk/langtools/src/share/classes/com/sun/tools/javap/Options.java Fri Oct 25 06:07:26 2013 +0100 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/Options.java Fri Oct 25 06:17:08 2013 +0100 ++@@ -79,6 +79,8 @@ ++ public boolean showAllAttrs; ++ public boolean showConstants; ++ public boolean sysInfo; +++ public int indentWidth = 2; // #spaces per indentWidth level +++ public int tabColumn = 40; // column number for comments ++ ++ public boolean compat; // bug-for-bug compatibility mode with old javap ++ public boolean jsr277; +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/6868539-constant_pool_tags.patch openjdk-6-6b27-1.12.6/patches/openjdk/6868539-constant_pool_tags.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/6868539-constant_pool_tags.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/6868539-constant_pool_tags.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,163 @@ ++# HG changeset patch ++# User jjg ++# Date 1249779397 25200 ++# Sat Aug 08 17:56:37 2009 -0700 ++# Node ID 4f38abed863c89ee101a3af495e7293df04a4a0e ++# Parent db86275eb3f82caf87fbe6c162dc776cb5ed85dc ++6868539: javap should use current names for constant pool tags ++Reviewed-by: ksrini ++ ++diff -r db86275eb3f8 -r 4f38abed863c src/share/classes/com/sun/tools/javap/CodeWriter.java ++--- openjdk/langtools/src/share/classes/com/sun/tools/javap/CodeWriter.java Fri Oct 25 06:17:08 2013 +0100 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/CodeWriter.java Sat Aug 08 17:56:37 2009 -0700 ++@@ -103,7 +103,7 @@ ++ } ++ ++ public void writeInstr(Instruction instr) { ++- print(String.format("%4d: %-12s ", instr.getPC(), instr.getMnemonic())); +++ print(String.format("%4d: %-13s ", instr.getPC(), instr.getMnemonic())); ++ instr.accept(instructionPrinter, null); ++ println(); ++ } ++diff -r db86275eb3f8 -r 4f38abed863c src/share/classes/com/sun/tools/javap/ConstantWriter.java ++--- openjdk/langtools/src/share/classes/com/sun/tools/javap/ConstantWriter.java Fri Oct 25 06:17:08 2013 +0100 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/ConstantWriter.java Sat Aug 08 17:56:37 2009 -0700 ++@@ -134,10 +134,10 @@ ++ int width = String.valueOf(constant_pool.size()).length() + 1; ++ int cpx = 1; ++ while (cpx < constant_pool.size()) { ++- print(String.format("const %" + width + "s", ("#" + cpx))); +++ print(String.format("%" + width + "s", ("#" + cpx))); ++ try { ++ CPInfo cpInfo = constant_pool.get(cpx); ++- print(String.format(" = %-15s ", tagName(cpInfo.getTag()))); +++ print(String.format(" = %-18s ", cpTagName(cpInfo))); ++ cpx += cpInfo.accept(v, null); ++ } catch (ConstantPool.InvalidIndex ex) { ++ // should not happen ++@@ -178,10 +178,15 @@ ++ print(tagName(tag) + " " + stringValue(cpInfo)); ++ } ++ +++ String cpTagName(CPInfo cpInfo) { +++ String n = cpInfo.getClass().getSimpleName(); +++ return n.replace("CONSTANT_", "").replace("_info", ""); +++ } +++ ++ String tagName(int tag) { ++ switch (tag) { ++ case CONSTANT_Utf8: ++- return "Asciz"; +++ return "Utf8"; ++ case CONSTANT_Integer: ++ return "int"; ++ case CONSTANT_Float: ++@@ -203,7 +208,7 @@ ++ case CONSTANT_NameAndType: ++ return "NameAndType"; ++ default: ++- return "unknown tag"; +++ return "(unknown tag)"; ++ } ++ } ++ ++diff -r db86275eb3f8 -r 4f38abed863c test/tools/javap/T6868539.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/langtools/test/tools/javap/T6868539.java Sat Aug 08 17:56:37 2009 -0700 ++@@ -0,0 +1,96 @@ +++/* +++ * Copyright 2009 Sun Microsystems, Inc. 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. +++ * +++ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +++ * CA 95054 USA or visit www.sun.com if you need additional information or +++ * have any questions. +++ */ +++ +++/* +++ * @test +++ * @bug 6868539 6868548 +++ * @summary javap should use current names for constant pool entries, +++ * remove spurious ';' from constant pool entries +++ */ +++ +++import java.io.*; +++import java.util.*; +++ +++public class T6868539 +++ +++{ +++ public static void main(String... args) { +++ new T6868539().run(); +++ } +++ +++ void run() { +++ verify("T6868539", "Utf8 +java/lang/String"); // 1: Utf8 +++ // 2: currently unused +++ verify("T6868539", "Integer +123456"); // 3: Integer +++ verify("T6868539", "Float +123456.0f"); // 4: Float +++ verify("T6868539", "Long +123456l"); // 5: Long +++ verify("T6868539", "Double +123456.0d"); // 6: Double +++ verify("T6868539", "Class +#[0-9]+ +// + T6868539"); // 7: Class +++ verify("T6868539", "String +#[0-9]+ +// + not found"); // 8: String +++ verify("T6868539", "Fieldref +#[0-9]+\\.#[0-9]+ +// +T6868539.errors:I"); // 9: Fieldref +++ verify("T6868539", "Methodref +#[0-9]+\\.#[0-9]+ +// +T6868539.run:\\(\\)V"); // 10: Methodref +++ verify("T6868539", "InterfaceMethodref +#[0-9]+\\.#[0-9]+ +// +java/lang/Runnable\\.run:\\(\\)V"); +++ // 11: InterfaceMethodref +++ verify("T6868539", "NameAndType +#[0-9]+:#[0-9]+ +// +run:\\(\\)V"); // 12: NameAndType +++ if (errors > 0) +++ throw new Error(errors + " found."); +++ } +++ +++ void verify(String className, String... expects) { +++ String output = javap(className); +++ for (String expect: expects) { +++ if (!output.matches("(?s).*" + expect + ".*")) +++ error(expect + " not found"); +++ } +++ } +++ +++ void error(String msg) { +++ System.err.println(msg); +++ errors++; +++ } +++ +++ int errors; +++ +++ String javap(String className) { +++ String testClasses = System.getProperty("test.classes", "."); +++ StringWriter sw = new StringWriter(); +++ PrintWriter out = new PrintWriter(sw); +++ String[] args = { "-v", "-classpath", testClasses, className }; +++ int rc = com.sun.tools.javap.Main.run(args, out); +++ if (rc != 0) +++ throw new Error("javap failed. rc=" + rc); +++ out.close(); +++ String output = sw.toString(); +++ System.out.println("class " + className); +++ System.out.println(output); +++ return output; +++ } +++ +++ int i = 123456; +++ float f = 123456.f; +++ double d = 123456.; +++ long l = 123456L; +++ +++ void m(Runnable r) { r.run(); } +++} +++ +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/6902264-fix_indentation.patch openjdk-6-6b27-1.12.6/patches/openjdk/6902264-fix_indentation.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/6902264-fix_indentation.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/6902264-fix_indentation.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,159 @@ ++# HG changeset patch ++# User jjg ++# Date 1382713809 -3600 ++# Fri Oct 25 16:10:09 2013 +0100 ++# Node ID 9083313d5733ca9be66bc52cf64b9b5d4dd2e39a ++# Parent a7567fdabf3eae2c495726e6c25e2364e175261f ++6902264: fix indentation of tableswitch and lookupswitch ++Reviewed-by: ksrini ++ ++diff -r a7567fdabf3e -r 9083313d5733 src/share/classes/com/sun/tools/classfile/Instruction.java ++--- openjdk/langtools/src/share/classes/com/sun/tools/classfile/Instruction.java Tue May 19 13:53:00 2009 -0700 +++++ openjdk/langtools/src/share/classes/com/sun/tools/classfile/Instruction.java Fri Oct 25 16:10:09 2013 +0100 ++@@ -106,9 +106,9 @@ ++ /** See {@link Kind#LOCAL_UBYTE}. */ ++ R visitLocalAndValue(Instruction instr, int index, int value, P p); ++ /** See {@link Kind#DYNAMIC}. */ ++- R visitLookupSwitch(Instruction instr, int default_, int npairs, int[] matches, int[] offsets); +++ R visitLookupSwitch(Instruction instr, int default_, int npairs, int[] matches, int[] offsets, P p); ++ /** See {@link Kind#DYNAMIC}. */ ++- R visitTableSwitch(Instruction instr, int default_, int low, int high, int[] offsets); +++ R visitTableSwitch(Instruction instr, int default_, int low, int high, int[] offsets, P p); ++ /** See {@link Kind#BYTE}, {@link Kind#SHORT}. */ ++ R visitValue(Instruction instr, int value, P p); ++ /** Instruction is unrecognized. */ ++@@ -282,7 +282,7 @@ ++ for (int i = 0; i < values.length; i++) ++ values[i] = getInt(pad + 12 + 4 * i); ++ return visitor.visitTableSwitch( ++- this, default_, low, high, values); +++ this, default_, low, high, values, p); ++ } ++ case LOOKUPSWITCH: { ++ int pad = align(pc + 1) - pc; ++@@ -295,7 +295,7 @@ ++ offsets[i] = getInt(pad + 12 + i * 8); ++ } ++ return visitor.visitLookupSwitch( ++- this, default_, npairs, matches, offsets); +++ this, default_, npairs, matches, offsets, p); ++ } ++ default: ++ throw new IllegalStateException(); ++diff -r a7567fdabf3e -r 9083313d5733 src/share/classes/com/sun/tools/javap/CodeWriter.java ++--- openjdk/langtools/src/share/classes/com/sun/tools/javap/CodeWriter.java Tue May 19 13:53:00 2009 -0700 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javap/CodeWriter.java Fri Oct 25 16:10:09 2013 +0100 ++@@ -117,28 +117,33 @@ ++ ++ public void writeInstr(Instruction instr) { ++ print(String.format("%4d: %-13s ", instr.getPC(), instr.getMnemonic())); ++- instr.accept(instructionPrinter, null); +++ // compute the number of indentations for the body of multi-line instructions +++ // This is 6 (the width of "%4d: "), divided by the width of each indentation level, +++ // and rounded up to the next integer. +++ int indentWidth = options.indentWidth; +++ int indent = (6 + indentWidth - 1) / indentWidth; +++ instr.accept(instructionPrinter, indent); ++ println(); ++ } ++ // where ++- Instruction.KindVisitor instructionPrinter = ++- new Instruction.KindVisitor() { +++ Instruction.KindVisitor instructionPrinter = +++ new Instruction.KindVisitor() { ++ ++- public Void visitNoOperands(Instruction instr, Void p) { +++ public Void visitNoOperands(Instruction instr, Integer indent) { ++ return null; ++ } ++ ++- public Void visitArrayType(Instruction instr, TypeKind kind, Void p) { +++ public Void visitArrayType(Instruction instr, TypeKind kind, Integer indent) { ++ print(" " + kind.name); ++ return null; ++ } ++ ++- public Void visitBranch(Instruction instr, int offset, Void p) { +++ public Void visitBranch(Instruction instr, int offset, Integer indent) { ++ print((instr.getPC() + offset)); ++ return null; ++ } ++ ++- public Void visitConstantPoolRef(Instruction instr, int index, Void p) { +++ public Void visitConstantPoolRef(Instruction instr, int index, Integer indent) { ++ print("#" + index + ";"); ++ tab(); ++ print("// "); ++@@ -146,7 +151,7 @@ ++ return null; ++ } ++ ++- public Void visitConstantPoolRefAndValue(Instruction instr, int index, int value, Void p) { +++ public Void visitConstantPoolRefAndValue(Instruction instr, int index, int value, Integer indent) { ++ print("#" + index + ", " + value + ";"); ++ tab(); ++ print("// "); ++@@ -154,46 +159,48 @@ ++ return null; ++ } ++ ++- public Void visitLocal(Instruction instr, int index, Void p) { +++ public Void visitLocal(Instruction instr, int index, Integer indent) { ++ print(index); ++ return null; ++ } ++ ++- public Void visitLocalAndValue(Instruction instr, int index, int value, Void p) { +++ public Void visitLocalAndValue(Instruction instr, int index, int value, Integer indent) { ++ print(index + ", " + value); ++ return null; ++ } ++ ++- public Void visitLookupSwitch(Instruction instr, int default_, int npairs, int[] matches, int[] offsets) { +++ public Void visitLookupSwitch(Instruction instr, +++ int default_, int npairs, int[] matches, int[] offsets, Integer indent) { ++ int pc = instr.getPC(); ++ print("{ // " + npairs); ++- indent(+1); +++ indent(indent); ++ for (int i = 0; i < npairs; i++) { ++- print("\n" + matches[i] + ": " + (pc + offsets[i]) + ";"); +++ print(String.format("%n%12d: %d", matches[i], (pc + offsets[i]))); ++ } ++- print("\ndefault: " + (pc + default_) + " }"); ++- indent(-1); +++ print("\n default: " + (pc + default_) + "\n}"); +++ indent(-indent); ++ return null; ++ } ++ ++- public Void visitTableSwitch(Instruction instr, int default_, int low, int high, int[] offsets) { +++ public Void visitTableSwitch(Instruction instr, +++ int default_, int low, int high, int[] offsets, Integer indent) { ++ int pc = instr.getPC(); ++- print("{ //" + low + " to " + high); ++- indent(+1); +++ print("{ // " + low + " to " + high); +++ indent(indent); ++ for (int i = 0; i < offsets.length; i++) { ++- print("\n" + (low + i) + ": " + (pc + offsets[i]) + ";"); +++ print(String.format("%n%12d: %d", (low + i), (pc + offsets[i]))); ++ } ++- print("\ndefault: " + (pc + default_) + " }"); ++- indent(-1); +++ print("\n default: " + (pc + default_) + "\n}"); +++ indent(-indent); ++ return null; ++ } ++ ++- public Void visitValue(Instruction instr, int value, Void p) { +++ public Void visitValue(Instruction instr, int value, Integer indent) { ++ print(value); ++ return null; ++ } ++ ++- public Void visitUnknown(Instruction instr, Void p) { +++ public Void visitUnknown(Instruction instr, Integer indent) { ++ return null; ++ } ++ }; +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/6954275-big_xml_signatures.patch openjdk-6-6b27-1.12.6/patches/openjdk/6954275-big_xml_signatures.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/6954275-big_xml_signatures.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/6954275-big_xml_signatures.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,194 @@ ++# HG changeset patch ++# User mullan ++# Date 1287154559 14400 ++# Fri Oct 15 10:55:59 2010 -0400 ++# Node ID 5e3c766d18092d498d9019827c1058a32f1c4e2a ++# Parent e5a4a4ec7b21f3d092d0b29024ff903864d05543 ++6954275: XML signatures with reference data larger 16KB and cacheRef on fails to validate ++Reviewed-by: xuelei ++ ++diff -r e5a4a4ec7b21 -r 5e3c766d1809 src/share/classes/com/sun/org/apache/xml/internal/security/utils/UnsyncByteArrayOutputStream.java ++--- openjdk/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/UnsyncByteArrayOutputStream.java Mon Oct 28 21:46:43 2013 +0000 +++++ openjdk/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/UnsyncByteArrayOutputStream.java Fri Oct 15 10:55:59 2010 -0400 ++@@ -3,7 +3,7 @@ ++ * DO NOT REMOVE OR ALTER! ++ */ ++ /* ++- * Copyright 1999-2005 The Apache Software Foundation. +++ * Copyright 1999-2010 The Apache Software Foundation. ++ * ++ * Licensed under the Apache License, Version 2.0 (the "License"); ++ * you may not use this file except in compliance with the License. ++@@ -23,66 +23,70 @@ ++ import java.io.OutputStream; ++ ++ /** ++- * A simple Unsynced ByteArryOutputStream +++ * A simple Unsynced ByteArrayOutputStream ++ * @author raul ++ * ++ */ ++ public class UnsyncByteArrayOutputStream extends OutputStream { ++- private static ThreadLocal bufCahce = new ThreadLocal() { +++ private static final int INITIAL_SIZE = 8192; +++ private static ThreadLocal bufCache = new ThreadLocal() { ++ protected synchronized Object initialValue() { ++- return new byte[8*1024]; +++ return new byte[INITIAL_SIZE]; ++ } ++ }; ++- byte[] buf; ++- int size=8*1024;//buf.length; ++- int pos=0; ++- public UnsyncByteArrayOutputStream() { ++- buf=(byte[])bufCahce.get(); +++ +++ private byte[] buf; +++ private int size = INITIAL_SIZE; +++ private int pos = 0; +++ +++ public UnsyncByteArrayOutputStream() { +++ buf = (byte[])bufCache.get(); +++ } +++ +++ public void write(byte[] arg0) { +++ int newPos = pos + arg0.length; +++ if (newPos > size) { +++ expandSize(newPos); ++ } ++- /** @inheritDoc */ ++- public void write(byte[] arg0) { ++- int newPos=pos+arg0.length; ++- if (newPos>size) { ++- expandSize(); ++- } ++- System.arraycopy(arg0,0,buf,pos,arg0.length); ++- pos=newPos; +++ System.arraycopy(arg0, 0, buf, pos, arg0.length); +++ pos = newPos; +++ } +++ +++ public void write(byte[] arg0, int arg1, int arg2) { +++ int newPos = pos + arg2; +++ if (newPos > size) { +++ expandSize(newPos); ++ } ++- /** @inheritDoc */ ++- public void write(byte[] arg0, int arg1, int arg2) { ++- int newPos=pos+arg2; ++- if (newPos>size) { ++- expandSize(); ++- } ++- System.arraycopy(arg0,arg1,buf,pos,arg2); ++- pos=newPos; +++ System.arraycopy(arg0, arg1, buf, pos, arg2); +++ pos = newPos; +++ } +++ +++ public void write(int arg0) { +++ int newPos = pos + 1; +++ if (newPos > size) { +++ expandSize(newPos); ++ } ++- /** @inheritDoc */ ++- public void write(int arg0) { ++- if (pos>=size) { ++- expandSize(); ++- } ++- buf[pos++]=(byte)arg0; +++ buf[pos++] = (byte)arg0; +++ } +++ +++ public byte[] toByteArray() { +++ byte result[] = new byte[pos]; +++ System.arraycopy(buf, 0, result, 0, pos); +++ return result; +++ } +++ +++ public void reset() { +++ pos = 0; +++ } +++ +++ private void expandSize(int newPos) { +++ int newSize = size; +++ while (newPos > newSize) { +++ newSize = newSize<<2; ++ } ++- /** @inheritDoc */ ++- public byte[] toByteArray() { ++- byte result[]=new byte[pos]; ++- System.arraycopy(buf,0,result,0,pos); ++- return result; ++- } ++- ++- /** @inheritDoc */ ++- public void reset() { ++- pos=0; ++- } ++- ++- /** @inheritDoc */ ++- void expandSize() { ++- int newSize=size<<2; ++- byte newBuf[]=new byte[newSize]; ++- System.arraycopy(buf,0,newBuf,0,pos); ++- buf=newBuf; ++- size=newSize; ++- ++- } +++ byte newBuf[] = new byte[newSize]; +++ System.arraycopy(buf, 0, newBuf, 0, pos); +++ buf = newBuf; +++ size = newSize; +++ } ++ } ++diff -r e5a4a4ec7b21 -r 5e3c766d1809 test/com/sun/org/apache/xml/internal/security/utils/UnsyncByteArrayOutputStream/BufferOverflowTest.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/jdk/test/com/sun/org/apache/xml/internal/security/utils/UnsyncByteArrayOutputStream/BufferOverflowTest.java Fri Oct 15 10:55:59 2010 -0400 ++@@ -0,0 +1,47 @@ +++/* +++ * Copyright (c) 2010, 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. +++ * +++ * 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. +++ */ +++ +++/** +++ * @test %I% %E% +++ * @bug 6954275 +++ * @summary Check that UnsyncByteArrayOutputStream does not +++ * throw ArrayIndexOutOfBoundsException +++ * @compile -XDignore.symbol.file BufferOverflowTest.java +++ * @run main BufferOverflowTest +++ */ +++ +++import com.sun.org.apache.xml.internal.security.utils.UnsyncByteArrayOutputStream; +++ +++public class BufferOverflowTest { +++ +++ public static void main(String[] args) throws Exception { +++ try { +++ UnsyncByteArrayOutputStream out = new UnsyncByteArrayOutputStream(); +++ out.write(new byte[(8192) << 2 + 1]); +++ System.out.println("PASSED"); +++ } catch (ArrayIndexOutOfBoundsException e) { +++ System.err.println("FAILED, got ArrayIndexOutOfBoundsException"); +++ throw new Exception(e); +++ } +++ } +++} +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/7146431-java.security_files.patch openjdk-6-6b27-1.12.6/patches/openjdk/7146431-java.security_files.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/7146431-java.security_files.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/7146431-java.security_files.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,82 @@ ++# HG changeset patch ++# User mullan ++# Date 1382735486 -3600 ++# Fri Oct 25 22:11:26 2013 +0100 ++# Node ID 5b485ecccea9064e5036e1bb040fc2af1f773c20 ++# Parent 011d86bdcbf8d4fe0016351b775ff1f48f3620a1 ++7146431: java.security files out-of-sync ++Reviewed-by: vinnie, xuelei, wetmore ++ ++diff -r 011d86bdcbf8 -r 5b485ecccea9 src/share/lib/security/java.security-solaris ++--- openjdk/jdk/src/share/lib/security/java.security-solaris Mon Jul 15 03:40:16 2013 -0700 +++++ openjdk/jdk/src/share/lib/security/java.security-solaris Fri Oct 25 22:11:26 2013 +0100 ++@@ -141,6 +141,7 @@ ++ com.sun.org.apache.xalan.internal.lib.,\ ++ com.sun.org.apache.xalan.internal.res.,\ ++ com.sun.org.apache.xalan.internal.templates.,\ +++ com.sun.org.apache.xalan.internal.utils.\ ++ com.sun.org.apache.xalan.internal.xslt.,\ ++ com.sun.org.apache.xalan.internal.xsltc.cmdline.,\ ++ com.sun.org.apache.xalan.internal.xsltc.compiler.,\ ++diff -r 011d86bdcbf8 -r 5b485ecccea9 src/share/lib/security/java.security-windows ++--- openjdk/jdk/src/share/lib/security/java.security-windows Mon Jul 15 03:40:16 2013 -0700 +++++ openjdk/jdk/src/share/lib/security/java.security-windows Fri Oct 25 22:11:26 2013 +0100 ++@@ -141,6 +141,7 @@ ++ com.sun.org.apache.xalan.internal.lib.,\ ++ com.sun.org.apache.xalan.internal.res.,\ ++ com.sun.org.apache.xalan.internal.templates.,\ +++ com.sun.org.apache.xalan.internal.utils.\ ++ com.sun.org.apache.xalan.internal.xslt.,\ ++ com.sun.org.apache.xalan.internal.xsltc.cmdline.,\ ++ com.sun.org.apache.xalan.internal.xsltc.compiler.,\ ++diff -r 011d86bdcbf8 -r 5b485ecccea9 test/java/lang/SecurityManager/CheckPackageAccess.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/jdk/test/java/lang/SecurityManager/CheckPackageAccess.java Fri Oct 25 22:11:26 2013 +0100 ++@@ -0,0 +1,47 @@ +++/* +++ * Copyright (c) 2012, 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. +++ * +++ * 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. +++ */ +++ +++/* +++ * @test +++ * @bug 7146431 +++ * @summary Test that internal JAXP packages cannot be accessed +++ */ +++ +++public class CheckPackageAccess { +++ +++ public static void main(String[] args) throws Exception { +++ +++ String[] pkgs = new String[] { +++ "com.sun.org.apache.xerces.internal.utils.", +++ "com.sun.org.apache.xalan.internal.utils." }; +++ SecurityManager sm = new SecurityManager(); +++ System.setSecurityManager(sm); +++ for (String pkg : pkgs) { +++ System.out.println("Checking package access for " + pkg); +++ try { +++ sm.checkPackageAccess(pkg); +++ throw new Exception("Expected SecurityException not thrown"); +++ } catch (SecurityException se) { } +++ } +++ } +++} +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/7196533-timezone_bottleneck.patch openjdk-6-6b27-1.12.6/patches/openjdk/7196533-timezone_bottleneck.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/7196533-timezone_bottleneck.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/7196533-timezone_bottleneck.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,75 @@ ++# HG changeset patch ++# User coffeys ++# Date 1381845864 -3600 ++# Tue Oct 15 15:04:24 2013 +0100 ++# Node ID 5d81a5f8a3791316367990b35b1ad5faef42d773 ++# Parent 77af6e10b333347cd882027ab1bb9a3366278096 ++7196533: TimeZone.getDefault() slow due to synchronization bottleneck ++Reviewed-by: okutsu, omajid ++ ++diff -r 77af6e10b333 -r 5d81a5f8a379 src/share/classes/java/util/TimeZone.java ++--- openjdk/jdk/src/share/classes/java/util/TimeZone.java Fri Oct 04 12:22:34 2013 -0400 +++++ openjdk/jdk/src/share/classes/java/util/TimeZone.java Tue Oct 15 15:04:24 2013 +0100 ++@@ -1,5 +1,5 @@ ++ /* ++- * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved. +++ * Copyright (c) 1996, 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 ++@@ -646,9 +646,15 @@ ++ * Returns the default TimeZone in an AppContext if any AppContext ++ * has ever used. null is returned if any AppContext hasn't been ++ * used or if the AppContext doesn't have the default TimeZone. +++ * +++ * Note that javaAWTAccess may be null if sun.awt.AppContext class hasn't +++ * been loaded. If so, it implies that AWTSecurityManager is not our +++ * SecurityManager and we can use a local static variable. +++ * This works around a build time issue. ++ */ ++- private synchronized static TimeZone getDefaultInAppContext() { ++- javaAWTAccess = SharedSecrets.getJavaAWTAccess(); +++ private static TimeZone getDefaultInAppContext() { +++ // JavaAWTAccess provides access implementation-private methods without using reflection. +++ JavaAWTAccess javaAWTAccess = SharedSecrets.getJavaAWTAccess(); ++ if (javaAWTAccess == null) { ++ return mainAppContextDefault; ++ } else { ++@@ -670,9 +676,15 @@ ++ * tz. null is handled special: do nothing if any AppContext ++ * hasn't been used, remove the default TimeZone in the ++ * AppContext otherwise. +++ * +++ * Note that javaAWTAccess may be null if sun.awt.AppContext class hasn't +++ * been loaded. If so, it implies that AWTSecurityManager is not our +++ * SecurityManager and we can use a local static variable. +++ * This works around a build time issue. ++ */ ++- private synchronized static void setDefaultInAppContext(TimeZone tz) { ++- javaAWTAccess = SharedSecrets.getJavaAWTAccess(); +++ private static void setDefaultInAppContext(TimeZone tz) { +++ // JavaAWTAccess provides access implementation-private methods without using reflection. +++ JavaAWTAccess javaAWTAccess = SharedSecrets.getJavaAWTAccess(); ++ if (javaAWTAccess == null) { ++ mainAppContextDefault = tz; ++ } else { ++@@ -736,18 +748,8 @@ ++ static final String GMT_ID = "GMT"; ++ private static final int GMT_ID_LENGTH = 3; ++ ++- /* ++- * Provides access implementation-private methods without using reflection ++- * ++- * Note that javaAWTAccess may be null if sun.awt.AppContext class hasn't ++- * been loaded. If so, it implies that AWTSecurityManager is not our ++- * SecurityManager and we can use a local static variable. ++- * This works around a build time issue. ++- */ ++- private static JavaAWTAccess javaAWTAccess; ++- ++ // a static TimeZone we can reference if no AppContext is in place ++- private static TimeZone mainAppContextDefault; +++ private static volatile TimeZone mainAppContextDefault; ++ ++ ++ /** +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8000450-restrict_access.patch openjdk-6-6b27-1.12.6/patches/openjdk/8000450-restrict_access.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8000450-restrict_access.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8000450-restrict_access.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,108 @@ ++# HG changeset patch ++# User coffeys ++# Date 1382735937 -3600 ++# Fri Oct 25 22:18:57 2013 +0100 ++# Node ID f7a7c7d70e4968eb99e42f812c59900f545d7fa7 ++# Parent 695dd7ceb9e34fd4058374de63964c205f061002 ++8000450: Restrict access to com/sun/corba/se/impl package ++Reviewed-by: alanb, chegar, lancea ++ ++diff -r 695dd7ceb9e3 -r f7a7c7d70e49 src/share/lib/security/java.security ++--- openjdk/jdk/src/share/lib/security/java.security Fri Oct 25 22:17:00 2013 +0100 +++++ openjdk/jdk/src/share/lib/security/java.security Fri Oct 25 22:18:57 2013 +0100 ++@@ -128,6 +128,7 @@ ++ # corresponding RuntimePermission ("accessClassInPackage."+package) has ++ # been granted. ++ package.access=sun.,\ +++ com.sun.corba.se.impl.,\ ++ com.sun.xml.internal.,\ ++ com.sun.imageio.,\ ++ com.sun.istack.internal.,\ ++@@ -164,6 +165,7 @@ ++ # checkPackageDefinition. ++ # ++ package.definition=sun.,\ +++ com.sun.corba.se.impl.,\ ++ com.sun.xml.internal.,\ ++ com.sun.imageio.,\ ++ com.sun.istack.internal.,\ ++diff -r 695dd7ceb9e3 -r f7a7c7d70e49 src/share/lib/security/java.security-solaris ++--- openjdk/jdk/src/share/lib/security/java.security-solaris Fri Oct 25 22:17:00 2013 +0100 +++++ openjdk/jdk/src/share/lib/security/java.security-solaris Fri Oct 25 22:18:57 2013 +0100 ++@@ -129,6 +129,7 @@ ++ # corresponding RuntimePermission ("accessClassInPackage."+package) has ++ # been granted. ++ package.access=sun.,\ +++ com.sun.corba.se.impl.,\ ++ com.sun.xml.internal.,\ ++ com.sun.imageio.,\ ++ com.sun.istack.internal.,\ ++@@ -166,6 +167,7 @@ ++ # checkPackageDefinition. ++ # ++ package.definition=sun.,\ +++ com.sun.corba.se.impl.,\ ++ com.sun.xml.internal.,\ ++ com.sun.imageio.,\ ++ com.sun.istack.internal.,\ ++diff -r 695dd7ceb9e3 -r f7a7c7d70e49 src/share/lib/security/java.security-windows ++--- openjdk/jdk/src/share/lib/security/java.security-windows Fri Oct 25 22:17:00 2013 +0100 +++++ openjdk/jdk/src/share/lib/security/java.security-windows Fri Oct 25 22:18:57 2013 +0100 ++@@ -129,6 +129,7 @@ ++ # corresponding RuntimePermission ("accessClassInPackage."+package) has ++ # been granted. ++ package.access=sun.,\ +++ com.sun.corba.se.impl.,\ ++ com.sun.xml.internal.,\ ++ com.sun.imageio.,\ ++ com.sun.istack.internal.,\ ++@@ -167,6 +168,7 @@ ++ # checkPackageDefinition. ++ # ++ package.definition=sun.,\ +++ com.sun.corba.se.impl.,\ ++ com.sun.xml.internal.,\ ++ com.sun.imageio.,\ ++ com.sun.istack.internal.,\ ++diff -r 695dd7ceb9e3 -r f7a7c7d70e49 test/java/lang/SecurityManager/CheckPackageAccess.java ++--- openjdk/jdk/test/java/lang/SecurityManager/CheckPackageAccess.java Fri Oct 25 22:17:00 2013 +0100 +++++ openjdk/jdk/test/java/lang/SecurityManager/CheckPackageAccess.java Fri Oct 25 22:18:57 2013 +0100 ++@@ -1,5 +1,5 @@ ++ /* ++- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. +++ * Copyright (c) 2012, 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 ++@@ -23,8 +23,8 @@ ++ ++ /* ++ * @test ++- * @bug 7146431 ++- * @summary Test that internal JAXP packages cannot be accessed +++ * @bug 7146431 8000450 +++ * @summary Test that internal packages cannot be accessed ++ */ ++ ++ public class CheckPackageAccess { ++@@ -32,6 +32,7 @@ ++ public static void main(String[] args) throws Exception { ++ ++ String[] pkgs = new String[] { +++ "com.sun.corba.se.impl.", ++ "com.sun.org.apache.xerces.internal.utils.", ++ "com.sun.org.apache.xalan.internal.utils." }; ++ SecurityManager sm = new SecurityManager(); ++@@ -40,7 +41,11 @@ ++ System.out.println("Checking package access for " + pkg); ++ try { ++ sm.checkPackageAccess(pkg); ++- throw new Exception("Expected SecurityException not thrown"); +++ throw new Exception("Expected PackageAccess SecurityException not thrown"); +++ } catch (SecurityException se) { } +++ try { +++ sm.checkPackageDefinition(pkg); +++ throw new Exception("Expected PackageDefinition SecurityException not thrown"); ++ } catch (SecurityException se) { } ++ } ++ } +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8002070-remove_logger_stack_search.patch openjdk-6-6b27-1.12.6/patches/openjdk/8002070-remove_logger_stack_search.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8002070-remove_logger_stack_search.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8002070-remove_logger_stack_search.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,658 @@ ++# HG changeset patch ++# User jgish ++# Date 1381898393 -3600 ++# Wed Oct 16 05:39:53 2013 +0100 ++# Node ID e56220b54fe2d0f09ee151b28d6e8495cea2136f ++# Parent 1ed7c9cea8c508e60d6df30c046ab48b1f1d3ab9 ++8002070: Remove the stack search for a resource bundle for Logger to use ++Summary: The fragile, vulnerable, stack crawling has been eliminated from findResourceBundle(String) ++Reviewed-by: mchung ++ ++diff -r 1ed7c9cea8c5 -r e56220b54fe2 src/share/classes/java/util/logging/Logger.java ++--- openjdk/jdk/src/share/classes/java/util/logging/Logger.java Wed Oct 16 05:10:54 2013 +0100 +++++ openjdk/jdk/src/share/classes/java/util/logging/Logger.java Wed Oct 16 05:39:53 2013 +0100 ++@@ -26,9 +26,17 @@ ++ ++ package java.util.logging; ++ ++-import java.util.*; ++-import java.security.*; ++ import java.lang.ref.WeakReference; +++import java.security.AccessController; +++import java.security.PrivilegedAction; +++import java.util.ArrayList; +++import java.util.Iterator; +++import java.util.Locale; +++import java.util.MissingResourceException; +++import java.util.ResourceBundle; +++import java.util.concurrent.CopyOnWriteArrayList; +++import sun.reflect.CallerSensitive; +++import sun.reflect.Reflection; ++ ++ /** ++ * A Logger object is used to log messages for a specific ++@@ -97,14 +105,8 @@ ++ *

++ * When mapping ResourceBundle names to ResourceBundles, the Logger ++ * will first try to use the Thread's ContextClassLoader. If that ++- * is null it will try the SystemClassLoader instead. As a temporary ++- * transition feature in the initial implementation, if the Logger is ++- * unable to locate a ResourceBundle from the ContextClassLoader or ++- * SystemClassLoader the Logger will also search up the class stack ++- * and use successive calling ClassLoaders to try to locate a ResourceBundle. ++- * (This call stack search is to allow containers to transition to ++- * using ContextClassLoaders and is likely to be removed in future ++- * versions.) +++ * is null it will try the +++ * {@linkplain java.lang.ClassLoader#getSystemClassLoader() system ClassLoader} instead. ++ *

++ * Formatting (including localization) is the responsibility of ++ * the output Handler, which will typically call a Formatter. ++@@ -1297,12 +1299,6 @@ ++ return useParentHandlers; ++ } ++ ++- // Private utility method to map a resource bundle name to an ++- // actual resource bundle, using a simple one-entry cache. ++- // Returns null for a null name. ++- // May also return null if we can't find the resource bundle and ++- // there is no suitable previous cached value. ++- ++ static final String SYSTEM_LOGGER_RB_NAME = "sun.util.logging.resources.logging"; ++ ++ private static ResourceBundle findSystemResourceBundle(final Locale locale) { ++@@ -1320,6 +1316,16 @@ ++ }); ++ } ++ +++ /** +++ * Private utility method to map a resource bundle name to an +++ * actual resource bundle, using a simple one-entry cache. +++ * Returns null for a null name. +++ * May also return null if we can't find the resource bundle and +++ * there is no suitable previous cached value. +++ * +++ * @param name the ResourceBundle to locate +++ * @return ResourceBundle specified by name or null if not found +++ */ ++ private synchronized ResourceBundle findResourceBundle(String name) { ++ // Return a null bundle for a null name. ++ if (name == null) { ++@@ -1329,8 +1335,8 @@ ++ Locale currentLocale = Locale.getDefault(); ++ ++ // Normally we should hit on our simple one entry cache. ++- if (catalog != null && currentLocale == catalogLocale ++- && name == catalogName) { +++ if (catalog != null && currentLocale.equals(catalogLocale) +++ && name.equals(catalogName)) { ++ return catalog; ++ } ++ ++@@ -1341,8 +1347,8 @@ ++ return catalog; ++ } ++ ++- // Use the thread's context ClassLoader. If there isn't one, ++- // use the SystemClassloader. +++ // Use the thread's context ClassLoader. If there isn't one, use the +++ // {@linkplain java.lang.ClassLoader#getSystemClassLoader() system ClassLoader}. ++ ClassLoader cl = Thread.currentThread().getContextClassLoader(); ++ if (cl == null) { ++ cl = ClassLoader.getSystemClassLoader(); ++@@ -1353,45 +1359,8 @@ ++ catalogLocale = currentLocale; ++ return catalog; ++ } catch (MissingResourceException ex) { ++- // Woops. We can't find the ResourceBundle in the default ++- // ClassLoader. Drop through. +++ return null; ++ } ++- ++- ++- // Fall back to searching up the call stack and trying each ++- // calling ClassLoader. ++- for (int ix = 0; ; ix++) { ++- Class clz = sun.reflect.Reflection.getCallerClass(ix); ++- if (clz == null) { ++- break; ++- } ++- ClassLoader cl2 = clz.getClassLoader(); ++- if (cl2 == null) { ++- cl2 = ClassLoader.getSystemClassLoader(); ++- } ++- if (cl == cl2) { ++- // We've already checked this classloader. ++- continue; ++- } ++- cl = cl2; ++- try { ++- catalog = ResourceBundle.getBundle(name, currentLocale, cl); ++- catalogName = name; ++- catalogLocale = currentLocale; ++- return catalog; ++- } catch (MissingResourceException ex) { ++- // Ok, this one didn't work either. ++- // Drop through, and try the next one. ++- } ++- } ++- ++- if (name.equals(catalogName)) { ++- // Return the previous cached value for that name. ++- // This may be null. ++- return catalog; ++- } ++- // Sorry, we're out of luck. ++- return null; ++ } ++ ++ // Private utility method to initialize our one entry ++@@ -1403,8 +1372,7 @@ ++ if (name == null) { ++ return; ++ } ++- ResourceBundle rb = findResourceBundle(name); ++- if (rb == null) { +++ if (findResourceBundle(name) == null) { ++ // We've failed to find an expected ResourceBundle. ++ throw new MissingResourceException("Can't find " + name + " bundle", name, ""); ++ } ++diff -r 1ed7c9cea8c5 -r e56220b54fe2 test/java/util/logging/bundlesearch/ClassPathTestBundle_en.properties ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/jdk/test/java/util/logging/bundlesearch/ClassPathTestBundle_en.properties Wed Oct 16 05:39:53 2013 +0100 ++@@ -0,0 +1,25 @@ +++# +++# Copyright (c) 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. +++# +++# 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. +++# +++sample1=translation #2 for sample1 +++sample2=translation #2 for sample2 +++supports-test=ResourceBundleSearchTest ++diff -r 1ed7c9cea8c5 -r e56220b54fe2 test/java/util/logging/bundlesearch/IndirectlyLoadABundle.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/jdk/test/java/util/logging/bundlesearch/IndirectlyLoadABundle.java Wed Oct 16 05:39:53 2013 +0100 ++@@ -0,0 +1,89 @@ +++/* +++ * Copyright (c) 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. +++ * +++ * 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 java.lang.reflect.InvocationTargetException; +++import java.lang.reflect.Method; +++import java.net.URL; +++import java.net.URLClassLoader; +++ +++/** +++ * This class is used to ensure that a resource bundle loadable by a classloader +++ * is on the caller's stack, but not on the classpath or TCCL to ensure that +++ * Logger.getLogger() can't load the bundle via a stack search +++ * +++ * @author Jim Gish +++ */ +++public class IndirectlyLoadABundle { +++ +++ private final static String rbName = "StackSearchableResource"; +++ +++ public boolean loadAndTest() throws Throwable { +++ // Find out where we are running from so we can setup the URLClassLoader URLs +++ // test.src and test.classes will be set if running in jtreg, but probably +++ // not otherwise +++ String testDir = System.getProperty("test.src", System.getProperty("user.dir")); +++ String testClassesDir = System.getProperty("test.classes", +++ System.getProperty("user.dir")); +++ String sep = System.getProperty("file.separator"); +++ URL[] urls = new URL[2]; +++ +++ // Allow for both jtreg and standalone cases here +++ urls[0] = new URL("file://" + testDir + sep + "resources" + sep); +++ urls[1] = new URL("file://" + testClassesDir + sep ); +++ System.out.println("INFO: urls[0] = " + urls[0]); +++ System.out.println("INFO: urls[1] = " + urls[1]); +++ +++ // Make sure we can find it via the URLClassLoader +++ URLClassLoader yetAnotherResourceCL = new URLClassLoader(urls, null); +++ if (!testForValidResourceSetup(yetAnotherResourceCL)) { +++ throw new Exception("Couldn't directly load bundle " + rbName +++ + " as expected. Test config problem"); +++ } +++ // But it shouldn't be available via the system classloader +++ ClassLoader myCL = this.getClass().getClassLoader(); +++ if (testForValidResourceSetup(myCL)) { +++ throw new Exception("Was able to directly load bundle " + rbName +++ + " from " + myCL + " but shouldn't have been" +++ + " able to. Test config problem"); +++ } +++ +++ Class loadItUpClazz = Class.forName("LoadItUp", true, yetAnotherResourceCL); +++ ClassLoader actual = loadItUpClazz.getClassLoader(); +++ if (actual != yetAnotherResourceCL) { +++ throw new Exception("LoadItUp was loaded by an unexpected CL: " + actual); +++ } +++ Object loadItUp = loadItUpClazz.newInstance(); +++ Method testMethod = loadItUpClazz.getMethod("test", String.class); +++ try { +++ return (Boolean) testMethod.invoke(loadItUp, rbName); +++ } catch (InvocationTargetException ex) { +++ throw ex.getTargetException(); +++ } +++ } +++ +++ private boolean testForValidResourceSetup(ClassLoader cl) { +++ // First make sure the test environment is setup properly and the bundle actually +++ // exists +++ return ResourceBundleSearchTest.isOnClassPath(rbName, cl); +++ } +++} ++diff -r 1ed7c9cea8c5 -r e56220b54fe2 test/java/util/logging/bundlesearch/LoadItUp.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/jdk/test/java/util/logging/bundlesearch/LoadItUp.java Wed Oct 16 05:39:53 2013 +0100 ++@@ -0,0 +1,62 @@ +++/* +++ * Copyright (c) 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. +++ * +++ * 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 java.util.MissingResourceException; +++import java.util.logging.Logger; +++ +++/* +++ * This class is loaded onto the call stack when the test method is called +++ * and then its classloader can be used to find a property bundle in the same +++ * directory as the class. However, Logger is not allowed +++ * to find the bundle by looking up the stack for this classloader. +++ * We verify that this cannot happen. +++ * +++ * @author Jim Gish +++ */ +++public class LoadItUp { +++ +++ private final static boolean DEBUG = false; +++ +++ public Boolean test(String rbName) throws Exception { +++ // we should not be able to find the resource in this directory via +++ // getLogger calls. The only way that would be possible given this setup +++ // is that if Logger.getLogger searched up the call stack +++ return lookupBundle(rbName); +++ } +++ +++ private boolean lookupBundle(String rbName) { +++ // See if Logger.getLogger can find the resource in this directory +++ try { +++ Logger aLogger = Logger.getLogger("NestedLogger", rbName); +++ } catch (MissingResourceException re) { +++ if (DEBUG) { +++ System.out.println( +++ "As expected, LoadItUp.lookupBundle() did not find the bundle " +++ + rbName); +++ } +++ return false; +++ } +++ System.out.println("FAILED: LoadItUp.lookupBundle() found the bundle " +++ + rbName + " using a stack search."); +++ return true; +++ } +++} ++diff -r 1ed7c9cea8c5 -r e56220b54fe2 test/java/util/logging/bundlesearch/ResourceBundleSearchTest.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/jdk/test/java/util/logging/bundlesearch/ResourceBundleSearchTest.java Wed Oct 16 05:39:53 2013 +0100 ++@@ -0,0 +1,249 @@ +++/* +++ * Copyright (c) 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. +++ * +++ * 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. +++ */ +++ +++/* +++ * @test +++ * @bug 8010127 +++ * @summary Remove the stack search for a resource bundle Logger to use +++ * @author Jim Gish +++ * @build ResourceBundleSearchTest IndirectlyLoadABundle LoadItUp +++ * @run main ResourceBundleSearchTest +++ */ +++import java.net.URL; +++import java.net.URLClassLoader; +++import java.util.ArrayList; +++import java.util.List; +++import java.util.Locale; +++import java.util.MissingResourceException; +++import java.util.ResourceBundle; +++import java.util.logging.Logger; +++ +++public class ResourceBundleSearchTest { +++ +++ private final static boolean DEBUG = false; +++ private final static String LOGGER_PREFIX = "myLogger."; +++ private static int loggerNum = 0; +++ private final static String PROP_RB_NAME = "ClassPathTestBundle"; +++ private final static String TCCL_TEST_BUNDLE = "ContextClassLoaderTestBundle"; +++ +++ private static int numPass = 0; +++ private static int numFail = 0; +++ private static List msgs = new ArrayList(); +++ +++ public static void main(String[] args) throws Throwable { +++ ResourceBundleSearchTest test = new ResourceBundleSearchTest(); +++ test.runTests(); +++ } +++ +++ private void runTests() throws Throwable { +++ // ensure we are using en as the default Locale so we can find the resource +++ Locale.setDefault(Locale.ENGLISH); +++ +++ String testClasses = System.getProperty("test.classes"); +++ System.out.println( "test.classes = " + testClasses ); +++ +++ ClassLoader myClassLoader = ClassLoader.getSystemClassLoader(); +++ +++ // Find out where we are running from so we can setup the URLClassLoader URL +++ String userDir = System.getProperty("user.dir"); +++ String testDir = System.getProperty("test.src", userDir); +++ String sep = System.getProperty("file.separator"); +++ +++ URL[] urls = new URL[1]; +++ urls[0] = new URL("file://" + testDir + sep + "resources" + sep); +++ URLClassLoader rbClassLoader = new URLClassLoader(urls); +++ +++ // Test 1 - can we find a Logger bundle from doing a stack search? +++ // We shouldn't be able to +++ assertFalse(testGetBundleFromStackSearch(), "testGetBundleFromStackSearch"); +++ +++ // Test 2 - can we find a Logger bundle off of the Thread context class +++ // loader? We should be able to. +++ assertTrue( +++ testGetBundleFromTCCL(TCCL_TEST_BUNDLE, rbClassLoader), +++ "testGetBundleFromTCCL"); +++ +++ // Test 3 - Can we find a Logger bundle from the classpath? We should be +++ // able to, but .... +++ // We check to see if the bundle is on the classpath or not so that this +++ // will work standalone. In the case of jtreg/samevm, +++ // the resource bundles are not on the classpath. Running standalone +++ // (or othervm), they are +++ if (isOnClassPath(PROP_RB_NAME, myClassLoader)) { +++ debug("We should be able to see " + PROP_RB_NAME + " on the classpath"); +++ assertTrue(testGetBundleFromSystemClassLoader(PROP_RB_NAME), +++ "testGetBundleFromSystemClassLoader"); +++ } else { +++ debug("We should not be able to see " + PROP_RB_NAME + " on the classpath"); +++ assertFalse(testGetBundleFromSystemClassLoader(PROP_RB_NAME), +++ "testGetBundleFromSystemClassLoader"); +++ } +++ +++ report(); +++ } +++ +++ private void report() throws Exception { +++ System.out.println("Num passed = " + numPass + " Num failed = " + numFail); +++ if (numFail > 0) { +++ // We only care about the messages if they were errors +++ for (String msg : msgs) { +++ System.out.println(msg); +++ } +++ throw new Exception(numFail + " out of " + (numPass + numFail) +++ + " tests failed."); +++ } +++ } +++ +++ public void assertTrue(boolean testResult, String testName) { +++ if (testResult) { +++ numPass++; +++ } else { +++ numFail++; +++ System.out.println("FAILED: " + testName +++ + " was supposed to return true but did NOT!"); +++ } +++ } +++ +++ public void assertFalse(boolean testResult, String testName) { +++ if (!testResult) { +++ numPass++; +++ } else { +++ numFail++; +++ System.out.println("FAILED: " + testName +++ + " was supposed to return false but did NOT!"); +++ } +++ } +++ +++ public boolean testGetBundleFromStackSearch() throws Throwable { +++ // This should fail. This was the old functionality to search up the +++ // caller's call stack +++ IndirectlyLoadABundle indirectLoader = new IndirectlyLoadABundle(); +++ return indirectLoader.loadAndTest(); +++ } +++ +++ public boolean testGetBundleFromTCCL(String bundleName, +++ ClassLoader setOnTCCL) throws InterruptedException { +++ // This should succeed. We should be able to get the bundle from the +++ // thread context class loader +++ debug("Looking for " + bundleName + " using TCCL"); +++ LoggingThread lr = new LoggingThread(bundleName, setOnTCCL); +++ lr.start(); +++ synchronized (lr) { +++ try { +++ lr.wait(); +++ } catch (InterruptedException ex) { +++ throw ex; +++ } +++ } +++ msgs.add(lr.msg); +++ return lr.foundBundle; +++ } +++ +++ /* +++ * @param String bundleClass +++ * @param ClassLoader to use for search +++ * @return true iff bundleClass is on system classpath +++ */ +++ public static boolean isOnClassPath(String baseName, ClassLoader cl) { +++ ResourceBundle rb = null; +++ try { +++ rb = ResourceBundle.getBundle(baseName, Locale.getDefault(), cl); +++ System.out.println("INFO: Found bundle " + baseName + " on " + cl); +++ } catch (MissingResourceException e) { +++ System.out.println("INFO: Could not find bundle " + baseName + " on " + cl); +++ return false; +++ } +++ return (rb != null); +++ } +++ +++ private static String newLoggerName() { +++ // we need a new logger name every time we attempt to find a bundle via +++ // the Logger.getLogger call, so we'll simply tack on an integer which +++ // we increment each time this is called +++ loggerNum++; +++ return LOGGER_PREFIX + loggerNum; +++ } +++ +++ public boolean testGetBundleFromSystemClassLoader(String bundleName) { +++ // this should succeed if the bundle is on the system classpath. +++ try { +++ Logger aLogger = Logger.getLogger(ResourceBundleSearchTest.newLoggerName(), +++ bundleName); +++ } catch (MissingResourceException re) { +++ msgs.add("INFO: testGetBundleFromSystemClassLoader() did not find bundle " +++ + bundleName); +++ return false; +++ } +++ msgs.add("INFO: testGetBundleFromSystemClassLoader() found the bundle " +++ + bundleName); +++ return true; +++ } +++ +++ public static class LoggingThread extends Thread { +++ +++ boolean foundBundle = false; +++ String msg = null; +++ ClassLoader clToSetOnTCCL = null; +++ String bundleName = null; +++ +++ public LoggingThread(String bundleName) { +++ this.bundleName = bundleName; +++ } +++ +++ public LoggingThread(String bundleName, ClassLoader setOnTCCL) { +++ this.clToSetOnTCCL = setOnTCCL; +++ this.bundleName = bundleName; +++ } +++ +++ public void run() { +++ boolean setTCCL = false; +++ try { +++ if (clToSetOnTCCL != null) { +++ Thread.currentThread().setContextClassLoader(clToSetOnTCCL); +++ setTCCL = true; +++ } +++ // this should succeed if the bundle is on the system classpath. +++ try { +++ Logger aLogger = Logger.getLogger(ResourceBundleSearchTest.newLoggerName(), +++ bundleName); +++ msg = "INFO: LoggingRunnable() found the bundle " + bundleName +++ + (setTCCL ? " with " : " without ") + "setting the TCCL"; +++ foundBundle = true; +++ } catch (MissingResourceException re) { +++ msg = "INFO: LoggingRunnable() did not find the bundle " + bundleName +++ + (setTCCL ? " with " : " without ") + "setting the TCCL"; +++ foundBundle = false; +++ } +++ } catch (Throwable e) { +++ e.printStackTrace(); +++ System.exit(1); +++ } +++ } +++ } +++ +++ private void debug(String msg) { +++ if (DEBUG) { +++ System.out.println(msg); +++ } +++ } +++} ++diff -r 1ed7c9cea8c5 -r e56220b54fe2 test/java/util/logging/bundlesearch/resources/ContextClassLoaderTestBundle_en.properties ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/jdk/test/java/util/logging/bundlesearch/resources/ContextClassLoaderTestBundle_en.properties Wed Oct 16 05:39:53 2013 +0100 ++@@ -0,0 +1,25 @@ +++# +++# Copyright (c) 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. +++# +++# 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. +++# +++sample1=translation #3 for sample1 +++sample2=translation #3 for sample2 +++supports-test=ResourceBundleSearchTest ++diff -r 1ed7c9cea8c5 -r e56220b54fe2 test/java/util/logging/bundlesearch/resources/StackSearchableResource_en.properties ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/jdk/test/java/util/logging/bundlesearch/resources/StackSearchableResource_en.properties Wed Oct 16 05:39:53 2013 +0100 ++@@ -0,0 +1,25 @@ +++# +++# Copyright (c) 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. +++# +++# 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. +++# +++sample1=translation #4 for sample1 +++sample2=translation #4 for sample2 +++supports-test=ResourceBundleSearchTest +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8003992-embedded_nulls.patch openjdk-6-6b27-1.12.6/patches/openjdk/8003992-embedded_nulls.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8003992-embedded_nulls.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8003992-embedded_nulls.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,1026 @@ ++# HG changeset patch ++# User dxu ++# Date 1383015918 0 ++# Tue Oct 29 03:05:18 2013 +0000 ++# Node ID 8ad2eb12bf42f2564fdf80a7236e4046046a4f4e ++# Parent 44a49c18eba21f97222a2cde09f6536a7f365363 ++8003992: File and other classes in java.io do not handle embedded nulls properly ++Summary: Have every file operation done with File, FileInputStream, FileOutputStream, or RandomAccessFile that involves a file path containing NUL fail. Also reviewed by fweimer@redhat.com ++Reviewed-by: alanb, sherman, ahgross, mduigou, dholmes, aph, plevart, martin ++ ++diff -r 44a49c18eba2 -r 8ad2eb12bf42 src/share/classes/java/io/File.java ++--- openjdk/jdk/src/share/classes/java/io/File.java Fri Sep 06 09:38:10 2013 -0700 +++++ openjdk/jdk/src/share/classes/java/io/File.java Tue Oct 29 03:05:18 2013 +0000 ++@@ -1,5 +1,5 @@ ++ /* ++- * Copyright (c) 1994, 2012, Oracle and/or its affiliates. All rights reserved. +++ * Copyright (c) 1994, 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 ++@@ -153,6 +153,32 @@ ++ private String path; ++ ++ /** +++ * Enum type that indicates the status of a file path. +++ */ +++ private static enum PathStatus { INVALID, CHECKED }; +++ +++ /** +++ * The flag indicating whether the file path is invalid. +++ */ +++ private transient PathStatus status = null; +++ +++ /** +++ * Check if the file has an invalid path. Currently, the inspection of +++ * a file path is very limited, and it only covers Nul character check. +++ * Returning true means the path is definitely invalid/garbage. But +++ * returning false does not guarantee that the path is valid. +++ * +++ * @return true if the file path is invalid. +++ */ +++ final boolean isInvalid() { +++ if (status == null) { +++ status = (this.path.indexOf('\u0000') < 0) ? PathStatus.CHECKED +++ : PathStatus.INVALID; +++ } +++ return status == PathStatus.INVALID; +++ } +++ +++ /** ++ * The length of this abstract pathname's prefix, or zero if it has no ++ * prefix. ++ */ ++@@ -573,6 +599,9 @@ ++ * @since JDK1.1 ++ */ ++ public String getCanonicalPath() throws IOException { +++ if (isInvalid()) { +++ throw new IOException("Invalid file path"); +++ } ++ return fs.canonicalize(fs.resolve(this)); ++ } ++ ++@@ -637,6 +666,9 @@ ++ */ ++ @Deprecated ++ public URL toURL() throws MalformedURLException { +++ if (isInvalid()) { +++ throw new MalformedURLException("Invalid file path"); +++ } ++ return new URL("file", "", slashify(getAbsolutePath(), isDirectory())); ++ } ++ ++@@ -705,6 +737,9 @@ ++ if (security != null) { ++ security.checkRead(path); ++ } +++ if (isInvalid()) { +++ return false; +++ } ++ return fs.checkAccess(this, FileSystem.ACCESS_READ); ++ } ++ ++@@ -727,6 +762,9 @@ ++ if (security != null) { ++ security.checkWrite(path); ++ } +++ if (isInvalid()) { +++ return false; +++ } ++ return fs.checkAccess(this, FileSystem.ACCESS_WRITE); ++ } ++ ++@@ -747,6 +785,9 @@ ++ if (security != null) { ++ security.checkRead(path); ++ } +++ if (isInvalid()) { +++ return false; +++ } ++ return ((fs.getBooleanAttributes(this) & FileSystem.BA_EXISTS) != 0); ++ } ++ ++@@ -768,6 +809,9 @@ ++ if (security != null) { ++ security.checkRead(path); ++ } +++ if (isInvalid()) { +++ return false; +++ } ++ return ((fs.getBooleanAttributes(this) & FileSystem.BA_DIRECTORY) ++ != 0); ++ } ++@@ -792,6 +836,9 @@ ++ if (security != null) { ++ security.checkRead(path); ++ } +++ if (isInvalid()) { +++ return false; +++ } ++ return ((fs.getBooleanAttributes(this) & FileSystem.BA_REGULAR) != 0); ++ } ++ ++@@ -818,6 +865,9 @@ ++ if (security != null) { ++ security.checkRead(path); ++ } +++ if (isInvalid()) { +++ return false; +++ } ++ return ((fs.getBooleanAttributes(this) & FileSystem.BA_HIDDEN) != 0); ++ } ++ ++@@ -840,6 +890,9 @@ ++ if (security != null) { ++ security.checkRead(path); ++ } +++ if (isInvalid()) { +++ return 0L; +++ } ++ return fs.getLastModifiedTime(this); ++ } ++ ++@@ -862,6 +915,9 @@ ++ if (security != null) { ++ security.checkRead(path); ++ } +++ if (isInvalid()) { +++ return 0L; +++ } ++ return fs.getLength(this); ++ } ++ ++@@ -897,6 +953,9 @@ ++ public boolean createNewFile() throws IOException { ++ SecurityManager security = System.getSecurityManager(); ++ if (security != null) security.checkWrite(path); +++ if (isInvalid()) { +++ throw new IOException("Invalid file path"); +++ } ++ return fs.createFileExclusively(path, false); ++ } ++ ++@@ -918,6 +977,9 @@ ++ if (security != null) { ++ security.checkDelete(path); ++ } +++ if (isInvalid()) { +++ return false; +++ } ++ return fs.delete(this); ++ } ++ ++@@ -953,6 +1015,9 @@ ++ if (security != null) { ++ security.checkDelete(path); ++ } +++ if (isInvalid()) { +++ return; +++ } ++ DeleteOnExitHook.add(path); ++ } ++ ++@@ -987,6 +1052,9 @@ ++ if (security != null) { ++ security.checkRead(path); ++ } +++ if (isInvalid()) { +++ return null; +++ } ++ return fs.list(this); ++ } ++ ++@@ -1168,6 +1236,9 @@ ++ if (security != null) { ++ security.checkWrite(path); ++ } +++ if (isInvalid()) { +++ return false; +++ } ++ return fs.createDirectory(this); ++ } ++ ++@@ -1239,6 +1310,12 @@ ++ security.checkWrite(path); ++ security.checkWrite(dest.path); ++ } +++ if (dest == null) { +++ throw new NullPointerException(); +++ } +++ if (this.isInvalid() || dest.isInvalid()) { +++ return false; +++ } ++ return fs.rename(this, dest); ++ } ++ ++@@ -1274,6 +1351,9 @@ ++ if (security != null) { ++ security.checkWrite(path); ++ } +++ if (isInvalid()) { +++ return false; +++ } ++ return fs.setLastModifiedTime(this, time); ++ } ++ ++@@ -1299,6 +1379,9 @@ ++ if (security != null) { ++ security.checkWrite(path); ++ } +++ if (isInvalid()) { +++ return false; +++ } ++ return fs.setReadOnly(this); ++ } ++ ++@@ -1333,6 +1416,9 @@ ++ if (security != null) { ++ security.checkWrite(path); ++ } +++ if (isInvalid()) { +++ return false; +++ } ++ return fs.setPermission(this, FileSystem.ACCESS_WRITE, writable, ownerOnly); ++ } ++ ++@@ -1399,6 +1485,9 @@ ++ if (security != null) { ++ security.checkWrite(path); ++ } +++ if (isInvalid()) { +++ return false; +++ } ++ return fs.setPermission(this, FileSystem.ACCESS_READ, readable, ownerOnly); ++ } ++ ++@@ -1468,6 +1557,9 @@ ++ if (security != null) { ++ security.checkWrite(path); ++ } +++ if (isInvalid()) { +++ return false; +++ } ++ return fs.setPermission(this, FileSystem.ACCESS_EXECUTE, executable, ownerOnly); ++ } ++ ++@@ -1522,6 +1614,9 @@ ++ if (security != null) { ++ security.checkExec(path); ++ } +++ if (isInvalid()) { +++ return false; +++ } ++ return fs.checkAccess(this, FileSystem.ACCESS_EXECUTE); ++ } ++ ++@@ -1597,6 +1692,9 @@ ++ sm.checkPermission(new RuntimePermission("getFileSystemAttributes")); ++ sm.checkRead(path); ++ } +++ if (isInvalid()) { +++ return 0L; +++ } ++ return fs.getSpace(this, FileSystem.SPACE_TOTAL); ++ } ++ ++@@ -1613,7 +1711,7 @@ ++ * makes no guarantee that write operations to this file system ++ * will succeed. ++ * ++- * @return The number of unallocated bytes on the partition 0L +++ * @return The number of unallocated bytes on the partition or 0L ++ * if the abstract pathname does not name a partition. This ++ * value will be less than or equal to the total file system size ++ * returned by {@link #getTotalSpace}. ++@@ -1632,6 +1730,9 @@ ++ sm.checkPermission(new RuntimePermission("getFileSystemAttributes")); ++ sm.checkRead(path); ++ } +++ if (isInvalid()) { +++ return 0L; +++ } ++ return fs.getSpace(this, FileSystem.SPACE_FREE); ++ } ++ ++@@ -1670,6 +1771,9 @@ ++ sm.checkPermission(new RuntimePermission("getFileSystemAttributes")); ++ sm.checkRead(path); ++ } +++ if (isInvalid()) { +++ return 0L; +++ } ++ return fs.getSpace(this, FileSystem.SPACE_USABLE); ++ } ++ ++@@ -1682,9 +1786,9 @@ ++ ++ static final String temporaryDirectory = temporaryDirectory(); ++ static String temporaryDirectory() { ++- return fs.normalize( +++ return ++ AccessController.doPrivileged( ++- new GetPropertyAction("java.io.tmpdir"))); +++ new GetPropertyAction("java.io.tmpdir")); ++ } ++ } ++ ++@@ -1735,6 +1839,9 @@ ++ File f; ++ do { ++ f = generateFile(prefix, s, directory); +++ if (f.isInvalid()) { +++ throw new IOException("Unable to create temporary file"); +++ } ++ } while (!checkAndCreate(f.getPath(), sm, restrictive)); ++ return f; ++ } ++diff -r 44a49c18eba2 -r 8ad2eb12bf42 src/share/classes/java/io/FileInputStream.java ++--- openjdk/jdk/src/share/classes/java/io/FileInputStream.java Fri Sep 06 09:38:10 2013 -0700 +++++ openjdk/jdk/src/share/classes/java/io/FileInputStream.java Tue Oct 29 03:05:18 2013 +0000 ++@@ -1,5 +1,5 @@ ++ /* ++- * Copyright (c) 1994, 2007, Oracle and/or its affiliates. All rights reserved. +++ * Copyright (c) 1994, 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 ++@@ -132,6 +132,9 @@ ++ if (name == null) { ++ throw new NullPointerException(); ++ } +++ if (file.isInvalid()) { +++ throw new FileNotFoundException("Invalid file path"); +++ } ++ fd = new FileDescriptor(); ++ fd.incrementAndGetUseCount(); ++ open(name); ++diff -r 44a49c18eba2 -r 8ad2eb12bf42 src/share/classes/java/io/FileOutputStream.java ++--- openjdk/jdk/src/share/classes/java/io/FileOutputStream.java Fri Sep 06 09:38:10 2013 -0700 +++++ openjdk/jdk/src/share/classes/java/io/FileOutputStream.java Tue Oct 29 03:05:18 2013 +0000 ++@@ -1,5 +1,5 @@ ++ /* ++- * Copyright (c) 1994, 2007, Oracle and/or its affiliates. All rights reserved. +++ * Copyright (c) 1994, 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 ++@@ -200,6 +200,9 @@ ++ if (name == null) { ++ throw new NullPointerException(); ++ } +++ if (file.isInvalid()) { +++ throw new FileNotFoundException("Invalid file path"); +++ } ++ fd = new FileDescriptor(); ++ fd.incrementAndGetUseCount(); ++ this.append = append; ++diff -r 44a49c18eba2 -r 8ad2eb12bf42 src/share/classes/java/io/RandomAccessFile.java ++--- openjdk/jdk/src/share/classes/java/io/RandomAccessFile.java Fri Sep 06 09:38:10 2013 -0700 +++++ openjdk/jdk/src/share/classes/java/io/RandomAccessFile.java Tue Oct 29 03:05:18 2013 +0000 ++@@ -1,5 +1,5 @@ ++ /* ++- * Copyright (c) 1994, 2007, Oracle and/or its affiliates. All rights reserved. +++ * Copyright (c) 1994, 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 ++@@ -228,6 +228,9 @@ ++ if (name == null) { ++ throw new NullPointerException(); ++ } +++ if (file.isInvalid()) { +++ throw new FileNotFoundException("Invalid file path"); +++ } ++ fd = new FileDescriptor(); ++ fd.incrementAndGetUseCount(); ++ open(name, imode); ++diff -r 44a49c18eba2 -r 8ad2eb12bf42 test/java/io/File/NulFile.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/jdk/test/java/io/File/NulFile.java Tue Oct 29 03:05:18 2013 +0000 ++@@ -0,0 +1,625 @@ +++/* +++ * Copyright (c) 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. +++ * +++ * 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. +++ */ +++ +++/* @test +++ * @bug 8003992 +++ * @summary Test a file whose path name is embedded with NUL character, and +++ * ensure it is handled correctly. +++ * @author Dan Xu +++ */ +++ +++import java.io.File; +++import java.io.FileFilter; +++import java.io.FileInputStream; +++import java.io.FileOutputStream; +++import java.io.RandomAccessFile; +++import java.io.FileNotFoundException; +++import java.io.FilenameFilter; +++import java.io.IOException; +++import java.net.MalformedURLException; +++import java.nio.file.InvalidPathException; +++import java.io.ByteArrayInputStream; +++import java.io.ByteArrayOutputStream; +++import java.io.ObjectOutputStream; +++import java.io.ObjectInputStream; +++ +++public class NulFile { +++ +++ private static final char CHAR_NUL = '\u0000'; +++ +++ private static final String ExceptionMsg = "Invalid file path"; +++ +++ public static void main(String[] args) { +++ testFile(); +++ testFileInUnix(); +++ testFileInWindows(); +++ testTempFile(); +++ } +++ +++ private static void testFile() { +++ test(new File(new StringBuilder().append(CHAR_NUL).toString())); +++ test(new File( +++ new StringBuilder().append("").append(CHAR_NUL).toString())); +++ test(new File( +++ new StringBuilder().append(CHAR_NUL).append("").toString())); +++ } +++ +++ private static void testFileInUnix() { +++ String osName = System.getProperty("os.name"); +++ if (osName.startsWith("Windows")) +++ return; +++ +++ String unixFile = "/"; +++ test(unixFile); +++ +++ unixFile = "//"; +++ test(unixFile); +++ +++ unixFile = "data/info"; +++ test(unixFile); +++ +++ unixFile = "/data/info"; +++ test(unixFile); +++ +++ unixFile = "//data//info"; +++ test(unixFile); +++ } +++ +++ private static void testFileInWindows() { +++ String osName = System.getProperty("os.name"); +++ if (!osName.startsWith("Windows")) +++ return; +++ +++ String windowsFile = "\\"; +++ test(windowsFile); +++ +++ windowsFile = "\\\\"; +++ test(windowsFile); +++ +++ windowsFile = "/"; +++ test(windowsFile); +++ +++ windowsFile = "//"; +++ test(windowsFile); +++ +++ windowsFile = "/\\"; +++ test(windowsFile); +++ +++ windowsFile = "\\/"; +++ test(windowsFile); +++ +++ windowsFile = "data\\info"; +++ test(windowsFile); +++ +++ windowsFile = "\\data\\info"; +++ test(windowsFile); +++ +++ windowsFile = "\\\\server\\data\\info"; +++ test(windowsFile); +++ +++ windowsFile = "z:data\\info"; +++ test(windowsFile); +++ +++ windowsFile = "z:\\data\\info"; +++ test(windowsFile); +++ } +++ +++ private static void test(final String name) { +++ int length = name.length(); +++ +++ for (int i = 0; i <= length; i++) { +++ StringBuilder sbName = new StringBuilder(name); +++ sbName.insert(i, CHAR_NUL); +++ String curName = sbName.toString(); +++ +++ // test File(String parent, String child) +++ File testFile = new File(curName, "child"); +++ test(testFile); +++ testFile = new File("parent", curName); +++ test(testFile); +++ +++ // test File(String pathname) +++ testFile = new File(curName); +++ test(testFile); +++ +++ // test File(File parent, String child) +++ testFile = new File(new File(curName), "child"); +++ test(testFile); +++ testFile = new File(new File("parent"), curName); +++ test(testFile); +++ +++ // test FileInputStream +++ testFileInputStream(curName); +++ +++ // test FileOutputStream +++ testFileOutputStream(curName); +++ +++ // test RandomAccessFile +++ testRandomAccessFile(curName); +++ } +++ } +++ +++ private static void testFileInputStream(final String str) { +++ boolean exceptionThrown = false; +++ FileInputStream is = null; +++ try { +++ is = new FileInputStream(str); +++ } catch (FileNotFoundException ex) { +++ if (ExceptionMsg.equals(ex.getMessage())) +++ exceptionThrown = true; +++ } +++ if (!exceptionThrown) { +++ throw new RuntimeException("FileInputStream constructor" +++ + " should throw FileNotFoundException"); +++ } +++ if (is != null) { +++ throw new RuntimeException("FileInputStream constructor" +++ + " should fail"); +++ } +++ +++ exceptionThrown = false; +++ is = null; +++ try { +++ is = new FileInputStream(new File(str)); +++ } catch (FileNotFoundException ex) { +++ if (ExceptionMsg.equals(ex.getMessage())) +++ exceptionThrown = true; +++ } +++ if (!exceptionThrown) { +++ throw new RuntimeException("FileInputStream constructor" +++ + " should throw FileNotFoundException"); +++ } +++ if (is != null) { +++ throw new RuntimeException("FileInputStream constructor" +++ + " should fail"); +++ } +++ } +++ +++ private static void testFileOutputStream(final String str) { +++ boolean exceptionThrown = false; +++ FileOutputStream os = null; +++ try { +++ os = new FileOutputStream(str); +++ } catch (FileNotFoundException ex) { +++ if (ExceptionMsg.equals(ex.getMessage())) +++ exceptionThrown = true; +++ } +++ if (!exceptionThrown) { +++ throw new RuntimeException("FileOutputStream constructor" +++ + " should throw FileNotFoundException"); +++ } +++ if (os != null) { +++ throw new RuntimeException("FileOutputStream constructor" +++ + " should fail"); +++ } +++ +++ exceptionThrown = false; +++ os = null; +++ try { +++ os = new FileOutputStream(new File(str)); +++ } catch (FileNotFoundException ex) { +++ if (ExceptionMsg.equals(ex.getMessage())) +++ exceptionThrown = true; +++ } +++ if (!exceptionThrown) { +++ throw new RuntimeException("FileOutputStream constructor" +++ + " should throw FileNotFoundException"); +++ } +++ if (os != null) { +++ throw new RuntimeException("FileOutputStream constructor" +++ + " should fail"); +++ } +++ } +++ +++ private static void testRandomAccessFile(final String str) { +++ boolean exceptionThrown = false; +++ RandomAccessFile raf = null; +++ String[] modes = {"r", "rw", "rws", "rwd"}; +++ +++ for (String mode : modes) { +++ try { +++ raf = new RandomAccessFile(str, mode); +++ } catch (FileNotFoundException ex) { +++ if (ExceptionMsg.equals(ex.getMessage())) +++ exceptionThrown = true; +++ } +++ if (!exceptionThrown) { +++ throw new RuntimeException("RandomAccessFile constructor" +++ + " should throw FileNotFoundException"); +++ } +++ if (raf != null) { +++ throw new RuntimeException("RandomAccessFile constructor" +++ + " should fail"); +++ } +++ +++ exceptionThrown = false; +++ raf = null; +++ try { +++ raf = new RandomAccessFile(new File(str), mode); +++ } catch (FileNotFoundException ex) { +++ if (ExceptionMsg.equals(ex.getMessage())) +++ exceptionThrown = true; +++ } +++ if (!exceptionThrown) { +++ throw new RuntimeException("RandomAccessFile constructor" +++ + " should throw FileNotFoundException"); +++ } +++ if (raf != null) { +++ throw new RuntimeException("RandomAccessFile constructor" +++ + " should fail"); +++ } +++ } +++ } +++ +++ private static void test(File testFile) { +++ test(testFile, false); +++ // test serialization +++ testSerialization(testFile); +++ } +++ +++ @SuppressWarnings("deprecation") +++ private static void test(File testFile, boolean derived) { +++ boolean exceptionThrown = false; +++ +++ if (testFile == null) { +++ throw new RuntimeException("test file should not be null."); +++ } +++ +++ // getPath() +++ if (testFile.getPath().indexOf(CHAR_NUL) < 0) { +++ throw new RuntimeException( +++ "File path should contain Nul character"); +++ } +++ // getAbsolutePath() +++ if (testFile.getAbsolutePath().indexOf(CHAR_NUL) < 0) { +++ throw new RuntimeException( +++ "File absolute path should contain Nul character"); +++ } +++ // getAbsoluteFile() +++ File derivedAbsFile = testFile.getAbsoluteFile(); +++ if (derived) { +++ if (derivedAbsFile.getPath().indexOf(CHAR_NUL) < 0) { +++ throw new RuntimeException( +++ "Derived file path should also contain Nul character"); +++ } +++ } else { +++ test(derivedAbsFile, true); +++ } +++ // getCanonicalPath() +++ try { +++ exceptionThrown = false; +++ testFile.getCanonicalPath(); +++ } catch (IOException ex) { +++ if (ExceptionMsg.equals(ex.getMessage())) +++ exceptionThrown = true; +++ } +++ if (!exceptionThrown) { +++ throw new RuntimeException( +++ "getCanonicalPath() should throw IOException with" +++ + " message \"" + ExceptionMsg + "\""); +++ } +++ // getCanonicalFile() +++ try { +++ exceptionThrown = false; +++ testFile.getCanonicalFile(); +++ } catch (IOException ex) { +++ if (ExceptionMsg.equals(ex.getMessage())) +++ exceptionThrown = true; +++ } +++ if (!exceptionThrown) { +++ throw new RuntimeException( +++ "getCanonicalFile() should throw IOException with" +++ + " message \"" + ExceptionMsg + "\""); +++ } +++ // toURL() +++ try { +++ exceptionThrown = false; +++ testFile.toURL(); +++ } catch (MalformedURLException ex) { +++ if (ExceptionMsg.equals(ex.getMessage())) +++ exceptionThrown = true; +++ } +++ if (!exceptionThrown) { +++ throw new RuntimeException("toURL() should throw IOException with" +++ + " message \"" + ExceptionMsg + "\""); +++ } +++ // canRead() +++ if (testFile.canRead()) +++ throw new RuntimeException("File should not be readable"); +++ // canWrite() +++ if (testFile.canWrite()) +++ throw new RuntimeException("File should not be writable"); +++ // exists() +++ if (testFile.exists()) +++ throw new RuntimeException("File should not be existed"); +++ // isDirectory() +++ if (testFile.isDirectory()) +++ throw new RuntimeException("File should not be a directory"); +++ // isFile() +++ if (testFile.isFile()) +++ throw new RuntimeException("File should not be a file"); +++ // isHidden() +++ if (testFile.isHidden()) +++ throw new RuntimeException("File should not be hidden"); +++ // lastModified() +++ if (testFile.lastModified() != 0L) +++ throw new RuntimeException("File last modified time should be 0L"); +++ // length() +++ if (testFile.length() != 0L) +++ throw new RuntimeException("File length should be 0L"); +++ // createNewFile() +++ try { +++ exceptionThrown = false; +++ testFile.createNewFile(); +++ } catch (IOException ex) { +++ if (ExceptionMsg.equals(ex.getMessage())) +++ exceptionThrown = true; +++ } +++ if (!exceptionThrown) { +++ throw new RuntimeException( +++ "createNewFile() should throw IOException with" +++ + " message \"" + ExceptionMsg + "\""); +++ } +++ // delete() +++ if (testFile.delete()) +++ throw new RuntimeException("Delete operation should fail"); +++ // list() +++ if (testFile.list() != null) +++ throw new RuntimeException("File list() should return null"); +++ // list(FilenameFilter) +++ FilenameFilter fnFilter = new FilenameFilter() { +++ @Override +++ public boolean accept(File dir, String name) { +++ return false; +++ } +++ }; +++ if (testFile.list(fnFilter) != null) { +++ throw new RuntimeException("File list(FilenameFilter) should" +++ + " return null"); +++ } +++ // listFiles() +++ if (testFile.listFiles() != null) +++ throw new RuntimeException("File listFiles() should return null"); +++ // listFiles(FilenameFilter) +++ if (testFile.listFiles(fnFilter) != null) { +++ throw new RuntimeException("File listFiles(FilenameFilter)" +++ + " should return null"); +++ } +++ // listFiles(FileFilter) +++ FileFilter fFilter = new FileFilter() { +++ @Override +++ public boolean accept(File file) { +++ return false; +++ } +++ }; +++ if (testFile.listFiles(fFilter) != null) { +++ throw new RuntimeException("File listFiles(FileFilter)" +++ + " should return null"); +++ } +++ // mkdir() +++ if (testFile.mkdir()) { +++ throw new RuntimeException("File should not be able to" +++ + " create directory"); +++ } +++ // mkdirs() +++ if (testFile.mkdirs()) { +++ throw new RuntimeException("File should not be able to" +++ + " create directories"); +++ } +++ // renameTo(File) +++ if (testFile.renameTo(new File("dest"))) +++ throw new RuntimeException("File rename should fail"); +++ if (new File("dest").renameTo(testFile)) +++ throw new RuntimeException("File rename should fail"); +++ try { +++ exceptionThrown = false; +++ testFile.renameTo(null); +++ } catch (NullPointerException ex) { +++ exceptionThrown = true; +++ } +++ if (!exceptionThrown) { +++ throw new RuntimeException("File rename should thrown NPE"); +++ } +++ // setLastModified(long) +++ if (testFile.setLastModified(0L)) { +++ throw new RuntimeException("File should fail to set" +++ + " last modified time"); +++ } +++ try { +++ exceptionThrown = false; +++ testFile.setLastModified(-1); +++ } catch (IllegalArgumentException ex) { +++ if ("Negative time".equals(ex.getMessage())) +++ exceptionThrown = true; +++ } +++ if (!exceptionThrown) { +++ throw new RuntimeException("File should fail to set" +++ + " last modified time with message \"Negative time\""); +++ } +++ // setReadOnly() +++ if (testFile.setReadOnly()) +++ throw new RuntimeException("File should fail to set read-only"); +++ // setWritable(boolean writable, boolean ownerOnly) +++ if (testFile.setWritable(true, true)) +++ throw new RuntimeException("File should fail to set writable"); +++ if (testFile.setWritable(true, false)) +++ throw new RuntimeException("File should fail to set writable"); +++ if (testFile.setWritable(false, true)) +++ throw new RuntimeException("File should fail to set writable"); +++ if (testFile.setWritable(false, false)) +++ throw new RuntimeException("File should fail to set writable"); +++ // setWritable(boolean writable) +++ if (testFile.setWritable(false)) +++ throw new RuntimeException("File should fail to set writable"); +++ if (testFile.setWritable(true)) +++ throw new RuntimeException("File should fail to set writable"); +++ // setReadable(boolean readable, boolean ownerOnly) +++ if (testFile.setReadable(true, true)) +++ throw new RuntimeException("File should fail to set readable"); +++ if (testFile.setReadable(true, false)) +++ throw new RuntimeException("File should fail to set readable"); +++ if (testFile.setReadable(false, true)) +++ throw new RuntimeException("File should fail to set readable"); +++ if (testFile.setReadable(false, false)) +++ throw new RuntimeException("File should fail to set readable"); +++ // setReadable(boolean readable) +++ if (testFile.setReadable(false)) +++ throw new RuntimeException("File should fail to set readable"); +++ if (testFile.setReadable(true)) +++ throw new RuntimeException("File should fail to set readable"); +++ // setExecutable(boolean executable, boolean ownerOnly) +++ if (testFile.setExecutable(true, true)) +++ throw new RuntimeException("File should fail to set executable"); +++ if (testFile.setExecutable(true, false)) +++ throw new RuntimeException("File should fail to set executable"); +++ if (testFile.setExecutable(false, true)) +++ throw new RuntimeException("File should fail to set executable"); +++ if (testFile.setExecutable(false, false)) +++ throw new RuntimeException("File should fail to set executable"); +++ // setExecutable(boolean executable) +++ if (testFile.setExecutable(false)) +++ throw new RuntimeException("File should fail to set executable"); +++ if (testFile.setExecutable(true)) +++ throw new RuntimeException("File should fail to set executable"); +++ // canExecute() +++ if (testFile.canExecute()) +++ throw new RuntimeException("File should not be executable"); +++ // getTotalSpace() +++ if (testFile.getTotalSpace() != 0L) +++ throw new RuntimeException("The total space should be 0L"); +++ // getFreeSpace() +++ if (testFile.getFreeSpace() != 0L) +++ throw new RuntimeException("The free space should be 0L"); +++ // getUsableSpace() +++ if (testFile.getUsableSpace() != 0L) +++ throw new RuntimeException("The usable space should be 0L"); +++ // compareTo(File null) +++ try { +++ exceptionThrown = false; +++ testFile.compareTo(null); +++ } catch (NullPointerException ex) { +++ exceptionThrown = true; +++ } +++ if (!exceptionThrown) { +++ throw new RuntimeException("compareTo(null) should throw NPE"); +++ } +++ // toString() +++ if (testFile.toString().indexOf(CHAR_NUL) < 0) { +++ throw new RuntimeException( +++ "File path should contain Nul character"); +++ } +++ // toPath() +++ try { +++ exceptionThrown = false; +++ testFile.toPath(); +++ } catch (InvalidPathException ex) { +++ exceptionThrown = true; +++ } +++ if (!exceptionThrown) { +++ throw new RuntimeException("toPath() should throw" +++ + " InvalidPathException"); +++ } +++ } +++ +++ private static void testSerialization(File testFile) { +++ String path = testFile.getPath(); +++ try { +++ // serialize test file +++ ByteArrayOutputStream baos = new ByteArrayOutputStream(); +++ ObjectOutputStream oos = new ObjectOutputStream(baos); +++ oos.writeObject(testFile); +++ oos.close(); +++ // deserialize test file +++ byte[] bytes = baos.toByteArray(); +++ ByteArrayInputStream is = new ByteArrayInputStream(bytes); +++ ObjectInputStream ois = new ObjectInputStream(is); +++ File newFile = (File) ois.readObject(); +++ // test +++ String newPath = newFile.getPath(); +++ if (!path.equals(newPath)) { +++ throw new RuntimeException( +++ "Serialization should not change file path"); +++ } +++ test(newFile, false); +++ } catch (IOException | ClassNotFoundException ex) { +++ System.err.println("Exception happens in testSerialization"); +++ System.err.println(ex.getMessage()); +++ } +++ } +++ +++ private static void testTempFile() { +++ final String[] names = {"x", "xx", "xxx", "xxxx"}; +++ final String shortPrefix = "sp"; +++ final String prefix = "prefix"; +++ final String suffix = "suffix"; +++ File tmpDir = new File("tmpDir"); +++ +++ for (String name : names) { +++ int length = name.length(); +++ for (int i = 0; i <= length; i++) { +++ StringBuilder sbName = new StringBuilder(name); +++ sbName.insert(i, CHAR_NUL); +++ String curName = sbName.toString(); +++ +++ // test prefix +++ testCreateTempFile(curName, suffix, tmpDir); +++ // test suffix +++ testCreateTempFile(shortPrefix, curName, tmpDir); +++ testCreateTempFile(prefix, curName, tmpDir); +++ // test directory +++ testCreateTempFile(shortPrefix, suffix, new File(curName)); +++ testCreateTempFile(prefix, suffix, new File(curName)); +++ } +++ } +++ } +++ +++ private static void testCreateTempFile(String prefix, String suffix, +++ File directory) { +++ // createTempFile(String prefix, String suffix, File directory) +++ boolean exceptionThrown = false; +++ boolean shortPrefix = (prefix.length() < 3); +++ if (shortPrefix) { +++ try { +++ File.createTempFile(prefix, suffix, directory); +++ } catch (IllegalArgumentException ex) { +++ if ("Prefix string too short".equals(ex.getMessage())) +++ exceptionThrown = true; +++ } catch (IOException ioe) { +++ System.err.println("IOException happens in testCreateTempFile"); +++ System.err.println(ioe.getMessage()); +++ } +++ } else { +++ try { +++ File.createTempFile(prefix, suffix, directory); +++ } catch (IOException ex) { +++ if ("Unable to create temporary file".equals(ex.getMessage())) +++ exceptionThrown = true; +++ } +++ } +++ if (!exceptionThrown) { +++ throw new RuntimeException("createTempFile() should throw" +++ + (shortPrefix ? " IllegalArgumentException" +++ : " IOException")); +++ } +++ } +++} +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8004188-rename_java.security.patch openjdk-6-6b27-1.12.6/patches/openjdk/8004188-rename_java.security.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8004188-rename_java.security.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8004188-rename_java.security.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,652 @@ ++# HG changeset patch ++# User juh ++# Date 1382736906 -3600 ++# Fri Oct 25 22:35:06 2013 +0100 ++# Node ID 2a023db33371ce5ee42134cf0d860ab9f0adff92 ++# Parent 3b6f55f02122398ba662fb581352c9c9b102c2e3 ++8004188: Rename src/share/lib/security/java.security to java.security-linux ++Reviewed-by: mullan, mchung ++ ++diff -r 3b6f55f02122 -r 2a023db33371 make/java/security/Makefile ++--- openjdk/jdk/make/java/security/Makefile Fri Jul 12 11:36:15 2013 +0100 +++++ openjdk/jdk/make/java/security/Makefile Fri Oct 25 22:35:06 2013 +0100 ++@@ -37,7 +37,8 @@ ++ # Directories ++ # ++ ++-PROPS_SRC = $(TOPDIR)/src/share/lib/security/java.security +++# The default security properties file is for linux +++PROPS_SRC = $(TOPDIR)/src/share/lib/security/java.security-linux ++ SUNPKCS11 = ++ ++ ifeq ($(PLATFORM), solaris) ++diff -r 3b6f55f02122 -r 2a023db33371 src/share/lib/security/java.security ++--- openjdk/jdk/src/share/lib/security/java.security Fri Jul 12 11:36:15 2013 +0100 +++++ /dev/null Thu Jan 01 00:00:00 1970 +0000 ++@@ -1,311 +0,0 @@ ++-# ++-# This is the "master security properties file". ++-# ++-# In this file, various security properties are set for use by ++-# java.security classes. This is where users can statically register ++-# Cryptography Package Providers ("providers" for short). The term ++-# "provider" refers to a package or set of packages that supply a ++-# concrete implementation of a subset of the cryptography aspects of ++-# the Java Security API. A provider may, for example, implement one or ++-# more digital signature algorithms or message digest algorithms. ++-# ++-# Each provider must implement a subclass of the Provider class. ++-# To register a provider in this master security properties file, ++-# specify the Provider subclass name and priority in the format ++-# ++-# security.provider.= ++-# ++-# This declares a provider, and specifies its preference ++-# order n. The preference order is the order in which providers are ++-# searched for requested algorithms (when no specific provider is ++-# requested). The order is 1-based; 1 is the most preferred, followed ++-# by 2, and so on. ++-# ++-# must specify the subclass of the Provider class whose ++-# constructor sets the values of various properties that are required ++-# for the Java Security API to look up the algorithms or other ++-# facilities implemented by the provider. ++-# ++-# There must be at least one provider specification in java.security. ++-# There is a default provider that comes standard with the JDK. It ++-# is called the "SUN" provider, and its Provider subclass ++-# named Sun appears in the sun.security.provider package. Thus, the ++-# "SUN" provider is registered via the following: ++-# ++-# security.provider.1=sun.security.provider.Sun ++-# ++-# (The number 1 is used for the default provider.) ++-# ++-# Note: Providers can be dynamically registered instead by calls to ++-# either the addProvider or insertProviderAt method in the Security ++-# class. ++- ++-# ++-# List of providers and their preference orders (see above): ++-# ++-security.provider.1=sun.security.provider.Sun ++-security.provider.2=sun.security.rsa.SunRsaSign ++-security.provider.3=com.sun.net.ssl.internal.ssl.Provider ++-security.provider.4=com.sun.crypto.provider.SunJCE ++-security.provider.5=sun.security.jgss.SunProvider ++-security.provider.6=com.sun.security.sasl.Provider ++-security.provider.7=org.jcp.xml.dsig.internal.dom.XMLDSigRI ++-security.provider.8=sun.security.smartcardio.SunPCSC ++- ++-# ++-# Select the source of seed data for SecureRandom. By default an ++-# attempt is made to use the entropy gathering device specified by ++-# the securerandom.source property. If an exception occurs when ++-# accessing the URL then the traditional system/thread activity ++-# algorithm is used. ++-# ++-# On Solaris and Linux systems, if file:/dev/urandom is specified and it ++-# exists, a special SecureRandom implementation is activated by default. ++-# This "NativePRNG" reads random bytes directly from /dev/urandom. ++-# ++-# On Windows systems, the URLs file:/dev/random and file:/dev/urandom ++-# enables use of the Microsoft CryptoAPI seed functionality. ++-# ++-securerandom.source=file:/dev/urandom ++-# ++-# The entropy gathering device is described as a URL and can also ++-# be specified with the system property "java.security.egd". For example, ++-# -Djava.security.egd=file:/dev/urandom ++-# Specifying this system property will override the securerandom.source ++-# setting. ++- ++-# ++-# Class to instantiate as the javax.security.auth.login.Configuration ++-# provider. ++-# ++-login.configuration.provider=com.sun.security.auth.login.ConfigFile ++- ++-# ++-# Default login configuration file ++-# ++-#login.config.url.1=file:${user.home}/.java.login.config ++- ++-# ++-# Class to instantiate as the system Policy. This is the name of the class ++-# that will be used as the Policy object. ++-# ++-policy.provider=sun.security.provider.PolicyFile ++- ++-# The default is to have a single system-wide policy file, ++-# and a policy file in the user's home directory. ++-policy.url.1=file:${java.home}/lib/security/java.policy ++-policy.url.2=file:${user.home}/.java.policy ++- ++-# whether or not we expand properties in the policy file ++-# if this is set to false, properties (${...}) will not be expanded in policy ++-# files. ++-policy.expandProperties=true ++- ++-# whether or not we allow an extra policy to be passed on the command line ++-# with -Djava.security.policy=somefile. Comment out this line to disable ++-# this feature. ++-policy.allowSystemProperty=true ++- ++-# whether or not we look into the IdentityScope for trusted Identities ++-# when encountering a 1.1 signed JAR file. If the identity is found ++-# and is trusted, we grant it AllPermission. ++-policy.ignoreIdentityScope=false ++- ++-# ++-# Default keystore type. ++-# ++-keystore.type=jks ++- ++-# ++-# Class to instantiate as the system scope: ++-# ++-system.scope=sun.security.provider.IdentityDatabase ++- ++-# ++-# List of comma-separated packages that start with or equal this string ++-# will cause a security exception to be thrown when ++-# passed to checkPackageAccess unless the ++-# corresponding RuntimePermission ("accessClassInPackage."+package) has ++-# been granted. ++-package.access=sun.,\ ++- com.sun.corba.se.impl.,\ ++- com.sun.xml.internal.,\ ++- com.sun.imageio.,\ ++- com.sun.istack.internal.,\ ++- com.sun.jmx.,\ ++- com.sun.proxy.,\ ++- com.sun.org.apache.bcel.internal.,\ ++- com.sun.org.apache.regexp.internal.,\ ++- com.sun.org.apache.xerces.internal.,\ ++- com.sun.org.apache.xpath.internal.,\ ++- com.sun.org.apache.xalan.internal.extensions.,\ ++- com.sun.org.apache.xalan.internal.lib.,\ ++- com.sun.org.apache.xalan.internal.res.,\ ++- com.sun.org.apache.xalan.internal.templates.,\ ++- com.sun.org.apache.xalan.internal.xslt.,\ ++- com.sun.org.apache.xalan.internal.xsltc.cmdline.,\ ++- com.sun.org.apache.xalan.internal.xsltc.compiler.,\ ++- com.sun.org.apache.xalan.internal.xsltc.trax.,\ ++- com.sun.org.apache.xalan.internal.xsltc.util.,\ ++- com.sun.org.apache.xml.internal.res.,\ ++- com.sun.org.apache.xml.internal.serializer.utils.,\ ++- com.sun.org.apache.xml.internal.utils.,\ ++- com.sun.org.apache.xml.internal.security.,\ ++- com.sun.org.glassfish.,\ ++- org.jcp.xml.dsig.internal. ++- ++-# ++-# List of comma-separated packages that start with or equal this string ++-# will cause a security exception to be thrown when ++-# passed to checkPackageDefinition unless the ++-# corresponding RuntimePermission ("defineClassInPackage."+package) has ++-# been granted. ++-# ++-# by default, none of the class loaders supplied with the JDK call ++-# checkPackageDefinition. ++-# ++-package.definition=sun.,\ ++- com.sun.corba.se.impl.,\ ++- com.sun.xml.internal.,\ ++- com.sun.imageio.,\ ++- com.sun.istack.internal.,\ ++- com.sun.jmx.,\ ++- com.sun.proxy.,\ ++- com.sun.org.apache.bcel.internal.,\ ++- com.sun.org.apache.regexp.internal.,\ ++- com.sun.org.apache.xerces.internal.,\ ++- com.sun.org.apache.xpath.internal.,\ ++- com.sun.org.apache.xalan.internal.extensions.,\ ++- com.sun.org.apache.xalan.internal.lib.,\ ++- com.sun.org.apache.xalan.internal.res.,\ ++- com.sun.org.apache.xalan.internal.templates.,\ ++- com.sun.org.apache.xalan.internal.xslt.,\ ++- com.sun.org.apache.xalan.internal.xsltc.cmdline.,\ ++- com.sun.org.apache.xalan.internal.xsltc.compiler.,\ ++- com.sun.org.apache.xalan.internal.xsltc.trax.,\ ++- com.sun.org.apache.xalan.internal.xsltc.util.,\ ++- com.sun.org.apache.xml.internal.res.,\ ++- com.sun.org.apache.xml.internal.serializer.utils.,\ ++- com.sun.org.apache.xml.internal.utils.,\ ++- com.sun.org.apache.xml.internal.security.,\ ++- com.sun.org.glassfish.,\ ++- org.jcp.xml.dsig.internal. ++- ++-# ++-# Determines whether this properties file can be appended to ++-# or overridden on the command line via -Djava.security.properties ++-# ++-security.overridePropertiesFile=true ++- ++-# ++-# Determines the default key and trust manager factory algorithms for ++-# the javax.net.ssl package. ++-# ++-ssl.KeyManagerFactory.algorithm=SunX509 ++-ssl.TrustManagerFactory.algorithm=PKIX ++- ++-# ++-# The Java-level namelookup cache policy for successful lookups: ++-# ++-# any negative value: caching forever ++-# any positive value: the number of seconds to cache an address for ++-# zero: do not cache ++-# ++-# default value is forever (FOREVER). For security reasons, this ++-# caching is made forever when a security manager is set. When a security ++-# manager is not set, the default behavior in this implementation ++-# is to cache for 30 seconds. ++-# ++-# NOTE: setting this to anything other than the default value can have ++-# serious security implications. Do not set it unless ++-# you are sure you are not exposed to DNS spoofing attack. ++-# ++-#networkaddress.cache.ttl=-1 ++- ++-# The Java-level namelookup cache policy for failed lookups: ++-# ++-# any negative value: cache forever ++-# any positive value: the number of seconds to cache negative lookup results ++-# zero: do not cache ++-# ++-# In some Microsoft Windows networking environments that employ ++-# the WINS name service in addition to DNS, name service lookups ++-# that fail may take a noticeably long time to return (approx. 5 seconds). ++-# For this reason the default caching policy is to maintain these ++-# results for 10 seconds. ++-# ++-# ++-networkaddress.cache.negative.ttl=10 ++- ++-# ++-# Properties to configure OCSP for certificate revocation checking ++-# ++- ++-# Enable OCSP ++-# ++-# By default, OCSP is not used for certificate revocation checking. ++-# This property enables the use of OCSP when set to the value "true". ++-# ++-# NOTE: SocketPermission is required to connect to an OCSP responder. ++-# ++-# Example, ++-# ocsp.enable=true ++- ++-# ++-# Location of the OCSP responder ++-# ++-# By default, the location of the OCSP responder is determined implicitly ++-# from the certificate being validated. This property explicitly specifies ++-# the location of the OCSP responder. The property is used when the ++-# Authority Information Access extension (defined in RFC 3280) is absent ++-# from the certificate or when it requires overriding. ++-# ++-# Example, ++-# ocsp.responderURL=http://ocsp.example.net:80 ++- ++-# ++-# Subject name of the OCSP responder's certificate ++-# ++-# By default, the certificate of the OCSP responder is that of the issuer ++-# of the certificate being validated. This property identifies the certificate ++-# of the OCSP responder when the default does not apply. Its value is a string ++-# distinguished name (defined in RFC 2253) which identifies a certificate in ++-# the set of certificates supplied during cert path validation. In cases where ++-# the subject name alone is not sufficient to uniquely identify the certificate ++-# then both the "ocsp.responderCertIssuerName" and ++-# "ocsp.responderCertSerialNumber" properties must be used instead. When this ++-# property is set then those two properties are ignored. ++-# ++-# Example, ++-# ocsp.responderCertSubjectName="CN=OCSP Responder, O=XYZ Corp" ++- ++-# ++-# Issuer name of the OCSP responder's certificate ++-# ++-# By default, the certificate of the OCSP responder is that of the issuer ++-# of the certificate being validated. This property identifies the certificate ++-# of the OCSP responder when the default does not apply. Its value is a string ++-# distinguished name (defined in RFC 2253) which identifies a certificate in ++-# the set of certificates supplied during cert path validation. When this ++-# property is set then the "ocsp.responderCertSerialNumber" property must also ++-# be set. When the "ocsp.responderCertSubjectName" property is set then this ++-# property is ignored. ++-# ++-# Example, ++-# ocsp.responderCertIssuerName="CN=Enterprise CA, O=XYZ Corp" ++- ++-# ++-# Serial number of the OCSP responder's certificate ++-# ++-# By default, the certificate of the OCSP responder is that of the issuer ++-# of the certificate being validated. This property identifies the certificate ++-# of the OCSP responder when the default does not apply. Its value is a string ++-# of hexadecimal digits (colon or space separators may be present) which ++-# identifies a certificate in the set of certificates supplied during cert path ++-# validation. When this property is set then the "ocsp.responderCertIssuerName" ++-# property must also be set. When the "ocsp.responderCertSubjectName" property ++-# is set then this property is ignored. ++-# ++-# Example, ++-# ocsp.responderCertSerialNumber=2A:FF:00 ++- ++diff -r 3b6f55f02122 -r 2a023db33371 src/share/lib/security/java.security-linux ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/jdk/src/share/lib/security/java.security-linux Fri Oct 25 22:35:06 2013 +0100 ++@@ -0,0 +1,311 @@ +++# +++# This is the "master security properties file". +++# +++# In this file, various security properties are set for use by +++# java.security classes. This is where users can statically register +++# Cryptography Package Providers ("providers" for short). The term +++# "provider" refers to a package or set of packages that supply a +++# concrete implementation of a subset of the cryptography aspects of +++# the Java Security API. A provider may, for example, implement one or +++# more digital signature algorithms or message digest algorithms. +++# +++# Each provider must implement a subclass of the Provider class. +++# To register a provider in this master security properties file, +++# specify the Provider subclass name and priority in the format +++# +++# security.provider.= +++# +++# This declares a provider, and specifies its preference +++# order n. The preference order is the order in which providers are +++# searched for requested algorithms (when no specific provider is +++# requested). The order is 1-based; 1 is the most preferred, followed +++# by 2, and so on. +++# +++# must specify the subclass of the Provider class whose +++# constructor sets the values of various properties that are required +++# for the Java Security API to look up the algorithms or other +++# facilities implemented by the provider. +++# +++# There must be at least one provider specification in java.security. +++# There is a default provider that comes standard with the JDK. It +++# is called the "SUN" provider, and its Provider subclass +++# named Sun appears in the sun.security.provider package. Thus, the +++# "SUN" provider is registered via the following: +++# +++# security.provider.1=sun.security.provider.Sun +++# +++# (The number 1 is used for the default provider.) +++# +++# Note: Providers can be dynamically registered instead by calls to +++# either the addProvider or insertProviderAt method in the Security +++# class. +++ +++# +++# List of providers and their preference orders (see above): +++# +++security.provider.1=sun.security.provider.Sun +++security.provider.2=sun.security.rsa.SunRsaSign +++security.provider.3=com.sun.net.ssl.internal.ssl.Provider +++security.provider.4=com.sun.crypto.provider.SunJCE +++security.provider.5=sun.security.jgss.SunProvider +++security.provider.6=com.sun.security.sasl.Provider +++security.provider.7=org.jcp.xml.dsig.internal.dom.XMLDSigRI +++security.provider.8=sun.security.smartcardio.SunPCSC +++ +++# +++# Select the source of seed data for SecureRandom. By default an +++# attempt is made to use the entropy gathering device specified by +++# the securerandom.source property. If an exception occurs when +++# accessing the URL then the traditional system/thread activity +++# algorithm is used. +++# +++# On Solaris and Linux systems, if file:/dev/urandom is specified and it +++# exists, a special SecureRandom implementation is activated by default. +++# This "NativePRNG" reads random bytes directly from /dev/urandom. +++# +++# On Windows systems, the URLs file:/dev/random and file:/dev/urandom +++# enables use of the Microsoft CryptoAPI seed functionality. +++# +++securerandom.source=file:/dev/urandom +++# +++# The entropy gathering device is described as a URL and can also +++# be specified with the system property "java.security.egd". For example, +++# -Djava.security.egd=file:/dev/urandom +++# Specifying this system property will override the securerandom.source +++# setting. +++ +++# +++# Class to instantiate as the javax.security.auth.login.Configuration +++# provider. +++# +++login.configuration.provider=com.sun.security.auth.login.ConfigFile +++ +++# +++# Default login configuration file +++# +++#login.config.url.1=file:${user.home}/.java.login.config +++ +++# +++# Class to instantiate as the system Policy. This is the name of the class +++# that will be used as the Policy object. +++# +++policy.provider=sun.security.provider.PolicyFile +++ +++# The default is to have a single system-wide policy file, +++# and a policy file in the user's home directory. +++policy.url.1=file:${java.home}/lib/security/java.policy +++policy.url.2=file:${user.home}/.java.policy +++ +++# whether or not we expand properties in the policy file +++# if this is set to false, properties (${...}) will not be expanded in policy +++# files. +++policy.expandProperties=true +++ +++# whether or not we allow an extra policy to be passed on the command line +++# with -Djava.security.policy=somefile. Comment out this line to disable +++# this feature. +++policy.allowSystemProperty=true +++ +++# whether or not we look into the IdentityScope for trusted Identities +++# when encountering a 1.1 signed JAR file. If the identity is found +++# and is trusted, we grant it AllPermission. +++policy.ignoreIdentityScope=false +++ +++# +++# Default keystore type. +++# +++keystore.type=jks +++ +++# +++# Class to instantiate as the system scope: +++# +++system.scope=sun.security.provider.IdentityDatabase +++ +++# +++# List of comma-separated packages that start with or equal this string +++# will cause a security exception to be thrown when +++# passed to checkPackageAccess unless the +++# corresponding RuntimePermission ("accessClassInPackage."+package) has +++# been granted. +++package.access=sun.,\ +++ com.sun.corba.se.impl.,\ +++ com.sun.xml.internal.,\ +++ com.sun.imageio.,\ +++ com.sun.istack.internal.,\ +++ com.sun.jmx.,\ +++ com.sun.proxy.,\ +++ com.sun.org.apache.bcel.internal.,\ +++ com.sun.org.apache.regexp.internal.,\ +++ com.sun.org.apache.xerces.internal.,\ +++ com.sun.org.apache.xpath.internal.,\ +++ com.sun.org.apache.xalan.internal.extensions.,\ +++ com.sun.org.apache.xalan.internal.lib.,\ +++ com.sun.org.apache.xalan.internal.res.,\ +++ com.sun.org.apache.xalan.internal.templates.,\ +++ com.sun.org.apache.xalan.internal.xslt.,\ +++ com.sun.org.apache.xalan.internal.xsltc.cmdline.,\ +++ com.sun.org.apache.xalan.internal.xsltc.compiler.,\ +++ com.sun.org.apache.xalan.internal.xsltc.trax.,\ +++ com.sun.org.apache.xalan.internal.xsltc.util.,\ +++ com.sun.org.apache.xml.internal.res.,\ +++ com.sun.org.apache.xml.internal.serializer.utils.,\ +++ com.sun.org.apache.xml.internal.utils.,\ +++ com.sun.org.apache.xml.internal.security.,\ +++ com.sun.org.glassfish.,\ +++ org.jcp.xml.dsig.internal. +++ +++# +++# List of comma-separated packages that start with or equal this string +++# will cause a security exception to be thrown when +++# passed to checkPackageDefinition unless the +++# corresponding RuntimePermission ("defineClassInPackage."+package) has +++# been granted. +++# +++# by default, none of the class loaders supplied with the JDK call +++# checkPackageDefinition. +++# +++package.definition=sun.,\ +++ com.sun.corba.se.impl.,\ +++ com.sun.xml.internal.,\ +++ com.sun.imageio.,\ +++ com.sun.istack.internal.,\ +++ com.sun.jmx.,\ +++ com.sun.proxy.,\ +++ com.sun.org.apache.bcel.internal.,\ +++ com.sun.org.apache.regexp.internal.,\ +++ com.sun.org.apache.xerces.internal.,\ +++ com.sun.org.apache.xpath.internal.,\ +++ com.sun.org.apache.xalan.internal.extensions.,\ +++ com.sun.org.apache.xalan.internal.lib.,\ +++ com.sun.org.apache.xalan.internal.res.,\ +++ com.sun.org.apache.xalan.internal.templates.,\ +++ com.sun.org.apache.xalan.internal.xslt.,\ +++ com.sun.org.apache.xalan.internal.xsltc.cmdline.,\ +++ com.sun.org.apache.xalan.internal.xsltc.compiler.,\ +++ com.sun.org.apache.xalan.internal.xsltc.trax.,\ +++ com.sun.org.apache.xalan.internal.xsltc.util.,\ +++ com.sun.org.apache.xml.internal.res.,\ +++ com.sun.org.apache.xml.internal.serializer.utils.,\ +++ com.sun.org.apache.xml.internal.utils.,\ +++ com.sun.org.apache.xml.internal.security.,\ +++ com.sun.org.glassfish.,\ +++ org.jcp.xml.dsig.internal. +++ +++# +++# Determines whether this properties file can be appended to +++# or overridden on the command line via -Djava.security.properties +++# +++security.overridePropertiesFile=true +++ +++# +++# Determines the default key and trust manager factory algorithms for +++# the javax.net.ssl package. +++# +++ssl.KeyManagerFactory.algorithm=SunX509 +++ssl.TrustManagerFactory.algorithm=PKIX +++ +++# +++# The Java-level namelookup cache policy for successful lookups: +++# +++# any negative value: caching forever +++# any positive value: the number of seconds to cache an address for +++# zero: do not cache +++# +++# default value is forever (FOREVER). For security reasons, this +++# caching is made forever when a security manager is set. When a security +++# manager is not set, the default behavior in this implementation +++# is to cache for 30 seconds. +++# +++# NOTE: setting this to anything other than the default value can have +++# serious security implications. Do not set it unless +++# you are sure you are not exposed to DNS spoofing attack. +++# +++#networkaddress.cache.ttl=-1 +++ +++# The Java-level namelookup cache policy for failed lookups: +++# +++# any negative value: cache forever +++# any positive value: the number of seconds to cache negative lookup results +++# zero: do not cache +++# +++# In some Microsoft Windows networking environments that employ +++# the WINS name service in addition to DNS, name service lookups +++# that fail may take a noticeably long time to return (approx. 5 seconds). +++# For this reason the default caching policy is to maintain these +++# results for 10 seconds. +++# +++# +++networkaddress.cache.negative.ttl=10 +++ +++# +++# Properties to configure OCSP for certificate revocation checking +++# +++ +++# Enable OCSP +++# +++# By default, OCSP is not used for certificate revocation checking. +++# This property enables the use of OCSP when set to the value "true". +++# +++# NOTE: SocketPermission is required to connect to an OCSP responder. +++# +++# Example, +++# ocsp.enable=true +++ +++# +++# Location of the OCSP responder +++# +++# By default, the location of the OCSP responder is determined implicitly +++# from the certificate being validated. This property explicitly specifies +++# the location of the OCSP responder. The property is used when the +++# Authority Information Access extension (defined in RFC 3280) is absent +++# from the certificate or when it requires overriding. +++# +++# Example, +++# ocsp.responderURL=http://ocsp.example.net:80 +++ +++# +++# Subject name of the OCSP responder's certificate +++# +++# By default, the certificate of the OCSP responder is that of the issuer +++# of the certificate being validated. This property identifies the certificate +++# of the OCSP responder when the default does not apply. Its value is a string +++# distinguished name (defined in RFC 2253) which identifies a certificate in +++# the set of certificates supplied during cert path validation. In cases where +++# the subject name alone is not sufficient to uniquely identify the certificate +++# then both the "ocsp.responderCertIssuerName" and +++# "ocsp.responderCertSerialNumber" properties must be used instead. When this +++# property is set then those two properties are ignored. +++# +++# Example, +++# ocsp.responderCertSubjectName="CN=OCSP Responder, O=XYZ Corp" +++ +++# +++# Issuer name of the OCSP responder's certificate +++# +++# By default, the certificate of the OCSP responder is that of the issuer +++# of the certificate being validated. This property identifies the certificate +++# of the OCSP responder when the default does not apply. Its value is a string +++# distinguished name (defined in RFC 2253) which identifies a certificate in +++# the set of certificates supplied during cert path validation. When this +++# property is set then the "ocsp.responderCertSerialNumber" property must also +++# be set. When the "ocsp.responderCertSubjectName" property is set then this +++# property is ignored. +++# +++# Example, +++# ocsp.responderCertIssuerName="CN=Enterprise CA, O=XYZ Corp" +++ +++# +++# Serial number of the OCSP responder's certificate +++# +++# By default, the certificate of the OCSP responder is that of the issuer +++# of the certificate being validated. This property identifies the certificate +++# of the OCSP responder when the default does not apply. Its value is a string +++# of hexadecimal digits (colon or space separators may be present) which +++# identifies a certificate in the set of certificates supplied during cert path +++# validation. When this property is set then the "ocsp.responderCertIssuerName" +++# property must also be set. When the "ocsp.responderCertSubjectName" property +++# is set then this property is ignored. +++# +++# Example, +++# ocsp.responderCertSerialNumber=2A:FF:00 +++ +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8006882-jmockit.patch openjdk-6-6b27-1.12.6/patches/openjdk/8006882-jmockit.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8006882-jmockit.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8006882-jmockit.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,90 @@ ++# HG changeset patch ++# User mchung ++# Date 1382735820 -3600 ++# Fri Oct 25 22:17:00 2013 +0100 ++# Node ID 695dd7ceb9e34fd4058374de63964c205f061002 ++# Parent 5b485ecccea9064e5036e1bb040fc2af1f773c20 ++8006882: Proxy generated classes in sun.proxy package breaks JMockit ++Reviewed-by: alanb, ahgross ++ ++diff -r 5b485ecccea9 -r 695dd7ceb9e3 src/share/classes/java/lang/reflect/Proxy.java ++--- openjdk/jdk/src/share/classes/java/lang/reflect/Proxy.java Fri Oct 25 22:11:26 2013 +0100 +++++ openjdk/jdk/src/share/classes/java/lang/reflect/Proxy.java Fri Oct 25 22:17:00 2013 +0100 ++@@ -609,7 +609,7 @@ ++ } ++ ++ if (proxyPkg == null) { ++- // if no non-public proxy interfaces, use sun.proxy package +++ // if no non-public proxy interfaces, use com.sun.proxy package ++ proxyPkg = ReflectUtil.PROXY_PACKAGE + "."; ++ } ++ ++diff -r 5b485ecccea9 -r 695dd7ceb9e3 src/share/classes/sun/reflect/misc/ReflectUtil.java ++--- openjdk/jdk/src/share/classes/sun/reflect/misc/ReflectUtil.java Fri Oct 25 22:11:26 2013 +0100 +++++ openjdk/jdk/src/share/classes/sun/reflect/misc/ReflectUtil.java Fri Oct 25 22:17:00 2013 +0100 ++@@ -246,7 +246,7 @@ ++ } ++ } ++ ++- public static final String PROXY_PACKAGE = "sun.proxy"; +++ public static final String PROXY_PACKAGE = "com.sun.proxy"; ++ ++ /** ++ * Test if the given class is a proxy class that implements ++diff -r 5b485ecccea9 -r 695dd7ceb9e3 src/share/lib/security/java.security ++--- openjdk/jdk/src/share/lib/security/java.security Fri Oct 25 22:11:26 2013 +0100 +++++ openjdk/jdk/src/share/lib/security/java.security Fri Oct 25 22:17:00 2013 +0100 ++@@ -132,6 +132,7 @@ ++ com.sun.imageio.,\ ++ com.sun.istack.internal.,\ ++ com.sun.jmx.,\ +++ com.sun.proxy.,\ ++ com.sun.org.apache.bcel.internal.,\ ++ com.sun.org.apache.regexp.internal.,\ ++ com.sun.org.apache.xerces.internal.,\ ++@@ -167,6 +168,7 @@ ++ com.sun.imageio.,\ ++ com.sun.istack.internal.,\ ++ com.sun.jmx.,\ +++ com.sun.proxy.,\ ++ com.sun.org.apache.bcel.internal.,\ ++ com.sun.org.apache.regexp.internal.,\ ++ com.sun.org.apache.xerces.internal.,\ ++diff -r 5b485ecccea9 -r 695dd7ceb9e3 src/share/lib/security/java.security-solaris ++--- openjdk/jdk/src/share/lib/security/java.security-solaris Fri Oct 25 22:11:26 2013 +0100 +++++ openjdk/jdk/src/share/lib/security/java.security-solaris Fri Oct 25 22:17:00 2013 +0100 ++@@ -133,6 +133,7 @@ ++ com.sun.imageio.,\ ++ com.sun.istack.internal.,\ ++ com.sun.jmx.,\ +++ com.sun.proxy.,\ ++ com.sun.org.apache.bcel.internal.,\ ++ com.sun.org.apache.regexp.internal.,\ ++ com.sun.org.apache.xerces.internal.,\ ++@@ -169,6 +170,7 @@ ++ com.sun.imageio.,\ ++ com.sun.istack.internal.,\ ++ com.sun.jmx.,\ +++ com.sun.proxy.,\ ++ com.sun.org.apache.bcel.internal.,\ ++ com.sun.org.apache.regexp.internal.,\ ++ com.sun.org.apache.xerces.internal.,\ ++diff -r 5b485ecccea9 -r 695dd7ceb9e3 src/share/lib/security/java.security-windows ++--- openjdk/jdk/src/share/lib/security/java.security-windows Fri Oct 25 22:11:26 2013 +0100 +++++ openjdk/jdk/src/share/lib/security/java.security-windows Fri Oct 25 22:17:00 2013 +0100 ++@@ -133,6 +133,7 @@ ++ com.sun.imageio.,\ ++ com.sun.istack.internal.,\ ++ com.sun.jmx.,\ +++ com.sun.proxy.,\ ++ com.sun.org.apache.bcel.internal.,\ ++ com.sun.org.apache.regexp.internal.,\ ++ com.sun.org.apache.xerces.internal.,\ ++@@ -170,6 +171,7 @@ ++ com.sun.imageio.,\ ++ com.sun.istack.internal.,\ ++ com.sun.jmx.,\ +++ com.sun.proxy.,\ ++ com.sun.org.apache.bcel.internal.,\ ++ com.sun.org.apache.regexp.internal.,\ ++ com.sun.org.apache.xerces.internal.,\ +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8006900-new_date_time.patch openjdk-6-6b27-1.12.6/patches/openjdk/8006900-new_date_time.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8006900-new_date_time.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8006900-new_date_time.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,115 @@ ++# HG changeset patch ++# User okutsu ++# Date 1374215521 -32400 ++# Fri Jul 19 15:32:01 2013 +0900 ++# Node ID f38a3c5421df4697851a4b4d491071c3a30e5378 ++# Parent 5d81a5f8a3791316367990b35b1ad5faef42d773 ++8006900: Add new date/time capability ++Reviewed-by: mchung, hawtin ++ ++diff -r 5d81a5f8a379 -r f38a3c5421df src/share/classes/java/util/TimeZone.java ++--- openjdk/jdk/src/share/classes/java/util/TimeZone.java Tue Oct 15 15:04:24 2013 +0100 +++++ openjdk/jdk/src/share/classes/java/util/TimeZone.java Fri Jul 19 15:32:01 2013 +0900 ++@@ -170,6 +170,11 @@ ++ // Proclaim serialization compatibility with JDK 1.1 ++ static final long serialVersionUID = 3581463369166924961L; ++ +++ // TimeZone.setDefault maintains the compatible behavior of the AppContext-based +++ // default setting for untrusted code if allowSetDefault is true. +++ private static final boolean allowSetDefault = AccessController.doPrivileged( +++ new sun.security.action.GetPropertyAction("jdk.util.TimeZone.allowSetDefault")) != null; +++ ++ /** ++ * Gets the time zone offset, for current date, modified in case of ++ * daylight savings. This is the offset to add to UTC to get local time. ++@@ -616,6 +621,9 @@ ++ sm.checkPermission(new PropertyPermission ++ ("user.timezone", "write")); ++ } catch (SecurityException e) { +++ if (!allowSetDefault) { +++ throw e; +++ } ++ hasPermission = false; ++ } ++ } ++@@ -646,6 +654,7 @@ ++ * Returns the default TimeZone in an AppContext if any AppContext ++ * has ever used. null is returned if any AppContext hasn't been ++ * used or if the AppContext doesn't have the default TimeZone. +++ * null is also returned if allowSetDefault is false. ++ * ++ * Note that javaAWTAccess may be null if sun.awt.AppContext class hasn't ++ * been loaded. If so, it implies that AWTSecurityManager is not our ++@@ -653,18 +662,20 @@ ++ * This works around a build time issue. ++ */ ++ private static TimeZone getDefaultInAppContext() { ++- // JavaAWTAccess provides access implementation-private methods without using reflection. ++- JavaAWTAccess javaAWTAccess = SharedSecrets.getJavaAWTAccess(); ++- if (javaAWTAccess == null) { ++- return mainAppContextDefault; ++- } else { ++- if (!javaAWTAccess.isDisposed()) { ++- TimeZone tz = (TimeZone) ++- javaAWTAccess.get(TimeZone.class); ++- if (tz == null && javaAWTAccess.isMainAppContext()) { ++- return mainAppContextDefault; ++- } else { ++- return tz; +++ if (allowSetDefault) { +++ // JavaAWTAccess provides access implementation-private methods without using reflection. +++ JavaAWTAccess javaAWTAccess = SharedSecrets.getJavaAWTAccess(); +++ if (javaAWTAccess == null) { +++ return mainAppContextDefault; +++ } else { +++ if (!javaAWTAccess.isDisposed()) { +++ TimeZone tz = (TimeZone) +++ javaAWTAccess.get(TimeZone.class); +++ if (tz == null && javaAWTAccess.isMainAppContext()) { +++ return mainAppContextDefault; +++ } else { +++ return tz; +++ } ++ } ++ } ++ } ++@@ -672,9 +683,9 @@ ++ } ++ ++ /** ++- * Sets the default TimeZone in the AppContext to the given ++- * tz. null is handled special: do nothing if any AppContext ++- * hasn't been used, remove the default TimeZone in the +++ * Sets the default TimeZone in the AppContext to the given tz if +++ * allowSetDefault is true. null is handled special: do nothing if any +++ * AppContext hasn't been used, remove the default TimeZone in the ++ * AppContext otherwise. ++ * ++ * Note that javaAWTAccess may be null if sun.awt.AppContext class hasn't ++@@ -683,15 +694,17 @@ ++ * This works around a build time issue. ++ */ ++ private static void setDefaultInAppContext(TimeZone tz) { ++- // JavaAWTAccess provides access implementation-private methods without using reflection. ++- JavaAWTAccess javaAWTAccess = SharedSecrets.getJavaAWTAccess(); ++- if (javaAWTAccess == null) { ++- mainAppContextDefault = tz; ++- } else { ++- if (!javaAWTAccess.isDisposed()) { ++- javaAWTAccess.put(TimeZone.class, tz); ++- if (javaAWTAccess.isMainAppContext()) { ++- mainAppContextDefault = null; +++ if (allowSetDefault) { +++ // JavaAWTAccess provides access implementation-private methods without using reflection. +++ JavaAWTAccess javaAWTAccess = SharedSecrets.getJavaAWTAccess(); +++ if (javaAWTAccess == null) { +++ mainAppContextDefault = tz; +++ } else { +++ if (!javaAWTAccess.isDisposed()) { +++ javaAWTAccess.put(TimeZone.class, tz); +++ if (javaAWTAccess.isMainAppContext()) { +++ mainAppContextDefault = null; +++ } ++ } ++ } ++ } +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8008589-better_mbean_permission_validation.patch openjdk-6-6b27-1.12.6/patches/openjdk/8008589-better_mbean_permission_validation.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8008589-better_mbean_permission_validation.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8008589-better_mbean_permission_validation.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,61 @@ ++# HG changeset patch ++# User dsamersoff ++# Date 1373279676 -14400 ++# Mon Jul 08 14:34:36 2013 +0400 ++# Node ID db4712506571ae3ae2d37b91e63641b18c3258f2 ++# Parent f38a3c5421df4697851a4b4d491071c3a30e5378 ++8008589: Better MBean permission validation ++Summary: Better MBean permission validation ++Reviewed-by: skoivu, dfuchs, mchung, sjiang ++ ++diff -r f38a3c5421df -r db4712506571 src/share/classes/javax/management/MBeanTrustPermission.java ++--- openjdk/jdk/src/share/classes/javax/management/MBeanTrustPermission.java Fri Jul 19 15:32:01 2013 +0900 +++++ openjdk/jdk/src/share/classes/javax/management/MBeanTrustPermission.java Mon Jul 08 14:34:36 2013 +0400 ++@@ -26,6 +26,9 @@ ++ package javax.management; ++ ++ import java.security.BasicPermission; +++import java.io.IOException; +++import java.io.InvalidObjectException; +++import java.io.ObjectInputStream; ++ ++ /** ++ * This permission represents "trust" in a signer or codebase. ++@@ -75,15 +78,31 @@ ++ */ ++ public MBeanTrustPermission(String name, String actions) { ++ super(name, actions); +++ validate(name,actions); +++ } +++ +++ private static void validate(String name, String actions) { ++ /* Check that actions is a null empty string */ ++- if (actions != null && actions.length() > 0) ++- throw new IllegalArgumentException("MBeanTrustPermission " + ++- "actions must be null: " + +++ if (actions != null && actions.length() > 0) { +++ throw new IllegalArgumentException("MBeanTrustPermission actions must be null: " + ++ actions); +++ } ++ ++- if (!name.equals("register") && !name.equals("*")) ++- throw new IllegalArgumentException("MBeanTrustPermission: " + ++- "Unknown target name " + +++ if (!name.equals("register") && !name.equals("*")) { +++ throw new IllegalArgumentException("MBeanTrustPermission: Unknown target name " + ++ "[" + name + "]"); +++ } +++ } +++ +++ private void readObject(ObjectInputStream in) +++ throws IOException, ClassNotFoundException { +++ +++ // Reading private fields of base class +++ in.defaultReadObject(); +++ try { +++ validate(super.getName(),super.getActions()); +++ } catch (IllegalArgumentException e) { +++ throw new InvalidObjectException(e.getMessage()); +++ } ++ } ++ } +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8010118-caller_sensitive.patch openjdk-6-6b27-1.12.6/patches/openjdk/8010118-caller_sensitive.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8010118-caller_sensitive.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8010118-caller_sensitive.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,2981 @@ ++# HG changeset patch ++# User mchung ++# Date 1382375156 -3600 ++# Mon Oct 21 18:05:56 2013 +0100 ++# Node ID d206cb658a9907c7842c8920f141b3c4eb5efc1f ++# Parent e56220b54fe2d0f09ee151b28d6e8495cea2136f ++8010118: Annotate jdk caller sensitive methods with @sun.reflect.CallerSensitive ++Reviewed-by: alanb, twisti, jrose, kvn ++ ++diff -r e56220b54fe2 -r d206cb658a99 make/java/java/FILES_c.gmk ++--- openjdk/jdk/make/java/java/FILES_c.gmk Wed Oct 16 05:39:53 2013 +0100 +++++ openjdk/jdk/make/java/java/FILES_c.gmk Mon Oct 21 18:05:56 2013 +0100 ++@@ -48,7 +48,6 @@ ++ Proxy.c \ ++ RandomAccessFile.c \ ++ RandomAccessFile_md.c \ ++- ResourceBundle.c \ ++ Runtime.c \ ++ SecurityManager.c \ ++ Shutdown.c \ ++@@ -68,7 +67,6 @@ ++ jdk_util_md.c \ ++ check_version.c \ ++ java_props_md.c \ ++- DriverManager.c \ ++ ConstantPool.c \ ++ MessageUtils.c \ ++ GC.c \ ++diff -r e56220b54fe2 -r d206cb658a99 make/java/java/mapfile-vers ++--- openjdk/jdk/make/java/java/mapfile-vers Wed Oct 16 05:39:53 2013 +0100 +++++ openjdk/jdk/make/java/java/mapfile-vers Mon Oct 21 18:05:56 2013 +0100 ++@@ -237,8 +237,6 @@ ++ Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedExceptionAction_2Ljava_security_AccessControlContext_2; ++ Java_java_security_AccessController_getStackAccessControlContext; ++ Java_java_security_AccessController_getInheritedAccessControlContext; ++- Java_java_sql_DriverManager_getCallerClassLoader; ++- Java_java_util_ResourceBundle_getClassContext; ++ Java_java_util_TimeZone_getSystemTimeZoneID; ++ Java_java_util_TimeZone_getSystemGMTOffsetID; ++ Java_java_util_concurrent_atomic_AtomicLong_VMSupportsCS8; ++diff -r e56220b54fe2 -r d206cb658a99 make/java/java/reorder-i586 ++--- openjdk/jdk/make/java/java/reorder-i586 Wed Oct 16 05:39:53 2013 +0100 +++++ openjdk/jdk/make/java/java/reorder-i586 Mon Oct 21 18:05:56 2013 +0100 ++@@ -73,7 +73,6 @@ ++ # Test Sleep ++ # Test IntToString ++ # Test LoadToolkit ++-text: .text%Java_java_util_ResourceBundle_getClassContext; ++ text: .text%Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2Ljava_security_AccessControlContext_2; ++ text: .text%JNU_GetEnv; ++ text: .text%Java_java_io_UnixFileSystem_checkAccess; ++diff -r e56220b54fe2 -r d206cb658a99 make/java/java/reorder-sparc ++--- openjdk/jdk/make/java/java/reorder-sparc Wed Oct 16 05:39:53 2013 +0100 +++++ openjdk/jdk/make/java/java/reorder-sparc Mon Oct 21 18:05:56 2013 +0100 ++@@ -78,7 +78,6 @@ ++ # Test Sleep ++ # Test IntToString ++ # Test LoadToolkit ++-text: .text%Java_java_util_ResourceBundle_getClassContext; ++ text: .text%Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2Ljava_security_AccessControlContext_2; ++ text: .text%JNU_GetEnv; ++ text: .text%Java_java_io_UnixFileSystem_checkAccess; ++diff -r e56220b54fe2 -r d206cb658a99 make/java/java/reorder-sparcv9 ++--- openjdk/jdk/make/java/java/reorder-sparcv9 Wed Oct 16 05:39:53 2013 +0100 +++++ openjdk/jdk/make/java/java/reorder-sparcv9 Mon Oct 21 18:05:56 2013 +0100 ++@@ -74,7 +74,6 @@ ++ # Test Sleep ++ # Test IntToString ++ # Test LoadToolkit ++-text: .text%Java_java_util_ResourceBundle_getClassContext; ++ text: .text%Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2Ljava_security_AccessControlContext_2; ++ text: .text%JNU_GetEnv; ++ text: .text%Java_java_io_UnixFileSystem_checkAccess; ++diff -r e56220b54fe2 -r d206cb658a99 src/share/classes/java/io/ObjectStreamClass.java ++--- openjdk/jdk/src/share/classes/java/io/ObjectStreamClass.java Wed Oct 16 05:39:53 2013 +0100 +++++ openjdk/jdk/src/share/classes/java/io/ObjectStreamClass.java Mon Oct 21 18:05:56 2013 +0100 ++@@ -49,6 +49,8 @@ ++ import java.util.concurrent.ConcurrentHashMap; ++ import java.util.concurrent.ConcurrentMap; ++ import sun.misc.Unsafe; +++import sun.reflect.CallerSensitive; +++import sun.reflect.Reflection; ++ import sun.reflect.ReflectionFactory; ++ import sun.reflect.misc.ReflectUtil; ++ ++@@ -234,12 +236,13 @@ ++ * ++ * @return the Class instance that this descriptor represents ++ */ +++ @CallerSensitive ++ public Class forClass() { ++ if (cl == null) { ++ return null; ++ } ++- ClassLoader ccl = ObjectStreamField.getCallerClassLoader(); ++- if (ReflectUtil.needsPackageAccessCheck(ccl, cl.getClassLoader())) { +++ Class caller = Reflection.getCallerClass(); +++ if (ReflectUtil.needsPackageAccessCheck(caller.getClassLoader(), cl.getClassLoader())) { ++ ReflectUtil.checkPackageAccess(cl); ++ } ++ return cl; ++diff -r e56220b54fe2 -r d206cb658a99 src/share/classes/java/io/ObjectStreamField.java ++--- openjdk/jdk/src/share/classes/java/io/ObjectStreamField.java Wed Oct 16 05:39:53 2013 +0100 +++++ openjdk/jdk/src/share/classes/java/io/ObjectStreamField.java Mon Oct 21 18:05:56 2013 +0100 ++@@ -26,6 +26,7 @@ ++ package java.io; ++ ++ import java.lang.reflect.Field; +++import sun.reflect.CallerSensitive; ++ import sun.reflect.Reflection; ++ import sun.reflect.misc.ReflectUtil; ++ ++@@ -159,32 +160,15 @@ ++ * @return a Class object representing the type of the ++ * serializable field ++ */ +++ @CallerSensitive ++ public Class getType() { ++- ClassLoader ccl = getCallerClassLoader(); ++- if (ReflectUtil.needsPackageAccessCheck(ccl, type.getClassLoader())) { +++ Class caller = Reflection.getCallerClass(); +++ if (ReflectUtil.needsPackageAccessCheck(caller.getClassLoader(), type.getClassLoader())) { ++ ReflectUtil.checkPackageAccess(type); ++ } ++ return type; ++ } ++ ++- // Returns the invoker's class loader. ++- // This is package private because it is accessed from ObjectStreamClass. ++- // NOTE: This must always be invoked when there is exactly one intervening ++- // frame from the core libraries on the stack between this method's ++- // invocation and the desired invoker. The frame count of 3 is determined ++- // as follows: ++- // ++- // 0: Reflection.getCallerClass ++- // 1: getCallerClassLoader() ++- // 2: ObjectStreamField.getType() or ObjectStreamClass.forClass() ++- // 3: the caller we want to check ++- // ++- // NOTE: copied from java.lang.ClassLoader and modified. ++- static ClassLoader getCallerClassLoader() { ++- Class caller = Reflection.getCallerClass(3); ++- return caller.getClassLoader(); ++- } ++- ++ /** ++ * Returns character encoding of field type. The encoding is as follows: ++ *

++diff -r e56220b54fe2 -r d206cb658a99 src/share/classes/java/lang/Class.java
++--- openjdk/jdk/src/share/classes/java/lang/Class.java	Wed Oct 16 05:39:53 2013 +0100
+++++ openjdk/jdk/src/share/classes/java/lang/Class.java	Mon Oct 21 18:05:56 2013 +0100
++@@ -53,6 +53,7 @@
++ import java.util.Map;
++ import java.util.HashMap;
++ import sun.misc.Unsafe;
+++import sun.reflect.CallerSensitive;
++ import sun.reflect.ConstantPool;
++ import sun.reflect.Reflection;
++ import sun.reflect.ReflectionFactory;
++@@ -183,9 +184,11 @@
++      *            by this method fails
++      * @exception ClassNotFoundException if the class cannot be located
++      */
+++    @CallerSensitive
++     public static Class forName(String className)
++                 throws ClassNotFoundException {
++-        return forName0(className, true, ClassLoader.getCallerClassLoader());
+++        return forName0(className, true,
+++                        ClassLoader.getClassLoader(Reflection.getCallerClass()));
++     }
++ 
++ 
++@@ -249,6 +252,7 @@
++      * @see       java.lang.ClassLoader
++      * @since     1.2
++      */
+++    @CallerSensitive
++     public static Class forName(String name, boolean initialize,
++                                    ClassLoader loader)
++         throws ClassNotFoundException
++@@ -256,7 +260,7 @@
++         if (loader == null) {
++             SecurityManager sm = System.getSecurityManager();
++             if (sm != null) {
++-                ClassLoader ccl = ClassLoader.getCallerClassLoader();
+++                ClassLoader ccl = ClassLoader.getClassLoader(Reflection.getCallerClass());
++                 if (ccl != null) {
++                     sm.checkPermission(
++                         SecurityConstants.GET_CLASSLOADER_PERMISSION);
++@@ -318,18 +322,14 @@
++      *             
++      *
++      */
+++    @CallerSensitive
++     public T newInstance()
++         throws InstantiationException, IllegalAccessException
++     {
++         if (System.getSecurityManager() != null) {
++-            checkMemberAccess(Member.PUBLIC, ClassLoader.getCallerClassLoader(), false);
+++            checkMemberAccess(Member.PUBLIC, Reflection.getCallerClass(), false);
++         }
++-        return newInstance0();
++-    }
++ 
++-    private T newInstance0()
++-        throws InstantiationException, IllegalAccessException
++-    {
++         // NOTE: the following code may not be strictly correct under
++         // the current Java memory model.
++ 
++@@ -363,7 +363,7 @@
++         // Security check (same as in java.lang.reflect.Constructor)
++         int modifiers = tmpConstructor.getModifiers();
++         if (!Reflection.quickCheckMemberAccess(this, modifiers)) {
++-            Class caller = Reflection.getCallerClass(3);
+++            Class caller = Reflection.getCallerClass();
++             if (newInstanceCallerCache != caller) {
++                 Reflection.ensureMemberAccess(caller, this, null, modifiers);
++                 newInstanceCallerCache = caller;
++@@ -602,16 +602,14 @@
++      * @see SecurityManager#checkPermission
++      * @see java.lang.RuntimePermission
++      */
+++    @CallerSensitive
++     public ClassLoader getClassLoader() {
++         ClassLoader cl = getClassLoader0();
++         if (cl == null)
++             return null;
++         SecurityManager sm = System.getSecurityManager();
++         if (sm != null) {
++-            ClassLoader ccl = ClassLoader.getCallerClassLoader();
++-            if (ccl != null && ccl != cl && !cl.isAncestor(ccl)) {
++-                sm.checkPermission(SecurityConstants.GET_CLASSLOADER_PERMISSION);
++-            }
+++            ClassLoader.checkClassLoaderPermission(cl, Reflection.getCallerClass());
++         }
++         return cl;
++     }
++@@ -891,6 +889,7 @@
++      *     that class is a local or anonymous class; otherwise {@code null}.
++      * @since 1.5
++      */
+++    @CallerSensitive
++     public Method getEnclosingMethod() {
++         EnclosingMethodInfo enclosingInfo = getEnclosingMethodInfo();
++ 
++@@ -920,7 +919,7 @@
++             //
++             // Note that we need to do this on the enclosing class
++             enclosingCandidate.checkMemberAccess(Member.DECLARED,
++-                        ClassLoader.getCallerClassLoader(), true);
+++                                                 Reflection.getCallerClass(), true);
++             /*
++              * Loop over all declared methods; match method name,
++              * number of and type of parameters, *and* return
++@@ -1028,6 +1027,7 @@
++      *     that class is a local or anonymous class; otherwise {@code null}.
++      * @since 1.5
++      */
+++    @CallerSensitive
++     public Constructor getEnclosingConstructor() {
++         EnclosingMethodInfo enclosingInfo = getEnclosingMethodInfo();
++ 
++@@ -1056,7 +1056,7 @@
++             //
++             // Note that we need to do this on the enclosing class
++             enclosingCandidate.checkMemberAccess(Member.DECLARED,
++-                        ClassLoader.getCallerClassLoader(), true);
+++                                                 Reflection.getCallerClass(), true);
++             /*
++              * Loop over all declared constructors; match number
++              * of and type of parameters.
++@@ -1103,6 +1103,7 @@
++      * @return the immediately enclosing class of the underlying class
++      * @since 1.5
++      */
+++    @CallerSensitive
++     public Class getEnclosingClass() {
++         // There are five kinds of classes (or interfaces):
++         // a) Top level classes
++@@ -1135,7 +1136,7 @@
++         // see java.lang.SecurityManager.checkMemberAccess
++         if (enclosingCandidate != null) {
++             enclosingCandidate.checkMemberAccess(Member.DECLARED,
++-                    ClassLoader.getCallerClassLoader(), true);
+++                                                 Reflection.getCallerClass(), true);
++         }
++         return enclosingCandidate;
++     }
++@@ -1320,11 +1321,12 @@
++      *
++      * @since JDK1.1
++      */
+++    @CallerSensitive
++     public Class[] getClasses() {
++         // be very careful not to change the stack depth of this
++         // checkMemberAccess call for security reasons
++         // see java.lang.SecurityManager.checkMemberAccess
++-        checkMemberAccess(Member.PUBLIC, ClassLoader.getCallerClassLoader(), false);
+++        checkMemberAccess(Member.PUBLIC, Reflection.getCallerClass(), false);
++ 
++         // Privileged so this implementation can look at DECLARED classes,
++         // something the caller might not have privilege to do.  The code here
++@@ -1398,11 +1400,12 @@
++      *
++      * @since JDK1.1
++      */
+++    @CallerSensitive
++     public Field[] getFields() throws SecurityException {
++         // be very careful not to change the stack depth of this
++         // checkMemberAccess call for security reasons
++         // see java.lang.SecurityManager.checkMemberAccess
++-        checkMemberAccess(Member.PUBLIC, ClassLoader.getCallerClassLoader(), true);
+++        checkMemberAccess(Member.PUBLIC, Reflection.getCallerClass(), true);
++         return copyFields(privateGetPublicFields(null));
++     }
++ 
++@@ -1449,11 +1452,12 @@
++      *
++      * @since JDK1.1
++      */
+++    @CallerSensitive
++     public Method[] getMethods() throws SecurityException {
++         // be very careful not to change the stack depth of this
++         // checkMemberAccess call for security reasons
++         // see java.lang.SecurityManager.checkMemberAccess
++-        checkMemberAccess(Member.PUBLIC, ClassLoader.getCallerClassLoader(), true);
+++        checkMemberAccess(Member.PUBLIC, Reflection.getCallerClass(), true);
++         return copyMethods(privateGetPublicMethods());
++     }
++ 
++@@ -1498,11 +1502,12 @@
++      *
++      * @since JDK1.1
++      */
+++    @CallerSensitive
++     public Constructor[] getConstructors() throws SecurityException {
++         // be very careful not to change the stack depth of this
++         // checkMemberAccess call for security reasons
++         // see java.lang.SecurityManager.checkMemberAccess
++-        checkMemberAccess(Member.PUBLIC, ClassLoader.getCallerClassLoader(), true);
+++        checkMemberAccess(Member.PUBLIC, Reflection.getCallerClass(), true);
++         return copyConstructors(privateGetDeclaredConstructors(true));
++     }
++ 
++@@ -1556,12 +1561,13 @@
++      *
++      * @since JDK1.1
++      */
+++    @CallerSensitive
++     public Field getField(String name)
++         throws NoSuchFieldException, SecurityException {
++         // be very careful not to change the stack depth of this
++         // checkMemberAccess call for security reasons
++         // see java.lang.SecurityManager.checkMemberAccess
++-        checkMemberAccess(Member.PUBLIC, ClassLoader.getCallerClassLoader(), true);
+++        checkMemberAccess(Member.PUBLIC, Reflection.getCallerClass(), true);
++         Field field = getField0(name);
++         if (field == null) {
++             throw new NoSuchFieldException(name);
++@@ -1641,12 +1647,13 @@
++      *
++      * @since JDK1.1
++      */
+++    @CallerSensitive
++     public Method getMethod(String name, Class... parameterTypes)
++         throws NoSuchMethodException, SecurityException {
++         // be very careful not to change the stack depth of this
++         // checkMemberAccess call for security reasons
++         // see java.lang.SecurityManager.checkMemberAccess
++-        checkMemberAccess(Member.PUBLIC, ClassLoader.getCallerClassLoader(), true);
+++        checkMemberAccess(Member.PUBLIC, Reflection.getCallerClass(), true);
++         Method method = getMethod0(name, parameterTypes);
++         if (method == null) {
++             throw new NoSuchMethodException(getName() + "." + name + argumentTypesToString(parameterTypes));
++@@ -1695,12 +1702,13 @@
++      *
++      * @since JDK1.1
++      */
+++    @CallerSensitive
++     public Constructor getConstructor(Class... parameterTypes)
++         throws NoSuchMethodException, SecurityException {
++         // be very careful not to change the stack depth of this
++         // checkMemberAccess call for security reasons
++         // see java.lang.SecurityManager.checkMemberAccess
++-        checkMemberAccess(Member.PUBLIC, ClassLoader.getCallerClassLoader(), true);
+++        checkMemberAccess(Member.PUBLIC, Reflection.getCallerClass(), true);
++         return getConstructor0(parameterTypes, Member.PUBLIC);
++     }
++ 
++@@ -1738,11 +1746,12 @@
++      *
++      * @since JDK1.1
++      */
+++    @CallerSensitive
++     public Class[] getDeclaredClasses() throws SecurityException {
++         // be very careful not to change the stack depth of this
++         // checkMemberAccess call for security reasons
++         // see java.lang.SecurityManager.checkMemberAccess
++-        checkMemberAccess(Member.DECLARED, ClassLoader.getCallerClassLoader(), false);
+++        checkMemberAccess(Member.DECLARED, Reflection.getCallerClass(), false);
++         return getDeclaredClasses0();
++     }
++ 
++@@ -1782,11 +1791,12 @@
++      *
++      * @since JDK1.1
++      */
+++    @CallerSensitive
++     public Field[] getDeclaredFields() throws SecurityException {
++         // be very careful not to change the stack depth of this
++         // checkMemberAccess call for security reasons
++         // see java.lang.SecurityManager.checkMemberAccess
++-        checkMemberAccess(Member.DECLARED, ClassLoader.getCallerClassLoader(), true);
+++        checkMemberAccess(Member.DECLARED, Reflection.getCallerClass(), true);
++         return copyFields(privateGetDeclaredFields(false));
++     }
++ 
++@@ -1830,11 +1840,12 @@
++      *
++      * @since JDK1.1
++      */
+++    @CallerSensitive
++     public Method[] getDeclaredMethods() throws SecurityException {
++         // be very careful not to change the stack depth of this
++         // checkMemberAccess call for security reasons
++         // see java.lang.SecurityManager.checkMemberAccess
++-        checkMemberAccess(Member.DECLARED, ClassLoader.getCallerClassLoader(), true);
+++        checkMemberAccess(Member.DECLARED, Reflection.getCallerClass(), true);
++         return copyMethods(privateGetDeclaredMethods(false));
++     }
++ 
++@@ -1875,11 +1886,12 @@
++      *
++      * @since JDK1.1
++      */
+++    @CallerSensitive
++     public Constructor[] getDeclaredConstructors() throws SecurityException {
++         // be very careful not to change the stack depth of this
++         // checkMemberAccess call for security reasons
++         // see java.lang.SecurityManager.checkMemberAccess
++-        checkMemberAccess(Member.DECLARED, ClassLoader.getCallerClassLoader(), true);
+++        checkMemberAccess(Member.DECLARED, Reflection.getCallerClass(), true);
++         return copyConstructors(privateGetDeclaredConstructors(false));
++     }
++ 
++@@ -1918,12 +1930,13 @@
++      *
++      * @since JDK1.1
++      */
+++    @CallerSensitive
++     public Field getDeclaredField(String name)
++         throws NoSuchFieldException, SecurityException {
++         // be very careful not to change the stack depth of this
++         // checkMemberAccess call for security reasons
++         // see java.lang.SecurityManager.checkMemberAccess
++-        checkMemberAccess(Member.DECLARED, ClassLoader.getCallerClassLoader(), true);
+++        checkMemberAccess(Member.DECLARED, Reflection.getCallerClass(), true);
++         Field field = searchFields(privateGetDeclaredFields(false), name);
++         if (field == null) {
++             throw new NoSuchFieldException(name);
++@@ -1973,12 +1986,13 @@
++      *
++      * @since JDK1.1
++      */
+++    @CallerSensitive
++     public Method getDeclaredMethod(String name, Class... parameterTypes)
++         throws NoSuchMethodException, SecurityException {
++         // be very careful not to change the stack depth of this
++         // checkMemberAccess call for security reasons
++         // see java.lang.SecurityManager.checkMemberAccess
++-        checkMemberAccess(Member.DECLARED, ClassLoader.getCallerClassLoader(), true);
+++        checkMemberAccess(Member.DECLARED, Reflection.getCallerClass(), true);
++         Method method = searchMethods(privateGetDeclaredMethods(false), name, parameterTypes);
++         if (method == null) {
++             throw new NoSuchMethodException(getName() + "." + name + argumentTypesToString(parameterTypes));
++@@ -2023,12 +2037,13 @@
++      *
++      * @since JDK1.1
++      */
+++    @CallerSensitive
++     public Constructor getDeclaredConstructor(Class... parameterTypes)
++         throws NoSuchMethodException, SecurityException {
++         // be very careful not to change the stack depth of this
++         // checkMemberAccess call for security reasons
++         // see java.lang.SecurityManager.checkMemberAccess
++-        checkMemberAccess(Member.DECLARED, ClassLoader.getCallerClassLoader(), true);
+++        checkMemberAccess(Member.DECLARED, Reflection.getCallerClass(), true);
++         return getConstructor0(parameterTypes, Member.DECLARED);
++     }
++ 
++@@ -2186,23 +2201,40 @@
++      */
++     static native Class getPrimitiveClass(String name);
++ 
+++    private static boolean isCheckMemberAccessOverridden(SecurityManager smgr) {
+++        if (smgr.getClass() == SecurityManager.class) return false;
+++
+++        Class[] paramTypes = new Class[] {Class.class, int.class};
+++        return smgr.getClass().getMethod0("checkMemberAccess", paramTypes).
+++                getDeclaringClass() != SecurityManager.class;
+++    }
+++
++ 
++     /*
++      * Check if client is allowed to access members.  If access is denied,
++      * throw a SecurityException.
++      *
++-     * Be very careful not to change the stack depth of this checkMemberAccess
++-     * call for security reasons.
++-     * See java.lang.SecurityManager.checkMemberAccess.
++-     *
++      * 

Default policy: allow all clients access with normal Java access ++ * control. ++ */ ++- private void checkMemberAccess(int which, ClassLoader ccl, boolean checkProxyInterfaces) { ++- SecurityManager s = System.getSecurityManager(); +++ private void checkMemberAccess(int which, Class caller, boolean checkProxyInterfaces) { +++ final SecurityManager s = System.getSecurityManager(); ++ if (s != null) { ++- s.checkMemberAccess(this, which); ++- ClassLoader cl = getClassLoader0(); +++ final ClassLoader ccl = ClassLoader.getClassLoader(caller); +++ final ClassLoader cl = getClassLoader0(); +++ if (!isCheckMemberAccessOverridden(s)) { +++ // Inlined SecurityManager.checkMemberAccess +++ if (which != Member.PUBLIC) { +++ if (ccl != cl) { +++ s.checkPermission(SecurityConstants.CHECK_MEMBER_ACCESS_PERMISSION); +++ } +++ } +++ } else { +++ // Don't refactor; otherwise break the stack depth for +++ // checkMemberAccess of subclasses of SecurityManager as specified. +++ s.checkMemberAccess(this, which); +++ } +++ ++ if (ReflectUtil.needsPackageAccessCheck(ccl, cl)) { ++ ++ String name = this.getName(); ++diff -r e56220b54fe2 -r d206cb658a99 src/share/classes/java/lang/ClassLoader.java ++--- openjdk/jdk/src/share/classes/java/lang/ClassLoader.java Wed Oct 16 05:39:53 2013 +0100 +++++ openjdk/jdk/src/share/classes/java/lang/ClassLoader.java Mon Oct 21 18:05:56 2013 +0100 ++@@ -52,6 +52,7 @@ ++ import sun.misc.Resource; ++ import sun.misc.URLClassPath; ++ import sun.misc.VM; +++import sun.reflect.CallerSensitive; ++ import sun.reflect.Reflection; ++ import sun.security.util.SecurityConstants; ++ ++@@ -1214,15 +1215,13 @@ ++ * ++ * @since 1.2 ++ */ +++ @CallerSensitive ++ public final ClassLoader getParent() { ++ if (parent == null) ++ return null; ++ SecurityManager sm = System.getSecurityManager(); ++ if (sm != null) { ++- ClassLoader ccl = getCallerClassLoader(); ++- if (ccl != null && !isAncestor(ccl)) { ++- sm.checkPermission(SecurityConstants.GET_CLASSLOADER_PERMISSION); ++- } +++ checkClassLoaderPermission(parent, Reflection.getCallerClass()); ++ } ++ return parent; ++ } ++@@ -1282,6 +1281,7 @@ ++ * ++ * @revised 1.4 ++ */ +++ @CallerSensitive ++ public static ClassLoader getSystemClassLoader() { ++ initSystemClassLoader(); ++ if (scl == null) { ++@@ -1289,10 +1289,7 @@ ++ } ++ SecurityManager sm = System.getSecurityManager(); ++ if (sm != null) { ++- ClassLoader ccl = getCallerClassLoader(); ++- if (ccl != null && ccl != scl && !scl.isAncestor(ccl)) { ++- sm.checkPermission(SecurityConstants.GET_CLASSLOADER_PERMISSION); ++- } +++ checkClassLoaderPermission(scl, Reflection.getCallerClass()); ++ } ++ return scl; ++ } ++@@ -1341,13 +1338,25 @@ ++ return false; ++ } ++ ++- // Returns the invoker's class loader, or null if none. ++- // NOTE: This must always be invoked when there is exactly one intervening ++- // frame from the core libraries on the stack between this method's ++- // invocation and the desired invoker. ++- static ClassLoader getCallerClassLoader() { ++- // NOTE use of more generic Reflection.getCallerClass() ++- Class caller = Reflection.getCallerClass(3); +++ // Tests if class loader access requires "getClassLoader" permission +++ // check. A class loader 'from' can access class loader 'to' if +++ // class loader 'from' is same as class loader 'to' or an ancestor +++ // of 'to'. The class loader in a system domain can access +++ // any class loader. +++ private static boolean needsClassLoaderPermissionCheck(ClassLoader from, +++ ClassLoader to) +++ { +++ if (from == to) +++ return false; +++ +++ if (from == null) +++ return false; +++ +++ return !to.isAncestor(from); +++ } +++ +++ // Returns the class's class loader, or null if none. +++ static ClassLoader getClassLoader(Class caller) { ++ // This can be null if the VM is requesting it ++ if (caller == null) { ++ return null; ++@@ -1356,6 +1365,17 @@ ++ return caller.getClassLoader0(); ++ } ++ +++ static void checkClassLoaderPermission(ClassLoader cl, Class caller) { +++ SecurityManager sm = System.getSecurityManager(); +++ if (sm != null) { +++ // caller can be null if the VM is requesting it +++ ClassLoader ccl = getClassLoader(caller); +++ if (needsClassLoaderPermissionCheck(ccl, cl)) { +++ sm.checkPermission(SecurityConstants.GET_CLASSLOADER_PERMISSION); +++ } +++ } +++ } +++ ++ // The class loader for the system ++ private static ClassLoader scl; ++ ++diff -r e56220b54fe2 -r d206cb658a99 src/share/classes/java/lang/Package.java ++--- openjdk/jdk/src/share/classes/java/lang/Package.java Wed Oct 16 05:39:53 2013 +0100 +++++ openjdk/jdk/src/share/classes/java/lang/Package.java Mon Oct 21 18:05:56 2013 +0100 ++@@ -47,9 +47,10 @@ ++ import java.util.HashMap; ++ import java.util.Iterator; ++ +++import java.lang.annotation.Annotation; ++ import sun.net.www.ParseUtil; ++- ++-import java.lang.annotation.Annotation; +++import sun.reflect.CallerSensitive; +++import sun.reflect.Reflection; ++ ++ /** ++ * {@code Package} objects contain version information ++@@ -273,8 +274,9 @@ ++ * @return the package of the requested name. It may be null if no package ++ * information is available from the archive or codebase. ++ */ +++ @CallerSensitive ++ public static Package getPackage(String name) { ++- ClassLoader l = ClassLoader.getCallerClassLoader(); +++ ClassLoader l = ClassLoader.getClassLoader(Reflection.getCallerClass()); ++ if (l != null) { ++ return l.getPackage(name); ++ } else { ++@@ -294,8 +296,9 @@ ++ * @return a new array of packages known to the callers {@code ClassLoader} ++ * instance. An zero length array is returned if none are known. ++ */ +++ @CallerSensitive ++ public static Package[] getPackages() { ++- ClassLoader l = ClassLoader.getCallerClassLoader(); +++ ClassLoader l = ClassLoader.getClassLoader(Reflection.getCallerClass()); ++ if (l != null) { ++ return l.getPackages(); ++ } else { ++diff -r e56220b54fe2 -r d206cb658a99 src/share/classes/java/lang/Runtime.java ++--- openjdk/jdk/src/share/classes/java/lang/Runtime.java Wed Oct 16 05:39:53 2013 +0100 +++++ openjdk/jdk/src/share/classes/java/lang/Runtime.java Mon Oct 21 18:05:56 2013 +0100 ++@@ -27,6 +27,8 @@ ++ ++ import java.io.*; ++ import java.util.StringTokenizer; +++import sun.reflect.CallerSensitive; +++import sun.reflect.Reflection; ++ ++ /** ++ * Every Java application has a single instance of class ++@@ -771,8 +773,9 @@ ++ * @see java.lang.SecurityException ++ * @see java.lang.SecurityManager#checkLink(java.lang.String) ++ */ +++ @CallerSensitive ++ public void load(String filename) { ++- load0(System.getCallerClass(), filename); +++ load0(Reflection.getCallerClass(), filename); ++ } ++ ++ synchronized void load0(Class fromClass, String filename) { ++@@ -824,8 +827,9 @@ ++ * @see java.lang.SecurityException ++ * @see java.lang.SecurityManager#checkLink(java.lang.String) ++ */ +++ @CallerSensitive ++ public void loadLibrary(String libname) { ++- loadLibrary0(System.getCallerClass(), libname); +++ loadLibrary0(Reflection.getCallerClass(), libname); ++ } ++ ++ synchronized void loadLibrary0(Class fromClass, String libname) { ++diff -r e56220b54fe2 -r d206cb658a99 src/share/classes/java/lang/System.java ++--- openjdk/jdk/src/share/classes/java/lang/System.java Wed Oct 16 05:39:53 2013 +0100 +++++ openjdk/jdk/src/share/classes/java/lang/System.java Mon Oct 21 18:05:56 2013 +0100 ++@@ -35,6 +35,7 @@ ++ import java.nio.channels.spi.SelectorProvider; ++ import sun.nio.ch.Interruptible; ++ import sun.net.InetAddressCachePolicy; +++import sun.reflect.CallerSensitive; ++ import sun.reflect.Reflection; ++ import sun.security.util.SecurityConstants; ++ import sun.reflect.annotation.AnnotationType; ++@@ -1018,8 +1019,9 @@ ++ * @see java.lang.Runtime#load(java.lang.String) ++ * @see java.lang.SecurityManager#checkLink(java.lang.String) ++ */ +++ @CallerSensitive ++ public static void load(String filename) { ++- Runtime.getRuntime().load0(getCallerClass(), filename); +++ Runtime.getRuntime().load0(Reflection.getCallerClass(), filename); ++ } ++ ++ /** ++@@ -1043,8 +1045,9 @@ ++ * @see java.lang.Runtime#loadLibrary(java.lang.String) ++ * @see java.lang.SecurityManager#checkLink(java.lang.String) ++ */ +++ @CallerSensitive ++ public static void loadLibrary(String libname) { ++- Runtime.getRuntime().loadLibrary0(getCallerClass(), libname); +++ Runtime.getRuntime().loadLibrary0(Reflection.getCallerClass(), libname); ++ } ++ ++ /** ++@@ -1157,10 +1160,4 @@ ++ } ++ }); ++ } ++- ++- /* returns the class of the caller. */ ++- static Class getCallerClass() { ++- // NOTE use of more generic Reflection.getCallerClass() ++- return Reflection.getCallerClass(3); ++- } ++ } ++diff -r e56220b54fe2 -r d206cb658a99 src/share/classes/java/lang/Thread.java ++--- openjdk/jdk/src/share/classes/java/lang/Thread.java Wed Oct 16 05:39:53 2013 +0100 +++++ openjdk/jdk/src/share/classes/java/lang/Thread.java Mon Oct 21 18:05:56 2013 +0100 ++@@ -34,6 +34,8 @@ ++ import java.util.concurrent.locks.LockSupport; ++ import sun.misc.SoftCache; ++ import sun.nio.ch.Interruptible; +++import sun.reflect.CallerSensitive; +++import sun.reflect.Reflection; ++ import sun.security.util.SecurityConstants; ++ ++ ++@@ -1370,16 +1372,15 @@ ++ * ++ * @since 1.2 ++ */ +++ @CallerSensitive ++ public ClassLoader getContextClassLoader() { ++ if (contextClassLoader == null) ++ return null; +++ ++ SecurityManager sm = System.getSecurityManager(); ++ if (sm != null) { ++- ClassLoader ccl = ClassLoader.getCallerClassLoader(); ++- if (ccl != null && ccl != contextClassLoader && ++- !contextClassLoader.isAncestor(ccl)) { ++- sm.checkPermission(SecurityConstants.GET_CLASSLOADER_PERMISSION); ++- } +++ ClassLoader.checkClassLoaderPermission(contextClassLoader, +++ Reflection.getCallerClass()); ++ } ++ return contextClassLoader; ++ } ++diff -r e56220b54fe2 -r d206cb658a99 src/share/classes/java/lang/reflect/Constructor.java ++--- openjdk/jdk/src/share/classes/java/lang/reflect/Constructor.java Wed Oct 16 05:39:53 2013 +0100 +++++ openjdk/jdk/src/share/classes/java/lang/reflect/Constructor.java Mon Oct 21 18:05:56 2013 +0100 ++@@ -25,6 +25,7 @@ ++ ++ package java.lang.reflect; ++ +++import sun.reflect.CallerSensitive; ++ import sun.reflect.ConstructorAccessor; ++ import sun.reflect.Reflection; ++ import sun.reflect.generics.repository.ConstructorRepository; ++@@ -513,13 +514,14 @@ ++ * @exception ExceptionInInitializerError if the initialization provoked ++ * by this method fails. ++ */ +++ @CallerSensitive ++ public T newInstance(Object ... initargs) ++ throws InstantiationException, IllegalAccessException, ++ IllegalArgumentException, InvocationTargetException ++ { ++ if (!override) { ++ if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) { ++- Class caller = Reflection.getCallerClass(2); +++ Class caller = Reflection.getCallerClass(); ++ if (securityCheckCache != caller) { ++ Reflection.ensureMemberAccess(caller, clazz, null, modifiers); ++ securityCheckCache = caller; ++diff -r e56220b54fe2 -r d206cb658a99 src/share/classes/java/lang/reflect/Field.java ++--- openjdk/jdk/src/share/classes/java/lang/reflect/Field.java Wed Oct 16 05:39:53 2013 +0100 +++++ openjdk/jdk/src/share/classes/java/lang/reflect/Field.java Mon Oct 21 18:05:56 2013 +0100 ++@@ -25,6 +25,7 @@ ++ ++ package java.lang.reflect; ++ +++import sun.reflect.CallerSensitive; ++ import sun.reflect.FieldAccessor; ++ import sun.reflect.Reflection; ++ import sun.reflect.generics.repository.FieldRepository; ++@@ -370,9 +371,15 @@ ++ * @exception ExceptionInInitializerError if the initialization provoked ++ * by this method fails. ++ */ +++ @CallerSensitive ++ public Object get(Object obj) ++ throws IllegalArgumentException, IllegalAccessException ++ { +++ if (!override) { +++ if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) { +++ checkAccess(Reflection.getCallerClass(), clazz, obj, modifiers); +++ } +++ } ++ return getFieldAccessor(obj).get(obj); ++ } ++ ++@@ -397,9 +404,15 @@ ++ * by this method fails. ++ * @see Field#get ++ */ +++ @CallerSensitive ++ public boolean getBoolean(Object obj) ++ throws IllegalArgumentException, IllegalAccessException ++ { +++ if (!override) { +++ if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) { +++ checkAccess(Reflection.getCallerClass(), clazz, obj, modifiers); +++ } +++ } ++ return getFieldAccessor(obj).getBoolean(obj); ++ } ++ ++@@ -424,9 +437,15 @@ ++ * by this method fails. ++ * @see Field#get ++ */ +++ @CallerSensitive ++ public byte getByte(Object obj) ++ throws IllegalArgumentException, IllegalAccessException ++ { +++ if (!override) { +++ if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) { +++ checkAccess(Reflection.getCallerClass(), clazz, obj, modifiers); +++ } +++ } ++ return getFieldAccessor(obj).getByte(obj); ++ } ++ ++@@ -453,9 +472,15 @@ ++ * by this method fails. ++ * @see Field#get ++ */ +++ @CallerSensitive ++ public char getChar(Object obj) ++ throws IllegalArgumentException, IllegalAccessException ++ { +++ if (!override) { +++ if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) { +++ checkAccess(Reflection.getCallerClass(), clazz, obj, modifiers); +++ } +++ } ++ return getFieldAccessor(obj).getChar(obj); ++ } ++ ++@@ -482,9 +507,15 @@ ++ * by this method fails. ++ * @see Field#get ++ */ +++ @CallerSensitive ++ public short getShort(Object obj) ++ throws IllegalArgumentException, IllegalAccessException ++ { +++ if (!override) { +++ if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) { +++ checkAccess(Reflection.getCallerClass(), clazz, obj, modifiers); +++ } +++ } ++ return getFieldAccessor(obj).getShort(obj); ++ } ++ ++@@ -511,9 +542,15 @@ ++ * by this method fails. ++ * @see Field#get ++ */ +++ @CallerSensitive ++ public int getInt(Object obj) ++ throws IllegalArgumentException, IllegalAccessException ++ { +++ if (!override) { +++ if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) { +++ checkAccess(Reflection.getCallerClass(), clazz, obj, modifiers); +++ } +++ } ++ return getFieldAccessor(obj).getInt(obj); ++ } ++ ++@@ -540,9 +577,15 @@ ++ * by this method fails. ++ * @see Field#get ++ */ +++ @CallerSensitive ++ public long getLong(Object obj) ++ throws IllegalArgumentException, IllegalAccessException ++ { +++ if (!override) { +++ if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) { +++ checkAccess(Reflection.getCallerClass(), clazz, obj, modifiers); +++ } +++ } ++ return getFieldAccessor(obj).getLong(obj); ++ } ++ ++@@ -569,9 +612,15 @@ ++ * by this method fails. ++ * @see Field#get ++ */ +++ @CallerSensitive ++ public float getFloat(Object obj) ++ throws IllegalArgumentException, IllegalAccessException ++ { +++ if (!override) { +++ if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) { +++ checkAccess(Reflection.getCallerClass(), clazz, obj, modifiers); +++ } +++ } ++ return getFieldAccessor(obj).getFloat(obj); ++ } ++ ++@@ -598,9 +647,15 @@ ++ * by this method fails. ++ * @see Field#get ++ */ +++ @CallerSensitive ++ public double getDouble(Object obj) ++ throws IllegalArgumentException, IllegalAccessException ++ { +++ if (!override) { +++ if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) { +++ checkAccess(Reflection.getCallerClass(), clazz, obj, modifiers); +++ } +++ } ++ return getFieldAccessor(obj).getDouble(obj); ++ } ++ ++@@ -669,9 +724,15 @@ ++ * @exception ExceptionInInitializerError if the initialization provoked ++ * by this method fails. ++ */ +++ @CallerSensitive ++ public void set(Object obj, Object value) ++ throws IllegalArgumentException, IllegalAccessException ++ { +++ if (!override) { +++ if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) { +++ checkAccess(Reflection.getCallerClass(), clazz, obj, modifiers); +++ } +++ } ++ getFieldAccessor(obj).set(obj, value); ++ } ++ ++@@ -698,9 +759,15 @@ ++ * by this method fails. ++ * @see Field#set ++ */ +++ @CallerSensitive ++ public void setBoolean(Object obj, boolean z) ++ throws IllegalArgumentException, IllegalAccessException ++ { +++ if (!override) { +++ if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) { +++ checkAccess(Reflection.getCallerClass(), clazz, obj, modifiers); +++ } +++ } ++ getFieldAccessor(obj).setBoolean(obj, z); ++ } ++ ++@@ -727,9 +794,15 @@ ++ * by this method fails. ++ * @see Field#set ++ */ +++ @CallerSensitive ++ public void setByte(Object obj, byte b) ++ throws IllegalArgumentException, IllegalAccessException ++ { +++ if (!override) { +++ if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) { +++ checkAccess(Reflection.getCallerClass(), clazz, obj, modifiers); +++ } +++ } ++ getFieldAccessor(obj).setByte(obj, b); ++ } ++ ++@@ -756,9 +829,15 @@ ++ * by this method fails. ++ * @see Field#set ++ */ +++ @CallerSensitive ++ public void setChar(Object obj, char c) ++ throws IllegalArgumentException, IllegalAccessException ++ { +++ if (!override) { +++ if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) { +++ checkAccess(Reflection.getCallerClass(), clazz, obj, modifiers); +++ } +++ } ++ getFieldAccessor(obj).setChar(obj, c); ++ } ++ ++@@ -785,9 +864,15 @@ ++ * by this method fails. ++ * @see Field#set ++ */ +++ @CallerSensitive ++ public void setShort(Object obj, short s) ++ throws IllegalArgumentException, IllegalAccessException ++ { +++ if (!override) { +++ if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) { +++ checkAccess(Reflection.getCallerClass(), clazz, obj, modifiers); +++ } +++ } ++ getFieldAccessor(obj).setShort(obj, s); ++ } ++ ++@@ -814,9 +899,15 @@ ++ * by this method fails. ++ * @see Field#set ++ */ +++ @CallerSensitive ++ public void setInt(Object obj, int i) ++ throws IllegalArgumentException, IllegalAccessException ++ { +++ if (!override) { +++ if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) { +++ checkAccess(Reflection.getCallerClass(), clazz, obj, modifiers); +++ } +++ } ++ getFieldAccessor(obj).setInt(obj, i); ++ } ++ ++@@ -843,9 +934,15 @@ ++ * by this method fails. ++ * @see Field#set ++ */ +++ @CallerSensitive ++ public void setLong(Object obj, long l) ++ throws IllegalArgumentException, IllegalAccessException ++ { +++ if (!override) { +++ if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) { +++ checkAccess(Reflection.getCallerClass(), clazz, obj, modifiers); +++ } +++ } ++ getFieldAccessor(obj).setLong(obj, l); ++ } ++ ++@@ -872,9 +969,15 @@ ++ * by this method fails. ++ * @see Field#set ++ */ +++ @CallerSensitive ++ public void setFloat(Object obj, float f) ++ throws IllegalArgumentException, IllegalAccessException ++ { +++ if (!override) { +++ if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) { +++ checkAccess(Reflection.getCallerClass(), clazz, obj, modifiers); +++ } +++ } ++ getFieldAccessor(obj).setFloat(obj, f); ++ } ++ ++@@ -901,20 +1004,25 @@ ++ * by this method fails. ++ * @see Field#set ++ */ +++ @CallerSensitive ++ public void setDouble(Object obj, double d) ++ throws IllegalArgumentException, IllegalAccessException ++ { +++ if (!override) { +++ if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) { +++ checkAccess(Reflection.getCallerClass(), clazz, obj, modifiers); +++ } +++ } ++ getFieldAccessor(obj).setDouble(obj, d); ++ } ++ ++- // Convenience routine which performs security checks +++ // security check is done before calling this method ++ private FieldAccessor getFieldAccessor(Object obj) ++ throws IllegalAccessException ++ { ++- doSecurityCheck(obj); ++ boolean ov = override; ++- FieldAccessor a = (ov)? overrideFieldAccessor : fieldAccessor; ++- return (a != null)? a : acquireFieldAccessor(ov); +++ FieldAccessor a = (ov) ? overrideFieldAccessor : fieldAccessor; +++ return (a != null) ? a : acquireFieldAccessor(ov); ++ } ++ ++ // NOTE that there is no synchronization used here. It is correct ++@@ -961,10 +1069,7 @@ ++ // NOTE: be very careful if you change the stack depth of this ++ // routine. The depth of the "getCallerClass" call is hardwired so ++ // that the compiler can have an easier time if this gets inlined. ++- private void doSecurityCheck(Object obj) throws IllegalAccessException { ++- if (!override) { ++- if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) { ++- Class caller = Reflection.getCallerClass(4); +++ private void checkAccess(Class caller, Class clazz, Object obj, int modifiers) throws IllegalAccessException { ++ Class targetClass = ((obj == null || !Modifier.isProtected(modifiers)) ++ ? clazz ++ : obj.getClass()); ++@@ -980,8 +1085,6 @@ ++ securityCheckCache = caller; ++ securityCheckTargetClassCache = targetClass; ++ } ++- } ++- } ++ } ++ ++ /* ++diff -r e56220b54fe2 -r d206cb658a99 src/share/classes/java/lang/reflect/Method.java ++--- openjdk/jdk/src/share/classes/java/lang/reflect/Method.java Wed Oct 16 05:39:53 2013 +0100 +++++ openjdk/jdk/src/share/classes/java/lang/reflect/Method.java Mon Oct 21 18:05:56 2013 +0100 ++@@ -25,6 +25,7 @@ ++ ++ package java.lang.reflect; ++ +++import sun.reflect.CallerSensitive; ++ import sun.reflect.MethodAccessor; ++ import sun.reflect.Reflection; ++ import sun.reflect.generics.repository.MethodRepository; ++@@ -587,13 +588,18 @@ ++ * @exception ExceptionInInitializerError if the initialization ++ * provoked by this method fails. ++ */ +++ @CallerSensitive ++ public Object invoke(Object obj, Object... args) ++ throws IllegalAccessException, IllegalArgumentException, ++ InvocationTargetException ++ { ++ if (!override) { ++ if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) { ++- Class caller = Reflection.getCallerClass(1); +++ // Until there is hotspot @CallerSensitive support +++ // can't call Reflection.getCallerClass() here +++ // Workaround for now: add a frame getCallerClass to +++ // make the caller at stack depth 2 +++ Class caller = getCallerClass(); ++ Class targetClass = ((obj == null || !Modifier.isProtected(modifiers)) ++ ? clazz ++ : obj.getClass()); ++@@ -616,6 +622,16 @@ ++ return methodAccessor.invoke(obj, args); ++ } ++ +++ /* +++ * This method makes the frame count to be 2 to find the caller +++ */ +++ @CallerSensitive +++ private Class getCallerClass() { +++ // Reflection.getCallerClass() currently returns the frame at depth 2 +++ // before the hotspot support is in. +++ return Reflection.getCallerClass(); +++ } +++ ++ /** ++ * Returns {@code true} if this method is a bridge ++ * method; returns {@code false} otherwise. ++diff -r e56220b54fe2 -r d206cb658a99 src/share/classes/java/lang/reflect/Proxy.java ++--- openjdk/jdk/src/share/classes/java/lang/reflect/Proxy.java Wed Oct 16 05:39:53 2013 +0100 +++++ openjdk/jdk/src/share/classes/java/lang/reflect/Proxy.java Mon Oct 21 18:05:56 2013 +0100 ++@@ -38,6 +38,7 @@ ++ import java.util.Set; ++ import java.util.WeakHashMap; ++ import sun.misc.ProxyGenerator; +++import sun.reflect.CallerSensitive; ++ import sun.reflect.Reflection; ++ import sun.reflect.misc.ReflectUtil; ++ import sun.security.util.SecurityConstants; ++@@ -404,28 +405,21 @@ ++ * @throws NullPointerException if the {@code interfaces} array ++ * argument or any of its elements are {@code null} ++ */ +++ @CallerSensitive ++ public static Class getProxyClass(ClassLoader loader, ++ Class... interfaces) ++ throws IllegalArgumentException ++ { ++- return getProxyClass0(loader, interfaces); // stack walk magic: do not refactor ++- } ++- ++- private static void checkProxyLoader(ClassLoader ccl, ++- ClassLoader loader) ++- { ++ SecurityManager sm = System.getSecurityManager(); ++ if (sm != null) { ++- if (loader == null && ccl != null) { ++- if (!ProxyAccessHelper.allowNullLoader) { ++- sm.checkPermission(SecurityConstants.GET_CLASSLOADER_PERMISSION); ++- } ++- } +++ checkProxyAccess(Reflection.getCallerClass(), loader, interfaces); ++ } +++ +++ return getProxyClass0(loader, interfaces); ++ } ++ ++ /* ++- * Generate a proxy class (caller-sensitive). +++ * Check permissions required to create a proxy class. ++ * ++ * To define a proxy class, it performs the access checks as in ++ * Class.forName (VM will invoke ClassLoader.checkPackageAccess): ++@@ -442,16 +436,28 @@ ++ * will throw IllegalAccessError when the generated proxy class is ++ * being defined via the defineClass0 method. ++ */ +++ private static void checkProxyAccess(Class caller, +++ ClassLoader loader, +++ Class... interfaces) +++ { +++ SecurityManager sm = System.getSecurityManager(); +++ if (sm != null) { +++ ClassLoader ccl = caller.getClassLoader(); +++ if (loader == null && ccl != null) { +++ if (!ProxyAccessHelper.allowNullLoader) { +++ sm.checkPermission(SecurityConstants.GET_CLASSLOADER_PERMISSION); +++ } +++ } +++ ReflectUtil.checkProxyPackageAccess(ccl, interfaces); +++ } +++ } +++ +++ /** +++ * Generate a proxy class. Must call the checkProxyAccess method +++ * to perform permission checks before calling this. +++ */ ++ private static Class getProxyClass0(ClassLoader loader, ++ Class... interfaces) { ++- SecurityManager sm = System.getSecurityManager(); ++- if (sm != null) { ++- final int CALLER_FRAME = 3; // 0: Reflection, 1: getProxyClass0 2: Proxy 3: caller ++- final Class caller = Reflection.getCallerClass(CALLER_FRAME); ++- final ClassLoader ccl = caller.getClassLoader(); ++- checkProxyLoader(ccl, loader); ++- ReflectUtil.checkProxyPackageAccess(ccl, interfaces); ++- } ++ if (interfaces.length > 65535) { ++ throw new IllegalArgumentException("interface limit exceeded"); ++ } ++@@ -692,6 +698,7 @@ ++ * if the invocation handler, {@code h}, is ++ * {@code null} ++ */ +++ @CallerSensitive ++ public static Object newProxyInstance(ClassLoader loader, ++ Class[] interfaces, ++ InvocationHandler h) ++@@ -701,10 +708,15 @@ ++ throw new NullPointerException(); ++ } ++ +++ final SecurityManager sm = System.getSecurityManager(); +++ if (sm != null) { +++ checkProxyAccess(Reflection.getCallerClass(), loader, interfaces); +++ } +++ ++ /* ++ * Look up or generate the designated proxy class. ++ */ ++- Class cl = getProxyClass0(loader, interfaces); // stack walk magic: do not refactor +++ Class cl = getProxyClass0(loader, interfaces); ++ ++ /* ++ * Invoke its constructor with the designated invocation handler. ++@@ -712,7 +724,6 @@ ++ try { ++ final Constructor cons = cl.getConstructor(constructorParams); ++ final InvocationHandler ih = h; ++- SecurityManager sm = System.getSecurityManager(); ++ if (sm != null && ProxyAccessHelper.needsNewInstanceCheck(cl)) { ++ // create proxy instance with doPrivilege as the proxy class may ++ // implement non-public interfaces that requires a special permission ++diff -r e56220b54fe2 -r d206cb658a99 src/share/classes/java/security/AccessController.java ++--- openjdk/jdk/src/share/classes/java/security/AccessController.java Wed Oct 16 05:39:53 2013 +0100 +++++ openjdk/jdk/src/share/classes/java/security/AccessController.java Mon Oct 21 18:05:56 2013 +0100 ++@@ -26,6 +26,8 @@ ++ package java.security; ++ ++ import sun.security.util.Debug; +++import sun.reflect.CallerSensitive; +++import sun.reflect.Reflection; ++ ++ /** ++ *

The AccessController class is used for access control operations ++@@ -264,6 +266,7 @@ ++ * @see java.security.DomainCombiner ++ */ ++ +++ @CallerSensitive ++ public static native T doPrivileged(PrivilegedAction action); ++ ++ /** ++@@ -288,14 +291,14 @@ ++ * ++ * @since 1.6 ++ */ +++ @CallerSensitive ++ public static T doPrivilegedWithCombiner(PrivilegedAction action) { ++- ++ AccessControlContext acc = getStackAccessControlContext(); ++ if (acc == null) { ++ return AccessController.doPrivileged(action); ++ } ++ DomainCombiner dc = acc.getAssignedCombiner(); ++- return AccessController.doPrivileged(action, preserveCombiner(dc)); +++ return AccessController.doPrivileged(action, preserveCombiner(dc, Reflection.getCallerClass())); ++ } ++ ++ ++@@ -326,6 +329,7 @@ ++ * @see #doPrivileged(PrivilegedAction) ++ * @see #doPrivileged(PrivilegedExceptionAction,AccessControlContext) ++ */ +++ @CallerSensitive ++ public static native T doPrivileged(PrivilegedAction action, ++ AccessControlContext context); ++ ++@@ -353,6 +357,7 @@ ++ * @see #doPrivilegedWithCombiner(PrivilegedExceptionAction) ++ * @see java.security.DomainCombiner ++ */ +++ @CallerSensitive ++ public static native T ++ doPrivileged(PrivilegedExceptionAction action) ++ throws PrivilegedActionException; ++@@ -383,6 +388,7 @@ ++ * ++ * @since 1.6 ++ */ +++ @CallerSensitive ++ public static T doPrivilegedWithCombiner ++ (PrivilegedExceptionAction action) throws PrivilegedActionException { ++ ++@@ -391,26 +397,18 @@ ++ return AccessController.doPrivileged(action); ++ } ++ DomainCombiner dc = acc.getAssignedCombiner(); ++- return AccessController.doPrivileged(action, preserveCombiner(dc)); +++ return AccessController.doPrivileged(action, preserveCombiner(dc, Reflection.getCallerClass())); ++ } ++ ++ /** ++ * preserve the combiner across the doPrivileged call ++ */ ++- private static AccessControlContext preserveCombiner ++- (DomainCombiner combiner) { ++- ++- /** ++- * callerClass[0] = Reflection.getCallerClass ++- * callerClass[1] = AccessController.preserveCombiner ++- * callerClass[2] = AccessController.doPrivileged ++- * callerClass[3] = caller ++- */ ++- final Class callerClass = sun.reflect.Reflection.getCallerClass(3); +++ private static AccessControlContext preserveCombiner(DomainCombiner combiner, +++ final Class caller) { ++ ProtectionDomain callerPd = doPrivileged ++ (new PrivilegedAction() { ++ public ProtectionDomain run() { ++- return callerClass.getProtectionDomain(); +++ return caller.getProtectionDomain(); ++ } ++ }); ++ ++@@ -455,6 +453,7 @@ ++ * @see #doPrivileged(PrivilegedAction) ++ * @see #doPrivileged(PrivilegedExceptionAction,AccessControlContext) ++ */ +++ @CallerSensitive ++ public static native T ++ doPrivileged(PrivilegedExceptionAction action, ++ AccessControlContext context) ++diff -r e56220b54fe2 -r d206cb658a99 src/share/classes/java/sql/DriverManager.java ++--- openjdk/jdk/src/share/classes/java/sql/DriverManager.java Wed Oct 16 05:39:53 2013 +0100 +++++ openjdk/jdk/src/share/classes/java/sql/DriverManager.java Mon Oct 21 18:05:56 2013 +0100 ++@@ -30,6 +30,8 @@ ++ import java.util.ServiceLoader; ++ import java.security.AccessController; ++ import java.security.PrivilegedAction; +++import sun.reflect.CallerSensitive; +++import sun.reflect.Reflection; ++ ++ ++ /** ++@@ -159,14 +161,10 @@ ++ * @return a Connection to the URL ++ * @exception SQLException if a database access error occurs ++ */ +++ @CallerSensitive ++ public static Connection getConnection(String url, ++ java.util.Properties info) throws SQLException { ++- ++- // Gets the classloader of the code that called this method, may ++- // be null. ++- ClassLoader callerCL = DriverManager.getCallerClassLoader(); ++- ++- return (getConnection(url, info, callerCL)); +++ return (getConnection(url, info, Reflection.getCallerClass())); ++ } ++ ++ /** ++@@ -182,14 +180,11 @@ ++ * @return a connection to the URL ++ * @exception SQLException if a database access error occurs ++ */ +++ @CallerSensitive ++ public static Connection getConnection(String url, ++ String user, String password) throws SQLException { ++ java.util.Properties info = new java.util.Properties(); ++ ++- // Gets the classloader of the code that called this method, may ++- // be null. ++- ClassLoader callerCL = DriverManager.getCallerClassLoader(); ++- ++ if (user != null) { ++ info.put("user", user); ++ } ++@@ -197,7 +192,7 @@ ++ info.put("password", password); ++ } ++ ++- return (getConnection(url, info, callerCL)); +++ return (getConnection(url, info, Reflection.getCallerClass())); ++ } ++ ++ /** ++@@ -210,16 +205,12 @@ ++ * @return a connection to the URL ++ * @exception SQLException if a database access error occurs ++ */ +++ @CallerSensitive ++ public static Connection getConnection(String url) ++ throws SQLException { ++ ++ java.util.Properties info = new java.util.Properties(); ++- ++- // Gets the classloader of the code that called this method, may ++- // be null. ++- ClassLoader callerCL = DriverManager.getCallerClassLoader(); ++- ++- return (getConnection(url, info, callerCL)); +++ return (getConnection(url, info, Reflection.getCallerClass())); ++ } ++ ++ /** ++@@ -233,6 +224,7 @@ ++ * that can connect to the given URL ++ * @exception SQLException if a database access error occurs ++ */ +++ @CallerSensitive ++ public static Driver getDriver(String url) ++ throws SQLException { ++ java.util.Vector drivers = null; ++@@ -248,9 +240,7 @@ ++ drivers = readDrivers; ++ } ++ ++- // Gets the classloader of the code that called this method, may ++- // be null. ++- ClassLoader callerCL = DriverManager.getCallerClassLoader(); +++ Class callerClass = Reflection.getCallerClass(); ++ ++ // Walk through the loaded drivers attempting to locate someone ++ // who understands the given URL. ++@@ -258,7 +248,7 @@ ++ DriverInfo di = (DriverInfo)drivers.elementAt(i); ++ // If the caller does not have permission to load the driver then ++ // skip it. ++- if ( getCallerClass(callerCL, di.driverClassName ) != +++ if ( getCallerClass(callerClass, di.driverClassName ) != ++ di.driverClass ) { ++ println(" skipping: " + di); ++ continue; ++@@ -319,11 +309,10 @@ ++ * @param driver the JDBC Driver to drop ++ * @exception SQLException if a database access error occurs ++ */ +++ @CallerSensitive ++ public static synchronized void deregisterDriver(Driver driver) ++ throws SQLException { ++- // Gets the classloader of the code that called this method, ++- // may be null. ++- ClassLoader callerCL = DriverManager.getCallerClassLoader(); +++ Class callerClass = Reflection.getCallerClass(); ++ println("DriverManager.deregisterDriver: " + driver); ++ ++ // Walk through the loaded drivers. ++@@ -343,7 +332,7 @@ ++ ++ // If the caller does not have permission to load the driver then ++ // throw a security exception. ++- if (getCallerClass(callerCL, di.driverClassName ) != di.driverClass ) { +++ if (getCallerClass(callerClass, di.driverClassName ) != di.driverClass) { ++ throw new SecurityException(); ++ } ++ ++@@ -363,6 +352,7 @@ ++ * ++ * @return the list of JDBC Drivers loaded by the caller's class loader ++ */ +++ @CallerSensitive ++ public static java.util.Enumeration getDrivers() { ++ java.util.Vector result = new java.util.Vector(); ++ java.util.Vector drivers = null; ++@@ -376,16 +366,14 @@ ++ drivers = readDrivers; ++ } ++ ++- // Gets the classloader of the code that called this method, may ++- // be null. ++- ClassLoader callerCL = DriverManager.getCallerClassLoader(); +++ Class callerClass = Reflection.getCallerClass(); ++ ++ // Walk through the loaded drivers. ++ for (int i = 0; i < drivers.size(); i++) { ++ DriverInfo di = (DriverInfo)drivers.elementAt(i); ++ // If the caller does not have permission to load the driver then ++ // skip it. ++- if ( getCallerClass(callerCL, di.driverClassName ) != di.driverClass ) { +++ if ( getCallerClass(callerClass, di.driverClassName) != di.driverClass ) { ++ println(" skipping: " + di); ++ continue; ++ } ++@@ -481,6 +469,12 @@ ++ ++ //------------------------------------------------------------------------ ++ +++ private static Class getCallerClass(Class caller, +++ String driverClassName) { +++ ClassLoader callerCL = caller != null ? caller.getClassLoader() : null; +++ return getCallerClass(callerCL, driverClassName); +++ } +++ ++ // Returns the class object that would be created if the code calling the ++ // driver manager had loaded the driver class, or null if the class ++ // is inaccessible. ++@@ -573,7 +567,7 @@ ++ ++ // Worker method called by the public getConnection() methods. ++ private static Connection getConnection( ++- String url, java.util.Properties info, ClassLoader callerCL) throws SQLException { +++ String url, java.util.Properties info, Class caller) throws SQLException { ++ java.util.Vector drivers = null; ++ /* ++ * When callerCl is null, we should check the application's ++@@ -581,11 +575,12 @@ ++ * classloader, so that the JDBC driver class outside rt.jar ++ * can be loaded from here. ++ */ ++- synchronized(DriverManager.class) { ++- // synchronize loading of the correct classloader. ++- if(callerCL == null) { ++- callerCL = Thread.currentThread().getContextClassLoader(); ++- } +++ ClassLoader callerCL = caller != null ? caller.getClassLoader() : null; +++ synchronized (DriverManager.class) { +++ // synchronize loading of the correct classloader. +++ if (callerCL == null) { +++ callerCL = Thread.currentThread().getContextClassLoader(); +++ } ++ } ++ ++ if(url == null) { ++@@ -666,10 +661,6 @@ ++ private static boolean initialized = false; ++ ++ private static Object logSync = new Object(); ++- ++- /* Returns the caller's class loader, or null if none */ ++- private static native ClassLoader getCallerClassLoader(); ++- ++ } ++ ++ // DriverInfo is a package-private support class. ++diff -r e56220b54fe2 -r d206cb658a99 src/share/classes/java/util/ResourceBundle.java ++--- openjdk/jdk/src/share/classes/java/util/ResourceBundle.java Wed Oct 16 05:39:53 2013 +0100 +++++ openjdk/jdk/src/share/classes/java/util/ResourceBundle.java Mon Oct 21 18:05:56 2013 +0100 ++@@ -56,6 +56,8 @@ ++ import java.util.concurrent.ConcurrentMap; ++ import java.util.jar.JarEntry; ++ +++import sun.reflect.CallerSensitive; +++import sun.reflect.Reflection; ++ ++ /** ++ * ++@@ -421,14 +423,10 @@ ++ ++ /* ++ * Automatic determination of the ClassLoader to be used to load ++- * resources on behalf of the client. N.B. The client is getLoader's ++- * caller's caller. +++ * resources on behalf of the client. ++ */ ++- private static ClassLoader getLoader() { ++- Class[] stack = getClassContext(); ++- /* Magic number 2 identifies our caller's caller */ ++- Class c = stack[2]; ++- ClassLoader cl = (c == null) ? null : c.getClassLoader(); +++ private static ClassLoader getLoader(Class caller) { +++ ClassLoader cl = caller == null ? null : caller.getClassLoader(); ++ if (cl == null) { ++ // When the caller's loader is the boot class loader, cl is null ++ // here. In that case, ClassLoader.getSystemClassLoader() may ++@@ -442,8 +440,6 @@ ++ return cl; ++ } ++ ++- private static native Class[] getClassContext(); ++- ++ /** ++ * A wrapper of ClassLoader.getSystemClassLoader(). ++ */ ++@@ -728,11 +724,12 @@ ++ * if no resource bundle for the specified base name can be found ++ * @return a resource bundle for the given base name and the default locale ++ */ +++ @CallerSensitive ++ public static final ResourceBundle getBundle(String baseName) ++ { ++ return getBundleImpl(baseName, Locale.getDefault(), ++ /* must determine loader here, else we break stack invariant */ ++- getLoader(), +++ getLoader(Reflection.getCallerClass()), ++ Control.INSTANCE); ++ } ++ ++@@ -770,11 +767,12 @@ ++ * needed. ++ * @since 1.6 ++ */ +++ @CallerSensitive ++ public static final ResourceBundle getBundle(String baseName, ++ Control control) { ++ return getBundleImpl(baseName, Locale.getDefault(), ++ /* must determine loader here, else we break stack invariant */ ++- getLoader(), +++ getLoader(Reflection.getCallerClass()), ++ control); ++ } ++ ++@@ -799,12 +797,13 @@ ++ * if no resource bundle for the specified base name can be found ++ * @return a resource bundle for the given base name and locale ++ */ +++ @CallerSensitive ++ public static final ResourceBundle getBundle(String baseName, ++ Locale locale) ++ { ++ return getBundleImpl(baseName, locale, ++ /* must determine loader here, else we break stack invariant */ ++- getLoader(), +++ getLoader(Reflection.getCallerClass()), ++ Control.INSTANCE); ++ } ++ ++@@ -845,11 +844,12 @@ ++ * needed. ++ * @since 1.6 ++ */ +++ @CallerSensitive ++ public static final ResourceBundle getBundle(String baseName, Locale targetLocale, ++ Control control) { ++ return getBundleImpl(baseName, targetLocale, ++ /* must determine loader here, else we break stack invariant */ ++- getLoader(), +++ getLoader(Reflection.getCallerClass()), ++ control); ++ } ++ ++@@ -1716,8 +1716,9 @@ ++ * @since 1.6 ++ * @see ResourceBundle.Control#getTimeToLive(String,Locale) ++ */ +++ @CallerSensitive ++ public static final void clearCache() { ++- clearCache(getLoader()); +++ clearCache(getLoader(Reflection.getCallerClass())); ++ } ++ ++ /** ++diff -r e56220b54fe2 -r d206cb658a99 src/share/classes/java/util/concurrent/atomic/AtomicIntegerFieldUpdater.java ++--- openjdk/jdk/src/share/classes/java/util/concurrent/atomic/AtomicIntegerFieldUpdater.java Wed Oct 16 05:39:53 2013 +0100 +++++ openjdk/jdk/src/share/classes/java/util/concurrent/atomic/AtomicIntegerFieldUpdater.java Mon Oct 21 18:05:56 2013 +0100 ++@@ -34,8 +34,10 @@ ++ */ ++ ++ package java.util.concurrent.atomic; +++import java.lang.reflect.*; ++ import sun.misc.Unsafe; ++-import java.lang.reflect.*; +++import sun.reflect.CallerSensitive; +++import sun.reflect.Reflection; ++ ++ /** ++ * A reflection-based utility that enables atomic updates to ++@@ -69,8 +71,9 @@ ++ * @throws RuntimeException with a nested reflection-based ++ * exception if the class does not hold field or is the wrong type ++ */ +++ @CallerSensitive ++ public static AtomicIntegerFieldUpdater newUpdater(Class tclass, String fieldName) { ++- return new AtomicIntegerFieldUpdaterImpl(tclass, fieldName); +++ return new AtomicIntegerFieldUpdaterImpl(tclass, fieldName, Reflection.getCallerClass()); ++ } ++ ++ /** ++@@ -268,13 +271,11 @@ ++ private final Class tclass; ++ private final Class cclass; ++ ++- AtomicIntegerFieldUpdaterImpl(Class tclass, String fieldName) { +++ AtomicIntegerFieldUpdaterImpl(Class tclass, String fieldName, Class caller) { ++ Field field = null; ++- Class caller = null; ++ int modifiers = 0; ++ try { ++ field = tclass.getDeclaredField(fieldName); ++- caller = sun.reflect.Reflection.getCallerClass(3); ++ modifiers = field.getModifiers(); ++ sun.reflect.misc.ReflectUtil.ensureMemberAccess( ++ caller, tclass, null, modifiers); ++diff -r e56220b54fe2 -r d206cb658a99 src/share/classes/java/util/concurrent/atomic/AtomicLongFieldUpdater.java ++--- openjdk/jdk/src/share/classes/java/util/concurrent/atomic/AtomicLongFieldUpdater.java Wed Oct 16 05:39:53 2013 +0100 +++++ openjdk/jdk/src/share/classes/java/util/concurrent/atomic/AtomicLongFieldUpdater.java Mon Oct 21 18:05:56 2013 +0100 ++@@ -34,8 +34,10 @@ ++ */ ++ ++ package java.util.concurrent.atomic; +++import java.lang.reflect.*; ++ import sun.misc.Unsafe; ++-import java.lang.reflect.*; +++import sun.reflect.CallerSensitive; +++import sun.reflect.Reflection; ++ ++ /** ++ * A reflection-based utility that enables atomic updates to ++@@ -69,11 +71,13 @@ ++ * @throws RuntimeException with a nested reflection-based ++ * exception if the class does not hold field or is the wrong type. ++ */ +++ @CallerSensitive ++ public static AtomicLongFieldUpdater newUpdater(Class tclass, String fieldName) { +++ Class caller = Reflection.getCallerClass(); ++ if (AtomicLong.VM_SUPPORTS_LONG_CAS) ++- return new CASUpdater(tclass, fieldName); +++ return new CASUpdater(tclass, fieldName, caller); ++ else ++- return new LockedUpdater(tclass, fieldName); +++ return new LockedUpdater(tclass, fieldName, caller); ++ } ++ ++ /** ++@@ -267,13 +271,11 @@ ++ private final Class tclass; ++ private final Class cclass; ++ ++- CASUpdater(Class tclass, String fieldName) { +++ CASUpdater(Class tclass, String fieldName, Class caller) { ++ Field field = null; ++- Class caller = null; ++ int modifiers = 0; ++ try { ++ field = tclass.getDeclaredField(fieldName); ++- caller = sun.reflect.Reflection.getCallerClass(3); ++ modifiers = field.getModifiers(); ++ sun.reflect.misc.ReflectUtil.ensureMemberAccess( ++ caller, tclass, null, modifiers); ++@@ -350,13 +352,11 @@ ++ private final Class tclass; ++ private final Class cclass; ++ ++- LockedUpdater(Class tclass, String fieldName) { +++ LockedUpdater(Class tclass, String fieldName, Class caller) { ++ Field field = null; ++- Class caller = null; ++ int modifiers = 0; ++ try { ++ field = tclass.getDeclaredField(fieldName); ++- caller = sun.reflect.Reflection.getCallerClass(3); ++ modifiers = field.getModifiers(); ++ sun.reflect.misc.ReflectUtil.ensureMemberAccess( ++ caller, tclass, null, modifiers); ++diff -r e56220b54fe2 -r d206cb658a99 src/share/classes/java/util/concurrent/atomic/AtomicReferenceFieldUpdater.java ++--- openjdk/jdk/src/share/classes/java/util/concurrent/atomic/AtomicReferenceFieldUpdater.java Wed Oct 16 05:39:53 2013 +0100 +++++ openjdk/jdk/src/share/classes/java/util/concurrent/atomic/AtomicReferenceFieldUpdater.java Mon Oct 21 18:05:56 2013 +0100 ++@@ -34,8 +34,10 @@ ++ */ ++ ++ package java.util.concurrent.atomic; +++import java.lang.reflect.*; ++ import sun.misc.Unsafe; ++-import java.lang.reflect.*; +++import sun.reflect.CallerSensitive; +++import sun.reflect.Reflection; ++ ++ /** ++ * A reflection-based utility that enables atomic updates to ++@@ -89,10 +91,12 @@ ++ * @throws RuntimeException with a nested reflection-based ++ * exception if the class does not hold field or is the wrong type. ++ */ +++ @CallerSensitive ++ public static AtomicReferenceFieldUpdater newUpdater(Class tclass, Class vclass, String fieldName) { ++ return new AtomicReferenceFieldUpdaterImpl(tclass, ++ vclass, ++- fieldName); +++ fieldName, +++ Reflection.getCallerClass()); ++ } ++ ++ /** ++@@ -200,14 +204,13 @@ ++ ++ AtomicReferenceFieldUpdaterImpl(Class tclass, ++ Class vclass, ++- String fieldName) { +++ String fieldName, +++ Class caller) { ++ Field field = null; ++ Class fieldClass = null; ++- Class caller = null; ++ int modifiers = 0; ++ try { ++ field = tclass.getDeclaredField(fieldName); ++- caller = sun.reflect.Reflection.getCallerClass(3); ++ modifiers = field.getModifiers(); ++ sun.reflect.misc.ReflectUtil.ensureMemberAccess( ++ caller, tclass, null, modifiers); ++diff -r e56220b54fe2 -r d206cb658a99 src/share/classes/java/util/logging/Logger.java ++--- openjdk/jdk/src/share/classes/java/util/logging/Logger.java Wed Oct 16 05:39:53 2013 +0100 +++++ openjdk/jdk/src/share/classes/java/util/logging/Logger.java Mon Oct 21 18:05:56 2013 +0100 ++@@ -298,13 +298,10 @@ ++ } ++ } ++ ++- private static Logger demandLogger(String name, String resourceBundleName) { +++ private static Logger demandLogger(String name, String resourceBundleName, Class caller) { ++ LogManager manager = LogManager.getLogManager(); ++ SecurityManager sm = System.getSecurityManager(); ++ if (sm != null && !SystemLoggerHelper.disableCallerCheck) { ++- // 0: Reflection 1: Logger.getLoggerContext 2: Logger.getLogger 3: caller ++- final int SKIP_FRAMES = 3; ++- Class caller = sun.reflect.Reflection.getCallerClass(SKIP_FRAMES); ++ if (caller.getClassLoader() == null) { ++ return manager.demandSystemLogger(name, resourceBundleName); ++ } ++@@ -339,8 +336,9 @@ ++ * @return a suitable Logger ++ * @throws NullPointerException if the name is null. ++ */ +++ @CallerSensitive ++ public static synchronized Logger getLogger(String name) { ++- return demandLogger(name, null); +++ return demandLogger(name, null, Reflection.getCallerClass()); ++ } ++ ++ /** ++@@ -382,8 +380,9 @@ ++ * a different resource bundle name. ++ * @throws NullPointerException if the name is null. ++ */ +++ @CallerSensitive ++ public static synchronized Logger getLogger(String name, String resourceBundleName) { ++- Logger result = demandLogger(name, resourceBundleName); +++ Logger result = demandLogger(name, resourceBundleName, Reflection.getCallerClass()); ++ if (result.resourceBundleName == null) { ++ // Note: we may get a MissingResourceException here. ++ result.setupResourceInfo(resourceBundleName); ++diff -r e56220b54fe2 -r d206cb658a99 src/share/classes/javax/sql/rowset/serial/SerialJavaObject.java ++--- openjdk/jdk/src/share/classes/javax/sql/rowset/serial/SerialJavaObject.java Wed Oct 16 05:39:53 2013 +0100 +++++ openjdk/jdk/src/share/classes/javax/sql/rowset/serial/SerialJavaObject.java Mon Oct 21 18:05:56 2013 +0100 ++@@ -30,6 +30,8 @@ ++ import java.util.Map; ++ import java.lang.reflect.*; ++ import javax.sql.rowset.RowSetWarning; +++import sun.reflect.CallerSensitive; +++import sun.reflect.misc.ReflectUtil; ++ ++ /** ++ * A serializable mapping in the Java programming language of an SQL ++@@ -137,6 +139,7 @@ ++ * @throws SerialException if an error is encountered accessing ++ * the serialized object ++ */ +++ @CallerSensitive ++ public Field[] getFields() throws SerialException { ++ if (fields != null) { ++ Class c = this.obj.getClass(); ++diff -r e56220b54fe2 -r d206cb658a99 src/share/classes/sun/misc/Unsafe.java ++--- openjdk/jdk/src/share/classes/sun/misc/Unsafe.java Wed Oct 16 05:39:53 2013 +0100 +++++ openjdk/jdk/src/share/classes/sun/misc/Unsafe.java Mon Oct 21 18:05:56 2013 +0100 ++@@ -28,6 +28,9 @@ ++ import java.security.*; ++ import java.lang.reflect.*; ++ +++import sun.reflect.CallerSensitive; +++import sun.reflect.Reflection; +++ ++ ++ /** ++ * A collection of methods for performing low-level, unsafe operations. ++@@ -80,8 +83,9 @@ ++ * checkPropertiesAccess method doesn't allow ++ * access to the system properties. ++ */ +++ @CallerSensitive ++ public static Unsafe getUnsafe() { ++- Class cc = sun.reflect.Reflection.getCallerClass(2); +++ Class cc = Reflection.getCallerClass(); ++ if (cc.getClassLoader() != null) ++ throw new SecurityException("Unsafe"); ++ return theUnsafe; ++@@ -708,6 +712,12 @@ ++ ClassLoader loader, ++ ProtectionDomain protectionDomain); ++ +++ /** +++ * @deprecated Use defineClass(String, byte[], int, int, ClassLoader, ProtectionDomain) +++ * instead. This method will be removed in JDK 8. +++ */ +++ @Deprecated +++ @CallerSensitive ++ public native Class defineClass(String name, byte[] b, int off, int len); ++ ++ /** Allocate an instance but do not run any constructor. ++diff -r e56220b54fe2 -r d206cb658a99 src/share/classes/sun/reflect/CallerSensitive.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/jdk/src/share/classes/sun/reflect/CallerSensitive.java Mon Oct 21 18:05:56 2013 +0100 ++@@ -0,0 +1,41 @@ +++/* +++ * Copyright (c) 2012, 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. +++ */ +++ +++package sun.reflect; +++ +++import java.lang.annotation.*; +++import static java.lang.annotation.ElementType.*; +++ +++/** +++ * A method annotated @CallerSensitive is sensitive to its calling class, +++ * via {@link sun.reflect.Reflection#getCallerClass Reflection.getCallerClass}, +++ * or via some equivalent. +++ * +++ * @author John R. Rose +++ */ +++@Retention(RetentionPolicy.RUNTIME) +++@Target({METHOD}) +++public @interface CallerSensitive { +++} ++diff -r e56220b54fe2 -r d206cb658a99 src/share/classes/sun/reflect/Reflection.java ++--- openjdk/jdk/src/share/classes/sun/reflect/Reflection.java Wed Oct 16 05:39:53 2013 +0100 +++++ openjdk/jdk/src/share/classes/sun/reflect/Reflection.java Mon Oct 21 18:05:56 2013 +0100 ++@@ -52,16 +52,11 @@ ++ methodFilterMap = new HashMap(); ++ } ++ ++- /** Returns the class of the method realFramesToSkip ++- frames up the stack (zero-based), ignoring frames associated ++- with java.lang.reflect.Method.invoke() and its implementation. ++- The first frame is that associated with this method, so ++- getCallerClass(0) returns the Class object for ++- sun.reflect.Reflection. Frames associated with ++- java.lang.reflect.Method.invoke() and its implementation are ++- completely ignored and do not count toward the number of "real" ++- frames skipped. */ ++- public static native Class getCallerClass(int realFramesToSkip); +++ /** Returns the class of the caller of the method calling this method, +++ ignoring frames associated with java.lang.reflect.Method.invoke() +++ and its implementation. */ +++ @CallerSensitive +++ public static native Class getCallerClass(); ++ ++ /** Retrieves the access flags written to the class file. For ++ inner classes these flags may differ from those returned by ++@@ -322,4 +317,27 @@ ++ } ++ return newMembers; ++ } +++ +++ /** +++ * Tests if the given method is caller-sensitive and the declaring class +++ * is defined by either the bootstrap class loader or extension class loader. +++ */ +++ public static boolean isCallerSensitive(Method m) { +++ final ClassLoader loader = m.getDeclaringClass().getClassLoader(); +++ if (loader == null || isExtClassLoader(loader)) { +++ return m.isAnnotationPresent(CallerSensitive.class); +++ } +++ return false; +++ } +++ +++ private static boolean isExtClassLoader(ClassLoader loader) { +++ ClassLoader cl = ClassLoader.getSystemClassLoader(); +++ while (cl != null) { +++ if (cl.getParent() == null && cl == loader) { +++ return true; +++ } +++ cl = cl.getParent(); +++ } +++ return false; +++ } ++ } ++diff -r e56220b54fe2 -r d206cb658a99 src/share/native/java/lang/SecurityManager.c ++--- openjdk/jdk/src/share/native/java/lang/SecurityManager.c Wed Oct 16 05:39:53 2013 +0100 +++++ openjdk/jdk/src/share/native/java/lang/SecurityManager.c Mon Oct 21 18:05:56 2013 +0100 ++@@ -29,7 +29,6 @@ ++ ++ #include "java_lang_SecurityManager.h" ++ #include "java_lang_ClassLoader.h" ++-#include "java_util_ResourceBundle.h" ++ ++ /* ++ * Make sure a security manager instance is initialized. ++diff -r e56220b54fe2 -r d206cb658a99 src/share/native/sun/reflect/Reflection.c ++--- openjdk/jdk/src/share/native/sun/reflect/Reflection.c Wed Oct 16 05:39:53 2013 +0100 +++++ openjdk/jdk/src/share/native/sun/reflect/Reflection.c Mon Oct 21 18:05:56 2013 +0100 ++@@ -27,9 +27,11 @@ ++ #include "sun_reflect_Reflection.h" ++ ++ JNIEXPORT jclass JNICALL Java_sun_reflect_Reflection_getCallerClass ++-(JNIEnv *env, jclass unused, jint depth) +++(JNIEnv *env, jclass unused) ++ { ++- return JVM_GetCallerClass(env, depth); +++ // Until there is hotspot @CallerSensitive support, +++ // depth must always be 2 to get the immediate caller +++ return JVM_GetCallerClass(env, 2); ++ } ++ ++ JNIEXPORT jint JNICALL Java_sun_reflect_Reflection_getClassAccessFlags ++diff -r e56220b54fe2 -r d206cb658a99 test/Makefile ++--- openjdk/jdk/test/Makefile Wed Oct 16 05:39:53 2013 +0100 +++++ openjdk/jdk/test/Makefile Mon Oct 21 18:05:56 2013 +0100 ++@@ -455,7 +455,7 @@ ++ ++ # Stable samevm testruns (minus items from PROBLEM_LIST) ++ JDK_ALL_TARGETS += jdk_lang ++-jdk_lang: java/lang +++jdk_lang: java/lang sun/reflect ++ $(call RunSamevmBatch) ++ ++ # Stable othervm testruns (minus items from PROBLEM_LIST) ++diff -r e56220b54fe2 -r d206cb658a99 test/sun/reflect/CallerSensitive/CallerSensitiveFinder.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/jdk/test/sun/reflect/CallerSensitive/CallerSensitiveFinder.java Mon Oct 21 18:05:56 2013 +0100 ++@@ -0,0 +1,248 @@ +++/* +++ * Copyright (c) 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. +++ * +++ * 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 com.sun.tools.classfile.*; +++import static com.sun.tools.classfile.ConstantPool.*; +++import java.io.File; +++import java.io.IOException; +++import java.lang.reflect.InvocationTargetException; +++import java.nio.file.FileVisitResult; +++import java.nio.file.Files; +++import java.nio.file.Path; +++import java.nio.file.Paths; +++import java.nio.file.SimpleFileVisitor; +++import java.nio.file.attribute.BasicFileAttributes; +++import java.util.ArrayList; +++import java.util.List; +++import java.util.Set; +++import java.util.concurrent.Callable; +++import java.util.concurrent.ExecutionException; +++import java.util.concurrent.ExecutorService; +++import java.util.concurrent.Executors; +++import java.util.concurrent.FutureTask; +++ +++/* +++ * @test +++ * @bug 8010117 +++ * @summary Verify if CallerSensitive methods are annotated with +++ * sun.reflect.CallerSensitive annotation +++ * @build CallerSensitiveFinder MethodFinder ClassFileReader +++ * @run main/othervm/timeout=900 -mx800m CallerSensitiveFinder +++ */ +++public class CallerSensitiveFinder extends MethodFinder { +++ private static int numThreads = 3; +++ private static boolean verbose = false; +++ public static void main(String[] args) throws Exception { +++ List classes = new ArrayList<>(); +++ String testclasses = System.getProperty("test.classes", "."); +++ int i = 0; +++ while (i < args.length) { +++ String arg = args[i++]; +++ if (arg.equals("-v")) { +++ verbose = true; +++ } else { +++ Path p = Paths.get(testclasses, arg); +++ if (!p.toFile().exists()) { +++ throw new IllegalArgumentException(arg + " does not exist"); +++ } +++ classes.add(p); +++ } +++ } +++ if (classes.isEmpty()) { +++ classes.addAll(PlatformClassPath.getJREClasses()); +++ } +++ final String method = "sun/reflect/Reflection.getCallerClass"; +++ CallerSensitiveFinder csfinder = new CallerSensitiveFinder(method); +++ +++ List errors = csfinder.run(classes); +++ if (!errors.isEmpty()) { +++ throw new RuntimeException(errors.size() + +++ " caller-sensitive methods are missing @CallerSensitive annotation"); +++ } +++ } +++ +++ private final List csMethodsMissingAnnotation = new ArrayList<>(); +++ private final java.lang.reflect.Method mhnCallerSensitiveMethod; +++ public CallerSensitiveFinder(String... methods) throws Exception { +++ super(methods); +++ this.mhnCallerSensitiveMethod = getIsCallerSensitiveMethod(); +++ } +++ +++ static java.lang.reflect.Method getIsCallerSensitiveMethod() +++ throws ClassNotFoundException, NoSuchMethodException +++ { +++ Class cls = Class.forName("java.lang.invoke.MethodHandleNatives"); +++ java.lang.reflect.Method m = cls.getDeclaredMethod("isCallerSensitiveMethod", Class.class, String.class); +++ m.setAccessible(true); +++ return m; +++ } +++ +++ boolean inMethodHandlesList(String classname, String method) { +++ Class cls; +++ try { +++ cls = Class.forName(classname.replace('/', '.'), +++ false, +++ ClassLoader.getSystemClassLoader()); +++ return (Boolean) mhnCallerSensitiveMethod.invoke(null, cls, method); +++ } catch (ClassNotFoundException|IllegalAccessException e) { +++ throw new RuntimeException(e); +++ } catch (InvocationTargetException e) { +++ throw new RuntimeException(e.getCause()); +++ } +++ } +++ +++ public List run(List classes) throws IOException, InterruptedException, +++ ExecutionException, ConstantPoolException +++ { +++ ExecutorService pool = Executors.newFixedThreadPool(numThreads); +++ for (Path path : classes) { +++ ClassFileReader reader = ClassFileReader.newInstance(path.toFile()); +++ for (ClassFile cf : reader.getClassFiles()) { +++ String classFileName = cf.getName(); +++ // for each ClassFile +++ // parse constant pool to find matching method refs +++ // parse each method (caller) +++ // - visit and find method references matching the given method name +++ pool.submit(getTask(cf)); +++ } +++ } +++ waitForCompletion(); +++ pool.shutdown(); +++ return csMethodsMissingAnnotation; +++ } +++ +++ private static final String CALLER_SENSITIVE_ANNOTATION = "Lsun/reflect/CallerSensitive;"; +++ private static boolean isCallerSensitive(Method m, ConstantPool cp) +++ throws ConstantPoolException +++ { +++ RuntimeAnnotations_attribute attr = +++ (RuntimeAnnotations_attribute)m.attributes.get(Attribute.RuntimeVisibleAnnotations); +++ int index = 0; +++ if (attr != null) { +++ for (int i = 0; i < attr.annotations.length; i++) { +++ Annotation ann = attr.annotations[i]; +++ String annType = cp.getUTF8Value(ann.type_index); +++ if (CALLER_SENSITIVE_ANNOTATION.equals(annType)) { +++ return true; +++ } +++ } +++ } +++ return false; +++ } +++ +++ public void referenceFound(ClassFile cf, Method m, Set refs) +++ throws ConstantPoolException +++ { +++ String name = String.format("%s#%s %s", cf.getName(), +++ m.getName(cf.constant_pool), +++ m.descriptor.getValue(cf.constant_pool)); +++ if (!CallerSensitiveFinder.isCallerSensitive(m, cf.constant_pool)) { +++ csMethodsMissingAnnotation.add(name); +++ System.err.println(" Missing @CallerSensitive: " + name); +++ } else if (verbose) { +++ System.out.format("Caller found: %s%n", name); +++ } +++ if (m.access_flags.is(AccessFlags.ACC_PUBLIC)) { +++ if (!inMethodHandlesList(cf.getName(), m.getName(cf.constant_pool))) { +++ csMethodsMissingAnnotation.add(name); +++ System.err.println(" Missing in MethodHandleNatives list: " + name); +++ } else if (verbose) { +++ System.out.format("Caller found in MethodHandleNatives list: %s%n", name); +++ +++ } +++ } +++ } +++ +++ private final List> tasks = new ArrayList>(); +++ private FutureTask getTask(final ClassFile cf) { +++ FutureTask task = new FutureTask(new Callable() { +++ public String call() throws Exception { +++ return parse(cf); +++ } +++ }); +++ tasks.add(task); +++ return task; +++ } +++ +++ private void waitForCompletion() throws InterruptedException, ExecutionException { +++ for (FutureTask t : tasks) { +++ String s = t.get(); +++ } +++ System.out.println("Parsed " + tasks.size() + " classfiles"); +++ } +++ +++ static class PlatformClassPath { +++ static List getJREClasses() throws IOException { +++ List result = new ArrayList(); +++ Path home = Paths.get(System.getProperty("java.home")); +++ +++ if (home.endsWith("jre")) { +++ // jar files in /jre/lib +++ // skip /lib +++ result.addAll(addJarFiles(home.resolve("lib"))); +++ } else if (home.resolve("lib").toFile().exists()) { +++ // either a JRE or a jdk build image +++ File classes = home.resolve("classes").toFile(); +++ if (classes.exists() && classes.isDirectory()) { +++ // jdk build outputdir +++ result.add(classes.toPath()); +++ } +++ // add other JAR files +++ result.addAll(addJarFiles(home.resolve("lib"))); +++ } else { +++ throw new RuntimeException("\"" + home + "\" not a JDK home"); +++ } +++ return result; +++ } +++ +++ static List addJarFiles(final Path root) throws IOException { +++ final List result = new ArrayList(); +++ final Path ext = root.resolve("ext"); +++ Files.walkFileTree(root, new SimpleFileVisitor() { +++ @Override +++ public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) +++ throws IOException { +++ if (dir.equals(root) || dir.equals(ext)) { +++ return FileVisitResult.CONTINUE; +++ } else { +++ // skip other cobundled JAR files +++ return FileVisitResult.SKIP_SUBTREE; +++ } +++ } +++ +++ @Override +++ public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) +++ throws IOException { +++ File f = file.toFile(); +++ String fn = f.getName(); +++ // parse alt-rt.jar as well +++ if (fn.endsWith(".jar") && !fn.equals("jfxrt.jar")) { +++ result.add(file); +++ } +++ return FileVisitResult.CONTINUE; +++ } +++ }); +++ return result; +++ } +++ } +++} ++diff -r e56220b54fe2 -r d206cb658a99 test/sun/reflect/CallerSensitive/ClassFileReader.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/jdk/test/sun/reflect/CallerSensitive/ClassFileReader.java Mon Oct 21 18:05:56 2013 +0100 ++@@ -0,0 +1,338 @@ +++/* +++ * Copyright (c) 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. +++ * +++ * 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 com.sun.tools.classfile.ClassFile; +++import com.sun.tools.classfile.ConstantPoolException; +++import java.io.*; +++import java.nio.file.FileVisitResult; +++import java.nio.file.Files; +++import java.nio.file.Path; +++import java.nio.file.SimpleFileVisitor; +++import java.nio.file.attribute.BasicFileAttributes; +++import java.util.*; +++import java.util.jar.JarEntry; +++import java.util.jar.JarFile; +++ +++/** +++ * ClassFileReader reads ClassFile(s) of a given path that can be +++ * a .class file, a directory, or a JAR file. +++ */ +++public class ClassFileReader { +++ /** +++ * Returns a ClassFileReader instance of a given path. +++ */ +++ public static ClassFileReader newInstance(File path) throws IOException { +++ if (!path.exists()) { +++ throw new FileNotFoundException(path.getAbsolutePath()); +++ } +++ +++ if (path.isDirectory()) { +++ return new DirectoryReader(path.toPath()); +++ } else if (path.getName().endsWith(".jar")) { +++ return new JarFileReader(path.toPath()); +++ } else { +++ return new ClassFileReader(path.toPath()); +++ } +++ } +++ +++ /** +++ * Returns a ClassFileReader instance of a given JarFile. +++ */ +++ public static ClassFileReader newInstance(Path path, JarFile jf) throws IOException { +++ return new JarFileReader(path, jf); +++ } +++ +++ protected final Path path; +++ protected final String baseFileName; +++ private ClassFileReader(Path path) { +++ this.path = path; +++ this.baseFileName = path.getFileName() != null +++ ? path.getFileName().toString() +++ : path.toString(); +++ } +++ +++ public String getFileName() { +++ return baseFileName; +++ } +++ +++ /** +++ * Returns the ClassFile matching the given binary name +++ * or a fully-qualified class name. +++ */ +++ public ClassFile getClassFile(String name) throws IOException { +++ if (name.indexOf('.') > 0) { +++ int i = name.lastIndexOf('.'); +++ String pathname = name.replace('.', File.separatorChar) + ".class"; +++ if (baseFileName.equals(pathname) || +++ baseFileName.equals(pathname.substring(0, i) + "$" + +++ pathname.substring(i+1, pathname.length()))) { +++ return readClassFile(path); +++ } +++ } else { +++ if (baseFileName.equals(name.replace('/', File.separatorChar) + ".class")) { +++ return readClassFile(path); +++ } +++ } +++ return null; +++ } +++ +++ public Iterable getClassFiles() throws IOException { +++ return new Iterable() { +++ public Iterator iterator() { +++ return new FileIterator(); +++ } +++ }; +++ } +++ +++ protected ClassFile readClassFile(Path p) throws IOException { +++ InputStream is = null; +++ try { +++ is = Files.newInputStream(p); +++ return ClassFile.read(is); +++ } catch (ConstantPoolException e) { +++ throw new ClassFileError(e); +++ } finally { +++ if (is != null) { +++ is.close(); +++ } +++ } +++ } +++ +++ class FileIterator implements Iterator { +++ int count; +++ FileIterator() { +++ this.count = 0; +++ } +++ public boolean hasNext() { +++ return count == 0 && baseFileName.endsWith(".class"); +++ } +++ +++ public ClassFile next() { +++ if (!hasNext()) { +++ throw new NoSuchElementException(); +++ } +++ try { +++ ClassFile cf = readClassFile(path); +++ count++; +++ return cf; +++ } catch (IOException e) { +++ throw new ClassFileError(e); +++ } +++ } +++ +++ public void remove() { +++ throw new UnsupportedOperationException("Not supported yet."); +++ } +++ } +++ +++ public String toString() { +++ return path.toString(); +++ } +++ +++ private static class DirectoryReader extends ClassFileReader { +++ DirectoryReader(Path path) throws IOException { +++ super(path); +++ } +++ +++ public ClassFile getClassFile(String name) throws IOException { +++ if (name.indexOf('.') > 0) { +++ int i = name.lastIndexOf('.'); +++ String pathname = name.replace('.', File.separatorChar) + ".class"; +++ Path p = path.resolve(pathname); +++ if (!p.toFile().exists()) { +++ p = path.resolve(pathname.substring(0, i) + "$" + +++ pathname.substring(i+1, pathname.length())); +++ } +++ if (p.toFile().exists()) { +++ return readClassFile(p); +++ } +++ } else { +++ Path p = path.resolve(name + ".class"); +++ if (p.toFile().exists()) { +++ return readClassFile(p); +++ } +++ } +++ return null; +++ } +++ +++ public Iterable getClassFiles() throws IOException { +++ final Iterator iter = new DirectoryIterator(); +++ return new Iterable() { +++ public Iterator iterator() { +++ return iter; +++ } +++ }; +++ } +++ +++ private List walkTree(Path dir) throws IOException { +++ final List files = new ArrayList(); +++ Files.walkFileTree(dir, new SimpleFileVisitor() { +++ public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) +++ throws IOException { +++ if (file.toFile().getName().endsWith(".class")) { +++ files.add(file); +++ } +++ return FileVisitResult.CONTINUE; +++ } +++ }); +++ return files; +++ } +++ +++ class DirectoryIterator implements Iterator { +++ private List entries; +++ private int index = 0; +++ DirectoryIterator() throws IOException { +++ entries = walkTree(path); +++ index = 0; +++ } +++ +++ public boolean hasNext() { +++ return index != entries.size(); +++ } +++ +++ public ClassFile next() { +++ if (!hasNext()) { +++ throw new NoSuchElementException(); +++ } +++ Path path = entries.get(index++); +++ try { +++ return readClassFile(path); +++ } catch (IOException e) { +++ throw new ClassFileError(e); +++ } +++ } +++ +++ public void remove() { +++ throw new UnsupportedOperationException("Not supported yet."); +++ } +++ } +++ } +++ +++ private static class JarFileReader extends ClassFileReader { +++ final JarFile jarfile; +++ JarFileReader(Path path) throws IOException { +++ this(path, new JarFile(path.toFile())); +++ } +++ JarFileReader(Path path, JarFile jf) throws IOException { +++ super(path); +++ this.jarfile = jf; +++ } +++ +++ public ClassFile getClassFile(String name) throws IOException { +++ if (name.indexOf('.') > 0) { +++ int i = name.lastIndexOf('.'); +++ String entryName = name.replace('.', '/') + ".class"; +++ JarEntry e = jarfile.getJarEntry(entryName); +++ if (e == null) { +++ e = jarfile.getJarEntry(entryName.substring(0, i) + "$" +++ + entryName.substring(i + 1, entryName.length())); +++ } +++ if (e != null) { +++ return readClassFile(e); +++ } +++ } else { +++ JarEntry e = jarfile.getJarEntry(name + ".class"); +++ if (e != null) { +++ return readClassFile(e); +++ } +++ } +++ return null; +++ } +++ +++ private ClassFile readClassFile(JarEntry e) throws IOException { +++ InputStream is = null; +++ try { +++ is = jarfile.getInputStream(e); +++ return ClassFile.read(is); +++ } catch (ConstantPoolException ex) { +++ throw new IOException(ex); +++ } finally { +++ if (is != null) +++ is.close(); +++ } +++ } +++ +++ public Iterable getClassFiles() throws IOException { +++ final Iterator iter = new JarFileIterator(); +++ return new Iterable() { +++ public Iterator iterator() { +++ return iter; +++ } +++ }; +++ } +++ +++ class JarFileIterator implements Iterator { +++ private Enumeration entries; +++ private JarEntry nextEntry; +++ JarFileIterator() { +++ this.entries = jarfile.entries(); +++ while (entries.hasMoreElements()) { +++ JarEntry e = entries.nextElement(); +++ String name = e.getName(); +++ if (name.endsWith(".class")) { +++ this.nextEntry = e; +++ break; +++ } +++ } +++ } +++ +++ public boolean hasNext() { +++ return nextEntry != null; +++ } +++ +++ public ClassFile next() { +++ if (!hasNext()) { +++ throw new NoSuchElementException(); +++ } +++ +++ ClassFile cf; +++ try { +++ cf = readClassFile(nextEntry); +++ } catch (IOException e) { +++ throw new ClassFileError(e); +++ } +++ JarEntry entry = nextEntry; +++ nextEntry = null; +++ while (entries.hasMoreElements()) { +++ JarEntry e = entries.nextElement(); +++ String name = e.getName(); +++ if (name.endsWith(".class")) { +++ nextEntry = e; +++ break; +++ } +++ } +++ return cf; +++ } +++ +++ public void remove() { +++ throw new UnsupportedOperationException("Not supported yet."); +++ } +++ } +++ } +++ +++ public static class ClassFileError extends Error { +++ public ClassFileError(Throwable t) { +++ super(t); +++ } +++ } +++} ++diff -r e56220b54fe2 -r d206cb658a99 test/sun/reflect/CallerSensitive/MethodFinder.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/jdk/test/sun/reflect/CallerSensitive/MethodFinder.java Mon Oct 21 18:05:56 2013 +0100 ++@@ -0,0 +1,201 @@ +++/* +++ * Copyright (c) 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. +++ * +++ * 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 java.util.*; +++import com.sun.tools.classfile.*; +++import static com.sun.tools.classfile.ConstantPool.*; +++import com.sun.tools.classfile.Instruction.TypeKind; +++ +++/** +++ * MethodFinder utility class to find references to the given methods. +++ */ +++public abstract class MethodFinder { +++ final List methods; +++ public MethodFinder(String... methods) { +++ this.methods = Arrays.asList(methods); +++ } +++ +++ /** +++ * A callback method will be invoked when a method referencing +++ * any of the lookup methods. +++ * +++ * @param cf ClassFile +++ * @param m Method +++ * @param refs Set of constant pool indices that reference the methods +++ * matching the given lookup method names +++ */ +++ public abstract void referenceFound(ClassFile cf, Method m, Set refs) +++ throws ConstantPoolException; +++ +++ public String parse(ClassFile cf) throws ConstantPoolException { +++ List cprefs = new ArrayList(); +++ int index = 1; +++ for (ConstantPool.CPInfo cpInfo : cf.constant_pool.entries()) { +++ if (cpInfo.accept(cpVisitor, null)) { +++ cprefs.add(index); +++ } +++ index += cpInfo.size(); +++ } +++ +++ if (!cprefs.isEmpty()) { +++ for (Method m : cf.methods) { +++ Set refs = new HashSet(); +++ Code_attribute c_attr = (Code_attribute) m.attributes.get(Attribute.Code); +++ if (c_attr != null) { +++ for (Instruction instr : c_attr.getInstructions()) { +++ int idx = instr.accept(codeVisitor, cprefs); +++ if (idx > 0) { +++ refs.add(idx); +++ } +++ } +++ } +++ if (refs.size() > 0) { +++ referenceFound(cf, m, refs); +++ } +++ } +++ } +++ return cprefs.isEmpty() ? "" : cf.getName(); +++ } +++ +++ private ConstantPool.Visitor cpVisitor = +++ new ConstantPool.Visitor() +++ { +++ private boolean matches(CPRefInfo info) { +++ try { +++ CONSTANT_NameAndType_info nat = info.getNameAndTypeInfo(); +++ return matches(info.getClassName(), nat.getName(), nat.getType()); +++ } catch (ConstantPoolException ex) { +++ return false; +++ } +++ } +++ +++ private boolean matches(String cn, String name, String type) { +++ return methods.contains(cn + "." + name); +++ } +++ +++ public Boolean visitClass(CONSTANT_Class_info info, Void p) { +++ return false; +++ } +++ +++ public Boolean visitInterfaceMethodref(CONSTANT_InterfaceMethodref_info info, Void p) { +++ return matches(info); +++ } +++ +++ public Boolean visitMethodref(CONSTANT_Methodref_info info, Void p) { +++ return matches(info); +++ } +++ +++ public Boolean visitDouble(CONSTANT_Double_info info, Void p) { +++ return false; +++ } +++ +++ public Boolean visitFieldref(CONSTANT_Fieldref_info info, Void p) { +++ return false; +++ } +++ +++ public Boolean visitFloat(CONSTANT_Float_info info, Void p) { +++ return false; +++ } +++ +++ public Boolean visitInteger(CONSTANT_Integer_info info, Void p) { +++ return false; +++ } +++ +++ public Boolean visitInvokeDynamic(CONSTANT_InvokeDynamic_info info, Void p) { +++ return false; +++ } +++ +++ public Boolean visitLong(CONSTANT_Long_info info, Void p) { +++ return false; +++ } +++ +++ public Boolean visitNameAndType(CONSTANT_NameAndType_info info, Void p) { +++ return false; +++ } +++ +++ public Boolean visitMethodHandle(CONSTANT_MethodHandle_info info, Void p) { +++ return false; +++ } +++ +++ public Boolean visitMethodType(CONSTANT_MethodType_info info, Void p) { +++ return false; +++ } +++ +++ public Boolean visitString(CONSTANT_String_info info, Void p) { +++ return false; +++ } +++ +++ public Boolean visitUtf8(CONSTANT_Utf8_info info, Void p) { +++ return false; +++ } +++ }; +++ +++ private Instruction.KindVisitor> codeVisitor = +++ new Instruction.KindVisitor>() +++ { +++ public Integer visitNoOperands(Instruction instr, List p) { +++ return 0; +++ } +++ +++ public Integer visitArrayType(Instruction instr, TypeKind kind, List p) { +++ return 0; +++ } +++ +++ public Integer visitBranch(Instruction instr, int offset, List p) { +++ return 0; +++ } +++ +++ public Integer visitConstantPoolRef(Instruction instr, int index, List p) { +++ return p.contains(index) ? index : 0; +++ } +++ +++ public Integer visitConstantPoolRefAndValue(Instruction instr, int index, int value, List p) { +++ return p.contains(index) ? index : 0; +++ } +++ +++ public Integer visitLocal(Instruction instr, int index, List p) { +++ return 0; +++ } +++ +++ public Integer visitLocalAndValue(Instruction instr, int index, int value, List p) { +++ return 0; +++ } +++ +++ public Integer visitLookupSwitch(Instruction instr, int default_, int npairs, int[] matches, int[] offsets, List p) { +++ return 0; +++ } +++ +++ public Integer visitTableSwitch(Instruction instr, int default_, int low, int high, int[] offsets, List p) { +++ return 0; +++ } +++ +++ public Integer visitValue(Instruction instr, int value, List p) { +++ return 0; +++ } +++ +++ public Integer visitUnknown(Instruction instr, List p) { +++ return 0; +++ } +++ }; +++} +++ ++diff -r e56220b54fe2 -r d206cb658a99 test/sun/reflect/CallerSensitive/MissingCallerSensitive.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/jdk/test/sun/reflect/CallerSensitive/MissingCallerSensitive.java Mon Oct 21 18:05:56 2013 +0100 ++@@ -0,0 +1,73 @@ +++/* +++ * Copyright (c) 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. +++ * +++ * 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. +++ */ +++ +++/* +++ * @test +++ * @bug 8010117 +++ * @summary Test CallerSensitiveFinder to find missing annotation +++ * @compile -XDignore.symbol.file MissingCallerSensitive.java +++ * @build CallerSensitiveFinder MethodFinder ClassFileReader +++ * @run main/othervm MissingCallerSensitive +++ */ +++ +++import java.nio.file.Path; +++import java.nio.file.Paths; +++import java.util.*; +++public class MissingCallerSensitive { +++ public static void main(String[] args) throws Exception { +++ String testclasses = System.getProperty("test.classes", "."); +++ List classes = new ArrayList<>(); +++ classes.add(Paths.get(testclasses, "MissingCallerSensitive.class")); +++ +++ final String method = "sun/reflect/Reflection.getCallerClass"; +++ CallerSensitiveFinder csfinder = new CallerSensitiveFinder(method); +++ List errors = csfinder.run(classes); +++ /* +++ * Expected 1 method missing @CallerSenitive and 2 methods not in +++ * the MethodHandleNatives CS list +++ */ +++ if (errors.size() != 3) { +++ throw new RuntimeException("Unexpected number of methods found: " + errors.size()); +++ } +++ int count=0; +++ for (String e : errors) { +++ if (e.startsWith("MissingCallerSensitive#missingCallerSensitiveAnnotation ")) { +++ count++; +++ } +++ } +++ if (count != 2) { +++ throw new RuntimeException("Error: expected 1 method missing annotation & missing in the list"); +++ } +++ } +++ +++ @sun.reflect.CallerSensitive +++ public ClassLoader getCallerLoader() { +++ Class c = sun.reflect.Reflection.getCallerClass(); +++ return c.getClassLoader(); +++ } +++ +++ public ClassLoader missingCallerSensitiveAnnotation() { +++ Class c = sun.reflect.Reflection.getCallerClass(); +++ return c.getClassLoader(); +++ } +++} +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8010727-empty_logger_name.patch openjdk-6-6b27-1.12.6/patches/openjdk/8010727-empty_logger_name.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8010727-empty_logger_name.patch 2013-07-10 09:13:47.000000000 -0500 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8010727-empty_logger_name.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -1,14 +1,16 @@ + # HG changeset patch + # User mchung + # Date 1368544028 25200 +-# Node ID 776ac4b51f1538de78054f7774b9bbefc91374cb +-# Parent 0d497f17e31b82d42b5ae0a26e6636ee9ea65887 ++# Tue May 14 08:07:08 2013 -0700 ++# Node ID e3eae7996a478cd07125110456836a42c8a504c6 ++# Parent d4fca2113b280a7db03b67caae22e0ceafb51b89 + 8010727: WLS fails to add a logger with "" in its own LogManager subclass instance + Reviewed-by: alanb, jgish + +---- openjdk/jdk/src/share/classes/java/util/logging/LogManager.java +-+++ openjdk/jdk/src/share/classes/java/util/logging/LogManager.java +-@@ -496,7 +496,7 @@ ++diff -r d4fca2113b28 -r e3eae7996a47 src/share/classes/java/util/logging/LogManager.java ++--- openjdk/jdk/src/share/classes/java/util/logging/LogManager.java Fri Oct 25 17:51:03 2013 +0100 +++++ openjdk/jdk/src/share/classes/java/util/logging/LogManager.java Tue May 14 08:07:08 2013 -0700 ++@@ -486,7 +486,7 @@ + } + + synchronized void ensureRootLogger(Logger logger) { +@@ -17,9 +19,9 @@ Reviewed-by: alanb, jgish + return; + + // during initialization, rootLogger is null when +-new file mode 100644 +---- /dev/null +-+++ openjdk/jdk/test/java/util/logging/LogManagerInstanceTest.java ++diff -r d4fca2113b28 -r e3eae7996a47 test/java/util/logging/LogManagerInstanceTest.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/jdk/test/java/util/logging/LogManagerInstanceTest.java Tue May 14 08:07:08 2013 -0700 + @@ -0,0 +1,76 @@ + +/* + + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8010939-logmanager_deadlock.patch openjdk-6-6b27-1.12.6/patches/openjdk/8010939-logmanager_deadlock.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8010939-logmanager_deadlock.patch 2013-07-10 09:13:47.000000000 -0500 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8010939-logmanager_deadlock.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -1,14 +1,16 @@ + # HG changeset patch + # User jgish + # Date 1366415410 25200 +-# Node ID 871acb7cd95cb1dedae326e0e8eb4630f4eb980d +-# Parent 776ac4b51f1538de78054f7774b9bbefc91374cb ++# Fri Apr 19 16:50:10 2013 -0700 ++# Node ID ed410e3d08fe7792e6c08e411580564d2562c03e ++# Parent e3eae7996a478cd07125110456836a42c8a504c6 + 8010939: Deadlock in LogManager + Summary: re-order locks to avoid deadlock + Reviewed-by: mchung, alanb + +---- openjdk/jdk/src/share/classes/java/util/logging/LogManager.java +-+++ openjdk/jdk/src/share/classes/java/util/logging/LogManager.java ++diff -r e3eae7996a47 -r ed410e3d08fe src/share/classes/java/util/logging/LogManager.java ++--- openjdk/jdk/src/share/classes/java/util/logging/LogManager.java Tue May 14 08:07:08 2013 -0700 +++++ openjdk/jdk/src/share/classes/java/util/logging/LogManager.java Fri Apr 19 16:50:10 2013 -0700 + @@ -33,10 +33,8 @@ + import java.lang.ref.WeakReference; + import java.beans.PropertyChangeListener; +@@ -28,7 +30,7 @@ Reviewed-by: mchung, alanb + private Properties props = new Properties(); + private PropertyChangeSupport changes + = new PropertyChangeSupport(LogManager.class); +-@@ -516,14 +513,11 @@ ++@@ -506,14 +503,11 @@ + throw new NullPointerException(); + } + +@@ -45,7 +47,7 @@ Reviewed-by: mchung, alanb + // a new one to be registered. + removeLogger(name); + } else { +-@@ -571,6 +565,8 @@ ++@@ -561,6 +555,8 @@ + return true; + } + +@@ -54,7 +56,7 @@ Reviewed-by: mchung, alanb + void removeLogger(String name) { + namedLoggers.remove(name); + } +-@@ -853,6 +849,7 @@ ++@@ -845,6 +841,7 @@ + if (name == null) { + throw new NullPointerException(); + } +@@ -62,9 +64,9 @@ Reviewed-by: mchung, alanb + LoggerContext cx = getUserContext(); + if (cx.addLocalLogger(logger)) { + // Do we have a per logger handler too? +-new file mode 100644 +---- /dev/null +-+++ openjdk/jdk/test/java/util/logging/DrainFindDeadlockTest.java ++diff -r e3eae7996a47 -r ed410e3d08fe test/java/util/logging/DrainFindDeadlockTest.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/jdk/test/java/util/logging/DrainFindDeadlockTest.java Fri Apr 19 16:50:10 2013 -0700 + @@ -0,0 +1,196 @@ + +/* + + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8011071-better_crypto_provider_handling.patch openjdk-6-6b27-1.12.6/patches/openjdk/8011071-better_crypto_provider_handling.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8011071-better_crypto_provider_handling.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8011071-better_crypto_provider_handling.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,287 @@ ++# HG changeset patch ++# User ascarpino ++# Date 1381846341 -3600 ++# Tue Oct 15 15:12:21 2013 +0100 ++# Node ID df887df12ad1543894fe79f753983754ceef5c73 ++# Parent db4712506571ae3ae2d37b91e63641b18c3258f2 ++8011071: Better crypto provider handling ++Reviewed-by: hawtin, valeriep ++ ++diff -r db4712506571 -r df887df12ad1 src/share/classes/com/sun/crypto/provider/DHPrivateKey.java ++--- openjdk/jdk/src/share/classes/com/sun/crypto/provider/DHPrivateKey.java Mon Jul 08 14:34:36 2013 +0400 +++++ openjdk/jdk/src/share/classes/com/sun/crypto/provider/DHPrivateKey.java Tue Oct 15 15:12:21 2013 +0100 ++@@ -1,5 +1,5 @@ ++ /* ++- * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved. +++ * Copyright (c) 1997, 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 ++@@ -279,22 +279,6 @@ ++ return new DHParameterSpec(this.p, this.g); ++ } ++ ++- public String toString() { ++- String LINE_SEP = System.getProperty("line.separator"); ++- ++- StringBuffer strbuf ++- = new StringBuffer("SunJCE Diffie-Hellman Private Key:" ++- + LINE_SEP + "x:" + LINE_SEP ++- + Debug.toHexString(this.x) ++- + LINE_SEP + "p:" + LINE_SEP ++- + Debug.toHexString(this.p) ++- + LINE_SEP + "g:" + LINE_SEP ++- + Debug.toHexString(this.g)); ++- if (this.l != 0) ++- strbuf.append(LINE_SEP + "l:" + LINE_SEP + " " + this.l); ++- return strbuf.toString(); ++- } ++- ++ private void parseKeyBits() throws InvalidKeyException { ++ try { ++ DerInputStream in = new DerInputStream(this.key); ++diff -r db4712506571 -r df887df12ad1 src/share/classes/sun/security/ec/ECPrivateKeyImpl.java ++--- openjdk/jdk/src/share/classes/sun/security/ec/ECPrivateKeyImpl.java Mon Jul 08 14:34:36 2013 +0400 +++++ openjdk/jdk/src/share/classes/sun/security/ec/ECPrivateKeyImpl.java Tue Oct 15 15:12:21 2013 +0100 ++@@ -1,5 +1,5 @@ ++ /* ++- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. +++ * Copyright (c) 2006, 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 ++@@ -153,12 +153,4 @@ ++ throw new InvalidKeyException("Invalid EC private key", e); ++ } ++ } ++- ++- // return a string representation of this key for debugging ++- public String toString() { ++- return "Sun EC private key, " + params.getCurve().getField().getFieldSize() ++- + " bits\n private value: " ++- + s + "\n parameters: " + params; ++- } ++- ++ } ++diff -r db4712506571 -r df887df12ad1 src/share/classes/sun/security/jgss/GSSCredentialImpl.java ++--- openjdk/jdk/src/share/classes/sun/security/jgss/GSSCredentialImpl.java Mon Jul 08 14:34:36 2013 +0400 +++++ openjdk/jdk/src/share/classes/sun/security/jgss/GSSCredentialImpl.java Tue Oct 15 15:12:21 2013 +0100 ++@@ -1,5 +1,5 @@ ++ /* ++- * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved. +++ * Copyright (c) 2000, 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 ++@@ -630,7 +630,7 @@ ++ buffer.append(element.isAcceptorCredential() ? ++ " Accept" : ""); ++ buffer.append(" ["); ++- buffer.append(element.toString()); +++ buffer.append(element.getClass()); ++ buffer.append(']'); ++ } catch (GSSException e) { ++ // skip to next element ++diff -r db4712506571 -r df887df12ad1 src/share/classes/sun/security/pkcs/PKCS8Key.java ++--- openjdk/jdk/src/share/classes/sun/security/pkcs/PKCS8Key.java Mon Jul 08 14:34:36 2013 +0400 +++++ openjdk/jdk/src/share/classes/sun/security/pkcs/PKCS8Key.java Tue Oct 15 15:12:21 2013 +0100 ++@@ -1,5 +1,5 @@ ++ /* ++- * Copyright (c) 1996, 2004, Oracle and/or its affiliates. All rights reserved. +++ * Copyright (c) 1996, 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 ++@@ -304,17 +304,6 @@ ++ return encodedKey.clone(); ++ } ++ ++- /* ++- * Returns a printable representation of the key ++- */ ++- public String toString () ++- { ++- HexDumpEncoder encoder = new HexDumpEncoder (); ++- ++- return "algorithm = " + algid.toString () ++- + ", unparsed keybits = \n" + encoder.encodeBuffer (key); ++- } ++- ++ /** ++ * Initialize an PKCS8Key object from an input stream. The data ++ * on that input stream must be encoded using DER, obeying the ++diff -r db4712506571 -r df887df12ad1 src/share/classes/sun/security/pkcs11/P11Key.java ++--- openjdk/jdk/src/share/classes/sun/security/pkcs11/P11Key.java Mon Jul 08 14:34:36 2013 +0400 +++++ openjdk/jdk/src/share/classes/sun/security/pkcs11/P11Key.java Tue Oct 15 15:12:21 2013 +0100 ++@@ -1,5 +1,5 @@ ++ /* ++- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. +++ * Copyright (c) 2003, 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 ++@@ -542,27 +542,6 @@ ++ fetchValues(); ++ return coeff; ++ } ++- public String toString() { ++- fetchValues(); ++- StringBuilder sb = new StringBuilder(super.toString()); ++- sb.append("\n modulus: "); ++- sb.append(n); ++- sb.append("\n public exponent: "); ++- sb.append(e); ++- sb.append("\n private exponent: "); ++- sb.append(d); ++- sb.append("\n prime p: "); ++- sb.append(p); ++- sb.append("\n prime q: "); ++- sb.append(q); ++- sb.append("\n prime exponent p: "); ++- sb.append(pe); ++- sb.append("\n prime exponent q: "); ++- sb.append(qe); ++- sb.append("\n crt coefficient: "); ++- sb.append(coeff); ++- return sb.toString(); ++- } ++ } ++ ++ // RSA non-CRT private key ++@@ -616,15 +595,6 @@ ++ fetchValues(); ++ return d; ++ } ++- public String toString() { ++- fetchValues(); ++- StringBuilder sb = new StringBuilder(super.toString()); ++- sb.append("\n modulus: "); ++- sb.append(n); ++- sb.append("\n private exponent: "); ++- sb.append(d); ++- return sb.toString(); ++- } ++ } ++ ++ private static final class P11RSAPublicKey extends P11Key ++@@ -794,11 +764,6 @@ ++ fetchValues(); ++ return params; ++ } ++- public String toString() { ++- fetchValues(); ++- return super.toString() + "\n x: " + x + "\n p: " + params.getP() ++- + "\n q: " + params.getQ() + "\n g: " + params.getG(); ++- } ++ } ++ ++ private static final class P11DHPrivateKey extends P11Key ++@@ -856,11 +821,6 @@ ++ fetchValues(); ++ return params; ++ } ++- public String toString() { ++- fetchValues(); ++- return super.toString() + "\n x: " + x + "\n p: " + params.getP() ++- + "\n g: " + params.getG(); ++- } ++ } ++ ++ private static final class P11DHPublicKey extends P11Key ++@@ -977,12 +937,6 @@ ++ fetchValues(); ++ return params; ++ } ++- public String toString() { ++- fetchValues(); ++- return super.toString() ++- + "\n private value: " + s ++- + "\n parameters: " + params; ++- } ++ } ++ ++ private static final class P11ECPublicKey extends P11Key ++diff -r db4712506571 -r df887df12ad1 src/share/classes/sun/security/provider/DSAPrivateKey.java ++--- openjdk/jdk/src/share/classes/sun/security/provider/DSAPrivateKey.java Mon Jul 08 14:34:36 2013 +0400 +++++ openjdk/jdk/src/share/classes/sun/security/provider/DSAPrivateKey.java Tue Oct 15 15:12:21 2013 +0100 ++@@ -1,5 +1,5 @@ ++ /* ++- * Copyright (c) 1996, 2002, Oracle and/or its affiliates. All rights reserved. +++ * Copyright (c) 1996, 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 ++@@ -142,11 +142,6 @@ ++ } ++ } ++ ++- public String toString() { ++- return "Sun DSA Private Key \nparameters:" + algid + "\nx: " + ++- Debug.toHexString(x) + "\n"; ++- } ++- ++ protected void parseKeyBits() throws InvalidKeyException { ++ try { ++ DerInputStream in = new DerInputStream(key); ++diff -r db4712506571 -r df887df12ad1 src/share/classes/sun/security/rsa/RSAPrivateCrtKeyImpl.java ++--- openjdk/jdk/src/share/classes/sun/security/rsa/RSAPrivateCrtKeyImpl.java Mon Jul 08 14:34:36 2013 +0400 +++++ openjdk/jdk/src/share/classes/sun/security/rsa/RSAPrivateCrtKeyImpl.java Tue Oct 15 15:12:21 2013 +0100 ++@@ -1,5 +1,5 @@ ++ /* ++- * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved. +++ * Copyright (c) 2003, 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 ++@@ -225,29 +225,4 @@ ++ } ++ return b; ++ } ++- ++- // return a string representation of this key for debugging ++- public String toString() { ++- StringBuffer sb = new StringBuffer(); ++- sb.append("Sun RSA private CRT key, "); ++- sb.append(n.bitLength()); ++- sb.append(" bits\n modulus: "); ++- sb.append(n); ++- sb.append("\n public exponent: "); ++- sb.append(e); ++- sb.append("\n private exponent: "); ++- sb.append(d); ++- sb.append("\n prime p: "); ++- sb.append(p); ++- sb.append("\n prime q: "); ++- sb.append(q); ++- sb.append("\n prime exponent p: "); ++- sb.append(pe); ++- sb.append("\n prime exponent q: "); ++- sb.append(qe); ++- sb.append("\n crt coefficient: "); ++- sb.append(coeff); ++- return sb.toString(); ++- } ++- ++ } ++diff -r db4712506571 -r df887df12ad1 src/share/classes/sun/security/rsa/RSAPrivateKeyImpl.java ++--- openjdk/jdk/src/share/classes/sun/security/rsa/RSAPrivateKeyImpl.java Mon Jul 08 14:34:36 2013 +0400 +++++ openjdk/jdk/src/share/classes/sun/security/rsa/RSAPrivateKeyImpl.java Tue Oct 15 15:12:21 2013 +0100 ++@@ -1,5 +1,5 @@ ++ /* ++- * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved. +++ * Copyright (c) 2003, 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 ++@@ -98,11 +98,4 @@ ++ public BigInteger getPrivateExponent() { ++ return d; ++ } ++- ++- // return a string representation of this key for debugging ++- public String toString() { ++- return "Sun RSA private key, " + n.bitLength() + " bits\n modulus: " ++- + n + "\n private exponent: " + d; ++- } ++- ++ } +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8011081-improve_jhat.patch openjdk-6-6b27-1.12.6/patches/openjdk/8011081-improve_jhat.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8011081-improve_jhat.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8011081-improve_jhat.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,267 @@ ++# HG changeset patch ++# User jbachorik ++# Date 1366702651 -7200 ++# Tue Apr 23 09:37:31 2013 +0200 ++# Node ID de77043ae6b9c9693ae149d0ab9bae4d5007ce19 ++# Parent df887df12ad1543894fe79f753983754ceef5c73 ++8011081: Improve jhat ++Summary: Properly escape HTML output ++Reviewed-by: alanb, mschoene, sundar ++ ++diff -r df887df12ad1 -r de77043ae6b9 src/share/classes/com/sun/tools/hat/internal/server/AllClassesQuery.java ++--- openjdk/jdk/src/share/classes/com/sun/tools/hat/internal/server/AllClassesQuery.java Tue Oct 15 15:12:21 2013 +0100 +++++ openjdk/jdk/src/share/classes/com/sun/tools/hat/internal/server/AllClassesQuery.java Tue Apr 23 09:37:31 2013 +0200 ++@@ -84,7 +84,7 @@ ++ lastPackage = pkg; ++ printClass(clazz); ++ if (clazz.getId() != -1) { ++- out.print(" [" + clazz.getIdString() + "]"); +++ print(" [" + clazz.getIdString() + "]"); ++ } ++ out.println("
"); ++ } ++diff -r df887df12ad1 -r de77043ae6b9 src/share/classes/com/sun/tools/hat/internal/server/ClassQuery.java ++--- openjdk/jdk/src/share/classes/com/sun/tools/hat/internal/server/ClassQuery.java Tue Oct 15 15:12:21 2013 +0100 +++++ openjdk/jdk/src/share/classes/com/sun/tools/hat/internal/server/ClassQuery.java Tue Apr 23 09:37:31 2013 +0200 ++@@ -112,12 +112,12 @@ ++ out.println("

Instances

"); ++ ++ printAnchorStart(); ++- out.print("instances/" + encodeForURL(clazz)); +++ print("instances/" + encodeForURL(clazz)); ++ out.print("\">"); ++ out.println("Exclude subclasses
"); ++ ++ printAnchorStart(); ++- out.print("allInstances/" + encodeForURL(clazz)); +++ print("allInstances/" + encodeForURL(clazz)); ++ out.print("\">"); ++ out.println("Include subclasses
"); ++ ++@@ -126,19 +126,19 @@ ++ out.println("

New Instances

"); ++ ++ printAnchorStart(); ++- out.print("newInstances/" + encodeForURL(clazz)); +++ print("newInstances/" + encodeForURL(clazz)); ++ out.print("\">"); ++ out.println("Exclude subclasses
"); ++ ++ printAnchorStart(); ++- out.print("allNewInstances/" + encodeForURL(clazz)); +++ print("allNewInstances/" + encodeForURL(clazz)); ++ out.print("\">"); ++ out.println("Include subclasses
"); ++ } ++ ++ out.println("

References summary by Type

"); ++ printAnchorStart(); ++- out.print("refsByType/" + encodeForURL(clazz)); +++ print("refsByType/" + encodeForURL(clazz)); ++ out.print("\">"); ++ out.println("References summary by type"); ++ ++diff -r df887df12ad1 -r de77043ae6b9 src/share/classes/com/sun/tools/hat/internal/server/HttpReader.java ++--- openjdk/jdk/src/share/classes/com/sun/tools/hat/internal/server/HttpReader.java Tue Oct 15 15:12:21 2013 +0100 +++++ openjdk/jdk/src/share/classes/com/sun/tools/hat/internal/server/HttpReader.java Tue Apr 23 09:37:31 2013 +0200 ++@@ -41,21 +41,17 @@ ++ ++ ++ import java.net.Socket; ++-import java.net.ServerSocket; ++-import java.net.InetAddress; ++ ++ import java.io.InputStream; ++ import java.io.BufferedInputStream; ++ import java.io.IOException; ++-import java.io.Writer; ++ import java.io.BufferedWriter; ++ import java.io.PrintWriter; ++-import java.io.OutputStream; ++ import java.io.OutputStreamWriter; ++-import java.io.BufferedOutputStream; ++ ++ import com.sun.tools.hat.internal.model.Snapshot; ++ import com.sun.tools.hat.internal.oql.OQLEngine; +++import com.sun.tools.hat.internal.util.Misc; ++ ++ public class HttpReader implements Runnable { ++ ++@@ -87,7 +83,7 @@ ++ outputError("Protocol error"); ++ } ++ int data; ++- StringBuffer queryBuf = new StringBuffer(); +++ StringBuilder queryBuf = new StringBuilder(); ++ while ((data = in.read()) != -1 && data != ' ') { ++ char ch = (char) data; ++ queryBuf.append(ch); ++@@ -217,7 +213,7 @@ ++ private void outputError(String msg) { ++ out.println(); ++ out.println(""); ++- out.println(msg); +++ out.println(Misc.encodeHtml(msg)); ++ out.println(""); ++ } ++ ++diff -r df887df12ad1 -r de77043ae6b9 src/share/classes/com/sun/tools/hat/internal/server/InstancesCountQuery.java ++--- openjdk/jdk/src/share/classes/com/sun/tools/hat/internal/server/InstancesCountQuery.java Tue Oct 15 15:12:21 2013 +0100 +++++ openjdk/jdk/src/share/classes/com/sun/tools/hat/internal/server/InstancesCountQuery.java Tue Apr 23 09:37:31 2013 +0200 ++@@ -102,7 +102,7 @@ ++ int count = clazz.getInstancesCount(false); ++ print("" + count); ++ printAnchorStart(); ++- out.print("instances/" + encodeForURL(classes[i])); +++ print("instances/" + encodeForURL(classes[i])); ++ out.print("\"> "); ++ if (count == 1) { ++ print("instance"); ++@@ -121,7 +121,7 @@ ++ } ++ print("("); ++ printAnchorStart(); ++- out.print("newInstances/" + encodeForURL(classes[i])); +++ print("newInstances/" + encodeForURL(classes[i])); ++ out.print("\">"); ++ print("" + newInst + " new"); ++ out.print(") "); ++diff -r df887df12ad1 -r de77043ae6b9 src/share/classes/com/sun/tools/hat/internal/server/OQLHelp.java ++--- openjdk/jdk/src/share/classes/com/sun/tools/hat/internal/server/OQLHelp.java Tue Oct 15 15:12:21 2013 +0100 +++++ openjdk/jdk/src/share/classes/com/sun/tools/hat/internal/server/OQLHelp.java Tue Apr 23 09:37:31 2013 +0200 ++@@ -54,10 +54,7 @@ ++ out.print((char)ch); ++ } ++ } catch (Exception exp) { ++- out.println(exp.getMessage()); ++- out.println("
");
++-            exp.printStackTrace(out);
++-            out.println("
"); +++ printException(exp); ++ } ++ } ++ } ++diff -r df887df12ad1 -r de77043ae6b9 src/share/classes/com/sun/tools/hat/internal/server/OQLQuery.java ++--- openjdk/jdk/src/share/classes/com/sun/tools/hat/internal/server/OQLQuery.java Tue Oct 15 15:12:21 2013 +0100 +++++ openjdk/jdk/src/share/classes/com/sun/tools/hat/internal/server/OQLQuery.java Tue Apr 23 09:37:31 2013 +0200 ++@@ -32,10 +32,7 @@ ++ ++ package com.sun.tools.hat.internal.server; ++ ++-import com.sun.tools.hat.internal.model.*; ++ import com.sun.tools.hat.internal.oql.*; ++-import com.sun.tools.hat.internal.util.ArraySorter; ++-import com.sun.tools.hat.internal.util.Comparer; ++ ++ /** ++ * This handles Object Query Language (OQL) queries. ++@@ -68,7 +65,7 @@ ++ out.println("

"); ++ out.println(""); ++ out.println("

"); ++@@ -91,10 +88,7 @@ ++ try { ++ out.println(engine.toHtml(o)); ++ } catch (Exception e) { ++- out.println(e.getMessage()); ++- out.println("
");
++-                             e.printStackTrace(out);
++-                             out.println("
"); +++ printException(e); ++ } ++ out.println(""); ++ return false; ++@@ -102,10 +96,7 @@ ++ }); ++ out.println(""); ++ } catch (OQLException exp) { ++- out.println(exp.getMessage()); ++- out.println("
");
++-            exp.printStackTrace(out);
++-            out.println("
"); +++ printException(exp); ++ } ++ } ++ ++diff -r df887df12ad1 -r de77043ae6b9 src/share/classes/com/sun/tools/hat/internal/server/QueryHandler.java ++--- openjdk/jdk/src/share/classes/com/sun/tools/hat/internal/server/QueryHandler.java Tue Oct 15 15:12:21 2013 +0100 +++++ openjdk/jdk/src/share/classes/com/sun/tools/hat/internal/server/QueryHandler.java Tue Apr 23 09:37:31 2013 +0200 ++@@ -36,6 +36,7 @@ ++ ++ import com.sun.tools.hat.internal.model.*; ++ import com.sun.tools.hat.internal.util.Misc; +++import java.io.StringWriter; ++ ++ import java.net.URLEncoder; ++ import java.io.UnsupportedEncodingException; ++@@ -96,7 +97,7 @@ ++ } ++ ++ protected void error(String msg) { ++- out.println(msg); +++ println(msg); ++ } ++ ++ protected void printAnchorStart() { ++@@ -160,7 +161,6 @@ ++ out.println("null"); ++ return; ++ } ++- String name = clazz.getName(); ++ printAnchorStart(); ++ out.print("class/"); ++ print(encodeForURL(clazz)); ++@@ -208,6 +208,15 @@ ++ } ++ } ++ +++ protected void printException(Throwable t) { +++ println(t.getMessage()); +++ out.println("
");
+++        StringWriter sw = new StringWriter();
+++        t.printStackTrace(new PrintWriter(sw));
+++        print(sw.toString());
+++        out.println("
"); +++ } +++ ++ protected void printHex(long addr) { ++ if (snapshot.getIdentifierSize() == 4) { ++ out.print(Misc.toHex((int)addr)); ++@@ -223,4 +232,8 @@ ++ protected void print(String str) { ++ out.print(Misc.encodeHtml(str)); ++ } +++ +++ protected void println(String str) { +++ out.println(Misc.encodeHtml(str)); +++ } ++ } ++diff -r df887df12ad1 -r de77043ae6b9 src/share/classes/com/sun/tools/hat/internal/server/RefsByTypeQuery.java ++--- openjdk/jdk/src/share/classes/com/sun/tools/hat/internal/server/RefsByTypeQuery.java Tue Oct 15 15:12:21 2013 +0100 +++++ openjdk/jdk/src/share/classes/com/sun/tools/hat/internal/server/RefsByTypeQuery.java Tue Apr 23 09:37:31 2013 +0200 ++@@ -89,7 +89,7 @@ ++ out.println("

"); ++ printClass(clazz); ++ if (clazz.getId() != -1) { ++- out.println("[" + clazz.getIdString() + "]"); +++ println("[" + clazz.getIdString() + "]"); ++ } ++ out.println("

"); ++ ++@@ -125,9 +125,9 @@ ++ JavaClass clazz = classes[i]; ++ out.println(""); ++ out.print(""); ++- out.print(clazz.getName()); +++ print(clazz.getName()); ++ out.println(""); ++ out.println(""); ++ out.println(map.get(clazz)); +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8011139-revise_checking_getenclosingclass.patch openjdk-6-6b27-1.12.6/patches/openjdk/8011139-revise_checking_getenclosingclass.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8011139-revise_checking_getenclosingclass.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8011139-revise_checking_getenclosingclass.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,58 @@ ++# HG changeset patch ++# User jfranck ++# Date 1382726704 -3600 ++# Fri Oct 25 19:45:04 2013 +0100 ++# Node ID a2b63addc0633a5ef8d196d1019d78b920cb4b1a ++# Parent e7ed5dad88eefc49130ae02bcbf329d72f18f12e ++8011139: (reflect) Revise checking in getEnclosingClass ++Reviewed-by: darcy, mchung, ahgross ++ ++diff -r e7ed5dad88ee -r a2b63addc063 src/share/classes/java/lang/Class.java ++--- openjdk/jdk/src/share/classes/java/lang/Class.java Fri Oct 25 19:37:20 2013 +0100 +++++ openjdk/jdk/src/share/classes/java/lang/Class.java Fri Oct 25 19:45:04 2013 +0100 ++@@ -1131,13 +1131,9 @@ ++ enclosingCandidate = enclosingClass; ++ } ++ ++- // be very careful not to change the stack depth of this ++- // checkMemberAccess call for security reasons ++- // see java.lang.SecurityManager.checkMemberAccess ++- if (enclosingCandidate != null) { ++- enclosingCandidate.checkMemberAccess(Member.DECLARED, ++- Reflection.getCallerClass(), true); ++- } +++ if (enclosingCandidate != null) +++ enclosingCandidate.checkPackageAccess( +++ ClassLoader.getClassLoader(Reflection.getCallerClass()), true); ++ return enclosingCandidate; ++ } ++ ++@@ -2214,6 +2210,8 @@ ++ * Check if client is allowed to access members. If access is denied, ++ * throw a SecurityException. ++ * +++ * This method also enforces package access. +++ * ++ *

Default policy: allow all clients access with normal Java access ++ * control. ++ */ ++@@ -2234,7 +2232,19 @@ ++ // checkMemberAccess of subclasses of SecurityManager as specified. ++ s.checkMemberAccess(this, which); ++ } +++ this.checkPackageAccess(ccl, checkProxyInterfaces); +++ } +++ } ++ +++ /* +++ * Checks if a client loaded in ClassLoader ccl is allowed to access this +++ * class under the current package access policy. If access is denied, +++ * throw a SecurityException. +++ */ +++ private void checkPackageAccess(final ClassLoader ccl, boolean checkProxyInterfaces) { +++ final SecurityManager s = System.getSecurityManager(); +++ if (s != null) { +++ final ClassLoader cl = getClassLoader0(); ++ if (ReflectUtil.needsPackageAccessCheck(ccl, cl)) { ++ ++ String name = this.getName(); +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8011157-improve_corba_portability-jdk.patch openjdk-6-6b27-1.12.6/patches/openjdk/8011157-improve_corba_portability-jdk.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8011157-improve_corba_portability-jdk.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8011157-improve_corba_portability-jdk.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,125 @@ ++# HG changeset patch ++# User msheppar ++# Date 1381849187 -3600 ++# Tue Oct 15 15:59:47 2013 +0100 ++# Node ID 468ec57a684409e4c7ed97be8ffa36322fb8a36b ++# Parent de77043ae6b9c9693ae149d0ab9bae4d5007ce19 ++8011157: Improve CORBA portablility ++Summary: fix also reviewed by Alexander Fomin ++Reviewed-by: alanb, coffeys, skoivu ++ ++diff -r de77043ae6b9 -r 468ec57a6844 make/com/sun/jmx/Makefile ++--- openjdk/jdk/make/com/sun/jmx/Makefile Tue Apr 23 09:37:31 2013 +0200 +++++ openjdk/jdk/make/com/sun/jmx/Makefile Tue Oct 15 15:59:47 2013 +0100 ++@@ -1,5 +1,5 @@ ++ # ++-# Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. +++# Copyright (c) 2003, 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 ++@@ -126,11 +126,13 @@ ++ $(RMIC) -classpath "$(CLASSDESTDIR)" \ ++ -d $(CLASSDESTDIR) \ ++ -iiop -v1.2 \ +++ -emitPermissionCheck \ ++ $(subst /,.,$(<:$(CLASSDESTDIR)/%.class=%)) ++ $(RMIC) $(HOTSPOT_INTERPRETER_FLAG) -classpath "$(CLASSDESTDIR)" \ ++ -d $(CLASSDESTDIR) \ ++ -iiop -v1.2 \ ++ -standardPackage \ +++ -emitPermissionCheck \ ++ $(subst /,.,$(<:$(CLASSDESTDIR)/%.class=%)) ++ @$(java-vm-cleanup) ++ ++diff -r de77043ae6b9 -r 468ec57a6844 src/share/classes/javax/management/modelmbean/RequiredModelMBean.java ++--- openjdk/jdk/src/share/classes/javax/management/modelmbean/RequiredModelMBean.java Tue Apr 23 09:37:31 2013 +0200 +++++ openjdk/jdk/src/share/classes/javax/management/modelmbean/RequiredModelMBean.java Tue Oct 15 15:59:47 2013 +0100 ++@@ -1,5 +1,5 @@ ++ /* ++- * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. +++ * Copyright (c) 2000, 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 ++@@ -299,11 +299,15 @@ ++ RequiredModelMBean.class.getName(), ++ "setModelMBeanInfo(ModelMBeanInfo)", ++ "Setting ModelMBeanInfo to " + printModelMBeanInfo(mbi)); +++ int noOfNotifications = 0; +++ if (mbi.getNotifications() != null) { +++ noOfNotifications = mbi.getNotifications().length; +++ } ++ MODELMBEAN_LOGGER.logp(Level.FINER, ++ RequiredModelMBean.class.getName(), ++ "setModelMBeanInfo(ModelMBeanInfo)", ++ "ModelMBeanInfo notifications has " + ++- (mbi.getNotifications()).length + " elements"); +++ noOfNotifications + " elements"); ++ } ++ ++ modelMBeanInfo = (ModelMBeanInfo)mbi.clone(); ++@@ -3001,4 +3005,5 @@ ++ Void.class.getName() ++ }; ++ } +++ ++ } ++diff -r de77043ae6b9 -r 468ec57a6844 src/share/classes/javax/management/remote/rmi/RMIConnector.java ++--- openjdk/jdk/src/share/classes/javax/management/remote/rmi/RMIConnector.java Tue Apr 23 09:37:31 2013 +0200 +++++ openjdk/jdk/src/share/classes/javax/management/remote/rmi/RMIConnector.java Tue Oct 15 15:59:47 2013 +0100 ++@@ -1,5 +1,5 @@ ++ /* ++- * Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved. +++ * Copyright (c) 2002, 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 ++@@ -60,6 +60,7 @@ ++ import java.security.AccessController; ++ import java.security.PrivilegedAction; ++ import java.security.PrivilegedExceptionAction; +++import java.security.PrivilegedActionException; ++ import java.security.ProtectionDomain; ++ import java.util.Arrays; ++ import java.util.Collections; ++@@ -241,10 +242,21 @@ ++ //-------------------------------------------------------------------- ++ // implements JMXConnector interface ++ //-------------------------------------------------------------------- +++ +++ /** +++ * @throws IOException if the connection could not be made because of a +++ * communication problem, or in the case of the {@code iiop} protocol, +++ * that RMI/IIOP is not supported +++ */ ++ public void connect() throws IOException { ++ connect(null); ++ } ++ +++ /** +++ * @throws IOException if the connection could not be made because of a +++ * communication problem, or in the case of the {@code iiop} protocol, +++ * that RMI/IIOP is not supported +++ */ ++ public synchronized void connect(Map environment) ++ throws IOException { ++ final boolean tracing = logger.traceOn(); ++@@ -2334,7 +2346,16 @@ ++ ++ private static RMIConnection shadowIiopStub(Stub stub) ++ throws InstantiationException, IllegalAccessException { ++- Stub proxyStub = (Stub) proxyStubClass.newInstance(); +++ Stub proxyStub = null; +++ try { +++ proxyStub = AccessController.doPrivileged(new PrivilegedExceptionAction() { +++ public Stub run() throws Exception { +++ return (Stub) proxyStubClass.newInstance(); +++ } +++ }); +++ } catch (PrivilegedActionException e) { +++ throw new InternalError(); +++ } ++ proxyStub._set_delegate(stub._get_delegate()); ++ return (RMIConnection) proxyStub; ++ } +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8011157-improve_corba_portability.patch openjdk-6-6b27-1.12.6/patches/openjdk/8011157-improve_corba_portability.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8011157-improve_corba_portability.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8011157-improve_corba_portability.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,183 @@ ++# HG changeset patch ++# User msheppar ++# Date 1381847065 -3600 ++# Tue Oct 15 15:24:25 2013 +0100 ++# Node ID 9e7e1b6ab5cdf0096c9c16d991e6a982771a15f1 ++# Parent 14308db8214e69d7cad09a8f4d49d421b5b13ba0 ++8011157: Improve CORBA portablility ++Summary: fix also reviewed by Alexander Fomin ++Reviewed-by: alanb, coffeys, skoivu ++ ++diff -r 14308db8214e -r 9e7e1b6ab5cd src/share/classes/com/sun/corba/se/impl/transport/SelectorImpl.java ++--- openjdk/corba/src/share/classes/com/sun/corba/se/impl/transport/SelectorImpl.java Mon Jun 17 19:01:08 2013 +0200 +++++ openjdk/corba/src/share/classes/com/sun/corba/se/impl/transport/SelectorImpl.java Tue Oct 15 15:24:25 2013 +0100 ++@@ -1,5 +1,5 @@ ++ /* ++- * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved. +++ * Copyright (c) 2003, 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 ++@@ -54,7 +54,7 @@ ++ /** ++ * @author Harold Carr ++ */ ++-public class SelectorImpl +++class SelectorImpl ++ extends ++ Thread ++ implements ++diff -r 14308db8214e -r 9e7e1b6ab5cd src/share/classes/sun/rmi/rmic/iiop/StubGenerator.java ++--- openjdk/corba/src/share/classes/sun/rmi/rmic/iiop/StubGenerator.java Mon Jun 17 19:01:08 2013 +0200 +++++ openjdk/corba/src/share/classes/sun/rmi/rmic/iiop/StubGenerator.java Tue Oct 15 15:24:25 2013 +0100 ++@@ -1,5 +1,5 @@ ++ /* ++- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. +++ * Copyright (c) 1998, 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 ++@@ -34,6 +34,9 @@ ++ ++ import java.io.File; ++ import java.io.IOException; +++import java.io.SerializablePermission; +++import java.security.AccessController; +++import java.security.PrivilegedAction; ++ import java.util.Vector; ++ import java.util.Hashtable; ++ import java.util.Enumeration; ++@@ -49,6 +52,7 @@ ++ import com.sun.corba.se.impl.util.PackagePrefixChecker; ++ import sun.rmi.rmic.Main; ++ +++ ++ /** ++ * An IIOP stub/tie generator for rmic. ++ * ++@@ -78,6 +82,7 @@ ++ protected boolean castArray = false; ++ protected Hashtable transactionalObjects = new Hashtable() ; ++ protected boolean POATie = false ; +++ protected boolean emitPermissionCheck = false; ++ ++ /** ++ * Default constructor for Main to use. ++@@ -193,6 +198,9 @@ ++ } else if (argv[i].equals("-standardPackage")) { ++ standardPackage = true; ++ argv[i] = null; +++ } else if (argv[i].equals("-emitPermissionCheck")) { +++ emitPermissionCheck = true; +++ argv[i] = null; ++ } else if (arg.equals("-xstubbase")) { ++ argv[i] = null; ++ if (++i < argv.length && argv[i] != null && !argv[i].startsWith("-")) { ++@@ -390,9 +398,22 @@ ++ ++ writePackageAndImports(p); ++ +++// generate +++// import java.security.AccessController; +++// import java.security.PrivilegedAction; +++// import java.io.SerializablePermission; +++ if (emitPermissionCheck) { +++ p.pln("import java.security.AccessController;"); +++ p.pln("import java.security.PrivilegedAction;"); +++ p.pln("import java.io.SerializablePermission;"); +++ p.pln(); +++ p.pln(); +++ } +++ ++ // Declare the stub class; implement all remote interfaces. ++ ++ p.p("public class " + currentClass); +++ ++ p.p(" extends " + getName(stubBaseClass)); ++ p.p(" implements "); ++ if (remoteInterfaces.length > 0) { ++@@ -422,6 +443,56 @@ ++ writeIds( p, theType, false ); ++ p.pln(); ++ +++ if (emitPermissionCheck) { +++ +++ // produce the following generated code +++ // private static Void checkPermission() { +++ // SecurityManager sm = System.getSecurityManager(); +++ // if (sm != null) { +++ // sm.checkPermission(new SerializablePermission( +++ // "enableSubclassImplementation")); // testing +++ // } +++ // return null; +++ // } +++ // +++ // private _XXXXXX_Stub(Void ignore) { +++ // } +++ // +++ // public _XXXXXX_Stub() { +++ // this(checkPermission()); +++ // } +++ // where XXXXXX is the name of the remote interface +++ +++ p.pln(); +++ p.plnI("private static Void checkPermission() {"); +++ p.plnI("SecurityManager sm = System.getSecurityManager();"); +++ p.pln("if (sm != null) {"); +++ p.pI(); +++ p.plnI("sm.checkPermission(new SerializablePermission("); +++ p.plnI("\"enableSubclassImplementation\"));"); +++ p.pO(); +++ p.pO(); +++ p.pOln("}"); +++ p.pln("return null;"); +++ p.pO(); +++ p.pOln("}"); +++ p.pln(); +++ p.pO(); +++ +++ p.pI(); +++ p.pln("private " + currentClass + "(Void ignore) { }"); +++ p.pln(); +++ +++ p.plnI("public " + currentClass + "() { "); +++ p.pln("this(checkPermission());"); +++ p.pOln("}"); +++ p.pln(); +++ } +++ +++ if (!emitPermissionCheck) { +++ p.pI(); +++ } +++ ++ // Write the _ids() method... ++ ++ p.plnI("public String[] _ids() { "); ++@@ -815,7 +886,6 @@ ++ CompoundType theType) throws IOException { ++ ++ // Wtite the method declaration and opening brace... ++- ++ String methodName = method.getName(); ++ String methodIDLName = method.getIDLName(); ++ ++@@ -1631,7 +1701,7 @@ ++ ++ // Write data members... ++ p.pln(); ++- p.pln("private " + getName(theType) + " target = null;"); +++ p.pln("volatile private " + getName(theType) + " target = null;"); ++ p.pln(); ++ ++ // Write the ids... ++@@ -1695,6 +1765,10 @@ ++ ++ if (remoteMethods.length > 0) { ++ p.plnI("try {"); +++ p.pln(getName(theType) + " target = this.target;"); +++ p.plnI("if (target == null) {"); +++ p.pln("throw new java.io.IOException();"); +++ p.pOln("}"); ++ p.plnI(idExtInputStream + " "+in+" = "); ++ p.pln("(" + idExtInputStream + ") "+_in+";"); ++ p.pO(); +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8011990-logger_test_urls.patch openjdk-6-6b27-1.12.6/patches/openjdk/8011990-logger_test_urls.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8011990-logger_test_urls.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8011990-logger_test_urls.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,58 @@ ++# HG changeset patch ++# User jgish ++# Date 1366144454 14400 ++# Tue Apr 16 16:34:14 2013 -0400 ++# Node ID a7048970934a1425d5486e6acd0b07558be038c4 ++# Parent ed410e3d08fe7792e6c08e411580564d2562c03e ++8011990: TEST_BUG: java/util/logging/bundlesearch/ResourceBundleSearchTest.java fails on Windows ++Summary: Fix URL to reliably work on all platforms ++Reviewed-by: duke ++ ++diff -r ed410e3d08fe -r a7048970934a test/java/util/logging/bundlesearch/IndirectlyLoadABundle.java ++--- openjdk/jdk/test/java/util/logging/bundlesearch/IndirectlyLoadABundle.java Fri Apr 19 16:50:10 2013 -0700 +++++ openjdk/jdk/test/java/util/logging/bundlesearch/IndirectlyLoadABundle.java Tue Apr 16 16:34:14 2013 -0400 ++@@ -21,6 +21,7 @@ ++ * questions. ++ */ ++ +++import java.io.File; ++ import java.lang.reflect.InvocationTargetException; ++ import java.lang.reflect.Method; ++ import java.net.URL; ++@@ -45,11 +46,13 @@ ++ String testClassesDir = System.getProperty("test.classes", ++ System.getProperty("user.dir")); ++ String sep = System.getProperty("file.separator"); +++ ++ URL[] urls = new URL[2]; ++ ++ // Allow for both jtreg and standalone cases here ++- urls[0] = new URL("file://" + testDir + sep + "resources" + sep); ++- urls[1] = new URL("file://" + testClassesDir + sep ); +++ urls[0] = new File( testDir + sep + "resources" + sep ).toURI().toURL(); +++ urls[1] = new File( testClassesDir + sep ).toURI().toURL(); +++ ++ System.out.println("INFO: urls[0] = " + urls[0]); ++ System.out.println("INFO: urls[1] = " + urls[1]); ++ ++diff -r ed410e3d08fe -r a7048970934a test/java/util/logging/bundlesearch/ResourceBundleSearchTest.java ++--- openjdk/jdk/test/java/util/logging/bundlesearch/ResourceBundleSearchTest.java Fri Apr 19 16:50:10 2013 -0700 +++++ openjdk/jdk/test/java/util/logging/bundlesearch/ResourceBundleSearchTest.java Tue Apr 16 16:34:14 2013 -0400 ++@@ -29,6 +29,7 @@ ++ * @build ResourceBundleSearchTest IndirectlyLoadABundle LoadItUp ++ * @run main ResourceBundleSearchTest ++ */ +++import java.io.File; ++ import java.net.URL; ++ import java.net.URLClassLoader; ++ import java.util.ArrayList; ++@@ -70,7 +71,8 @@ ++ String sep = System.getProperty("file.separator"); ++ ++ URL[] urls = new URL[1]; ++- urls[0] = new URL("file://" + testDir + sep + "resources" + sep); +++ +++ urls[0] = new File( testDir + sep + "resources" + sep ).toURI().toURL(); ++ URLClassLoader rbClassLoader = new URLClassLoader(urls); ++ ++ // Test 1 - can we find a Logger bundle from doing a stack search? +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8012071-better_bean_building.patch openjdk-6-6b27-1.12.6/patches/openjdk/8012071-better_bean_building.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8012071-better_bean_building.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8012071-better_bean_building.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,87 @@ ++# HG changeset patch ++# User malenkov ++# Date 1381850636 -3600 ++# Tue Oct 15 16:23:56 2013 +0100 ++# Node ID 7a6de63e89636f3bfb5b32e2a8d1ea3df1fe2d79 ++# Parent 468ec57a684409e4c7ed97be8ffa36322fb8a36b ++8012071: Better Building of Beans ++Reviewed-by: art, skoivu ++ ++diff -r 468ec57a6844 -r 7a6de63e8963 src/share/classes/java/beans/Beans.java ++--- openjdk/jdk/src/share/classes/java/beans/Beans.java Tue Oct 15 15:59:47 2013 +0100 +++++ openjdk/jdk/src/share/classes/java/beans/Beans.java Tue Oct 15 16:23:56 2013 +0100 ++@@ -42,6 +42,8 @@ ++ import java.io.ObjectStreamClass; ++ import java.io.StreamCorruptedException; ++ +++import java.lang.reflect.Modifier; +++ ++ import java.net.URL; ++ ++ import java.security.AccessController; ++@@ -222,6 +224,10 @@ ++ throw ex; ++ } ++ +++ if (!Modifier.isPublic(cl.getModifiers())) { +++ throw new ClassNotFoundException("" + cl + " : no public access"); +++ } +++ ++ /* ++ * Try to instantiate the class. ++ */ ++diff -r 468ec57a6844 -r 7a6de63e8963 src/share/classes/java/beans/DefaultPersistenceDelegate.java ++--- openjdk/jdk/src/share/classes/java/beans/DefaultPersistenceDelegate.java Tue Oct 15 15:59:47 2013 +0100 +++++ openjdk/jdk/src/share/classes/java/beans/DefaultPersistenceDelegate.java Tue Oct 15 16:23:56 2013 +0100 ++@@ -235,6 +235,9 @@ ++ for(int i = 0; i < a.length; i = i + 3) { ++ try { ++ Field f = type.getField((String)a[i]); +++ if (!ReflectUtil.isPackageAccessible(f.getDeclaringClass())) { +++ continue; +++ } ++ if (f.get(null).equals(oldValue)) { ++ out.remove(oldValue); ++ out.writeExpression(new Expression(oldValue, f, "get", new Object[]{null})); ++diff -r 468ec57a6844 -r 7a6de63e8963 src/share/classes/java/beans/MetaData.java ++--- openjdk/jdk/src/share/classes/java/beans/MetaData.java Tue Oct 15 15:59:47 2013 +0100 +++++ openjdk/jdk/src/share/classes/java/beans/MetaData.java Tue Oct 15 16:23:56 2013 +0100 ++@@ -40,6 +40,7 @@ ++ import java.lang.reflect.Constructor; ++ import java.lang.reflect.Field; ++ import java.lang.reflect.Method; +++import java.lang.reflect.Modifier; ++ ++ import java.security.AccessController; ++ import java.security.PrivilegedAction; ++@@ -47,6 +48,7 @@ ++ import java.sql.Timestamp; ++ ++ import java.util.*; +++import static sun.reflect.misc.ReflectUtil.isPackageAccessible; ++ ++ import javax.swing.Box; ++ import javax.swing.JLayeredPane; ++@@ -907,13 +909,15 @@ ++ ++ class StaticFieldsPersistenceDelegate extends PersistenceDelegate { ++ protected void installFields(Encoder out, Class cls) { ++- Field fields[] = cls.getFields(); ++- for(int i = 0; i < fields.length; i++) { ++- Field field = fields[i]; ++- // Don't install primitives, their identity will not be preserved ++- // by wrapping. ++- if (Object.class.isAssignableFrom(field.getType())) { ++- out.writeExpression(new Expression(field, "get", new Object[]{null})); +++ if (Modifier.isPublic(cls.getModifiers()) && isPackageAccessible(cls)) { +++ Field fields[] = cls.getFields(); +++ for(int i = 0; i < fields.length; i++) { +++ Field field = fields[i]; +++ // Don't install primitives, their identity will not be preserved +++ // by wrapping. +++ if (Object.class.isAssignableFrom(field.getType())) { +++ out.writeExpression(new Expression(field, "get", new Object[]{null})); +++ } ++ } ++ } ++ } +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8012147-improve_tool.patch openjdk-6-6b27-1.12.6/patches/openjdk/8012147-improve_tool.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8012147-improve_tool.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8012147-improve_tool.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,67 @@ ++# HG changeset patch ++# User erikj ++# Date 1381850834 -3600 ++# Tue Oct 15 16:27:14 2013 +0100 ++# Node ID 8521d2f3d9640e6516d8b71aa2f553bc4028362f ++# Parent 7a6de63e89636f3bfb5b32e2a8d1ea3df1fe2d79 ++8012147: Improve tool support ++Summary: Adding libjli to jdk lib dir and removing now redundant rpath entries from executables ++Reviewed-by: alanb, dholmes, ksrini, ahgross ++ ++diff -r 7a6de63e8963 -r 8521d2f3d964 make/common/Program.gmk ++--- openjdk/jdk/make/common/Program.gmk Tue Oct 15 16:23:56 2013 +0100 +++++ openjdk/jdk/make/common/Program.gmk Tue Oct 15 16:27:14 2013 +0100 ++@@ -78,17 +78,14 @@ ++ ifeq ($(PLATFORM), solaris) ++ ifeq ($(ARCH_DATA_MODEL), 32) ++ LDFLAGS += -R \$$ORIGIN/../lib/$(LIBARCH)/jli ++- LDFLAGS += -R \$$ORIGIN/../jre/lib/$(LIBARCH)/jli ++ else ++ LDFLAGS += -R \$$ORIGIN/../../lib/$(LIBARCH)/jli ++- LDFLAGS += -R \$$ORIGIN/../../jre/lib/$(LIBARCH)/jli ++ endif ++ endif ++ ifeq ($(PLATFORM), linux) ++ LDFLAGS += -Wl,-z -Wl,origin ++ LDFLAGS += -Wl,--allow-shlib-undefined ++ LDFLAGS += -Wl,-rpath -Wl,\$$ORIGIN/../lib/$(LIBARCH)/jli ++- LDFLAGS += -Wl,-rpath -Wl,\$$ORIGIN/../jre/lib/$(LIBARCH)/jli ++ endif ++ endif ++ ifeq ($(PLATFORM), windows) ++diff -r 7a6de63e8963 -r 8521d2f3d964 make/common/Release.gmk ++--- openjdk/jdk/make/common/Release.gmk Tue Oct 15 16:23:56 2013 +0100 +++++ openjdk/jdk/make/common/Release.gmk Tue Oct 15 16:27:14 2013 +0100 ++@@ -855,6 +855,11 @@ ++ | $(CPIO) -pdum $(JDK_IMAGE_DIR)/jre ) ++ $(RM) -rf $(JDK_IMAGE_DIR)/jre/man ++ $(CHMOD) a+rx `$(FIND) $(JDK_IMAGE_DIR) -type d` +++ ifneq (,$(findstring $(PLATFORM), linux solaris)) # If linux or solaris +++ ($(CD) $(LIBDIR)/.. && $(TAR) cf - \ +++ `$(FIND) lib -name $(LIB_PREFIX)jli.$(LIB_SUFFIX) -print `) | \ +++ ($(CD) $(JDK_IMAGE_DIR) && $(TAR) xf -) +++ endif # PLATFORM ++ ++ initial-image-jdk64-bindemos: ++ for dir in bin demo ; do \ ++@@ -891,7 +896,7 @@ ++ initial-image-jdk:: initial-image-jdk-setup \ ++ initial-image-jdk-db \ ++ $(JDK_LICENSES) $(JDK_DOCFILES) ++- $(MKDIR) $(JDK_IMAGE_DIR)/lib +++ $(MKDIR) -p $(JDK_IMAGE_DIR)/lib ++ @# ++ @# Copy in the jars in lib that only belong in the JDK ++ @# ++diff -r 7a6de63e8963 -r 8521d2f3d964 test/Makefile ++--- openjdk/jdk/test/Makefile Tue Oct 15 16:23:56 2013 +0100 +++++ openjdk/jdk/test/Makefile Tue Oct 15 16:27:14 2013 +0100 ++@@ -483,7 +483,7 @@ ++ JDK_ALL_TARGETS += jdk_misc ++ jdk_misc: demo javax/imageio javax/naming javax/print javax/script \ ++ javax/smartcardio javax/xml javax/sound com/sun/java com/sun/jndi \ ++- com/sun/org com/sun/corba sun/misc sun/pisces +++ com/sun/org com/sun/corba sun/misc sun/pisces misc ++ $(call RunSamevmBatch) ++ ++ # Stable samevm testruns (minus items from PROBLEM_LIST) +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8012243-serial_regression.patch openjdk-6-6b27-1.12.6/patches/openjdk/8012243-serial_regression.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8012243-serial_regression.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8012243-serial_regression.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,45 @@ ++# HG changeset patch ++# User dfuchs ++# Date 1367362161 -7200 ++# Wed May 01 00:49:21 2013 +0200 ++# Node ID 47c881c5439a4542b19ab85f376e94fc2c0a5a57 ++# Parent 0bf55b4c8a7bbea02a9d848b2a5451adbd6a6ac4 ++8012243: about 30% regression on specjvm2008.serial on 7u25 comparing 7u21 ++Reviewed-by: alanb, skoivu, smarks, mchung ++ ++diff -r 0bf55b4c8a7b -r 47c881c5439a src/share/classes/java/io/ObjectStreamClass.java ++--- openjdk/jdk/src/share/classes/java/io/ObjectStreamClass.java Fri May 17 14:29:51 2013 -0700 +++++ openjdk/jdk/src/share/classes/java/io/ObjectStreamClass.java Wed May 01 00:49:21 2013 +0200 ++@@ -241,9 +241,11 @@ ++ if (cl == null) { ++ return null; ++ } ++- Class caller = Reflection.getCallerClass(); ++- if (ReflectUtil.needsPackageAccessCheck(caller.getClassLoader(), cl.getClassLoader())) { ++- ReflectUtil.checkPackageAccess(cl); +++ if (System.getSecurityManager() != null) { +++ Class caller = Reflection.getCallerClass(); +++ if (ReflectUtil.needsPackageAccessCheck(caller.getClassLoader(), cl.getClassLoader())) { +++ ReflectUtil.checkPackageAccess(cl); +++ } ++ } ++ return cl; ++ } ++diff -r 0bf55b4c8a7b -r 47c881c5439a src/share/classes/java/io/ObjectStreamField.java ++--- openjdk/jdk/src/share/classes/java/io/ObjectStreamField.java Fri May 17 14:29:51 2013 -0700 +++++ openjdk/jdk/src/share/classes/java/io/ObjectStreamField.java Wed May 01 00:49:21 2013 +0200 ++@@ -162,9 +162,11 @@ ++ */ ++ @CallerSensitive ++ public Class getType() { ++- Class caller = Reflection.getCallerClass(); ++- if (ReflectUtil.needsPackageAccessCheck(caller.getClassLoader(), type.getClassLoader())) { ++- ReflectUtil.checkPackageAccess(type); +++ if (System.getSecurityManager() != null) { +++ Class caller = Reflection.getCallerClass(); +++ if (ReflectUtil.needsPackageAccessCheck(caller.getClassLoader(), type.getClassLoader())) { +++ ReflectUtil.checkPackageAccess(type); +++ } ++ } ++ return type; ++ } +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8012277-improve_dataflavour.patch openjdk-6-6b27-1.12.6/patches/openjdk/8012277-improve_dataflavour.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8012277-improve_dataflavour.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8012277-improve_dataflavour.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,83 @@ ++# HG changeset patch ++# User malenkov ++# Date 1370018612 -14400 ++# Fri May 31 20:43:32 2013 +0400 ++# Node ID 337232ddaec36c6d9843ff35906e6160446844eb ++# Parent 8521d2f3d9640e6516d8b71aa2f553bc4028362f ++8012277: Improve AWT DataFlavor ++Reviewed-by: art, skoivu ++ ++diff -r 8521d2f3d964 -r 337232ddaec3 src/share/classes/java/awt/datatransfer/DataFlavor.java ++--- openjdk/jdk/src/share/classes/java/awt/datatransfer/DataFlavor.java Tue Oct 15 16:27:14 2013 +0100 +++++ openjdk/jdk/src/share/classes/java/awt/datatransfer/DataFlavor.java Fri May 31 20:43:32 2013 +0400 ++@@ -25,12 +25,14 @@ ++ ++ package java.awt.datatransfer; ++ ++-import java.awt.Toolkit; ++ import java.io.*; ++ import java.nio.*; ++ import java.util.*; ++ ++ import sun.awt.datatransfer.DataTransferer; +++import sun.reflect.misc.ReflectUtil; +++ +++import static sun.security.util.SecurityConstants.GET_CLASSLOADER_PERMISSION; ++ ++ /** ++ * A {@code DataFlavor} provides meta information about data. {@code DataFlavor} ++@@ -117,26 +119,36 @@ ++ ClassLoader fallback) ++ throws ClassNotFoundException ++ { ++- ClassLoader systemClassLoader = (ClassLoader) ++- java.security.AccessController.doPrivileged( ++- new java.security.PrivilegedAction() { ++- public Object run() { ++- ClassLoader cl = Thread.currentThread(). ++- getContextClassLoader(); ++- return (cl != null) ++- ? cl ++- : ClassLoader.getSystemClassLoader(); +++ ReflectUtil.checkPackageAccess(className); +++ try { +++ SecurityManager sm = System.getSecurityManager(); +++ if (sm != null) { +++ sm.checkPermission(GET_CLASSLOADER_PERMISSION); +++ } +++ ClassLoader loader = ClassLoader.getSystemClassLoader(); +++ try { +++ // bootstrap class loader and system class loader if present +++ return Class.forName(className, true, loader); +++ } +++ catch (ClassNotFoundException exception) { +++ // thread context class loader if and only if present +++ loader = Thread.currentThread().getContextClassLoader(); +++ if (loader != null) { +++ try { +++ return Class.forName(className, true, loader); ++ } ++- }); ++- ++- try { ++- return Class.forName(className, true, systemClassLoader); ++- } catch (ClassNotFoundException e2) { ++- if (fallback != null) { ++- return Class.forName(className, true, fallback); ++- } else { ++- throw new ClassNotFoundException(className); +++ catch (ClassNotFoundException e) { +++ // fallback to user's class loader +++ } +++ } ++ } +++ } catch (SecurityException exception) { +++ // ignore secured class loaders +++ } +++ if (fallback != null) { +++ return Class.forName(className, true, fallback); +++ } else { +++ throw new ClassNotFoundException(className); ++ } ++ } ++ +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8012425-transform_transformfactory.patch openjdk-6-6b27-1.12.6/patches/openjdk/8012425-transform_transformfactory.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8012425-transform_transformfactory.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8012425-transform_transformfactory.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,380 @@ ++# HG changeset patch ++# User joehw ++# Date 1383025844 0 ++# Tue Oct 29 05:50:44 2013 +0000 ++# Node ID 7799c3bd00f5a4fda6448cb8bcd7768c66ec166d ++# Parent b5b1d1fa4bb4fcd8bc0602fd4f3523fe24d9f00b ++8012425: Transform TransformerFactory ++Reviewed-by: alanb, dfuchs, mullan ++ ++diff -r b5b1d1fa4bb4 -r 7799c3bd00f5 drop_included/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerImpl.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerImpl.java Thu Oct 10 16:18:30 2013 +0100 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerImpl.java Tue Oct 29 05:50:44 2013 +0000 ++@@ -40,6 +40,7 @@ ++ import java.util.Vector; ++ import java.lang.reflect.Constructor; ++ +++import javax.xml.XMLConstants; ++ import javax.xml.parsers.DocumentBuilder; ++ import javax.xml.parsers.DocumentBuilderFactory; ++ import javax.xml.parsers.ParserConfigurationException; ++@@ -251,6 +252,7 @@ ++ _propertiesClone = (Properties) _properties.clone(); ++ _indentNumber = indentNumber; ++ _tfactory = tfactory; +++ _readerManager.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, _isSecureProcessing); ++ //_isIncremental = tfactory._incremental; ++ } ++ ++@@ -266,6 +268,7 @@ ++ */ ++ public void setSecureProcessing(boolean flag) { ++ _isSecureProcessing = flag; +++ _readerManager.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, _isSecureProcessing); ++ } ++ ++ /** ++diff -r b5b1d1fa4bb4 -r 7799c3bd00f5 drop_included/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/trax/Util.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/trax/Util.java Thu Oct 10 16:18:30 2013 +0100 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/trax/Util.java Tue Oct 29 05:50:44 2013 +0000 ++@@ -104,6 +104,13 @@ ++ if (reader == null) { ++ try { ++ reader= XMLReaderFactory.createXMLReader(); +++ try { +++ reader.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, +++ xsltc.isSecureProcessing()); +++ } catch (SAXNotRecognizedException e) { +++ System.err.println("Warning: " + reader.getClass().getName() + ": " +++ + e.getMessage()); +++ } ++ } catch (Exception e ) { ++ try { ++ ++diff -r b5b1d1fa4bb4 -r 7799c3bd00f5 drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/StreamValidatorHelper.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/StreamValidatorHelper.java Thu Oct 10 16:18:30 2013 +0100 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/StreamValidatorHelper.java Tue Oct 29 05:50:44 2013 +0000 ++@@ -20,9 +20,18 @@ ++ ++ package com.sun.org.apache.xerces.internal.jaxp.validation; ++ +++import com.sun.org.apache.xerces.internal.impl.Constants; +++import com.sun.org.apache.xerces.internal.impl.XMLErrorReporter; +++import com.sun.org.apache.xerces.internal.impl.msg.XMLMessageFormatter; +++import com.sun.org.apache.xerces.internal.parsers.XML11Configuration; +++import com.sun.org.apache.xerces.internal.util.SecurityManager; +++import com.sun.org.apache.xerces.internal.xni.XNIException; +++import com.sun.org.apache.xerces.internal.xni.parser.XMLInputSource; +++import com.sun.org.apache.xerces.internal.xni.parser.XMLParseException; +++import com.sun.org.apache.xerces.internal.xni.parser.XMLParserConfiguration; ++ import java.lang.ref.SoftReference; ++ import java.io.IOException; ++- +++import javax.xml.XMLConstants; ++ import javax.xml.transform.Result; ++ import javax.xml.transform.Source; ++ import javax.xml.transform.sax.SAXTransformerFactory; ++@@ -32,15 +41,6 @@ ++ import javax.xml.transform.TransformerConfigurationException; ++ import javax.xml.transform.TransformerException; ++ import javax.xml.transform.TransformerFactoryConfigurationError; ++- ++-import com.sun.org.apache.xerces.internal.impl.Constants; ++-import com.sun.org.apache.xerces.internal.impl.XMLErrorReporter; ++-import com.sun.org.apache.xerces.internal.impl.msg.XMLMessageFormatter; ++-import com.sun.org.apache.xerces.internal.parsers.XML11Configuration; ++-import com.sun.org.apache.xerces.internal.xni.XNIException; ++-import com.sun.org.apache.xerces.internal.xni.parser.XMLInputSource; ++-import com.sun.org.apache.xerces.internal.xni.parser.XMLParseException; ++-import com.sun.org.apache.xerces.internal.xni.parser.XMLParserConfiguration; ++ import org.xml.sax.SAXException; ++ ++ /** ++@@ -84,6 +84,11 @@ ++ private static final String VALIDATION_MANAGER = ++ Constants.XERCES_PROPERTY_PREFIX + Constants.VALIDATION_MANAGER_PROPERTY; ++ +++ +++ /** Property id: security manager. */ +++ private static final String SECURITY_MANAGER = +++ Constants.XERCES_PROPERTY_PREFIX + Constants.SECURITY_MANAGER_PROPERTY; +++ ++ // ++ // Data ++ // ++@@ -161,6 +166,9 @@ ++ ++ private XMLParserConfiguration initialize() { ++ XML11Configuration config = new XML11Configuration(); +++ if (fComponentManager.getFeature(XMLConstants.FEATURE_SECURE_PROCESSING)) { +++ config.setProperty(SECURITY_MANAGER, new SecurityManager()); +++ } ++ config.setProperty(ENTITY_RESOLVER, fComponentManager.getProperty(ENTITY_RESOLVER)); ++ config.setProperty(ERROR_HANDLER, fComponentManager.getProperty(ERROR_HANDLER)); ++ XMLErrorReporter errorReporter = (XMLErrorReporter) fComponentManager.getProperty(ERROR_REPORTER); ++diff -r b5b1d1fa4bb4 -r 7799c3bd00f5 drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/ValidatorHandlerImpl.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/ValidatorHandlerImpl.java Thu Oct 10 16:18:30 2013 +0100 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/ValidatorHandlerImpl.java Tue Oct 29 05:50:44 2013 +0000 ++@@ -672,6 +672,8 @@ ++ SAXParserFactory spf = SAXParserFactory.newInstance(); ++ spf.setNamespaceAware(true); ++ try { +++ spf.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, +++ fComponentManager.getFeature(XMLConstants.FEATURE_SECURE_PROCESSING)); ++ reader = spf.newSAXParser().getXMLReader(); ++ // If this is a Xerces SAX parser, set the security manager if there is one ++ if (reader instanceof com.sun.org.apache.xerces.internal.parsers.SAXParser) { ++diff -r b5b1d1fa4bb4 -r 7799c3bd00f5 drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/AbstractSAXParser.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/AbstractSAXParser.java Thu Oct 10 16:18:30 2013 +0100 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/AbstractSAXParser.java Tue Oct 29 05:50:44 2013 +0000 ++@@ -20,15 +20,12 @@ ++ ++ package com.sun.org.apache.xerces.internal.parsers; ++ ++-import java.io.IOException; ++-import java.util.Locale; ++- ++ import com.sun.org.apache.xerces.internal.impl.Constants; ++-import com.sun.org.apache.xerces.internal.xs.PSVIProvider; +++import com.sun.org.apache.xerces.internal.util.EntityResolver2Wrapper; ++ import com.sun.org.apache.xerces.internal.util.EntityResolverWrapper; ++-import com.sun.org.apache.xerces.internal.util.EntityResolver2Wrapper; ++ import com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper; ++ import com.sun.org.apache.xerces.internal.util.SAXMessageFormatter; +++import com.sun.org.apache.xerces.internal.util.SecurityManager; ++ import com.sun.org.apache.xerces.internal.util.SymbolHash; ++ import com.sun.org.apache.xerces.internal.util.XMLSymbols; ++ import com.sun.org.apache.xerces.internal.xni.Augmentations; ++@@ -47,15 +44,17 @@ ++ import com.sun.org.apache.xerces.internal.xni.parser.XMLParserConfiguration; ++ import com.sun.org.apache.xerces.internal.xs.AttributePSVI; ++ import com.sun.org.apache.xerces.internal.xs.ElementPSVI; +++import com.sun.org.apache.xerces.internal.xs.PSVIProvider; +++import java.io.IOException; +++import java.util.Locale; +++import javax.xml.XMLConstants; ++ import org.xml.sax.AttributeList; ++-import org.xml.sax.Attributes; ++ import org.xml.sax.ContentHandler; ++ import org.xml.sax.DTDHandler; ++ import org.xml.sax.DocumentHandler; ++ import org.xml.sax.EntityResolver; ++ import org.xml.sax.ErrorHandler; ++ import org.xml.sax.InputSource; ++-import org.xml.sax.Locator; ++ import org.xml.sax.Parser; ++ import org.xml.sax.SAXException; ++ import org.xml.sax.SAXNotRecognizedException; ++@@ -129,6 +128,10 @@ ++ protected static final String DOM_NODE = ++ Constants.SAX_PROPERTY_PREFIX + Constants.DOM_NODE_PROPERTY; ++ +++ /** Property id: security manager. */ +++ private static final String SECURITY_MANAGER = +++ Constants.XERCES_PROPERTY_PREFIX + Constants.SECURITY_MANAGER_PROPERTY; +++ ++ /** Recognized properties. */ ++ private static final String[] RECOGNIZED_PROPERTIES = { ++ LEXICAL_HANDLER, ++@@ -1643,19 +1646,13 @@ ++ // Drop through and perform default processing ++ // ++ } ++- ++- // ++- // Xerces Features ++- // ++- ++- /* ++- else if (featureId.startsWith(XERCES_FEATURES_PREFIX)) { ++- String feature = featureId.substring(XERCES_FEATURES_PREFIX.length()); ++- // ++- // Drop through and perform default processing ++- // +++ else if (featureId.equals(XMLConstants.FEATURE_SECURE_PROCESSING)) { +++ if (state) { +++ if (fConfiguration.getProperty(SECURITY_MANAGER )==null) { +++ fConfiguration.setProperty(SECURITY_MANAGER, new SecurityManager()); +++ } +++ } ++ } ++- */ ++ ++ // ++ // Default handling ++diff -r b5b1d1fa4bb4 -r 7799c3bd00f5 drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/XML11Configuration.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/XML11Configuration.java Thu Oct 10 16:18:30 2013 +0100 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/XML11Configuration.java Tue Oct 29 05:50:44 2013 +0000 ++@@ -20,11 +20,6 @@ ++ ++ package com.sun.org.apache.xerces.internal.parsers; ++ ++-import java.io.IOException; ++-import java.util.ArrayList; ++-import java.util.HashMap; ++-import java.util.Locale; ++- ++ import com.sun.org.apache.xerces.internal.impl.Constants; ++ import com.sun.org.apache.xerces.internal.impl.XML11DTDScannerImpl; ++ import com.sun.org.apache.xerces.internal.impl.XML11DocumentScannerImpl; ++@@ -65,6 +60,11 @@ ++ import com.sun.org.apache.xerces.internal.xni.parser.XMLErrorHandler; ++ import com.sun.org.apache.xerces.internal.xni.parser.XMLInputSource; ++ import com.sun.org.apache.xerces.internal.xni.parser.XMLPullParserConfiguration; +++import java.io.IOException; +++import java.util.ArrayList; +++import java.util.HashMap; +++import java.util.Locale; +++import javax.xml.XMLConstants; ++ ++ /** ++ * This class is the configuration used to parse XML 1.0 and XML 1.1 documents. ++@@ -428,30 +428,30 @@ ++ XMLGrammarPool grammarPool, ++ XMLComponentManager parentSettings) { ++ ++- super(parentSettings); +++ super(parentSettings); ++ ++- // create a vector to hold all the components in use ++- // XML 1.0 specialized components ++- fComponents = new ArrayList(); ++- // XML 1.1 specialized components ++- fXML11Components = new ArrayList(); ++- // Common components for XML 1.1. and XML 1.0 ++- fCommonComponents = new ArrayList(); +++ // create a vector to hold all the components in use +++ // XML 1.0 specialized components +++ fComponents = new ArrayList(); +++ // XML 1.1 specialized components +++ fXML11Components = new ArrayList(); +++ // Common components for XML 1.1. and XML 1.0 +++ fCommonComponents = new ArrayList(); ++ ++- // create storage for recognized features and properties ++- fRecognizedFeatures = new ArrayList(); ++- fRecognizedProperties = new ArrayList(); ++- ++- // create table for features and properties ++- fFeatures = new HashMap(); ++- fProperties = new HashMap(); +++ // create storage for recognized features and properties +++ fRecognizedFeatures = new ArrayList(); +++ fRecognizedProperties = new ArrayList(); +++ +++ // create table for features and properties +++ fFeatures = new HashMap(); +++ fProperties = new HashMap(); ++ ++ // add default recognized features ++ final String[] recognizedFeatures = ++ { ++ CONTINUE_AFTER_FATAL_ERROR, LOAD_EXTERNAL_DTD, // from XMLDTDScannerImpl ++- VALIDATION, ++- NAMESPACES, +++ VALIDATION, +++ NAMESPACES, ++ NORMALIZE_DATA, SCHEMA_ELEMENT_DEFAULT, SCHEMA_AUGMENT_PSVI, ++ GENERATE_SYNTHETIC_ANNOTATIONS, VALIDATE_ANNOTATIONS, ++ HONOUR_ALL_SCHEMALOCATIONS, USE_GRAMMAR_POOL_ONLY, ++@@ -460,26 +460,29 @@ ++ // features might not have been set and it would cause a ++ // not-recognized exception to be thrown. -Ac ++ XMLSCHEMA_VALIDATION, XMLSCHEMA_FULL_CHECKING, ++- EXTERNAL_GENERAL_ENTITIES, ++- EXTERNAL_PARAMETER_ENTITIES, ++- PARSER_SETTINGS +++ EXTERNAL_GENERAL_ENTITIES, +++ EXTERNAL_PARAMETER_ENTITIES, +++ PARSER_SETTINGS, +++ XMLConstants.FEATURE_SECURE_PROCESSING ++ }; +++ ++ addRecognizedFeatures(recognizedFeatures); ++ // set state for default features ++- fFeatures.put(VALIDATION, Boolean.FALSE); ++- fFeatures.put(NAMESPACES, Boolean.TRUE); ++- fFeatures.put(EXTERNAL_GENERAL_ENTITIES, Boolean.TRUE); ++- fFeatures.put(EXTERNAL_PARAMETER_ENTITIES, Boolean.TRUE); ++- fFeatures.put(CONTINUE_AFTER_FATAL_ERROR, Boolean.FALSE); ++- fFeatures.put(LOAD_EXTERNAL_DTD, Boolean.TRUE); ++- fFeatures.put(SCHEMA_ELEMENT_DEFAULT, Boolean.TRUE); ++- fFeatures.put(NORMALIZE_DATA, Boolean.TRUE); ++- fFeatures.put(SCHEMA_AUGMENT_PSVI, Boolean.TRUE); +++ fFeatures.put(VALIDATION, Boolean.FALSE); +++ fFeatures.put(NAMESPACES, Boolean.TRUE); +++ fFeatures.put(EXTERNAL_GENERAL_ENTITIES, Boolean.TRUE); +++ fFeatures.put(EXTERNAL_PARAMETER_ENTITIES, Boolean.TRUE); +++ fFeatures.put(CONTINUE_AFTER_FATAL_ERROR, Boolean.FALSE); +++ fFeatures.put(LOAD_EXTERNAL_DTD, Boolean.TRUE); +++ fFeatures.put(SCHEMA_ELEMENT_DEFAULT, Boolean.TRUE); +++ fFeatures.put(NORMALIZE_DATA, Boolean.TRUE); +++ fFeatures.put(SCHEMA_AUGMENT_PSVI, Boolean.TRUE); ++ fFeatures.put(GENERATE_SYNTHETIC_ANNOTATIONS, Boolean.FALSE); ++ fFeatures.put(VALIDATE_ANNOTATIONS, Boolean.FALSE); ++ fFeatures.put(HONOUR_ALL_SCHEMALOCATIONS, Boolean.FALSE); ++ fFeatures.put(USE_GRAMMAR_POOL_ONLY, Boolean.FALSE); ++- fFeatures.put(PARSER_SETTINGS, Boolean.TRUE); +++ fFeatures.put(PARSER_SETTINGS, Boolean.TRUE); +++ fFeatures.put(XMLConstants.FEATURE_SECURE_PROCESSING, Boolean.TRUE); ++ ++ // add default recognized properties ++ final String[] recognizedProperties = ++diff -r b5b1d1fa4bb4 -r 7799c3bd00f5 drop_included/jaxp_src/src/com/sun/org/apache/xml/internal/utils/XMLReaderManager.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xml/internal/utils/XMLReaderManager.java Thu Oct 10 16:18:30 2013 +0100 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xml/internal/utils/XMLReaderManager.java Tue Oct 29 05:50:44 2013 +0000 ++@@ -24,6 +24,7 @@ ++ ++ import java.util.HashMap; ++ +++import javax.xml.XMLConstants; ++ import javax.xml.parsers.FactoryConfigurationError; ++ import javax.xml.parsers.ParserConfigurationException; ++ import javax.xml.parsers.SAXParserFactory; ++@@ -31,6 +32,7 @@ ++ import org.xml.sax.XMLReader; ++ import org.xml.sax.helpers.XMLReaderFactory; ++ import org.xml.sax.SAXException; +++import org.xml.sax.SAXNotRecognizedException; ++ ++ /** ++ * Creates XMLReader objects and caches them for re-use. ++@@ -60,6 +62,8 @@ ++ */ ++ private HashMap m_inUse; ++ +++ +++ private boolean _secureProcessing; ++ /** ++ * Hidden constructor ++ */ ++@@ -109,7 +113,12 @@ ++ // TransformerFactory creates a reader via the ++ // XMLReaderFactory if setXMLReader is not used ++ reader = XMLReaderFactory.createXMLReader(); ++- +++ try { +++ reader.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, _secureProcessing); +++ } catch (SAXNotRecognizedException e) { +++ System.err.println("Warning: " + reader.getClass().getName() + ": " +++ + e.getMessage()); +++ } ++ } catch (Exception e) { ++ try { ++ // If unable to create an instance, let's try to use ++@@ -150,6 +159,15 @@ ++ return reader; ++ } ++ +++ /** +++ * Set feature +++ */ +++ public void setFeature(String name, boolean value) { +++ if (name.equals(XMLConstants.FEATURE_SECURE_PROCESSING)) { +++ _secureProcessing = value; +++ } +++ } +++ ++ /** ++ * Mark the cached XMLReader as available. If the reader was not ++ * actually in the cache, do nothing. +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8012453-runtime.exec.patch openjdk-6-6b27-1.12.6/patches/openjdk/8012453-runtime.exec.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8012453-runtime.exec.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8012453-runtime.exec.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,383 @@ ++# HG changeset patch ++# User uta ++# Date 1383008821 0 ++# Tue Oct 29 01:07:01 2013 +0000 ++# Node ID 20c88fd14959c6a4df2e0f36bd759b56efa6f2cb ++# Parent 3e758b40337ef9da5ad030d0ac60ab4407357277 ++8012453: (process) Runtime.exec(String) fails if command contains spaces [win] ++Reviewed-by: alanb ++ ++diff -r 3e758b40337e -r 20c88fd14959 src/share/classes/java/lang/ProcessBuilder.java ++--- openjdk/jdk/src/share/classes/java/lang/ProcessBuilder.java Tue Jul 30 17:20:22 2013 -0400 +++++ openjdk/jdk/src/share/classes/java/lang/ProcessBuilder.java Tue Oct 29 01:07:01 2013 +0000 ++@@ -490,6 +490,15 @@ ++ + (dir == null ? "" : " (in directory \"" + dir + "\")") ++ + exceptionInfo, ++ cause); +++ } catch (IllegalArgumentException e) { +++ String exceptionInfo = ": " + e.getMessage(); +++ // It's much easier for us to create a high-quality error +++ // message than the low-level C code which found the problem. +++ throw new IOException( +++ "Cannot run program \"" + prog + "\"" +++ + (dir == null ? "" : " (in directory \"" + dir + "\")") +++ + exceptionInfo, +++ e); ++ } ++ } ++ } ++diff -r 3e758b40337e -r 20c88fd14959 src/windows/classes/java/lang/ProcessImpl.java ++--- openjdk/jdk/src/windows/classes/java/lang/ProcessImpl.java Tue Jul 30 17:20:22 2013 -0400 +++++ openjdk/jdk/src/windows/classes/java/lang/ProcessImpl.java Tue Oct 29 01:07:01 2013 +0000 ++@@ -26,6 +26,9 @@ ++ package java.lang; ++ ++ import java.io.*; +++import java.util.ArrayList; +++import java.util.regex.Matcher; +++import java.util.regex.Pattern; ++ ++ /* This class is for the exclusive use of ProcessBuilder.start() to ++ * create new processes. ++@@ -47,6 +50,66 @@ ++ return new ProcessImpl(cmdarray, envblock, dir, redirectErrorStream); ++ } ++ +++ private static class LazyPattern { +++ // Escape-support version: +++ // "(\")((?:\\\\\\1|.)+?)\\1|([^\\s\"]+)"; +++ private static final Pattern PATTERN = +++ Pattern.compile("[^\\s\"]+|\"[^\"]*\""); +++ }; +++ +++ /* Parses the command string parameter into the executable name and +++ * program arguments. +++ * +++ * The command string is broken into tokens. The token separator is a space +++ * or quota character. The space inside quotation is not a token separator. +++ * There are no escape sequences. +++ */ +++ private static String[] getTokensFromCommand(String command) { +++ ArrayList matchList = new ArrayList(8); +++ Matcher regexMatcher = LazyPattern.PATTERN.matcher(command); +++ while (regexMatcher.find()) +++ matchList.add(regexMatcher.group()); +++ return matchList.toArray(new String[matchList.size()]); +++ } +++ +++ private static String createCommandLine(boolean isCmdFile, +++ final String executablePath, +++ final String cmd[]) +++ { +++ StringBuilder cmdbuf = new StringBuilder(80); +++ +++ cmdbuf.append(executablePath); +++ +++ for (int i = 1; i < cmd.length; ++i) { +++ cmdbuf.append(' '); +++ String s = cmd[i]; +++ if (needsEscaping(isCmdFile, s)) { +++ cmdbuf.append('"'); +++ cmdbuf.append(s); +++ +++ // The code protects the [java.exe] and console command line +++ // parser, that interprets the [\"] combination as an escape +++ // sequence for the ["] char. +++ // http://msdn.microsoft.com/en-us/library/17w5ykft.aspx +++ // +++ // If the argument is an FS path, doubling of the tail [\] +++ // char is not a problem for non-console applications. +++ // +++ // The [\"] sequence is not an escape sequence for the [cmd.exe] +++ // command line parser. The case of the [""] tail escape +++ // sequence could not be realized due to the argument validation +++ // procedure. +++ if (!isCmdFile && s.endsWith("\\")) { +++ cmdbuf.append('\\'); +++ } +++ cmdbuf.append('"'); +++ } else { +++ cmdbuf.append(s); +++ } +++ } +++ return cmdbuf.toString(); +++ } +++ ++ // We guarantee the only command file execution for implicit [cmd.exe] run. ++ // http://technet.microsoft.com/en-us/library/bb490954.aspx ++ private static final char CMD_BAT_ESCAPE[] = {' ', '\t', '<', '>', '&', '|', '^'}; ++@@ -128,6 +191,16 @@ ++ return fileToRun.getPath(); ++ } ++ +++ private boolean isShellFile(String executablePath) { +++ String upPath = executablePath.toUpperCase(); +++ return (upPath.endsWith(".CMD") || upPath.endsWith(".BAT")); +++ } +++ +++ private String quoteString(String arg) { +++ StringBuilder argbuf = new StringBuilder(arg.length() + 2); +++ return argbuf.append('"').append(arg).append('"').toString(); +++ } +++ ++ ++ private long handle = 0; ++ private FileDescriptor stdin_fd; ++@@ -143,36 +216,66 @@ ++ boolean redirectErrorStream) ++ throws IOException ++ { ++- // The [executablePath] is not quoted for any case. ++- String executablePath = getExecutablePath(cmd[0]); +++ String cmdstr; +++ SecurityManager security = System.getSecurityManager(); +++ boolean allowAmbigousCommands = false; +++ if (security == null) { +++ String value = System.getProperty("jdk.lang.Process.allowAmbigousCommands"); +++ if (value != null) +++ allowAmbigousCommands = !"false".equalsIgnoreCase(value); +++ } +++ if (allowAmbigousCommands) { +++ // Legacy mode. ++ ++- // We need to extend the argument verification procedure ++- // to guarantee the only command file execution for implicit [cmd.exe] ++- // run. ++- String upPath = executablePath.toUpperCase(); ++- boolean isCmdFile = (upPath.endsWith(".CMD") || upPath.endsWith(".BAT")); +++ // Normalize path if possible. +++ String executablePath = new File(cmd[0]).getPath(); ++ ++- StringBuilder cmdbuf = new StringBuilder(80); +++ // No worry about internal and unpaired ["] . +++ if (needsEscaping(false, executablePath) ) +++ executablePath = quoteString(executablePath); ++ ++- // Quotation protects from interpretation of the [path] argument as ++- // start of longer path with spaces. Quotation has no influence to ++- // [.exe] extension heuristic. ++- cmdbuf.append('"'); ++- cmdbuf.append(executablePath); ++- cmdbuf.append('"'); +++ cmdstr = createCommandLine( +++ false, //legacy mode doesn't worry about extended verification +++ executablePath, +++ cmd); +++ } else { +++ String executablePath; +++ try { +++ executablePath = getExecutablePath(cmd[0]); +++ } catch (IllegalArgumentException e) { +++ // Workaround for the calls like +++ // Runtime.getRuntime().exec("\"C:\\Program Files\\foo\" bar") ++ ++- for (int i = 1; i < cmd.length; i++) { ++- cmdbuf.append(' '); ++- String s = cmd[i]; ++- if (needsEscaping(isCmdFile, s)) { ++- cmdbuf.append('"'); ++- cmdbuf.append(s); ++- cmdbuf.append('"'); ++- } else { ++- cmdbuf.append(s); +++ // No chance to avoid CMD/BAT injection, except to do the work +++ // right from the beginning. Otherwise we have too many corner +++ // cases from +++ // Runtime.getRuntime().exec(String[] cmd [, ...]) +++ // calls with internal ["] and escape sequences. +++ +++ // Restore original command line. +++ StringBuilder join = new StringBuilder(); +++ // terminal space in command line is ok +++ for (String s : cmd) +++ join.append(s).append(' '); +++ +++ // Parse the command line again. +++ cmd = getTokensFromCommand(join.toString()); +++ executablePath = getExecutablePath(cmd[0]); +++ +++ // Check new executable name once more +++ if (security != null) +++ security.checkExec(executablePath); ++ } +++ +++ // Quotation protects from interpretation of the [path] argument as +++ // start of longer path with spaces. Quotation has no influence to +++ // [.exe] extension heuristic. +++ cmdstr = createCommandLine( +++ // We need the extended verification procedure for CMD files. +++ isShellFile(executablePath), +++ quoteString(executablePath), +++ cmd); ++ } ++- String cmdstr = cmdbuf.toString(); ++ ++ stdin_fd = new FileDescriptor(); ++ stdout_fd = new FileDescriptor(); ++diff -r 3e758b40337e -r 20c88fd14959 test/java/lang/Runtime/exec/ExecCommand.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/jdk/test/java/lang/Runtime/exec/ExecCommand.java Tue Oct 29 01:07:01 2013 +0000 ++@@ -0,0 +1,163 @@ +++/* +++ * Copyright (c) 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. +++ * +++ * 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. +++ */ +++ +++ +++/** +++ * @test +++ * @bug 8012453 +++ * @run main/othervm ExecCommand +++ * @summary workaround for legacy applications with Runtime.getRuntime().exec(String command) +++ */ +++ +++import java.io.BufferedWriter; +++import java.io.File; +++import java.io.FileWriter; +++import java.io.IOException; +++import java.security.AccessControlException; +++ +++public class ExecCommand { +++ static class SecurityMan extends SecurityManager { +++ public static String unquote(String str) +++ { +++ int length = (str == null) +++ ? 0 +++ : str.length(); +++ +++ if (length > 1 +++ && str.charAt(0) == '\"' +++ && str.charAt(length - 1) == '\"') +++ { +++ return str.substring(1, length - 1); +++ } +++ return str; +++ } +++ +++ @Override public void checkExec(String cmd) { +++ String ncmd = (new File(unquote(cmd))).getPath(); +++ if ( ncmd.equals(".\\Program") +++ || ncmd.equals("\".\\Program") +++ || ncmd.equals(".\\Program Files\\do.cmd") +++ || ncmd.equals(".\\Program.cmd")) +++ { +++ return; +++ } +++ super.checkExec(cmd); +++ } +++ } +++ +++ // Parameters for the Runtime.exec calls +++ private static final String TEST_RTE_ARG[] = { +++ ".\\Program Files\\do.cmd", +++ "\".\\Program Files\\doNot.cmd\" arg", +++ "\".\\Program Files\\do.cmd\" arg", +++ // compatibility +++ "\".\\Program.cmd\" arg", +++ ".\\Program.cmd arg", +++ }; +++ +++ private static final String doCmdCopy[] = { +++ ".\\Program.cmd", +++ ".\\Program Files\\doNot.cmd", +++ ".\\Program Files\\do.cmd", +++ }; +++ +++ // Golden image for results +++ private static final String TEST_RTE_GI[][] = { +++ //Pure system | Legacy mode | Legacy mode & SM +++ // [.\Program File\do.cmd] +++ new String[]{"IOException", // [.\Program] not found +++ "Success", +++ "IOException"}, //SM - no legacy mode [.\Program] - OK +++ +++ // [".\Program File\doNot.cmd" arg] +++ new String[]{"Success", +++ "Success", +++ "AccessControlException"}, //SM - [".\Program] - OK, +++ // [.\\Program Files\\doNot.cmd] - Fail +++ +++ // [".\Program File\do.cmd" arg] +++ // AccessControlException +++ new String[]{"Success", +++ "Success", +++ "Success"}, //SM - [".\Program] - OK, +++ // [.\\Program Files\\do.cmd] - OK +++ +++ // compatibility +++ new String[]{"Success", "Success", "Success"}, //[".\Program.cmd"] +++ new String[]{"Success", "Success", "Success"} //[.\Program.cmd] +++ }; +++ +++ public static void main(String[] _args) throws Exception { +++ if (!System.getProperty("os.name").startsWith("Windows")) { +++ return; +++ } +++ +++ // tear up +++ try { +++ new File(".\\Program Files").mkdirs(); +++ for (int i = 0; i < doCmdCopy.length; ++i) { +++ try (BufferedWriter outCmd = new BufferedWriter( +++ new FileWriter(doCmdCopy[i]))) { +++ outCmd.write("@echo %1"); +++ } +++ } +++ } catch (IOException e) { +++ throw new Error(e.getMessage()); +++ } +++ +++ // action +++ for (int k = 0; k < 3; ++k) { +++ switch (k) { +++ case 1: +++ System.setProperty("jdk.lang.Process.allowAmbigousCommands", ""); +++ break; +++ case 2: +++ System.setSecurityManager( new SecurityMan() ); +++ break; +++ } +++ for (int i = 0; i < TEST_RTE_ARG.length; ++i) { +++ String outRes; +++ try { +++ Process exec = Runtime.getRuntime().exec(TEST_RTE_ARG[i]); +++ exec.waitFor(); +++ outRes = "Success"; +++ } catch (IOException ioe) { +++ outRes = "IOException: " + ioe.getMessage(); +++ } catch (IllegalArgumentException iae) { +++ outRes = "IllegalArgumentException: " + iae.getMessage(); +++ } catch (AccessControlException se) { +++ outRes = "AccessControlException: " + se.getMessage(); +++ } +++ +++ if (!outRes.startsWith(TEST_RTE_GI[i][k])) { +++ throw new Error("Unexpected output! Step" + k + "" + i +++ + " \nArgument: " + TEST_RTE_ARG[i] +++ + "\nExpected: " + TEST_RTE_GI[i][k] +++ + "\n Output: " + outRes); +++ } else { +++ System.out.println("RTE OK:" + TEST_RTE_ARG[i]); +++ } +++ } +++ } +++ } +++} +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8012617-arrayindexoutofbounds_linebreakmeasurer.patch openjdk-6-6b27-1.12.6/patches/openjdk/8012617-arrayindexoutofbounds_linebreakmeasurer.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8012617-arrayindexoutofbounds_linebreakmeasurer.patch 2013-07-10 09:13:47.000000000 -0500 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8012617-arrayindexoutofbounds_linebreakmeasurer.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -1,14 +1,16 @@ + # HG changeset patch + # User prr +-# Date 1366951061 25200 +-# Node ID 20d3d11e8d9a2eb2a3324eae651e0f1549f95f86 +-# Parent 80383749fc726e4ff57a1fd99d15d7ab9f0d28c6 ++# Date 1382993769 0 ++# Mon Oct 28 20:56:09 2013 +0000 ++# Node ID 150e0c3e95ce6869f8e7b42c6d8683817433e124 ++# Parent 9cfb9105241489a5fbc3fcfdea15a6aee15b2cfc + 8012617: ArrayIndexOutOfBoundsException with some fonts using LineBreakMeasurer +-Reviewed-by: bae, srl ++Reviewed-by: bae, srl, omajid + +---- openjdk/jdk/src/share/classes/sun/font/ExtendedTextSourceLabel.java +-+++ openjdk/jdk/src/share/classes/sun/font/ExtendedTextSourceLabel.java +-@@ -247,6 +247,10 @@ ++diff -r 9cfb91052414 -r 150e0c3e95ce src/share/classes/sun/font/ExtendedTextSourceLabel.java ++--- openjdk/jdk/src/share/classes/sun/font/ExtendedTextSourceLabel.java Tue Jul 16 21:00:34 2013 +0400 +++++ openjdk/jdk/src/share/classes/sun/font/ExtendedTextSourceLabel.java Mon Oct 28 20:56:09 2013 +0000 ++@@ -246,6 +246,10 @@ + float aw = 0f; + float ah = cm.ascent + cm.descent; + +@@ -19,7 +21,7 @@ Reviewed-by: bae, srl + boolean lineIsLTR = (source.getLayoutFlags() & 0x8) == 0; + int rn = info.length - numvals; + if (lineIsLTR) { +-@@ -350,24 +354,42 @@ ++@@ -349,24 +353,42 @@ + + public float getCharX(int index) { + validate(index); +@@ -66,7 +68,7 @@ Reviewed-by: bae, srl + return new Rectangle2D.Float(); + } + return new Rectangle2D.Float( +-@@ -463,7 +485,7 @@ ++@@ -462,7 +484,7 @@ + if (cidx >= charinfo.length) { + break; // layout bailed for some reason + } +@@ -75,7 +77,7 @@ Reviewed-by: bae, srl + width -= adv; + } + +-@@ -512,7 +534,13 @@ ++@@ -511,7 +533,13 @@ + // } + //} + +@@ -90,7 +92,7 @@ Reviewed-by: bae, srl + } + + private final float[] getCharinfo() { +-@@ -604,6 +632,9 @@ ++@@ -603,6 +631,9 @@ + */ + + int numGlyphs = gv.getNumGlyphs(); +@@ -100,9 +102,23 @@ Reviewed-by: bae, srl + int[] indices = gv.getGlyphCharIndices(0, numGlyphs, null); + + boolean DEBUG = false; +---- openjdk/jdk/src/share/classes/sun/font/GlyphLayout.java +-+++ openjdk/jdk/src/share/classes/sun/font/GlyphLayout.java +-@@ -464,7 +464,12 @@ ++diff -r 9cfb91052414 -r 150e0c3e95ce src/share/classes/sun/font/GlyphLayout.java ++--- openjdk/jdk/src/share/classes/sun/font/GlyphLayout.java Tue Jul 16 21:00:34 2013 +0400 +++++ openjdk/jdk/src/share/classes/sun/font/GlyphLayout.java Mon Oct 28 20:56:09 2013 +0000 ++@@ -76,9 +76,12 @@ ++ import java.awt.geom.Point2D; ++ import java.util.ArrayList; ++ import java.util.concurrent.ConcurrentHashMap; +++import java.util.logging.Logger; ++ ++ import static java.lang.Character.*; ++ +++import sun.java2d.SunGraphicsEnvironment; +++ ++ public final class GlyphLayout { ++ // data for glyph vector ++ private GVData _gvdata; ++@@ -461,7 +464,12 @@ + break; + } + catch (IndexOutOfBoundsException e) { +@@ -116,7 +132,7 @@ Reviewed-by: bae, srl + } + } + } +-@@ -473,7 +478,15 @@ ++@@ -470,7 +478,19 @@ + // _gvdata.adjustPositions(txinfo.invdtx); + // } + +@@ -127,14 +143,19 @@ Reviewed-by: bae, srl + + StandardGlyphVector gv; + + if (_gvdata._count < 0) { + + gv = new StandardGlyphVector(font, text, offset, count, frc); +++ if (SunGraphicsEnvironment.debugFonts) { +++ Logger.getLogger("sun.java2d").warning("OpenType layout failed on font: " + +++ font); +++ } + + } else { + + gv = _gvdata.createGlyphVector(font, frc, result); + + } + // System.err.println("Layout returns: " + gv); + return gv; + } +---- openjdk/jdk/src/share/native/sun/font/layout/ContextualSubstSubtables.cpp +-+++ openjdk/jdk/src/share/native/sun/font/layout/ContextualSubstSubtables.cpp ++diff -r 9cfb91052414 -r 150e0c3e95ce src/share/native/sun/font/layout/ContextualSubstSubtables.cpp ++--- openjdk/jdk/src/share/native/sun/font/layout/ContextualSubstSubtables.cpp Tue Jul 16 21:00:34 2013 +0400 +++++ openjdk/jdk/src/share/native/sun/font/layout/ContextualSubstSubtables.cpp Mon Oct 28 20:56:09 2013 +0000 + @@ -218,6 +218,9 @@ + + LEGlyphID glyph = glyphIterator->getCurrGlyphID(); +@@ -175,8 +196,9 @@ Reviewed-by: bae, srl + + if (coverageIndex >= 0) { + const ClassDefinitionTable *backtrackClassDefinitionTable = +---- openjdk/jdk/src/share/native/sun/font/layout/CursiveAttachmentSubtables.cpp +-+++ openjdk/jdk/src/share/native/sun/font/layout/CursiveAttachmentSubtables.cpp ++diff -r 9cfb91052414 -r 150e0c3e95ce src/share/native/sun/font/layout/CursiveAttachmentSubtables.cpp ++--- openjdk/jdk/src/share/native/sun/font/layout/CursiveAttachmentSubtables.cpp Tue Jul 16 21:00:34 2013 +0400 +++++ openjdk/jdk/src/share/native/sun/font/layout/CursiveAttachmentSubtables.cpp Mon Oct 28 20:56:09 2013 +0000 + @@ -45,7 +45,7 @@ + le_int32 coverageIndex = getGlyphCoverage(base, glyphID, success); + le_uint16 eeCount = SWAPW(entryExitCount); +@@ -186,8 +208,9 @@ Reviewed-by: bae, srl + glyphIterator->setCursiveGlyph(); + return 0; + } +---- openjdk/jdk/src/share/native/sun/font/layout/ExtensionSubtables.cpp +-+++ openjdk/jdk/src/share/native/sun/font/layout/ExtensionSubtables.cpp ++diff -r 9cfb91052414 -r 150e0c3e95ce src/share/native/sun/font/layout/ExtensionSubtables.cpp ++--- openjdk/jdk/src/share/native/sun/font/layout/ExtensionSubtables.cpp Tue Jul 16 21:00:34 2013 +0400 +++++ openjdk/jdk/src/share/native/sun/font/layout/ExtensionSubtables.cpp Mon Oct 28 20:56:09 2013 +0000 + @@ -44,10 +44,10 @@ + #define READ_LONG(code) (le_uint32)((SWAPW(*(le_uint16*)&code) << 16) + SWAPW(*(((le_uint16*)&code) + 1))) + +@@ -210,8 +233,9 @@ Reviewed-by: bae, srl + + if(LE_SUCCESS(success)) { + return lookupProcessor->applySubtable(subtable, elt, glyphIterator, fontInstance, success); +---- openjdk/jdk/src/share/native/sun/font/layout/ExtensionSubtables.h +-+++ openjdk/jdk/src/share/native/sun/font/layout/ExtensionSubtables.h ++diff -r 9cfb91052414 -r 150e0c3e95ce src/share/native/sun/font/layout/ExtensionSubtables.h ++--- openjdk/jdk/src/share/native/sun/font/layout/ExtensionSubtables.h Tue Jul 16 21:00:34 2013 +0400 +++++ openjdk/jdk/src/share/native/sun/font/layout/ExtensionSubtables.h Mon Oct 28 20:56:09 2013 +0000 + @@ -52,7 +52,8 @@ + le_uint16 extensionLookupType; + le_uint32 extensionOffset; +@@ -222,8 +246,9 @@ Reviewed-by: bae, srl + GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const; + }; + +---- openjdk/jdk/src/share/native/sun/font/layout/GlyphPosnLookupProc.cpp +-+++ openjdk/jdk/src/share/native/sun/font/layout/GlyphPosnLookupProc.cpp ++diff -r 9cfb91052414 -r 150e0c3e95ce src/share/native/sun/font/layout/GlyphPosnLookupProc.cpp ++--- openjdk/jdk/src/share/native/sun/font/layout/GlyphPosnLookupProc.cpp Tue Jul 16 21:00:34 2013 +0400 +++++ openjdk/jdk/src/share/native/sun/font/layout/GlyphPosnLookupProc.cpp Mon Oct 28 20:56:09 2013 +0000 + @@ -168,7 +168,7 @@ + { + LEReferenceTo subtable(lookupSubtable, success); +@@ -233,8 +258,9 @@ Reviewed-by: bae, srl + break; + } + +---- openjdk/jdk/src/share/native/sun/font/layout/GlyphSubstLookupProc.cpp +-+++ openjdk/jdk/src/share/native/sun/font/layout/GlyphSubstLookupProc.cpp ++diff -r 9cfb91052414 -r 150e0c3e95ce src/share/native/sun/font/layout/GlyphSubstLookupProc.cpp ++--- openjdk/jdk/src/share/native/sun/font/layout/GlyphSubstLookupProc.cpp Tue Jul 16 21:00:34 2013 +0400 +++++ openjdk/jdk/src/share/native/sun/font/layout/GlyphSubstLookupProc.cpp Mon Oct 28 20:56:09 2013 +0000 + @@ -139,7 +139,7 @@ + { + const LEReferenceTo subtable(lookupSubtable, success); +@@ -244,8 +270,9 @@ Reviewed-by: bae, srl + break; + } + +---- openjdk/jdk/src/share/native/sun/font/layout/LigatureSubstSubtables.cpp +-+++ openjdk/jdk/src/share/native/sun/font/layout/LigatureSubstSubtables.cpp ++diff -r 9cfb91052414 -r 150e0c3e95ce src/share/native/sun/font/layout/LigatureSubstSubtables.cpp ++--- openjdk/jdk/src/share/native/sun/font/layout/LigatureSubstSubtables.cpp Tue Jul 16 21:00:34 2013 +0400 +++++ openjdk/jdk/src/share/native/sun/font/layout/LigatureSubstSubtables.cpp Mon Oct 28 20:56:09 2013 +0000 + @@ -45,6 +45,10 @@ + LEGlyphID glyph = glyphIterator->getCurrGlyphID(); + le_int32 coverageIndex = getGlyphCoverage(base, glyph, success); +@@ -257,8 +284,9 @@ Reviewed-by: bae, srl + if (coverageIndex >= 0) { + Offset ligSetTableOffset = SWAPW(ligSetTableOffsetArray[coverageIndex]); + const LigatureSetTable *ligSetTable = (const LigatureSetTable *) ((char *) this + ligSetTableOffset); +---- openjdk/jdk/src/share/native/sun/font/layout/MarkToBasePosnSubtables.cpp +-+++ openjdk/jdk/src/share/native/sun/font/layout/MarkToBasePosnSubtables.cpp ++diff -r 9cfb91052414 -r 150e0c3e95ce src/share/native/sun/font/layout/MarkToBasePosnSubtables.cpp ++--- openjdk/jdk/src/share/native/sun/font/layout/MarkToBasePosnSubtables.cpp Tue Jul 16 21:00:34 2013 +0400 +++++ openjdk/jdk/src/share/native/sun/font/layout/MarkToBasePosnSubtables.cpp Mon Oct 28 20:56:09 2013 +0000 + @@ -56,6 +56,10 @@ + LEGlyphID markGlyph = glyphIterator->getCurrGlyphID(); + le_int32 markCoverage = getGlyphCoverage(base, (LEGlyphID) markGlyph, success); +@@ -270,8 +298,9 @@ Reviewed-by: bae, srl + if (markCoverage < 0) { + // markGlyph isn't a covered mark glyph + return 0; +---- openjdk/jdk/src/share/native/sun/font/layout/MarkToLigaturePosnSubtables.cpp +-+++ openjdk/jdk/src/share/native/sun/font/layout/MarkToLigaturePosnSubtables.cpp ++diff -r 9cfb91052414 -r 150e0c3e95ce src/share/native/sun/font/layout/MarkToLigaturePosnSubtables.cpp ++--- openjdk/jdk/src/share/native/sun/font/layout/MarkToLigaturePosnSubtables.cpp Tue Jul 16 21:00:34 2013 +0400 +++++ openjdk/jdk/src/share/native/sun/font/layout/MarkToLigaturePosnSubtables.cpp Mon Oct 28 20:56:09 2013 +0000 + @@ -55,6 +55,10 @@ + LEGlyphID markGlyph = glyphIterator->getCurrGlyphID(); + le_int32 markCoverage = getGlyphCoverage(base, (LEGlyphID) markGlyph, success); +@@ -283,8 +312,9 @@ Reviewed-by: bae, srl + if (markCoverage < 0) { + // markGlyph isn't a covered mark glyph + return 0; +---- openjdk/jdk/src/share/native/sun/font/layout/MarkToMarkPosnSubtables.cpp +-+++ openjdk/jdk/src/share/native/sun/font/layout/MarkToMarkPosnSubtables.cpp ++diff -r 9cfb91052414 -r 150e0c3e95ce src/share/native/sun/font/layout/MarkToMarkPosnSubtables.cpp ++--- openjdk/jdk/src/share/native/sun/font/layout/MarkToMarkPosnSubtables.cpp Tue Jul 16 21:00:34 2013 +0400 +++++ openjdk/jdk/src/share/native/sun/font/layout/MarkToMarkPosnSubtables.cpp Mon Oct 28 20:56:09 2013 +0000 + @@ -56,6 +56,10 @@ + LEGlyphID markGlyph = glyphIterator->getCurrGlyphID(); + le_int32 markCoverage = getGlyphCoverage(base, (LEGlyphID) markGlyph, success); +@@ -296,8 +326,9 @@ Reviewed-by: bae, srl + if (markCoverage < 0) { + // markGlyph isn't a covered mark glyph + return 0; +---- openjdk/jdk/src/share/native/sun/font/layout/MultipleSubstSubtables.cpp +-+++ openjdk/jdk/src/share/native/sun/font/layout/MultipleSubstSubtables.cpp ++diff -r 9cfb91052414 -r 150e0c3e95ce src/share/native/sun/font/layout/MultipleSubstSubtables.cpp ++--- openjdk/jdk/src/share/native/sun/font/layout/MultipleSubstSubtables.cpp Tue Jul 16 21:00:34 2013 +0400 +++++ openjdk/jdk/src/share/native/sun/font/layout/MultipleSubstSubtables.cpp Mon Oct 28 20:56:09 2013 +0000 + @@ -61,6 +61,10 @@ + le_int32 coverageIndex = getGlyphCoverage(base, glyph, success); + le_uint16 seqCount = SWAPW(sequenceCount); +@@ -309,8 +340,9 @@ Reviewed-by: bae, srl + if (coverageIndex >= 0 && coverageIndex < seqCount) { + Offset sequenceTableOffset = SWAPW(sequenceTableOffsetArray[coverageIndex]); + const SequenceTable *sequenceTable = (const SequenceTable *) ((char *) this + sequenceTableOffset); +---- openjdk/jdk/src/share/native/sun/font/layout/PairPositioningSubtables.cpp +-+++ openjdk/jdk/src/share/native/sun/font/layout/PairPositioningSubtables.cpp ++diff -r 9cfb91052414 -r 150e0c3e95ce src/share/native/sun/font/layout/PairPositioningSubtables.cpp ++--- openjdk/jdk/src/share/native/sun/font/layout/PairPositioningSubtables.cpp Tue Jul 16 21:00:34 2013 +0400 +++++ openjdk/jdk/src/share/native/sun/font/layout/PairPositioningSubtables.cpp Mon Oct 28 20:56:09 2013 +0000 + @@ -126,6 +126,11 @@ + { + LEGlyphID firstGlyph = glyphIterator->getCurrGlyphID(); +@@ -323,8 +355,9 @@ Reviewed-by: bae, srl + GlyphIterator tempIterator(*glyphIterator); + + if (coverageIndex >= 0 && glyphIterator->next()) { +---- openjdk/jdk/src/share/native/sun/font/layout/SinglePositioningSubtables.cpp +-+++ openjdk/jdk/src/share/native/sun/font/layout/SinglePositioningSubtables.cpp ++diff -r 9cfb91052414 -r 150e0c3e95ce src/share/native/sun/font/layout/SinglePositioningSubtables.cpp ++--- openjdk/jdk/src/share/native/sun/font/layout/SinglePositioningSubtables.cpp Tue Jul 16 21:00:34 2013 +0400 +++++ openjdk/jdk/src/share/native/sun/font/layout/SinglePositioningSubtables.cpp Mon Oct 28 20:56:09 2013 +0000 + @@ -70,6 +70,9 @@ + { + LEGlyphID glyph = glyphIterator->getCurrGlyphID(); +@@ -345,8 +378,9 @@ Reviewed-by: bae, srl + + if (coverageIndex >= 0) { + valueRecordArray[0].adjustPosition(coverageIndex, SWAPW(valueFormat), (const char *) this, *glyphIterator, fontInstance); +---- openjdk/jdk/src/share/native/sun/font/layout/SingleSubstitutionSubtables.cpp +-+++ openjdk/jdk/src/share/native/sun/font/layout/SingleSubstitutionSubtables.cpp ++diff -r 9cfb91052414 -r 150e0c3e95ce src/share/native/sun/font/layout/SingleSubstitutionSubtables.cpp ++--- openjdk/jdk/src/share/native/sun/font/layout/SingleSubstitutionSubtables.cpp Tue Jul 16 21:00:34 2013 +0400 +++++ openjdk/jdk/src/share/native/sun/font/layout/SingleSubstitutionSubtables.cpp Mon Oct 28 20:56:09 2013 +0000 + @@ -69,6 +69,9 @@ + { + LEGlyphID glyph = glyphIterator->getCurrGlyphID(); +@@ -367,8 +401,9 @@ Reviewed-by: bae, srl + + if (coverageIndex >= 0) { + TTGlyphID substitute = SWAPW(substituteArray[coverageIndex]); +---- openjdk/jdk/src/share/native/sun/font/layout/SunLayoutEngine.cpp +-+++ openjdk/jdk/src/share/native/sun/font/layout/SunLayoutEngine.cpp ++diff -r 9cfb91052414 -r 150e0c3e95ce src/share/native/sun/font/layout/SunLayoutEngine.cpp ++--- openjdk/jdk/src/share/native/sun/font/layout/SunLayoutEngine.cpp Tue Jul 16 21:00:34 2013 +0400 +++++ openjdk/jdk/src/share/native/sun/font/layout/SunLayoutEngine.cpp Mon Oct 28 20:56:09 2013 +0000 + @@ -203,16 +203,19 @@ + getFloat(env, pt, x, y); + jboolean rtl = (typo_flags & TYPO_RTL) != 0; +@@ -396,9 +431,9 @@ Reviewed-by: bae, srl + + if (chars != buffer) { + free(chars); +-new file mode 100644 +---- /dev/null +-+++ openjdk/jdk/test/java/awt/font/LineBreakMeasurer/AllFontsLBM.java ++diff -r 9cfb91052414 -r 150e0c3e95ce test/java/awt/font/LineBreakMeasurer/AllFontsLBM.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/jdk/test/java/awt/font/LineBreakMeasurer/AllFontsLBM.java Mon Oct 28 20:56:09 2013 +0000 + @@ -0,0 +1,78 @@ + +/* + + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8013380-logger_stack_walk_glassfish.patch openjdk-6-6b27-1.12.6/patches/openjdk/8013380-logger_stack_walk_glassfish.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8013380-logger_stack_walk_glassfish.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8013380-logger_stack_walk_glassfish.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,941 @@ ++# HG changeset patch ++# User andrew ++# Date 1372305047 18000 ++# Wed Jun 26 22:50:47 2013 -0500 ++# Node ID 8733761ca20bb4e46405e274c514bda0e0616a21 ++# Parent a7048970934a1425d5486e6acd0b07558be038c4 ++8013380: Removal of stack walk to find resource bundle breaks Glassfish startup ++Summary: Use caller's classloader to load resource as an alternative to thread context classloader and system classloader ++Reviewed-by: mchung, alanb ++ ++diff -r a7048970934a -r 8733761ca20b src/share/classes/java/util/logging/LogManager.java ++--- openjdk/jdk/src/share/classes/java/util/logging/LogManager.java Tue Apr 16 16:34:14 2013 -0400 +++++ openjdk/jdk/src/share/classes/java/util/logging/LogManager.java Wed Jun 26 22:50:47 2013 -0500 ++@@ -377,11 +377,11 @@ ++ // add a new Logger or return the one that has been added previously ++ // as a LogManager subclass may override the addLogger, getLogger, ++ // readConfiguration, and other methods. ++- Logger demandLogger(String name, String resourceBundleName) { +++ Logger demandLogger(String name, String resourceBundleName, Class caller) { ++ Logger result = getLogger(name); ++ if (result == null) { ++ // only allocate the new logger once ++- Logger newLogger = new Logger(name, resourceBundleName); +++ Logger newLogger = new Logger(name, resourceBundleName, caller); ++ do { ++ if (addLogger(newLogger)) { ++ // We successfully added the new Logger that we ++@@ -465,7 +465,7 @@ ++ Logger demandLogger(String name, String resourceBundleName) { ++ // a LogManager subclass may have its own implementation to add and ++ // get a Logger. So delegate to the LogManager to do the work. ++- return manager.demandLogger(name, resourceBundleName); +++ return manager.demandLogger(name, resourceBundleName, null); ++ } ++ ++ synchronized Logger findLogger(String name) { ++diff -r a7048970934a -r 8733761ca20b src/share/classes/java/util/logging/Logger.java ++--- openjdk/jdk/src/share/classes/java/util/logging/Logger.java Tue Apr 16 16:34:14 2013 -0400 +++++ openjdk/jdk/src/share/classes/java/util/logging/Logger.java Wed Jun 26 22:50:47 2013 -0500 ++@@ -189,6 +189,7 @@ ++ private ArrayList kids; // WeakReferences to loggers that have us as parent ++ private Level levelObject; ++ private volatile int levelValue; // current effective level value +++ private WeakReference callersClassLoaderRef; ++ ++ /** ++ * GLOBAL_LOGGER_NAME is a name for the global logger. ++@@ -244,15 +245,31 @@ ++ * no corresponding resource can be found. ++ */ ++ protected Logger(String name, String resourceBundleName) { +++ this(name, resourceBundleName, null); +++ } +++ +++ Logger(String name, String resourceBundleName, Class caller) { ++ this.manager = LogManager.getLogManager(); ++- if (resourceBundleName != null) { ++- // Note: we may get a MissingResourceException here. ++- setupResourceInfo(resourceBundleName); ++- } +++ setupResourceInfo(resourceBundleName, caller); ++ this.name = name; ++ levelValue = Level.INFO.intValue(); ++ } ++ +++ private void setCallersClassLoaderRef(Class caller) { +++ ClassLoader callersClassLoader = ((caller != null) +++ ? caller.getClassLoader() +++ : null); +++ if (callersClassLoader != null) { +++ this.callersClassLoaderRef = new WeakReference(callersClassLoader); +++ } +++ } +++ +++ private ClassLoader getCallersClassLoader() { +++ return (callersClassLoaderRef != null) +++ ? callersClassLoaderRef.get() +++ : null; +++ } +++ ++ // This constructor is used only to create the global Logger. ++ // It is needed to break a cyclic dependence between the LogManager ++ // and Logger static initializers causing deadlocks. ++@@ -306,7 +323,9 @@ ++ return manager.demandSystemLogger(name, resourceBundleName); ++ } ++ } ++- return manager.demandLogger(name, resourceBundleName); +++ return manager.demandLogger(name, resourceBundleName, caller); +++ // ends up calling new Logger(name, resourceBundleName, caller) +++ // iff the logger doesn't exist already ++ } ++ ++ /** ++@@ -382,11 +401,24 @@ ++ */ ++ @CallerSensitive ++ public static synchronized Logger getLogger(String name, String resourceBundleName) { ++- Logger result = demandLogger(name, resourceBundleName, Reflection.getCallerClass()); +++ Class callerClass = Reflection.getCallerClass(); +++ Logger result = demandLogger(name, resourceBundleName, callerClass); +++ ++ if (result.resourceBundleName == null) { +++ // We haven't set a bundle name yet on the Logger, so it's ok to proceed. +++ +++ // We have to set the callers ClassLoader here in case demandLogger +++ // above found a previously created Logger. This can happen, for +++ // example, if Logger.getLogger(name) is called and subsequently +++ // Logger.getLogger(name, resourceBundleName) is called. In this case +++ // we won't necessarily have the correct classloader saved away, so +++ // we need to set it here, too. +++ ++ // Note: we may get a MissingResourceException here. ++- result.setupResourceInfo(resourceBundleName); +++ result.setupResourceInfo(resourceBundleName, callerClass); ++ } else if (!result.resourceBundleName.equals(resourceBundleName)) { +++ // We already had a bundle name on the Logger and we're trying +++ // to change it here which is not allowed. ++ throw new IllegalArgumentException(result.resourceBundleName + ++ " != " + resourceBundleName); ++ } ++@@ -441,11 +473,13 @@ ++ * @return a newly created private Logger ++ * @throws MissingResourceException if the named ResourceBundle cannot be found. ++ */ +++ @CallerSensitive ++ public static synchronized Logger getAnonymousLogger(String resourceBundleName) { ++ LogManager manager = LogManager.getLogManager(); ++ // cleanup some Loggers that have been GC'ed ++ manager.drainLoggerRefQueueBounded(); ++- Logger result = new Logger(null, resourceBundleName); +++ Logger result = new Logger(null, resourceBundleName, +++ Reflection.getCallerClass()); ++ result.anonymous = true; ++ Logger root = manager.getLogger(""); ++ result.doSetParent(root); ++@@ -461,7 +495,7 @@ ++ * @return localization bundle (may be null) ++ */ ++ public ResourceBundle getResourceBundle() { ++- return findResourceBundle(getResourceBundleName()); +++ return findResourceBundle(getResourceBundleName(), true); ++ } ++ ++ /** ++@@ -548,7 +582,7 @@ ++ String ebname = getEffectiveResourceBundleName(); ++ if (ebname != null && !ebname.equals(SYSTEM_LOGGER_RB_NAME)) { ++ lr.setResourceBundleName(ebname); ++- lr.setResourceBundle(findResourceBundle(ebname)); +++ lr.setResourceBundle(findResourceBundle(ebname, true)); ++ } ++ log(lr); ++ } ++@@ -765,7 +799,7 @@ ++ lr.setLoggerName(name); ++ if (rbname != null) { ++ lr.setResourceBundleName(rbname); ++- lr.setResourceBundle(findResourceBundle(rbname)); +++ lr.setResourceBundle(findResourceBundle(rbname, false)); ++ } ++ log(lr); ++ } ++@@ -789,7 +823,6 @@ ++ * can be null ++ * @param msg The string message (or a key in the message catalog) ++ */ ++- ++ public void logrb(Level level, String sourceClass, String sourceMethod, ++ String bundleName, String msg) { ++ if (level.intValue() < levelValue || levelValue == offValue) { ++@@ -1323,9 +1356,18 @@ ++ * there is no suitable previous cached value. ++ * ++ * @param name the ResourceBundle to locate +++ * @param userCallersClassLoader if true search using the caller's ClassLoader ++ * @return ResourceBundle specified by name or null if not found ++ */ ++- private synchronized ResourceBundle findResourceBundle(String name) { +++ private synchronized ResourceBundle findResourceBundle(String name, +++ boolean useCallersClassLoader) { +++ // For all lookups, we first check the thread context class loader +++ // if it is set. If not, we use the system classloader. If we +++ // still haven't found it we use the callersClassLoaderRef if it +++ // is set and useCallersClassLoader is true. We set +++ // callersClassLoaderRef initially upon creating the logger with a +++ // non-null resource bundle name. +++ ++ // Return a null bundle for a null name. ++ if (name == null) { ++ return null; ++@@ -1358,22 +1400,52 @@ ++ catalogLocale = currentLocale; ++ return catalog; ++ } catch (MissingResourceException ex) { +++ // We can't find the ResourceBundle in the default +++ // ClassLoader. Drop through. +++ } +++ +++ if (useCallersClassLoader) { +++ // Try with the caller's ClassLoader +++ ClassLoader callersClassLoader = getCallersClassLoader(); +++ +++ if (callersClassLoader == null || callersClassLoader == cl) { +++ return null; +++ } +++ +++ try { +++ catalog = ResourceBundle.getBundle(name, currentLocale, +++ callersClassLoader); +++ catalogName = name; +++ catalogLocale = currentLocale; +++ return catalog; +++ } catch (MissingResourceException ex) { +++ return null; // no luck +++ } +++ } else { ++ return null; ++ } ++ } ++ ++ // Private utility method to initialize our one entry ++- // resource bundle cache. +++ // resource bundle name cache and the callers ClassLoader ++ // Note: for consistency reasons, we are careful to check ++ // that a suitable ResourceBundle exists before setting the ++- // ResourceBundleName. ++- private synchronized void setupResourceInfo(String name) { +++ // resourceBundleName field. +++ // Synchronized to prevent races in setting the fields. +++ private synchronized void setupResourceInfo(String name, +++ Class callersClass) { ++ if (name == null) { ++ return; ++ } ++- if (findResourceBundle(name) == null) { +++ +++ setCallersClassLoaderRef(callersClass); +++ if (findResourceBundle(name, true) == null) { ++ // We've failed to find an expected ResourceBundle. ++- throw new MissingResourceException("Can't find " + name + " bundle", name, ""); +++ // unset the caller's ClassLoader since we were unable to find the +++ // the bundle using it +++ this.callersClassLoaderRef = null; +++ throw new MissingResourceException("Can't find " + name + " bundle", +++ name, ""); ++ } ++ resourceBundleName = name; ++ } ++diff -r a7048970934a -r 8733761ca20b test/java/util/logging/bundlesearch/IndirectlyLoadABundle.java ++--- openjdk/jdk/test/java/util/logging/bundlesearch/IndirectlyLoadABundle.java Tue Apr 16 16:34:14 2013 -0400 +++++ openjdk/jdk/test/java/util/logging/bundlesearch/IndirectlyLoadABundle.java Wed Jun 26 22:50:47 2013 -0500 ++@@ -21,43 +21,28 @@ ++ * questions. ++ */ ++ ++-import java.io.File; ++ import java.lang.reflect.InvocationTargetException; ++ import java.lang.reflect.Method; +++import java.net.MalformedURLException; ++ import java.net.URL; ++ import java.net.URLClassLoader; +++import java.nio.file.Paths; +++import java.util.logging.Logger; ++ ++ /** ++ * This class is used to ensure that a resource bundle loadable by a classloader ++- * is on the caller's stack, but not on the classpath or TCCL to ensure that ++- * Logger.getLogger() can't load the bundle via a stack search +++ * is on the caller's stack, but not on the classpath or TCCL. It tests that +++ * Logger.getLogger() can load the bundle via the immediate caller's classloader ++ * ++ * @author Jim Gish ++ */ ++ public class IndirectlyLoadABundle { ++ ++- private final static String rbName = "StackSearchableResource"; +++ private final static String rbName = "CallerSearchableResource"; ++ ++ public boolean loadAndTest() throws Throwable { ++- // Find out where we are running from so we can setup the URLClassLoader URLs ++- // test.src and test.classes will be set if running in jtreg, but probably ++- // not otherwise ++- String testDir = System.getProperty("test.src", System.getProperty("user.dir")); ++- String testClassesDir = System.getProperty("test.classes", ++- System.getProperty("user.dir")); ++- String sep = System.getProperty("file.separator"); ++- ++- URL[] urls = new URL[2]; ++- ++- // Allow for both jtreg and standalone cases here ++- urls[0] = new File( testDir + sep + "resources" + sep ).toURI().toURL(); ++- urls[1] = new File( testClassesDir + sep ).toURI().toURL(); ++- ++- System.out.println("INFO: urls[0] = " + urls[0]); ++- System.out.println("INFO: urls[1] = " + urls[1]); ++- ++ // Make sure we can find it via the URLClassLoader ++- URLClassLoader yetAnotherResourceCL = new URLClassLoader(urls, null); +++ URLClassLoader yetAnotherResourceCL = new URLClassLoader(getURLs(), null); ++ if (!testForValidResourceSetup(yetAnotherResourceCL)) { ++ throw new Exception("Couldn't directly load bundle " + rbName ++ + " as expected. Test config problem"); ++@@ -70,23 +55,109 @@ ++ + " able to. Test config problem"); ++ } ++ ++- Class loadItUpClazz = Class.forName("LoadItUp", true, yetAnotherResourceCL); +++ Class loadItUpClazz = Class.forName("LoadItUp1", true, +++ yetAnotherResourceCL); ++ ClassLoader actual = loadItUpClazz.getClassLoader(); ++ if (actual != yetAnotherResourceCL) { ++- throw new Exception("LoadItUp was loaded by an unexpected CL: " + actual); +++ throw new Exception("LoadItUp1 was loaded by an unexpected CL: " + actual); ++ } ++ Object loadItUp = loadItUpClazz.newInstance(); ++- Method testMethod = loadItUpClazz.getMethod("test", String.class); +++ Method testMethod = loadItUpClazz.getMethod("getLogger", String.class, String.class); ++ try { ++- return (Boolean) testMethod.invoke(loadItUp, rbName); +++ return (Logger)testMethod.invoke(loadItUp, "NestedLogger1", rbName) != null; ++ } catch (InvocationTargetException ex) { ++ throw ex.getTargetException(); ++ } ++ } ++ +++ public boolean testGetAnonymousLogger() throws Throwable { +++ // Test getAnonymousLogger() +++ URLClassLoader loadItUpCL = new URLClassLoader(getURLs(), null); +++ Class loadItUpClazz = Class.forName("LoadItUp1", true, loadItUpCL); +++ ClassLoader actual = loadItUpClazz.getClassLoader(); +++ if (actual != loadItUpCL) { +++ throw new Exception("LoadItUp1 was loaded by an unexpected CL: " +++ + actual); +++ } +++ Object loadItUpAnon = loadItUpClazz.newInstance(); +++ Method testAnonMethod = loadItUpClazz.getMethod("getAnonymousLogger", +++ String.class); +++ try { +++ return (Logger)testAnonMethod.invoke(loadItUpAnon, rbName) != null; +++ } catch (InvocationTargetException ex) { +++ throw ex.getTargetException(); +++ } +++ } +++ +++ +++ public boolean testGetLoggerGetLoggerWithBundle() throws Throwable { +++ // test getLogger("NestedLogger2"); followed by +++ // getLogger("NestedLogger2", rbName) to see if the bundle is found +++ // +++ URL[] urls = getURLs(); +++ if (getLoggerWithNewCL(urls, "NestedLogger2", null)) { +++ return getLoggerWithNewCL(urls, "NestedLogger2", rbName); +++ +++ } else { +++ throw new Exception("TEST FAILED: first call to getLogger() failed " +++ + " in IndirectlyLoadABundle." +++ + "testGetLoggerGetLoggerWithBundle"); +++ } +++ } +++ +++ private URL[] getURLs() throws MalformedURLException { +++ // Find out where we are running from so we can setup the URLClassLoader URLs +++ // test.src and test.classes will be set if running in jtreg, but probably +++ // not otherwise +++ String testDir = System.getProperty("test.src", System.getProperty("user.dir")); +++ String testClassesDir = System.getProperty("test.classes", +++ System.getProperty("user.dir")); +++ URL[] urls = new URL[2]; +++ // Allow for both jtreg and standalone cases here +++ urls[0] = Paths.get(testDir, "resources").toUri().toURL(); +++ urls[1] = Paths.get(testClassesDir).toUri().toURL(); +++ +++ return urls; +++ } +++ +++ private boolean getLoggerWithNewCL(URL[] urls, String loggerName, +++ String bundleName) throws Throwable { +++ Logger result = null;; +++ // Test getLogger("foo"); getLogger("foo", "rbName"); +++ // First do the getLogger() call with no bundle name +++ URLClassLoader getLoggerCL = new URLClassLoader(urls, null); +++ Class loadItUpClazz1 = Class.forName("LoadItUp1", true, getLoggerCL); +++ ClassLoader actual = loadItUpClazz1.getClassLoader(); +++ if (actual != getLoggerCL) { +++ throw new Exception("LoadItUp1 was loaded by an unexpected CL: " +++ + actual); +++ } +++ Object loadItUp1 = loadItUpClazz1.newInstance(); +++ if (bundleName != null) { +++ Method getLoggerMethod = loadItUpClazz1.getMethod("getLogger", +++ String.class, +++ String.class); +++ try { +++ result = (Logger) getLoggerMethod.invoke(loadItUp1, loggerName, +++ bundleName); +++ } catch (InvocationTargetException ex) { +++ throw ex.getTargetException(); +++ } +++ } else { +++ Method getLoggerMethod = loadItUpClazz1.getMethod("getLogger", +++ String.class); +++ try { +++ result = (Logger) getLoggerMethod.invoke(loadItUp1, loggerName); +++ } catch (InvocationTargetException ex) { +++ throw ex.getTargetException(); +++ } +++ } +++ return result != null; +++ } +++ ++ private boolean testForValidResourceSetup(ClassLoader cl) { ++- // First make sure the test environment is setup properly and the bundle actually ++- // exists +++ // First make sure the test environment is setup properly and the bundle +++ // actually exists ++ return ResourceBundleSearchTest.isOnClassPath(rbName, cl); ++ } ++ } ++diff -r a7048970934a -r 8733761ca20b test/java/util/logging/bundlesearch/LoadItUp.java ++--- openjdk/jdk/test/java/util/logging/bundlesearch/LoadItUp.java Tue Apr 16 16:34:14 2013 -0400 +++++ openjdk/jdk/test/java/util/logging/bundlesearch/LoadItUp.java Wed Jun 26 22:50:47 2013 -0500 ++@@ -20,43 +20,30 @@ ++ * or visit www.oracle.com if you need additional information or have any ++ * questions. ++ */ ++-import java.util.MissingResourceException; ++ import java.util.logging.Logger; ++ ++ /* ++- * This class is loaded onto the call stack when the test method is called ++- * and then its classloader can be used to find a property bundle in the same ++- * directory as the class. However, Logger is not allowed +++ * This class is loaded onto the call stack when the getLogger methods are +++ * called and then the classes classloader can be used to find a bundle in +++ * the same directory as the class. However, Logger is not allowed ++ * to find the bundle by looking up the stack for this classloader. ++ * We verify that this cannot happen. ++ * ++ * @author Jim Gish ++ */ ++-public class LoadItUp { ++- ++- private final static boolean DEBUG = false; ++- ++- public Boolean test(String rbName) throws Exception { +++public class LoadItUp1 { +++ public Logger getAnonymousLogger(String rbName) throws Exception { ++ // we should not be able to find the resource in this directory via ++ // getLogger calls. The only way that would be possible given this setup ++ // is that if Logger.getLogger searched up the call stack ++- return lookupBundle(rbName); +++ return Logger.getAnonymousLogger(rbName); ++ } ++ ++- private boolean lookupBundle(String rbName) { ++- // See if Logger.getLogger can find the resource in this directory ++- try { ++- Logger aLogger = Logger.getLogger("NestedLogger", rbName); ++- } catch (MissingResourceException re) { ++- if (DEBUG) { ++- System.out.println( ++- "As expected, LoadItUp.lookupBundle() did not find the bundle " ++- + rbName); ++- } ++- return false; ++- } ++- System.out.println("FAILED: LoadItUp.lookupBundle() found the bundle " ++- + rbName + " using a stack search."); ++- return true; +++ public Logger getLogger(String loggerName) { +++ return Logger.getLogger(loggerName); +++ } +++ +++ public Logger getLogger(String loggerName,String bundleName) { +++ return Logger.getLogger(loggerName, bundleName); ++ } ++ } ++diff -r a7048970934a -r 8733761ca20b test/java/util/logging/bundlesearch/LoadItUp2.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/jdk/test/java/util/logging/bundlesearch/LoadItUp2.java Wed Jun 26 22:50:47 2013 -0500 ++@@ -0,0 +1,62 @@ +++/* +++ * Copyright (c) 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. +++ * +++ * 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 java.util.MissingResourceException; +++import java.util.logging.Logger; +++ +++/* +++ * This class is loaded onto the call stack by LoadItUp2Invoker from a separate +++ * classloader. LoadItUp2Invoker was loaded by a class loader that does have +++ * access to the bundle, but the class loader used to load this class does not. +++ * Thus the logging code should not be able to see the resource bundle unless +++ * it has more than a single level stack crawl, which is not allowed. +++ * +++ * @author Jim Gish +++ */ +++public class LoadItUp2 { +++ +++ private final static boolean DEBUG = false; +++ +++ public Boolean test(String rbName) throws Exception { +++ // we should not be able to find the resource in this directory via +++ // getLogger calls. The only way that would be possible given this setup +++ // is that if Logger.getLogger searched up the call stack +++ return lookupBundle(rbName); +++ } +++ +++ private boolean lookupBundle(String rbName) { +++ // See if Logger.getLogger can find the resource in this directory +++ try { +++ Logger aLogger = Logger.getLogger("NestedLogger2", rbName); +++ } catch (MissingResourceException re) { +++ if (DEBUG) { +++ System.out.println( +++ "As expected, LoadItUp2.lookupBundle() did not find the bundle " +++ + rbName); +++ } +++ return false; +++ } +++ System.out.println("FAILED: LoadItUp2.lookupBundle() found the bundle " +++ + rbName + " using a stack search."); +++ return true; +++ } +++} ++diff -r a7048970934a -r 8733761ca20b test/java/util/logging/bundlesearch/LoadItUp2Invoker.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/jdk/test/java/util/logging/bundlesearch/LoadItUp2Invoker.java Wed Jun 26 22:50:47 2013 -0500 ++@@ -0,0 +1,60 @@ +++/* +++ * Copyright (c) 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. +++ * +++ * 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 java.lang.reflect.InvocationTargetException; +++import java.lang.reflect.Method; +++import java.net.URL; +++import java.net.URLClassLoader; +++ +++/** +++ * This class is loaded by a class loader that can see the resource. It creates +++ * a new classloader for LoadItUp2 which cannot see the resource. So, 2 levels +++ * up the call chain we have a class/classloader that can see the resource, but +++ * 1 level up the class/classloader cannot. +++ * +++ * @author Jim Gish +++ */ +++public class LoadItUp2Invoker { +++ private URLClassLoader cl; +++ private String rbName; +++ private Object loadItUp2; +++ private Method testMethod; +++ +++ public void setup(URL[] urls, String rbName) throws +++ ReflectiveOperationException { +++ this.cl = new URLClassLoader(urls, null); +++ this.rbName = rbName; +++ // Using this new classloader, load the actual test class +++ // which is now two levels removed from the original caller +++ Class loadItUp2Clazz = Class.forName("LoadItUp2", true , cl); +++ this.loadItUp2 = loadItUp2Clazz.newInstance(); +++ this.testMethod = loadItUp2Clazz.getMethod("test", String.class); +++ } +++ +++ public Boolean test() throws Throwable { +++ try { +++ return (Boolean) testMethod.invoke(loadItUp2, rbName); +++ } catch (InvocationTargetException ex) { +++ throw ex.getTargetException(); +++ } +++ } +++} ++diff -r a7048970934a -r 8733761ca20b test/java/util/logging/bundlesearch/ResourceBundleSearchTest.java ++--- openjdk/jdk/test/java/util/logging/bundlesearch/ResourceBundleSearchTest.java Tue Apr 16 16:34:14 2013 -0400 +++++ openjdk/jdk/test/java/util/logging/bundlesearch/ResourceBundleSearchTest.java Wed Jun 26 22:50:47 2013 -0500 ++@@ -23,15 +23,15 @@ ++ ++ /* ++ * @test ++- * @bug 8010127 +++ * @bug 8010127 8013380 ++ * @summary Remove the stack search for a resource bundle Logger to use ++ * @author Jim Gish ++- * @build ResourceBundleSearchTest IndirectlyLoadABundle LoadItUp ++- * @run main ResourceBundleSearchTest +++ * @build ResourceBundleSearchTest IndirectlyLoadABundle LoadItUp1 LoadItUp2 TwiceIndirectlyLoadABundle LoadItUp2Invoker +++ * @run main/othervm ResourceBundleSearchTest ++ */ ++-import java.io.File; ++ import java.net.URL; ++ import java.net.URLClassLoader; +++import java.nio.file.Paths; ++ import java.util.ArrayList; ++ import java.util.List; ++ import java.util.Locale; ++@@ -39,6 +39,12 @@ ++ import java.util.ResourceBundle; ++ import java.util.logging.Logger; ++ +++/** +++ * This class tests various scenarios of loading resource bundles from +++ * java.util.logging. Since jtreg uses the logging system, it is necessary to +++ * run these tests using othervm mode to ensure no interference from logging +++ * initialization by jtreg +++ */ ++ public class ResourceBundleSearchTest { ++ ++ private final static boolean DEBUG = false; ++@@ -49,7 +55,7 @@ ++ ++ private static int numPass = 0; ++ private static int numFail = 0; ++- private static List msgs = new ArrayList(); +++ private static List msgs = new ArrayList<>(); ++ ++ public static void main(String[] args) throws Throwable { ++ ResourceBundleSearchTest test = new ResourceBundleSearchTest(); ++@@ -60,47 +66,54 @@ ++ // ensure we are using en as the default Locale so we can find the resource ++ Locale.setDefault(Locale.ENGLISH); ++ ++- String testClasses = System.getProperty("test.classes"); ++- System.out.println( "test.classes = " + testClasses ); ++- ++ ClassLoader myClassLoader = ClassLoader.getSystemClassLoader(); ++ ++ // Find out where we are running from so we can setup the URLClassLoader URL ++ String userDir = System.getProperty("user.dir"); ++ String testDir = System.getProperty("test.src", userDir); ++- String sep = System.getProperty("file.separator"); ++ ++ URL[] urls = new URL[1]; ++ ++- urls[0] = new File( testDir + sep + "resources" + sep ).toURI().toURL(); +++ urls[0] = Paths.get(testDir, "resources").toUri().toURL(); ++ URLClassLoader rbClassLoader = new URLClassLoader(urls); ++ ++ // Test 1 - can we find a Logger bundle from doing a stack search? ++ // We shouldn't be able to ++- assertFalse(testGetBundleFromStackSearch(), "testGetBundleFromStackSearch"); +++ assertFalse(testGetBundleFromStackSearch(), "1-testGetBundleFromStackSearch"); ++ ++ // Test 2 - can we find a Logger bundle off of the Thread context class ++ // loader? We should be able to. ++- assertTrue( ++- testGetBundleFromTCCL(TCCL_TEST_BUNDLE, rbClassLoader), ++- "testGetBundleFromTCCL"); +++ assertTrue(testGetBundleFromTCCL(TCCL_TEST_BUNDLE, rbClassLoader), +++ "2-testGetBundleFromTCCL"); ++ ++ // Test 3 - Can we find a Logger bundle from the classpath? We should be ++- // able to, but .... ++- // We check to see if the bundle is on the classpath or not so that this ++- // will work standalone. In the case of jtreg/samevm, ++- // the resource bundles are not on the classpath. Running standalone ++- // (or othervm), they are +++ // able to. We'll first check to make sure the setup is correct and +++ // it actually is on the classpath before checking whether logging +++ // can see it there. ++ if (isOnClassPath(PROP_RB_NAME, myClassLoader)) { ++ debug("We should be able to see " + PROP_RB_NAME + " on the classpath"); ++ assertTrue(testGetBundleFromSystemClassLoader(PROP_RB_NAME), ++- "testGetBundleFromSystemClassLoader"); +++ "3-testGetBundleFromSystemClassLoader"); ++ } else { ++- debug("We should not be able to see " + PROP_RB_NAME + " on the classpath"); ++- assertFalse(testGetBundleFromSystemClassLoader(PROP_RB_NAME), ++- "testGetBundleFromSystemClassLoader"); +++ throw new Exception("TEST SETUP FAILURE: Cannot see " + PROP_RB_NAME +++ + " on the classpath"); ++ } ++ +++ // Test 4 - we should be able to find a bundle from the caller's +++ // classloader, but only one level up. +++ assertTrue(testGetBundleFromCallersClassLoader(), +++ "4-testGetBundleFromCallersClassLoader"); +++ +++ // Test 5 - this ensures that getAnonymousLogger(String rbName) +++ // can find the bundle from the caller's classloader +++ assertTrue(testGetAnonymousLogger(), "5-testGetAnonymousLogger"); +++ +++ // Test 6 - first call getLogger("myLogger"). +++ // Then call getLogger("myLogger","bundleName") from a different ClassLoader +++ // Make sure we find the bundle +++ assertTrue(testGetBundleFromSecondCallersClassLoader(), +++ "6-testGetBundleFromSecondCallersClassLoader"); +++ ++ report(); ++ } ++ ++@@ -112,7 +125,7 @@ ++ System.out.println(msg); ++ } ++ throw new Exception(numFail + " out of " + (numPass + numFail) ++- + " tests failed."); +++ + " tests failed."); ++ } ++ } ++ ++@@ -122,7 +135,7 @@ ++ } else { ++ numFail++; ++ System.out.println("FAILED: " + testName ++- + " was supposed to return true but did NOT!"); +++ + " was supposed to return true but did NOT!"); ++ } ++ } ++ ++@@ -132,13 +145,20 @@ ++ } else { ++ numFail++; ++ System.out.println("FAILED: " + testName ++- + " was supposed to return false but did NOT!"); +++ + " was supposed to return false but did NOT!"); ++ } ++ } ++ ++ public boolean testGetBundleFromStackSearch() throws Throwable { ++ // This should fail. This was the old functionality to search up the ++ // caller's call stack +++ TwiceIndirectlyLoadABundle indirectLoader = new TwiceIndirectlyLoadABundle(); +++ return indirectLoader.loadAndTest(); +++ } +++ +++ public boolean testGetBundleFromCallersClassLoader() throws Throwable { +++ // This should pass. This exercises getting the bundle using the +++ // class loader of the caller (one level up) ++ IndirectlyLoadABundle indirectLoader = new IndirectlyLoadABundle(); ++ return indirectLoader.loadAndTest(); ++ } ++@@ -193,14 +213,29 @@ ++ bundleName); ++ } catch (MissingResourceException re) { ++ msgs.add("INFO: testGetBundleFromSystemClassLoader() did not find bundle " ++- + bundleName); +++ + bundleName); ++ return false; ++ } ++ msgs.add("INFO: testGetBundleFromSystemClassLoader() found the bundle " ++- + bundleName); +++ + bundleName); ++ return true; ++ } ++ +++ private boolean testGetAnonymousLogger() throws Throwable { +++ // This should pass. This exercises getting the bundle using the +++ // class loader of the caller (one level up) when calling +++ // Logger.getAnonymousLogger(String rbName) +++ IndirectlyLoadABundle indirectLoader = new IndirectlyLoadABundle(); +++ return indirectLoader.testGetAnonymousLogger(); +++ } +++ +++ private boolean testGetBundleFromSecondCallersClassLoader() throws Throwable { +++ // This should pass. This exercises getting the bundle using the +++ // class loader of the caller (one level up) +++ IndirectlyLoadABundle indirectLoader = new IndirectlyLoadABundle(); +++ return indirectLoader.testGetLoggerGetLoggerWithBundle(); +++ } +++ ++ public static class LoggingThread extends Thread { ++ ++ boolean foundBundle = false; ++@@ -227,13 +262,13 @@ ++ // this should succeed if the bundle is on the system classpath. ++ try { ++ Logger aLogger = Logger.getLogger(ResourceBundleSearchTest.newLoggerName(), ++- bundleName); ++- msg = "INFO: LoggingRunnable() found the bundle " + bundleName ++- + (setTCCL ? " with " : " without ") + "setting the TCCL"; +++ bundleName); +++ msg = "INFO: LoggingThread.run() found the bundle " + bundleName +++ + (setTCCL ? " with " : " without ") + "setting the TCCL"; ++ foundBundle = true; ++ } catch (MissingResourceException re) { ++- msg = "INFO: LoggingRunnable() did not find the bundle " + bundleName ++- + (setTCCL ? " with " : " without ") + "setting the TCCL"; +++ msg = "INFO: LoggingThread.run() did not find the bundle " + bundleName +++ + (setTCCL ? " with " : " without ") + "setting the TCCL"; ++ foundBundle = false; ++ } ++ } catch (Throwable e) { ++diff -r a7048970934a -r 8733761ca20b test/java/util/logging/bundlesearch/TwiceIndirectlyLoadABundle.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/jdk/test/java/util/logging/bundlesearch/TwiceIndirectlyLoadABundle.java Wed Jun 26 22:50:47 2013 -0500 ++@@ -0,0 +1,91 @@ +++/* +++ * Copyright (c) 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. +++ * +++ * 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 java.lang.reflect.InvocationTargetException; +++import java.lang.reflect.Method; +++import java.net.URL; +++import java.net.URLClassLoader; +++import java.nio.file.Paths; +++ +++/** +++ * This class constructs a scenario where a bundle is accessible on the call +++ * stack two levels up from the call to getLogger(), but not on the immediate +++ * caller. This tests that getLogger() isn't doing a stack crawl more than one +++ * level up to find a bundle. +++ * +++ * @author Jim Gish +++ */ +++public class TwiceIndirectlyLoadABundle { +++ +++ private final static String rbName = "StackSearchableResource"; +++ +++ public boolean loadAndTest() throws Throwable { +++ // Find out where we are running from so we can setup the URLClassLoader URLs +++ // test.src and test.classes will be set if running in jtreg, but probably +++ // not otherwise +++ String testDir = System.getProperty("test.src", System.getProperty("user.dir")); +++ String testClassesDir = System.getProperty("test.classes", +++ System.getProperty("user.dir")); +++ URL[] urls = new URL[2]; +++ +++ // Allow for both jtreg and standalone cases here +++ // Unlike the 1-level test where we can get the bundle from the caller's +++ // class loader, for this one we don't want to expose the resource directory +++ // to the next class. That way we're invoking the LoadItUp2Invoker class +++ // from this class that does have access to the resources (two levels +++ // up the call stack), but the Invoker itself won't have access to resource +++ urls[0] = Paths.get(testDir,"resources").toUri().toURL(); +++ urls[1] = Paths.get(testClassesDir).toUri().toURL(); +++ +++ // Make sure we can find it via the URLClassLoader +++ URLClassLoader yetAnotherResourceCL = new URLClassLoader(urls, null); +++ Class loadItUp2InvokerClazz = Class.forName("LoadItUp2Invoker", true, +++ yetAnotherResourceCL); +++ ClassLoader actual = loadItUp2InvokerClazz.getClassLoader(); +++ if (actual != yetAnotherResourceCL) { +++ throw new Exception("LoadItUp2Invoker was loaded by an unexpected CL: " +++ + actual); +++ } +++ Object loadItUp2Invoker = loadItUp2InvokerClazz.newInstance(); +++ +++ Method setupMethod = loadItUp2InvokerClazz.getMethod("setup", +++ urls.getClass(), String.class); +++ try { +++ // For the next class loader we create, we want to leave off +++ // the resources. That way loadItUp2Invoker will have access to +++ // them, but the next class won't. +++ URL[] noResourceUrl = new URL[1]; +++ noResourceUrl[0] = urls[1]; // from above -- just the test classes +++ setupMethod.invoke(loadItUp2Invoker, noResourceUrl, rbName); +++ } catch (InvocationTargetException ex) { +++ throw ex.getTargetException(); +++ } +++ +++ Method testMethod = loadItUp2InvokerClazz.getMethod("test"); +++ try { +++ return (Boolean) testMethod.invoke(loadItUp2Invoker); +++ } catch (InvocationTargetException ex) { +++ throw ex.getTargetException(); +++ } +++ } +++} ++diff -r a7048970934a -r 8733761ca20b test/java/util/logging/bundlesearch/resources/CallerSearchableResource_en.properties ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/jdk/test/java/util/logging/bundlesearch/resources/CallerSearchableResource_en.properties Wed Jun 26 22:50:47 2013 -0500 ++@@ -0,0 +1,25 @@ +++# +++# Copyright (c) 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. +++# +++# 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. +++# +++sample1=translation #4 for sample1 +++sample2=translation #4 for sample2 +++supports-test=ResourceBundleSearchTest +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8013503-improve_stream_factories.patch openjdk-6-6b27-1.12.6/patches/openjdk/8013503-improve_stream_factories.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8013503-improve_stream_factories.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8013503-improve_stream_factories.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,224 @@ ++# HG changeset patch ++# User joehw ++# Date 1381418310 -3600 ++# Thu Oct 10 16:18:30 2013 +0100 ++# Node ID b5b1d1fa4bb4fcd8bc0602fd4f3523fe24d9f00b ++# Parent 7e2686f3328994b546b7a5d2f7ed5d994a9a724f ++8013503: Improve stream factories ++Reviewed-by: alanb, dfuchs, mullan ++ ++diff -r 7e2686f33289 -r b5b1d1fa4bb4 drop_included/jaxp_src/src/javax/xml/stream/FactoryFinder.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/javax/xml/stream/FactoryFinder.java Fri Oct 04 12:22:34 2013 -0400 +++++ openjdk/jaxp/drop_included/jaxp_src/src/javax/xml/stream/FactoryFinder.java Thu Oct 10 16:18:30 2013 +0100 ++@@ -204,13 +204,15 @@ ++ * a property name ++ * @param fallbackClassName Implementation class name, if nothing else ++ * is found. Use null to mean no fallback. +++ * @param standardId Indicate whether the factoryId is standard +++ * or user specified. ++ * ++ * Package private so this code can be shared. ++ */ ++- static Object find(String factoryId, String fallbackClassName) +++ static Object find(String factoryId, String fallbackClassName, boolean standardId) ++ throws ConfigurationError ++ { ++- return find(factoryId, null, fallbackClassName); +++ return find(factoryId, null, fallbackClassName, standardId); ++ } ++ ++ /** ++@@ -227,23 +229,34 @@ ++ * @param fallbackClassName Implementation class name, if nothing else ++ * is found. Use null to mean no fallback. ++ * +++ * @param standardId Indicate whether the factoryId is standard +++ * or user specified. +++ * ++ * Package private so this code can be shared. ++ */ ++- static Object find(String factoryId, ClassLoader cl, String fallbackClassName) +++ static Object find(String factoryId, ClassLoader cl, String fallbackClassName, +++ boolean standardId) ++ throws ConfigurationError ++ { ++ dPrint("find factoryId =" + factoryId); ++ ++ // Use the system property first ++ try { ++- String systemProp = ss.getSystemProperty(factoryId); +++ String systemProp; +++ if (standardId) { +++ systemProp = ss.getSystemProperty(factoryId); +++ } else { +++ systemProp = System.getProperty(factoryId); +++ } +++ ++ if (systemProp != null) { ++ dPrint("found system property, value=" + systemProp); ++ return newInstance(systemProp, null, true); ++ } ++ } ++ catch (SecurityException se) { ++- if (debug) se.printStackTrace(); +++ throw new ConfigurationError( +++ "Failed to read factoryId '" + factoryId + "'", se); ++ } ++ ++ // Try read $java.home/lib/stax.properties followed by ++diff -r 7e2686f33289 -r b5b1d1fa4bb4 drop_included/jaxp_src/src/javax/xml/stream/XMLEventFactory.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/javax/xml/stream/XMLEventFactory.java Fri Oct 04 12:22:34 2013 -0400 +++++ openjdk/jaxp/drop_included/jaxp_src/src/javax/xml/stream/XMLEventFactory.java Thu Oct 10 16:18:30 2013 +0100 ++@@ -47,6 +47,9 @@ ++ * @since 1.6 ++ */ ++ public abstract class XMLEventFactory { +++ +++ static final String JAXPFACTORYID = "javax.xml.stream.XMLEventFactory"; +++ ++ protected XMLEventFactory(){} ++ ++ /** ++@@ -57,8 +60,7 @@ ++ throws FactoryConfigurationError ++ { ++ return (XMLEventFactory) FactoryFinder.find( ++- "javax.xml.stream.XMLEventFactory", ++- "com.sun.xml.internal.stream.events.XMLEventFactoryImpl"); +++ JAXPFACTORYID, "com.sun.xml.internal.stream.events.XMLEventFactoryImpl", true); ++ } ++ ++ /** ++@@ -91,7 +93,7 @@ ++ { ++ return (XMLEventFactory) FactoryFinder.find( ++ "javax.xml.stream.XMLEventFactory", ++- "com.sun.xml.internal.stream.events.XMLEventFactoryImpl"); +++ "com.sun.xml.internal.stream.events.XMLEventFactoryImpl", true); ++ } ++ ++ /** ++@@ -114,7 +116,8 @@ ++ throws FactoryConfigurationError { ++ try { ++ //do not fallback if given classloader can't find the class, throw exception ++- return (XMLEventFactory) FactoryFinder.newInstance(factoryId, classLoader, false); +++ return (XMLEventFactory) FactoryFinder.find(factoryId, classLoader, +++ null, factoryId.equals(JAXPFACTORYID) ? true : false); ++ } catch (FactoryFinder.ConfigurationError e) { ++ throw new FactoryConfigurationError(e.getException(), ++ e.getMessage()); ++@@ -141,7 +144,8 @@ ++ throws FactoryConfigurationError { ++ try { ++ //do not fallback if given classloader can't find the class, throw exception ++- return (XMLEventFactory) FactoryFinder.newInstance(factoryId, classLoader, false); +++ return (XMLEventFactory) FactoryFinder.find(factoryId, classLoader, +++ null, factoryId.equals(JAXPFACTORYID) ? true : false); ++ } catch (FactoryFinder.ConfigurationError e) { ++ throw new FactoryConfigurationError(e.getException(), ++ e.getMessage()); ++diff -r 7e2686f33289 -r b5b1d1fa4bb4 drop_included/jaxp_src/src/javax/xml/stream/XMLInputFactory.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/javax/xml/stream/XMLInputFactory.java Fri Oct 04 12:22:34 2013 -0400 +++++ openjdk/jaxp/drop_included/jaxp_src/src/javax/xml/stream/XMLInputFactory.java Thu Oct 10 16:18:30 2013 +0100 ++@@ -139,6 +139,7 @@ ++ public static final String ALLOCATOR= ++ "javax.xml.stream.allocator"; ++ +++ static final String JAXPFACTORYID = "javax.xml.stream.XMLInputFactory"; ++ static final String DEFAULIMPL = "com.sun.xml.internal.stream.XMLInputFactoryImpl"; ++ ++ protected XMLInputFactory(){} ++@@ -150,9 +151,7 @@ ++ public static XMLInputFactory newInstance() ++ throws FactoryConfigurationError ++ { ++- return (XMLInputFactory) FactoryFinder.find( ++- "javax.xml.stream.XMLInputFactory", ++- DEFAULIMPL); +++ return (XMLInputFactory) FactoryFinder.find(JAXPFACTORYID, DEFAULIMPL, true); ++ } ++ ++ /** ++@@ -183,9 +182,7 @@ ++ public static XMLInputFactory newFactory() ++ throws FactoryConfigurationError ++ { ++- return (XMLInputFactory) FactoryFinder.find( ++- "javax.xml.stream.XMLInputFactory", ++- DEFAULIMPL); +++ return (XMLInputFactory) FactoryFinder.find(JAXPFACTORYID, DEFAULIMPL, true); ++ } ++ ++ /** ++@@ -208,7 +205,8 @@ ++ throws FactoryConfigurationError { ++ try { ++ //do not fallback if given classloader can't find the class, throw exception ++- return (XMLInputFactory) FactoryFinder.find(factoryId, classLoader, null); +++ return (XMLInputFactory) FactoryFinder.find(factoryId, classLoader, +++ null, factoryId.equals(JAXPFACTORYID) ? true : false); ++ } catch (FactoryFinder.ConfigurationError e) { ++ throw new FactoryConfigurationError(e.getException(), ++ e.getMessage()); ++@@ -235,7 +233,8 @@ ++ throws FactoryConfigurationError { ++ try { ++ //do not fallback if given classloader can't find the class, throw exception ++- return (XMLInputFactory) FactoryFinder.find(factoryId, classLoader, null); +++ return (XMLInputFactory) FactoryFinder.find(factoryId, classLoader, +++ null, factoryId.equals(JAXPFACTORYID) ? true : false); ++ } catch (FactoryFinder.ConfigurationError e) { ++ throw new FactoryConfigurationError(e.getException(), ++ e.getMessage()); ++diff -r 7e2686f33289 -r b5b1d1fa4bb4 drop_included/jaxp_src/src/javax/xml/stream/XMLOutputFactory.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/javax/xml/stream/XMLOutputFactory.java Fri Oct 04 12:22:34 2013 -0400 +++++ openjdk/jaxp/drop_included/jaxp_src/src/javax/xml/stream/XMLOutputFactory.java Thu Oct 10 16:18:30 2013 +0100 ++@@ -115,6 +115,7 @@ ++ public static final String IS_REPAIRING_NAMESPACES= ++ "javax.xml.stream.isRepairingNamespaces"; ++ +++ static final String JAXPFACTORYID = "javax.xml.stream.XMLOutputFactory"; ++ static final String DEFAULIMPL = "com.sun.xml.internal.stream.XMLOutputFactoryImpl"; ++ ++ protected XMLOutputFactory(){} ++@@ -126,8 +127,7 @@ ++ public static XMLOutputFactory newInstance() ++ throws FactoryConfigurationError ++ { ++- return (XMLOutputFactory) FactoryFinder.find("javax.xml.stream.XMLOutputFactory", ++- DEFAULIMPL); +++ return (XMLOutputFactory) FactoryFinder.find(JAXPFACTORYID, DEFAULIMPL, true); ++ } ++ ++ /** ++@@ -158,8 +158,7 @@ ++ public static XMLOutputFactory newFactory() ++ throws FactoryConfigurationError ++ { ++- return (XMLOutputFactory) FactoryFinder.find("javax.xml.stream.XMLOutputFactory", ++- DEFAULIMPL); +++ return (XMLOutputFactory) FactoryFinder.find(JAXPFACTORYID, DEFAULIMPL, true); ++ } ++ ++ /** ++@@ -181,7 +180,8 @@ ++ throws FactoryConfigurationError { ++ try { ++ //do not fallback if given classloader can't find the class, throw exception ++- return (XMLInputFactory) FactoryFinder.find(factoryId, classLoader, null); +++ return (XMLInputFactory) FactoryFinder.find(factoryId, classLoader, +++ null, factoryId.equals(JAXPFACTORYID) ? true : false); ++ } catch (FactoryFinder.ConfigurationError e) { ++ throw new FactoryConfigurationError(e.getException(), ++ e.getMessage()); ++@@ -210,7 +210,8 @@ ++ throws FactoryConfigurationError { ++ try { ++ //do not fallback if given classloader can't find the class, throw exception ++- return (XMLOutputFactory) FactoryFinder.find(factoryId, classLoader, null); +++ return (XMLOutputFactory) FactoryFinder.find(factoryId, classLoader, +++ null, factoryId.equals(JAXPFACTORYID) ? true : false); ++ } catch (FactoryFinder.ConfigurationError e) { ++ throw new FactoryConfigurationError(e.getException(), ++ e.getMessage()); +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8013506-better_pack200.patch openjdk-6-6b27-1.12.6/patches/openjdk/8013506-better_pack200.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8013506-better_pack200.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8013506-better_pack200.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,39 @@ ++# HG changeset patch ++# User ksrini ++# Date 1381851019 -3600 ++# Tue Oct 15 16:30:19 2013 +0100 ++# Node ID 8fb384d684f5b9bc76970bdc7e5603b9cd9944b8 ++# Parent 337232ddaec36c6d9843ff35906e6160446844eb ++8013506: Better Pack200 data handling ++Reviewed-by: jrose, kizune, mschoene ++ ++diff -r 337232ddaec3 -r 8fb384d684f5 src/share/native/com/sun/java/util/jar/pack/zip.cpp ++--- openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp Fri May 31 20:43:32 2013 +0400 +++++ openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp Tue Oct 15 16:30:19 2013 +0100 ++@@ -1,5 +1,5 @@ ++ /* ++- * Copyright (c) 2001, 2005, Oracle and/or its affiliates. All rights reserved. +++ * Copyright (c) 2001, 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 ++@@ -339,6 +339,10 @@ ++ time_t t = modtime; ++ struct tm sbuf; ++ struct tm* s = gmtime_r(&t, &sbuf); +++ if (s == NULL) { +++ fprintf(u->errstrm, "Error: gmtime failure, invalid input archive\n"); +++ exit(2); +++ } ++ modtime_cache = modtime; ++ dostime_cache = dostime(s->tm_year + 1900, s->tm_mon + 1, s->tm_mday, ++ s->tm_hour, s->tm_min, s->tm_sec); ++@@ -383,7 +387,7 @@ ++ } ++ ++ deflated.empty(); ++- zs.next_out = (uchar*) deflated.grow(len + (len/2)); +++ zs.next_out = (uchar*) deflated.grow(add_size(len, (len/2))); ++ zs.avail_out = deflated.size(); ++ ++ zs.next_in = (uchar*)head.ptr; +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8013510-augment_image_writing.patch openjdk-6-6b27-1.12.6/patches/openjdk/8013510-augment_image_writing.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8013510-augment_image_writing.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8013510-augment_image_writing.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,57 @@ ++# HG changeset patch ++# User jchen ++# Date 1368123798 25200 ++# Thu May 09 11:23:18 2013 -0700 ++# Node ID c428e65fa8fd127058ea33ef728391887ea108e6 ++# Parent 8fb384d684f5b9bc76970bdc7e5603b9cd9944b8 ++8013510: Augment image writing code ++Reviewed-by: bae, prr ++ ++diff -r 8fb384d684f5 -r c428e65fa8fd src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReader.java ++--- openjdk/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReader.java Tue Oct 15 16:30:19 2013 +0100 +++++ openjdk/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReader.java Thu May 09 11:23:18 2013 -0700 ++@@ -1178,6 +1178,11 @@ ++ target = imRas; ++ } ++ int [] bandSizes = target.getSampleModel().getSampleSize(); +++ for (int i = 0; i < bandSizes.length; i++) { +++ if (bandSizes[i] <= 0 || bandSizes[i] > 8) { +++ throw new IIOException("Illegal band size: should be 0 < size <= 8"); +++ } +++ } ++ ++ /* ++ * If the process is sequential, and we have restart markers, ++diff -r 8fb384d684f5 -r c428e65fa8fd src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriter.java ++--- openjdk/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriter.java Tue Oct 15 16:30:19 2013 +0100 +++++ openjdk/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriter.java Thu May 09 11:23:18 2013 -0700 ++@@ -490,8 +490,8 @@ ++ // handle <= 8-bit samples. We now check the band sizes and throw ++ // an exception for images, such as USHORT_GRAY, with > 8 bits ++ // per sample. ++- if (bandSizes[i] > 8) { ++- throw new IIOException("Sample size must be <= 8"); +++ if (bandSizes[i] <= 0 || bandSizes[i] > 8) { +++ throw new IIOException("Illegal band size: should be 0 < size <= 8"); ++ } ++ // 4450894 part 2: We expand IndexColorModel images to full 24- ++ // or 32-bit in grabPixels() for each scanline. For indexed ++diff -r 8fb384d684f5 -r c428e65fa8fd src/share/native/sun/awt/image/jpeg/imageioJPEG.c ++--- openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c Tue Oct 15 16:30:19 2013 +0100 +++++ openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c Thu May 09 11:23:18 2013 -0700 ++@@ -2684,6 +2684,15 @@ ++ bandSize = (*env)->GetIntArrayElements(env, bandSizes, NULL); ++ ++ for (i = 0; i < numBands; i++) { +++ if (bandSize[i] <= 0 || bandSize[i] > JPEG_BAND_SIZE) { +++ (*env)->ReleaseIntArrayElements(env, bandSizes, +++ bandSize, JNI_ABORT); +++ JNU_ThrowByName(env, "javax/imageio/IIOException", "Invalid Image"); +++ return JNI_FALSE;; +++ } +++ } +++ +++ for (i = 0; i < numBands; i++) { ++ if (bandSize[i] != JPEG_BAND_SIZE) { ++ mustScale = TRUE; ++ break; +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8013514-improve_cmap_stability.patch openjdk-6-6b27-1.12.6/patches/openjdk/8013514-improve_cmap_stability.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8013514-improve_cmap_stability.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8013514-improve_cmap_stability.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,51 @@ ++# HG changeset patch ++# User vadim ++# Date 1381851333 -3600 ++# Tue Oct 15 16:35:33 2013 +0100 ++# Node ID a28b8ce4d90e7d7bc1fab599298831e0d62e171e ++# Parent c428e65fa8fd127058ea33ef728391887ea108e6 ++8013514: Improve stability of cmap class ++Reviewed-by: mschoene, prr, bae ++ ++diff -r c428e65fa8fd -r a28b8ce4d90e src/share/classes/sun/font/FileFont.java ++--- openjdk/jdk/src/share/classes/sun/font/FileFont.java Thu May 09 11:23:18 2013 -0700 +++++ openjdk/jdk/src/share/classes/sun/font/FileFont.java Tue Oct 15 16:35:33 2013 +0100 ++@@ -174,7 +174,9 @@ ++ } ++ } ++ } ++- scaler.dispose(); +++ if (scaler != null) { +++ scaler.dispose(); +++ } ++ scaler = FontManager.getNullScaler(); ++ } ++ ++diff -r c428e65fa8fd -r a28b8ce4d90e src/share/classes/sun/font/StandardGlyphVector.java ++--- openjdk/jdk/src/share/classes/sun/font/StandardGlyphVector.java Thu May 09 11:23:18 2013 -0700 +++++ openjdk/jdk/src/share/classes/sun/font/StandardGlyphVector.java Tue Oct 15 16:35:33 2013 +0100 ++@@ -1733,8 +1733,9 @@ ++ tx, ++ sgv.font.getStyle(), ++ aa, fm); ++- ++- FontStrike strike = sgv.font2D.getStrike(desc); // !!! getStrike(desc, false) +++ // Get the strike via the handle. Shouldn't matter +++ // if we've invalidated the font but its an extra precaution. +++ FontStrike strike = sgv.font2D.handle.font2D.getStrike(desc); // !!! getStrike(desc, false) ++ ++ return new GlyphStrike(sgv, strike, dx, dy); ++ } ++diff -r c428e65fa8fd -r a28b8ce4d90e src/share/classes/sun/font/TrueTypeFont.java ++--- openjdk/jdk/src/share/classes/sun/font/TrueTypeFont.java Thu May 09 11:23:18 2013 -0700 +++++ openjdk/jdk/src/share/classes/sun/font/TrueTypeFont.java Tue Oct 15 16:35:33 2013 +0100 ++@@ -559,6 +559,9 @@ ++ if (head_Table != null && head_Table.capacity() >= 18) { ++ ShortBuffer sb = head_Table.asShortBuffer(); ++ upem = sb.get(9) & 0xffff; +++ if (upem < 16 || upem > 16384) { +++ upem = 2048; +++ } ++ } ++ setStrikethroughMetrics(os2_Table, upem); ++ +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8013739-better_ldap_resource_management.patch openjdk-6-6b27-1.12.6/patches/openjdk/8013739-better_ldap_resource_management.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8013739-better_ldap_resource_management.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8013739-better_ldap_resource_management.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,148 @@ ++# HG changeset patch ++# User weijun ++# Date 1382990980 0 ++# Mon Oct 28 20:09:40 2013 +0000 ++# Node ID 42fd9f22ae5e9aea017af28a2b5ff7a498753e15 ++# Parent 2adb9f71f6c0723acf40877f059d276557b71034 ++8013739: Better LDAP resource management ++Reviewed-by: ahgross, mchung, xuelei ++ ++diff -r 2adb9f71f6c0 -r 42fd9f22ae5e src/share/classes/com/sun/jndi/ldap/VersionHelper12.java ++--- openjdk/jdk/src/share/classes/com/sun/jndi/ldap/VersionHelper12.java Mon Jul 22 14:06:39 2013 -0700 +++++ openjdk/jdk/src/share/classes/com/sun/jndi/ldap/VersionHelper12.java Mon Oct 28 20:09:40 2013 +0000 ++@@ -25,11 +25,12 @@ ++ ++ package com.sun.jndi.ldap; ++ ++-import java.net.URL; ++ import java.net.URLClassLoader; ++ import java.net.MalformedURLException; +++import java.security.AccessControlContext; ++ import java.security.AccessController; ++ import java.security.PrivilegedAction; +++import sun.misc.SharedSecrets; ++ ++ final class VersionHelper12 extends VersionHelper { ++ ++@@ -82,12 +83,16 @@ ++ } ++ ++ Thread createThread(final Runnable r) { ++- return (Thread) AccessController.doPrivileged( ++- new PrivilegedAction() { ++- public Object run() { ++- return new Thread(r); +++ final AccessControlContext acc = AccessController.getContext(); +++ // 4290486: doPrivileged is needed to create a thread in +++ // an environment that restricts "modifyThreadGroup". +++ return AccessController.doPrivileged( +++ new PrivilegedAction() { +++ public Thread run() { +++ return SharedSecrets.getJavaLangAccess() +++ .newThreadWithAcc(r, acc); +++ } ++ } ++- } ++ ); ++ } ++ } ++diff -r 2adb9f71f6c0 -r 42fd9f22ae5e src/share/classes/java/lang/System.java ++--- openjdk/jdk/src/share/classes/java/lang/System.java Mon Jul 22 14:06:39 2013 -0700 +++++ openjdk/jdk/src/share/classes/java/lang/System.java Mon Oct 28 20:09:40 2013 +0000 ++@@ -25,6 +25,7 @@ ++ package java.lang; ++ ++ import java.io.*; +++import java.security.AccessControlContext; ++ import java.util.Properties; ++ import java.util.PropertyPermission; ++ import java.util.StringTokenizer; ++@@ -1158,6 +1159,9 @@ ++ public void blockedOn(Thread t, Interruptible b) { ++ t.blockedOn(b); ++ } +++ public Thread newThreadWithAcc(Runnable target, AccessControlContext acc) { +++ return new Thread(target, acc); +++ } ++ }); ++ } ++ } ++diff -r 2adb9f71f6c0 -r 42fd9f22ae5e src/share/classes/java/lang/Thread.java ++--- openjdk/jdk/src/share/classes/java/lang/Thread.java Mon Jul 22 14:06:39 2013 -0700 +++++ openjdk/jdk/src/share/classes/java/lang/Thread.java Mon Oct 28 20:09:40 2013 +0000 ++@@ -322,6 +322,15 @@ ++ } ++ ++ /** +++ * Initializes a Thread with the current AccessControlContext. +++ * @see #init(ThreadGroup,Runnable,String,long,AccessControlContext) +++ */ +++ private void init(ThreadGroup g, Runnable target, String name, +++ long stackSize) { +++ init(g, target, name, stackSize, null); +++ } +++ +++ /** ++ * Initializes a Thread. ++ * ++ * @param g the Thread group ++@@ -329,9 +338,11 @@ ++ * @param name the name of the new Thread ++ * @param stackSize the desired stack size for the new thread, or ++ * zero to indicate that this parameter is to be ignored. +++ * @param acc the AccessControlContext to inherit, or +++ * AccessController.getContext() if null ++ */ ++ private void init(ThreadGroup g, Runnable target, String name, ++- long stackSize) { +++ long stackSize, AccessControlContext acc) { ++ Thread parent = currentThread(); ++ SecurityManager security = System.getSecurityManager(); ++ if (g == null) { ++@@ -374,7 +385,8 @@ ++ this.contextClassLoader = parent.getContextClassLoader(); ++ else ++ this.contextClassLoader = parent.contextClassLoader; ++- this.inheritedAccessControlContext = AccessController.getContext(); +++ this.inheritedAccessControlContext = +++ acc != null ? acc : AccessController.getContext(); ++ this.target = target; ++ setPriority(priority); ++ if (parent.inheritableThreadLocals != null) ++@@ -427,6 +439,14 @@ ++ } ++ ++ /** +++ * Creates a new Thread that inherits the given AccessControlContext. +++ * This is not a public constructor. +++ */ +++ Thread(Runnable target, AccessControlContext acc) { +++ init(null, target, "Thread-" + nextThreadNum(), 0, acc); +++ } +++ +++ /** ++ * Allocates a new Thread object. This constructor has ++ * the same effect as Thread(null, null, ++ * gname), where gname is ++diff -r 2adb9f71f6c0 -r 42fd9f22ae5e src/share/classes/sun/misc/JavaLangAccess.java ++--- openjdk/jdk/src/share/classes/sun/misc/JavaLangAccess.java Mon Jul 22 14:06:39 2013 -0700 +++++ openjdk/jdk/src/share/classes/sun/misc/JavaLangAccess.java Mon Oct 28 20:09:40 2013 +0000 ++@@ -25,6 +25,7 @@ ++ ++ package sun.misc; ++ +++import java.security.AccessControlContext; ++ import sun.reflect.ConstantPool; ++ import sun.reflect.annotation.AnnotationType; ++ import sun.nio.ch.Interruptible; ++@@ -54,4 +55,10 @@ ++ ++ /** Set thread's blocker field. */ ++ void blockedOn(Thread t, Interruptible b); +++ +++ /** +++ * Returns a new Thread with the given Runnable and an +++ * inherited AccessControlContext. +++ */ +++ Thread newThreadWithAcc(Runnable target, AccessControlContext acc); ++ } +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8013744-better_tabling.patch openjdk-6-6b27-1.12.6/patches/openjdk/8013744-better_tabling.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8013744-better_tabling.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8013744-better_tabling.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,196 @@ ++# HG changeset patch ++# User alexsch ++# Date 1381852031 -3600 ++# Tue Oct 15 16:47:11 2013 +0100 ++# Node ID d10e47deb098d4af5d58a8bfe92dc8033e5ef6f7 ++# Parent a28b8ce4d90e7d7bc1fab599298831e0d62e171e ++8013744: Better tabling for AWT ++Reviewed-by: art, malenkov, skoivu ++ ++diff -r a28b8ce4d90e -r d10e47deb098 src/share/classes/javax/swing/JTable.java ++--- openjdk/jdk/src/share/classes/javax/swing/JTable.java Tue Oct 15 16:35:33 2013 +0100 +++++ openjdk/jdk/src/share/classes/javax/swing/JTable.java Tue Oct 15 16:47:11 2013 +0100 ++@@ -52,6 +52,7 @@ ++ ++ import javax.print.attribute.*; ++ import javax.print.PrintService; +++import sun.reflect.misc.ReflectUtil; ++ ++ import sun.swing.SwingUtilities2; ++ import sun.swing.SwingUtilities2.Section; ++@@ -5461,14 +5462,15 @@ ++ // they have the option to replace the value with ++ // null or use escape to restore the original. ++ // For Strings, return "" for backward compatibility. ++- if ("".equals(s)) { ++- if (constructor.getDeclaringClass() == String.class) { ++- value = s; ++- } ++- super.stopCellEditing(); ++- } ++- ++ try { +++ if ("".equals(s)) { +++ if (constructor.getDeclaringClass() == String.class) { +++ value = s; +++ } +++ super.stopCellEditing(); +++ } +++ +++ SwingUtilities2.checkAccess(constructor.getModifiers()); ++ value = constructor.newInstance(new Object[]{s}); ++ } ++ catch (Exception e) { ++@@ -5492,6 +5494,8 @@ ++ if (type == Object.class) { ++ type = String.class; ++ } +++ ReflectUtil.checkPackageAccess(type); +++ SwingUtilities2.checkAccess(type.getModifiers()); ++ constructor = type.getConstructor(argTypes); ++ } ++ catch (Exception e) { ++diff -r a28b8ce4d90e -r d10e47deb098 src/share/classes/javax/swing/UIDefaults.java ++--- openjdk/jdk/src/share/classes/javax/swing/UIDefaults.java Tue Oct 15 16:35:33 2013 +0100 +++++ openjdk/jdk/src/share/classes/javax/swing/UIDefaults.java Tue Oct 15 16:47:11 2013 +0100 ++@@ -53,6 +53,7 @@ ++ ++ import sun.reflect.misc.MethodUtil; ++ import sun.reflect.misc.ReflectUtil; +++import sun.swing.SwingUtilities2; ++ import sun.util.CoreResourceBundleControl; ++ ++ /** ++@@ -1102,7 +1103,7 @@ ++ } ++ ReflectUtil.checkPackageAccess(className); ++ c = Class.forName(className, true, (ClassLoader)cl); ++- checkAccess(c.getModifiers()); +++ SwingUtilities2.checkAccess(c.getModifiers()); ++ if (methodName != null) { ++ Class[] types = getClassArray(args); ++ Method m = c.getMethod(methodName, types); ++@@ -1110,7 +1111,7 @@ ++ } else { ++ Class[] types = getClassArray(args); ++ Constructor constructor = c.getConstructor(types); ++- checkAccess(constructor.getModifiers()); +++ SwingUtilities2.checkAccess(constructor.getModifiers()); ++ return constructor.newInstance(args); ++ } ++ } catch(Exception e) { ++@@ -1125,13 +1126,6 @@ ++ }, acc); ++ } ++ ++- private void checkAccess(int modifiers) { ++- if(System.getSecurityManager() != null && ++- !Modifier.isPublic(modifiers)) { ++- throw new SecurityException("Resource is not accessible"); ++- } ++- } ++- ++ /* ++ * Coerce the array of class types provided into one which ++ * looks the way the Reflection APIs expect. This is done ++diff -r a28b8ce4d90e -r d10e47deb098 src/share/classes/javax/swing/text/DefaultFormatter.java ++--- openjdk/jdk/src/share/classes/javax/swing/text/DefaultFormatter.java Tue Oct 15 16:35:33 2013 +0100 +++++ openjdk/jdk/src/share/classes/javax/swing/text/DefaultFormatter.java Tue Oct 15 16:47:11 2013 +0100 ++@@ -24,7 +24,8 @@ ++ */ ++ package javax.swing.text; ++ ++-import sun.reflect.misc.ConstructorUtil; +++import sun.reflect.misc.ReflectUtil; +++import sun.swing.SwingUtilities2; ++ ++ import java.io.Serializable; ++ import java.lang.reflect.*; ++@@ -247,7 +248,9 @@ ++ Constructor cons; ++ ++ try { ++- cons = ConstructorUtil.getConstructor(vc, new Class[]{String.class}); +++ ReflectUtil.checkPackageAccess(vc); +++ SwingUtilities2.checkAccess(vc.getModifiers()); +++ cons = vc.getConstructor(new Class[]{String.class}); ++ ++ } catch (NoSuchMethodException nsme) { ++ cons = null; ++@@ -255,6 +258,7 @@ ++ ++ if (cons != null) { ++ try { +++ SwingUtilities2.checkAccess(cons.getModifiers()); ++ return cons.newInstance(new Object[] { string }); ++ } catch (Throwable ex) { ++ throw new ParseException("Error creating instance", 0); ++diff -r a28b8ce4d90e -r d10e47deb098 src/share/classes/javax/swing/text/NumberFormatter.java ++--- openjdk/jdk/src/share/classes/javax/swing/text/NumberFormatter.java Tue Oct 15 16:35:33 2013 +0100 +++++ openjdk/jdk/src/share/classes/javax/swing/text/NumberFormatter.java Tue Oct 15 16:47:11 2013 +0100 ++@@ -28,6 +28,8 @@ ++ import java.text.*; ++ import java.util.*; ++ import javax.swing.text.*; +++import sun.reflect.misc.ReflectUtil; +++import sun.swing.SwingUtilities2; ++ ++ /** ++ * NumberFormatter subclasses InternationalFormatter ++@@ -466,10 +468,12 @@ ++ valueClass = value.getClass(); ++ } ++ try { +++ ReflectUtil.checkPackageAccess(valueClass); +++ SwingUtilities2.checkAccess(valueClass.getModifiers()); ++ Constructor cons = valueClass.getConstructor( ++ new Class[] { String.class }); ++- ++ if (cons != null) { +++ SwingUtilities2.checkAccess(cons.getModifiers()); ++ return cons.newInstance(new Object[]{string}); ++ } ++ } catch (Throwable ex) { } ++diff -r a28b8ce4d90e -r d10e47deb098 src/share/classes/sun/swing/SwingLazyValue.java ++--- openjdk/jdk/src/share/classes/sun/swing/SwingLazyValue.java Tue Oct 15 16:35:33 2013 +0100 +++++ openjdk/jdk/src/share/classes/sun/swing/SwingLazyValue.java Tue Oct 15 16:47:11 2013 +0100 ++@@ -30,6 +30,7 @@ ++ import java.security.AccessController; ++ import java.security.PrivilegedAction; ++ import javax.swing.UIDefaults; +++import sun.reflect.misc.ReflectUtil; ++ ++ /** ++ * SwingLazyValue is a copy of ProxyLazyValue that does not snapshot the ++@@ -64,7 +65,7 @@ ++ public Object createValue(final UIDefaults table) { ++ try { ++ Class c; ++- Object cl; +++ ReflectUtil.checkPackageAccess(className); ++ c = Class.forName(className, true, null); ++ if (methodName != null) { ++ Class[] types = getClassArray(args); ++diff -r a28b8ce4d90e -r d10e47deb098 src/share/classes/sun/swing/SwingUtilities2.java ++--- openjdk/jdk/src/share/classes/sun/swing/SwingUtilities2.java Tue Oct 15 16:35:33 2013 +0100 +++++ openjdk/jdk/src/share/classes/sun/swing/SwingUtilities2.java Tue Oct 15 16:47:11 2013 +0100 ++@@ -1319,6 +1319,19 @@ ++ } ++ ++ /** +++ * Utility method that throws SecurityException if SecurityManager is set +++ * and modifiers are not public +++ * +++ * @param modifiers a set of modifiers +++ */ +++ public static void checkAccess(int modifiers) { +++ if (System.getSecurityManager() != null +++ && !Modifier.isPublic(modifiers)) { +++ throw new SecurityException("Resource is not accessible"); +++ } +++ } +++ +++ /** ++ * Returns true if EventQueue.getCurrentEvent() has the permissions to ++ * access the system clipboard and if it is allowed gesture (if ++ * checkGesture true) +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8013827-createtempfile_hang.patch openjdk-6-6b27-1.12.6/patches/openjdk/8013827-createtempfile_hang.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8013827-createtempfile_hang.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8013827-createtempfile_hang.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,176 @@ ++# HG changeset patch ++# User dxu ++# Date 1383018580 0 ++# Tue Oct 29 03:49:40 2013 +0000 ++# Node ID 8459b68eb028734b2153266176538e1eddbb87be ++# Parent 8ad2eb12bf42f2564fdf80a7236e4046046a4f4e ++8013827: File.createTempFile hangs with temp file starting with 'com1.4' ++8011950: java.io.File.createTempFile enters infinite loop when passed invalid data ++Reviewed-by: alanb ++ ++diff -r 8ad2eb12bf42 -r 8459b68eb028 src/share/classes/java/io/File.java ++--- openjdk/jdk/src/share/classes/java/io/File.java Tue Oct 29 03:05:18 2013 +0000 +++++ openjdk/jdk/src/share/classes/java/io/File.java Tue Oct 29 03:49:40 2013 +0000 ++@@ -1801,7 +1801,11 @@ ++ } else { ++ n = Math.abs(n); ++ } ++- return new File(dir, prefix + Long.toString(n) + suffix); +++ String name = prefix + Long.toString(n) + suffix; +++ File f = new File(dir, name); +++ if (!name.equals(f.getName())) +++ throw new IOException("Unable to create temporary file"); +++ return f; ++ } ++ ++ private static boolean checkAndCreate(String filename, SecurityManager sm, ++diff -r 8ad2eb12bf42 -r 8459b68eb028 src/windows/native/java/io/WinNTFileSystem_md.c ++--- openjdk/jdk/src/windows/native/java/io/WinNTFileSystem_md.c Tue Oct 29 03:05:18 2013 +0000 +++++ openjdk/jdk/src/windows/native/java/io/WinNTFileSystem_md.c Tue Oct 29 03:49:40 2013 +0000 ++@@ -356,6 +356,10 @@ ++ WCHAR *pathbuf = pathToNTPath(env, path, JNI_FALSE); ++ if (pathbuf == NULL) ++ return JNI_FALSE; +++ if (isReservedDeviceNameW(pathbuf)) { +++ free(pathbuf); +++ return JNI_FALSE; +++ } ++ h = CreateFileW( ++ pathbuf, /* Wide char path name */ ++ GENERIC_READ | GENERIC_WRITE, /* Read and write permission */ ++diff -r 8ad2eb12bf42 -r 8459b68eb028 test/java/io/File/CreateNewFile.java ++--- openjdk/jdk/test/java/io/File/CreateNewFile.java Tue Oct 29 03:05:18 2013 +0000 +++++ openjdk/jdk/test/java/io/File/CreateNewFile.java Tue Oct 29 03:49:40 2013 +0000 ++@@ -1,5 +1,5 @@ ++ /* ++- * Copyright (c) 1998, 2001, Oracle and/or its affiliates. All rights reserved. +++ * Copyright (c) 1998, 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 ++@@ -22,7 +22,7 @@ ++ */ ++ ++ /* @test ++- @bug 4130498 4391178 +++ @bug 4130498 4391178 6198547 ++ @summary Basic test for createNewFile method ++ */ ++ ++@@ -51,5 +51,20 @@ ++ } catch (IOException e) { ++ // Exception expected ++ } +++ +++ testCreateExistingDir(); +++ } +++ +++ // Test JDK-6198547 +++ private static void testCreateExistingDir() throws IOException { +++ File tmpFile = new File("hugo"); +++ if (tmpFile.exists() && !tmpFile.delete()) +++ throw new RuntimeException("Cannot delete " + tmpFile); +++ if (!tmpFile.mkdir()) +++ throw new RuntimeException("Cannot create dir " + tmpFile); +++ if (!tmpFile.exists()) +++ throw new RuntimeException("Cannot see created dir " + tmpFile); +++ if (tmpFile.createNewFile()) +++ throw new RuntimeException("Should fail to create file " + tmpFile); ++ } ++ } ++diff -r 8ad2eb12bf42 -r 8459b68eb028 test/java/io/File/NulFile.java ++--- openjdk/jdk/test/java/io/File/NulFile.java Tue Oct 29 03:05:18 2013 +0000 +++++ openjdk/jdk/test/java/io/File/NulFile.java Tue Oct 29 03:49:40 2013 +0000 ++@@ -612,7 +612,7 @@ ++ try { ++ File.createTempFile(prefix, suffix, directory); ++ } catch (IOException ex) { ++- if ("Unable to create temporary file".equals(ex.getMessage())) +++ if (ExceptionMsg.equals(ex.getMessage())) ++ exceptionThrown = true; ++ } ++ } ++diff -r 8ad2eb12bf42 -r 8459b68eb028 test/java/io/File/createTempFile/SpecialTempFile.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/jdk/test/java/io/File/createTempFile/SpecialTempFile.java Tue Oct 29 03:49:40 2013 +0000 ++@@ -0,0 +1,80 @@ +++/* +++ * Copyright (c) 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. +++ * +++ * 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. +++ */ +++ +++/* +++ * @test +++ * @bug 8013827 8011950 +++ * @summary Check whether File.createTempFile can handle special parameters +++ * on Windows platforms +++ * @author Dan Xu +++ */ +++ +++import java.io.File; +++import java.io.IOException; +++ +++public class SpecialTempFile { +++ +++ private static void test(String name, String[] prefix, String[] suffix) { +++ if (prefix == null || suffix == null +++ || prefix.length != suffix.length) +++ { +++ return; +++ } +++ +++ final String exceptionMsg = "Unable to create temporary file"; +++ final String errMsg = "IOException is expected"; +++ +++ for (int i = 0; i < prefix.length; i++) { +++ boolean exceptionThrown = false; +++ File f = null; +++ System.out.println("In test " + name +++ + ", creating temp file with prefix, " +++ + prefix[i] + ", suffix, " + suffix[i]); +++ try { +++ f = File.createTempFile(prefix[i], suffix[i]); +++ } catch (IOException e) { +++ if (exceptionMsg.equals(e.getMessage())) +++ exceptionThrown = true; +++ else +++ System.out.println("Wrong error message:" + e.getMessage()); +++ } +++ if (!exceptionThrown || f != null) +++ throw new RuntimeException(errMsg); +++ } +++ } +++ +++ public static void main(String[] args) throws Exception { +++ if (!System.getProperty("os.name").startsWith("Windows")) +++ return; +++ +++ // Test JDK-8013827 +++ String[] resvPre = { "LPT1.package.zip", "com7.4.package.zip" }; +++ String[] resvSuf = { ".temp", ".temp" }; +++ test("ReservedName", resvPre, resvSuf); +++ +++ // Test JDK-8011950 +++ String[] slashPre = { "///..///", "temp", "///..///" }; +++ String[] slashSuf = { ".temp", "///..///..", "///..///.." }; +++ test("SlashedName", slashPre, slashSuf); +++ } +++} +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8014085-better_serialization.patch openjdk-6-6b27-1.12.6/patches/openjdk/8014085-better_serialization.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8014085-better_serialization.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8014085-better_serialization.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,412 @@ ++# HG changeset patch ++# User jbachorik ++# Date 1371711107 -7200 ++# Thu Jun 20 08:51:47 2013 +0200 ++# Node ID a9be60a78488c7b261b92d927d1272afe2484e6b ++# Parent d10e47deb098d4af5d58a8bfe92dc8033e5ef6f7 ++8014085: Better serialization support in JMX classes ++Reviewed-by: alanb, dfuchs, skoivu ++ ++diff -r d10e47deb098 -r a9be60a78488 src/share/classes/javax/management/MBeanNotificationInfo.java ++--- openjdk/jdk/src/share/classes/javax/management/MBeanNotificationInfo.java Tue Oct 15 16:47:11 2013 +0100 +++++ openjdk/jdk/src/share/classes/javax/management/MBeanNotificationInfo.java Thu Jun 20 08:51:47 2013 +0200 ++@@ -25,6 +25,9 @@ ++ ++ package javax.management; ++ +++import java.io.IOException; +++import java.io.InvalidObjectException; +++import java.io.ObjectInputStream; ++ import java.util.Arrays; ++ ++ /** ++@@ -67,7 +70,7 @@ ++ /** ++ * @serial The different types of the notification. ++ */ ++- private final String[] types; +++ private String[] types; ++ ++ /** @see MBeanInfo#arrayGettersSafe */ ++ private final transient boolean arrayGettersSafe; ++@@ -114,9 +117,8 @@ ++ notifType, though it doesn't explicitly allow it ++ either. */ ++ ++- if (notifTypes == null) ++- notifTypes = NO_TYPES; ++- this.types = notifTypes; +++ this.types = (notifTypes != null && notifTypes.length > 0) ? +++ notifTypes.clone() : NO_TYPES; ++ this.arrayGettersSafe = ++ MBeanInfo.arrayGettersSafe(this.getClass(), ++ MBeanNotificationInfo.class); ++@@ -203,4 +205,16 @@ ++ hash ^= types[i].hashCode(); ++ return hash; ++ } +++ +++ private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException { +++ ObjectInputStream.GetField gf = ois.readFields(); +++ String[] t = (String[])gf.get("types", null); +++ +++ if (t == null) { +++ throw new InvalidObjectException("Trying to deserialize an invalid " + +++ "instance of " + MBeanNotificationInfo.class + +++ "[types=null]"); +++ } +++ types = t.length == 0 ? t : t.clone(); +++ } ++ } ++diff -r d10e47deb098 -r a9be60a78488 src/share/classes/javax/management/remote/JMXPrincipal.java ++--- openjdk/jdk/src/share/classes/javax/management/remote/JMXPrincipal.java Tue Oct 15 16:47:11 2013 +0100 +++++ openjdk/jdk/src/share/classes/javax/management/remote/JMXPrincipal.java Thu Jun 20 08:51:47 2013 +0200 ++@@ -26,6 +26,9 @@ ++ ++ package javax.management.remote; ++ +++import java.io.IOException; +++import java.io.InvalidObjectException; +++import java.io.ObjectInputStream; ++ import java.io.Serializable; ++ import java.security.Principal; ++ ++@@ -64,9 +67,7 @@ ++ * null. ++ */ ++ public JMXPrincipal(String name) { ++- if (name == null) ++- throw new NullPointerException("illegal null input"); ++- +++ validate(name); ++ this.name = name; ++ } ++ ++@@ -130,4 +131,20 @@ ++ public int hashCode() { ++ return name.hashCode(); ++ } +++ +++ private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException { +++ ObjectInputStream.GetField gf = ois.readFields(); +++ String principalName = (String)gf.get("name", null); +++ try { +++ validate(principalName); +++ this.name = principalName; +++ } catch (NullPointerException e) { +++ throw new InvalidObjectException(e.getMessage()); +++ } +++ } +++ +++ private static void validate(String name) throws NullPointerException { +++ if (name == null) +++ throw new NullPointerException("illegal null input"); +++ } ++ } ++diff -r d10e47deb098 -r a9be60a78488 src/share/classes/javax/management/remote/JMXServiceURL.java ++--- openjdk/jdk/src/share/classes/javax/management/remote/JMXServiceURL.java Tue Oct 15 16:47:11 2013 +0100 +++++ openjdk/jdk/src/share/classes/javax/management/remote/JMXServiceURL.java Thu Jun 20 08:51:47 2013 +0200 ++@@ -29,6 +29,9 @@ ++ ++ import com.sun.jmx.remote.util.ClassLogger; ++ import com.sun.jmx.remote.util.EnvHelp; +++import java.io.IOException; +++import java.io.InvalidObjectException; +++import java.io.ObjectInputStream; ++ ++ import java.io.Serializable; ++ import java.net.InetAddress; ++@@ -299,7 +302,7 @@ ++ If we're given an explicit host name that is illegal we ++ have to reject it. (Bug 5057532.) */ ++ try { ++- validateHost(host); +++ validateHost(host, port); ++ } catch (MalformedURLException e) { ++ if (logger.fineOn()) { ++ logger.fine("JMXServiceURL", ++@@ -338,36 +341,82 @@ ++ validate(); ++ } ++ ++- private void validate() throws MalformedURLException { +++ private static final String INVALID_INSTANCE_MSG = +++ "Trying to deserialize an invalid instance of JMXServiceURL"; +++ private void readObject(ObjectInputStream inputStream) throws IOException, ClassNotFoundException { +++ ObjectInputStream.GetField gf = inputStream.readFields(); +++ String h = (String)gf.get("host", null); +++ int p = (int)gf.get("port", -1); +++ String proto = (String)gf.get("protocol", null); +++ String url = (String)gf.get("urlPath", null); ++ +++ if (proto == null || url == null || h == null) { +++ StringBuilder sb = new StringBuilder(INVALID_INSTANCE_MSG).append('['); +++ boolean empty = true; +++ if (proto == null) { +++ sb.append("protocol=null"); +++ empty = false; +++ } +++ if (h == null) { +++ sb.append(empty ? "" : ",").append("host=null"); +++ empty = false; +++ } +++ if (url == null) { +++ sb.append(empty ? "" : ",").append("urlPath=null"); +++ } +++ sb.append(']'); +++ throw new InvalidObjectException(sb.toString()); +++ } +++ +++ if (h.contains("[") || h.contains("]")) { +++ throw new InvalidObjectException("Invalid host name: " + h); +++ } +++ +++ try { +++ validate(proto, h, p, url); +++ this.protocol = proto; +++ this.host = h; +++ this.port = p; +++ this.urlPath = url; +++ } catch (MalformedURLException e) { +++ throw new InvalidObjectException(INVALID_INSTANCE_MSG + ": " + +++ e.getMessage()); +++ } +++ +++ } +++ +++ private void validate(String proto, String h, int p, String url) +++ throws MalformedURLException { ++ // Check protocol ++- ++- final int protoEnd = indexOfFirstNotInSet(protocol, protocolBitSet, 0); ++- if (protoEnd == 0 || protoEnd < protocol.length() ++- || !alphaBitSet.get(protocol.charAt(0))) { +++ final int protoEnd = indexOfFirstNotInSet(proto, protocolBitSet, 0); +++ if (protoEnd == 0 || protoEnd < proto.length() +++ || !alphaBitSet.get(proto.charAt(0))) { ++ throw new MalformedURLException("Missing or invalid protocol " + ++- "name: \"" + protocol + "\""); +++ "name: \"" + proto + "\""); ++ } ++ ++ // Check host ++- ++- validateHost(); +++ validateHost(h, p); ++ ++ // Check port ++- ++- if (port < 0) ++- throw new MalformedURLException("Bad port: " + port); +++ if (p < 0) +++ throw new MalformedURLException("Bad port: " + p); ++ ++ // Check URL path ++- ++- if (urlPath.length() > 0) { ++- if (!urlPath.startsWith("/") && !urlPath.startsWith(";")) ++- throw new MalformedURLException("Bad URL path: " + urlPath); +++ if (url.length() > 0) { +++ if (!url.startsWith("/") && !url.startsWith(";")) +++ throw new MalformedURLException("Bad URL path: " + url); ++ } ++ } ++ ++- private void validateHost() throws MalformedURLException { ++- if (host.length() == 0) { +++ private void validate() throws MalformedURLException { +++ validate(this.protocol, this.host, this.port, this.urlPath); +++ } +++ +++ private static void validateHost(String h, int port) +++ throws MalformedURLException { +++ +++ if (h.length() == 0) { ++ if (port != 0) { ++ throw new MalformedURLException("Cannot give port number " + ++ "without host name"); ++@@ -375,12 +424,6 @@ ++ return; ++ } ++ ++- validateHost(host); ++- } ++- ++- private static void validateHost(String h) ++- throws MalformedURLException { ++- ++ if (isNumericIPv6Address(h)) { ++ /* We assume J2SE >= 1.4 here. Otherwise you can't ++ use the address anyway. We can't call ++@@ -670,22 +713,22 @@ ++ /** ++ * The value returned by {@link #getProtocol()}. ++ */ ++- private final String protocol; +++ private String protocol; ++ ++ /** ++ * The value returned by {@link #getHost()}. ++ */ ++- private final String host; +++ private String host; ++ ++ /** ++ * The value returned by {@link #getPort()}. ++ */ ++- private final int port; +++ private int port; ++ ++ /** ++ * The value returned by {@link #getURLPath()}. ++ */ ++- private final String urlPath; +++ private String urlPath; ++ ++ /** ++ * Cached result of {@link #toString()}. ++diff -r d10e47deb098 -r a9be60a78488 src/share/classes/javax/management/remote/NotificationResult.java ++--- openjdk/jdk/src/share/classes/javax/management/remote/NotificationResult.java Tue Oct 15 16:47:11 2013 +0100 +++++ openjdk/jdk/src/share/classes/javax/management/remote/NotificationResult.java Thu Jun 20 08:51:47 2013 +0200 ++@@ -25,6 +25,9 @@ ++ ++ package javax.management.remote; ++ +++import java.io.IOException; +++import java.io.InvalidObjectException; +++import java.io.ObjectInputStream; ++ import java.io.Serializable; ++ ++ /** ++@@ -76,17 +79,7 @@ ++ public NotificationResult(long earliestSequenceNumber, ++ long nextSequenceNumber, ++ TargetedNotification[] targetedNotifications) { ++- if (targetedNotifications == null) { ++- final String msg = "Notifications null"; ++- throw new IllegalArgumentException(msg); ++- } ++- ++- if (earliestSequenceNumber < 0 || nextSequenceNumber < 0) ++- throw new IllegalArgumentException("Bad sequence numbers"); ++- /* We used to check nextSequenceNumber >= earliestSequenceNumber ++- here. But in fact the opposite can legitimately be true if ++- notifications have been lost. */ ++- +++ validate(targetedNotifications, earliestSequenceNumber, nextSequenceNumber); ++ this.earliestSequenceNumber = earliestSequenceNumber; ++ this.nextSequenceNumber = nextSequenceNumber; ++ this.targetedNotifications = (targetedNotifications.length == 0 ? targetedNotifications : targetedNotifications.clone()); ++@@ -138,7 +131,39 @@ ++ getTargetedNotifications().length; ++ } ++ ++- private final long earliestSequenceNumber; ++- private final long nextSequenceNumber; ++- private final TargetedNotification[] targetedNotifications; +++ private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException { +++ ObjectInputStream.GetField gf = ois.readFields(); +++ TargetedNotification[] tNotifs = (TargetedNotification[])gf.get("targetedNotifications", null); +++ long snStart = gf.get("earliestSequenceNumber", -1L); +++ long snNext = gf.get("nextSequenceNumber", -1L); +++ try { +++ validate(tNotifs, snStart, snNext); +++ +++ this.targetedNotifications = tNotifs.length == 0 ? tNotifs : tNotifs.clone(); +++ this.earliestSequenceNumber = snStart; +++ this.nextSequenceNumber = snNext; +++ } catch (IllegalArgumentException e) { +++ throw new InvalidObjectException(e.getMessage()); +++ } +++ } +++ +++ private long earliestSequenceNumber; +++ private long nextSequenceNumber; +++ private TargetedNotification[] targetedNotifications; +++ +++ private static void validate(TargetedNotification[] targetedNotifications, +++ long earliestSequenceNumber, +++ long nextSequenceNumber) +++ throws IllegalArgumentException { +++ if (targetedNotifications == null) { +++ final String msg = "Notifications null"; +++ throw new IllegalArgumentException(msg); +++ } +++ +++ if (earliestSequenceNumber < 0 || nextSequenceNumber < 0) +++ throw new IllegalArgumentException("Bad sequence numbers"); +++ /* We used to check nextSequenceNumber >= earliestSequenceNumber +++ here. But in fact the opposite can legitimately be true if +++ notifications have been lost. */ +++ } ++ } ++diff -r d10e47deb098 -r a9be60a78488 src/share/classes/javax/management/remote/TargetedNotification.java ++--- openjdk/jdk/src/share/classes/javax/management/remote/TargetedNotification.java Tue Oct 15 16:47:11 2013 +0100 +++++ openjdk/jdk/src/share/classes/javax/management/remote/TargetedNotification.java Thu Jun 20 08:51:47 2013 +0200 ++@@ -26,6 +26,9 @@ ++ ++ package javax.management.remote; ++ +++import java.io.IOException; +++import java.io.InvalidObjectException; +++import java.io.ObjectInputStream; ++ import java.io.Serializable; ++ import javax.management.Notification; ++ ++@@ -73,12 +76,9 @@ ++ */ ++ public TargetedNotification(Notification notification, ++ Integer listenerID) { +++ validate(notification, listenerID); ++ // If we replace integer with int... ++ // this(notification,intValue(listenerID)); ++- if (notification == null) throw new ++- IllegalArgumentException("Invalid notification: null"); ++- if (listenerID == null) throw new ++- IllegalArgumentException("Invalid listener ID: null"); ++ this.notif = notification; ++ this.id = listenerID; ++ } ++@@ -115,13 +115,13 @@ ++ * @serial A notification to transmit to the other side. ++ * @see #getNotification() ++ **/ ++- private final Notification notif; +++ private Notification notif; ++ /** ++ * @serial The ID of the listener to which the notification is ++ * targeted. ++ * @see #getListenerID() ++ **/ ++- private final Integer id; +++ private Integer id; ++ //private final int id; ++ ++ // Needed if we use int instead of Integer... ++@@ -130,4 +130,26 @@ ++ // IllegalArgumentException("Invalid listener ID: null"); ++ // return id.intValue(); ++ // } +++ +++ private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException { +++ ObjectInputStream.GetField gf = ois.readFields(); +++ Notification notification = (Notification)gf.get("notif", null); +++ Integer listenerId = (Integer)gf.get("id", null); +++ try { +++ validate(notification, listenerId); +++ this.notif = notification; +++ this.id = listenerId; +++ } catch (IllegalArgumentException e) { +++ throw new InvalidObjectException(e.getMessage()); +++ } +++ } +++ +++ private static void validate(Notification notif, Integer id) throws IllegalArgumentException { +++ if (notif == null) { +++ throw new IllegalArgumentException("Invalid notification: null"); +++ } +++ if (id == null) { +++ throw new IllegalArgumentException("Invalid listener ID: null"); +++ } +++ } ++ } +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8014093-improve_image_parsing.patch openjdk-6-6b27-1.12.6/patches/openjdk/8014093-improve_image_parsing.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8014093-improve_image_parsing.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8014093-improve_image_parsing.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,719 @@ ++# HG changeset patch ++# User bae ++# Date 1368794871 -14400 ++# Fri May 17 16:47:51 2013 +0400 ++# Node ID 5405d79569f76d1285fd3c840489477a81bd9eff ++# Parent a9be60a78488c7b261b92d927d1272afe2484e6b ++8014093: Improve parsing of images ++Reviewed-by: prr ++ ++diff -r a9be60a78488 -r 5405d79569f7 src/share/native/sun/awt/image/awt_parseImage.c ++--- openjdk/jdk/src/share/native/sun/awt/image/awt_parseImage.c Thu Jun 20 08:51:47 2013 +0200 +++++ openjdk/jdk/src/share/native/sun/awt/image/awt_parseImage.c Fri May 17 16:47:51 2013 +0400 ++@@ -797,363 +797,204 @@ ++ return 1; ++ } ++ ++-/* ++- * This routine will fill in a buffer of data for either 1 band or all ++- * bands (if band == -1). ++- */ ++ #define MAX_TO_GRAB (10240) ++ ++-int awt_getPixelByte(JNIEnv *env, int band, RasterS_t *rasterP, ++- unsigned char *bufferP) { ++- int w = rasterP->width; ++- int h = rasterP->height; ++- int numBands = rasterP->numBands; +++typedef union { +++ void *pv; +++ unsigned char *pb; +++ unsigned short *ps; +++} PixelData_t; +++ +++ +++int awt_getPixels(JNIEnv *env, RasterS_t *rasterP, void *bufferP) { +++ const int w = rasterP->width; +++ const int h = rasterP->height; +++ const int numBands = rasterP->numBands; ++ int y; ++ int i; ++- int maxLines = (h < MAX_TO_GRAB/w ? h : MAX_TO_GRAB/w); +++ int maxLines; ++ jobject jsm; ++- int off; +++ int off = 0; ++ jarray jdata = NULL; ++ jobject jdatabuffer; ++ int *dataP; ++- int maxBytes = w; +++ int maxSamples; +++ PixelData_t p; +++ +++ if (bufferP == NULL) { +++ return -1; +++ } +++ +++ if (rasterP->dataType != BYTE_DATA_TYPE && +++ rasterP->dataType != SHORT_DATA_TYPE) +++ { +++ return -1; +++ } +++ +++ p.pv = bufferP; +++ +++ if (!SAFE_TO_MULT(w, numBands)) { +++ return -1; +++ } +++ maxSamples = w * numBands; +++ +++ maxLines = maxSamples > MAX_TO_GRAB ? 1 : (MAX_TO_GRAB / maxSamples); +++ if (maxLines > h) { +++ maxLines = h; +++ } +++ +++ if (!SAFE_TO_MULT(maxSamples, maxLines)) { +++ return -1; +++ } +++ +++ maxSamples *= maxLines; ++ ++ jsm = (*env)->GetObjectField(env, rasterP->jraster, g_RasterSampleModelID); ++ jdatabuffer = (*env)->GetObjectField(env, rasterP->jraster, ++ g_RasterDataBufferID); ++- jdata = (*env)->NewIntArray(env, maxBytes*rasterP->numBands*maxLines); +++ +++ jdata = (*env)->NewIntArray(env, maxSamples); ++ if (JNU_IsNull(env, jdata)) { ++ JNU_ThrowOutOfMemoryError(env, "Out of Memory"); ++ return -1; ++ } ++ ++- /* Here is the generic code */ ++- if (band >= 0) { ++- int dOff; ++- if (band >= numBands) { +++ for (y = 0; y < h; y += maxLines) { +++ if (y + maxLines > h) { +++ maxLines = h - y; +++ maxSamples = w * numBands * maxLines; +++ } +++ +++ (*env)->CallObjectMethod(env, jsm, g_SMGetPixelsMID, +++ 0, y, w, +++ maxLines, jdata, jdatabuffer); +++ +++ if ((*env)->ExceptionOccurred(env)) { ++ (*env)->DeleteLocalRef(env, jdata); ++- JNU_ThrowInternalError(env, "Band out of range."); ++ return -1; ++ } ++- off = 0; ++- for (y=0; y < h; ) { ++- (*env)->CallObjectMethod(env, jsm, g_SMGetPixelsMID, ++- 0, y, w, ++- maxLines, jdata, jdatabuffer); ++- dataP = (int *) (*env)->GetPrimitiveArrayCritical(env, jdata, ++- NULL); ++- if (dataP == NULL) { ++- (*env)->DeleteLocalRef(env, jdata); ++- return -1; ++- } ++- dOff = band; ++- for (i=0; i < maxBytes; i++, dOff += numBands) { ++- bufferP[off++] = (unsigned char) dataP[dOff]; ++- } ++ ++- (*env)->ReleasePrimitiveArrayCritical(env, jdata, dataP, ++- JNI_ABORT); ++- ++- if (y+maxLines < h) { ++- y += maxLines; ++- } ++- else { ++- y++; ++- maxBytes = w; ++- } ++- } ++- } ++- else { ++- off = 0; ++- maxBytes *= numBands; ++- for (y=0; y < h; ) { ++- (*env)->CallObjectMethod(env, jsm, g_SMGetPixelsMID, ++- 0, y, w, ++- maxLines, jdata, jdatabuffer); ++- dataP = (int *) (*env)->GetPrimitiveArrayCritical(env, jdata, ++- NULL); ++- if (dataP == NULL) { ++- (*env)->DeleteLocalRef(env, jdata); ++- return -1; ++- } ++- for (i=0; i < maxBytes; i++) { ++- bufferP[off++] = (unsigned char) dataP[i]; ++- } ++- ++- (*env)->ReleasePrimitiveArrayCritical(env, jdata, dataP, ++- JNI_ABORT); ++- ++- if (y+maxLines < h) { ++- y += maxLines; ++- } ++- else { ++- y++; ++- maxBytes = w*numBands; ++- } +++ dataP = (int *) (*env)->GetPrimitiveArrayCritical(env, jdata, +++ NULL); +++ if (dataP == NULL) { +++ (*env)->DeleteLocalRef(env, jdata); +++ return -1; ++ } ++ +++ switch (rasterP->dataType) { +++ case BYTE_DATA_TYPE: +++ for (i = 0; i < maxSamples; i ++) { +++ p.pb[off++] = (unsigned char) dataP[i]; +++ } +++ break; +++ case SHORT_DATA_TYPE: +++ for (i = 0; i < maxSamples; i ++) { +++ p.ps[off++] = (unsigned short) dataP[i]; +++ } +++ break; +++ } +++ +++ (*env)->ReleasePrimitiveArrayCritical(env, jdata, dataP, +++ JNI_ABORT); ++ } ++ (*env)->DeleteLocalRef(env, jdata); ++ ++- return 0; +++ return 1; ++ } ++-int awt_setPixelByte(JNIEnv *env, int band, RasterS_t *rasterP, ++- unsigned char *bufferP) { ++- int w = rasterP->width; ++- int h = rasterP->height; ++- int numBands = rasterP->numBands; +++ +++int awt_setPixels(JNIEnv *env, RasterS_t *rasterP, void *bufferP) { +++ const int w = rasterP->width; +++ const int h = rasterP->height; +++ const int numBands = rasterP->numBands; +++ ++ int y; ++ int i; ++- int maxLines = (h < MAX_TO_GRAB/w ? h : MAX_TO_GRAB/w); +++ int maxLines; ++ jobject jsm; ++- int off; +++ int off = 0; ++ jarray jdata = NULL; ++ jobject jdatabuffer; ++ int *dataP; ++- int maxBytes = w; +++ int maxSamples; +++ PixelData_t p; +++ +++ if (bufferP == NULL) { +++ return -1; +++ } +++ +++ if (rasterP->dataType != BYTE_DATA_TYPE && +++ rasterP->dataType != SHORT_DATA_TYPE) +++ { +++ return -1; +++ } +++ +++ p.pv = bufferP; +++ +++ if (!SAFE_TO_MULT(w, numBands)) { +++ return -1; +++ } +++ maxSamples = w * numBands; +++ +++ maxLines = maxSamples > MAX_TO_GRAB ? 1 : (MAX_TO_GRAB / maxSamples); +++ if (maxLines > h) { +++ maxLines = h; +++ } +++ +++ if (!SAFE_TO_MULT(maxSamples, maxLines)) { +++ return -1; +++ } +++ +++ maxSamples *= maxLines; ++ ++ jsm = (*env)->GetObjectField(env, rasterP->jraster, g_RasterSampleModelID); ++ jdatabuffer = (*env)->GetObjectField(env, rasterP->jraster, ++ g_RasterDataBufferID); ++- /* Here is the generic code */ ++- jdata = (*env)->NewIntArray(env, maxBytes*rasterP->numBands*maxLines); +++ +++ jdata = (*env)->NewIntArray(env, maxSamples); ++ if (JNU_IsNull(env, jdata)) { ++ JNU_ThrowOutOfMemoryError(env, "Out of Memory"); ++ return -1; ++ } ++- if (band >= 0) { ++- int dOff; ++- if (band >= numBands) { +++ +++ for (y = 0; y < h; y += maxLines) { +++ if (y + maxLines > h) { +++ maxLines = h - y; +++ maxSamples = w * numBands * maxLines; +++ } +++ dataP = (int *) (*env)->GetPrimitiveArrayCritical(env, jdata, +++ NULL); +++ if (dataP == NULL) { ++ (*env)->DeleteLocalRef(env, jdata); ++- JNU_ThrowInternalError(env, "Band out of range."); ++ return -1; ++ } ++- off = 0; ++- for (y=0; y < h; y+=maxLines) { ++- if (y+maxLines > h) { ++- maxBytes = w*numBands; ++- maxLines = h - y; +++ +++ switch (rasterP->dataType) { +++ case BYTE_DATA_TYPE: +++ for (i = 0; i < maxSamples; i ++) { +++ dataP[i] = p.pb[off++]; ++ } ++- dataP = (int *) (*env)->GetPrimitiveArrayCritical(env, jdata, ++- NULL); ++- if (dataP == NULL) { ++- (*env)->DeleteLocalRef(env, jdata); ++- return -1; +++ break; +++ case SHORT_DATA_TYPE: +++ for (i = 0; i < maxSamples; i ++) { +++ dataP[i] = p.ps[off++]; ++ } ++- dOff = band; ++- for (i=0; i < maxBytes; i++, dOff += numBands) { ++- dataP[dOff] = bufferP[off++]; ++- } ++- ++- (*env)->ReleasePrimitiveArrayCritical(env, jdata, dataP, ++- JNI_ABORT); ++- ++- (*env)->CallVoidMethod(env, jsm, g_SMSetPixelsMID, ++- 0, y, w, ++- maxLines, jdata, jdatabuffer); ++- } ++- } ++- else { ++- off = 0; ++- maxBytes *= numBands; ++- for (y=0; y < h; y+=maxLines) { ++- if (y+maxLines > h) { ++- maxBytes = w*numBands; ++- maxLines = h - y; ++- } ++- dataP = (int *) (*env)->GetPrimitiveArrayCritical(env, jdata, ++- NULL); ++- if (dataP == NULL) { ++- (*env)->DeleteLocalRef(env, jdata); ++- return -1; ++- } ++- for (i=0; i < maxBytes; i++) { ++- dataP[i] = bufferP[off++]; ++- } ++- ++- (*env)->ReleasePrimitiveArrayCritical(env, jdata, dataP, ++- JNI_ABORT); ++- ++- (*env)->CallVoidMethod(env, jsm, g_SMSetPixelsMID, ++- 0, y, w, ++- maxLines, jdata, jdatabuffer); +++ break; ++ } ++ +++ (*env)->ReleasePrimitiveArrayCritical(env, jdata, dataP, +++ JNI_ABORT); +++ +++ (*env)->CallVoidMethod(env, jsm, g_SMSetPixelsMID, +++ 0, y, w, +++ maxLines, jdata, jdatabuffer); +++ +++ if ((*env)->ExceptionOccurred(env)) { +++ (*env)->DeleteLocalRef(env, jdata); +++ return -1; +++ } ++ } ++ ++ (*env)->DeleteLocalRef(env, jdata); ++ ++- return 0; +++ return 1; ++ } ++-int awt_getPixelShort(JNIEnv *env, int band, RasterS_t *rasterP, ++- unsigned short *bufferP) { ++- int w = rasterP->width; ++- int h = rasterP->height; ++- int numBands = rasterP->numBands; ++- int y; ++- int i; ++- int maxLines = (h < MAX_TO_GRAB/w ? h : MAX_TO_GRAB/w); ++- jobject jsm; ++- int off; ++- jarray jdata = NULL; ++- jobject jdatabuffer; ++- int *dataP; ++- int maxBytes = w*maxLines; ++- ++- jsm = (*env)->GetObjectField(env, rasterP->jraster, g_RasterSampleModelID); ++- jdatabuffer = (*env)->GetObjectField(env, rasterP->jraster, ++- g_RasterDataBufferID); ++- jdata = (*env)->NewIntArray(env, maxBytes*rasterP->numBands*maxLines); ++- if (JNU_IsNull(env, jdata)) { ++- JNU_ThrowOutOfMemoryError(env, "Out of Memory"); ++- return -1; ++- } ++- /* Here is the generic code */ ++- if (band >= 0) { ++- int dOff; ++- if (band >= numBands) { ++- (*env)->DeleteLocalRef(env, jdata); ++- JNU_ThrowInternalError(env, "Band out of range."); ++- return -1; ++- } ++- off = 0; ++- for (y=0; y < h; y += maxLines) { ++- if (y+maxLines > h) { ++- maxBytes = w*numBands; ++- maxLines = h - y; ++- } ++- (*env)->CallObjectMethod(env, jsm, g_SMGetPixelsMID, ++- 0, y, w, ++- maxLines, jdata, jdatabuffer); ++- dataP = (int *) (*env)->GetPrimitiveArrayCritical(env, jdata, ++- NULL); ++- if (dataP == NULL) { ++- (*env)->DeleteLocalRef(env, jdata); ++- return -1; ++- } ++- ++- dOff = band; ++- for (i=0; i < maxBytes; i++, dOff += numBands) { ++- bufferP[off++] = (unsigned short) dataP[dOff]; ++- } ++- ++- (*env)->ReleasePrimitiveArrayCritical(env, jdata, dataP, ++- JNI_ABORT); ++- } ++- } ++- else { ++- off = 0; ++- maxBytes *= numBands; ++- for (y=0; y < h; y+=maxLines) { ++- if (y+maxLines > h) { ++- maxBytes = w*numBands; ++- maxLines = h - y; ++- } ++- (*env)->CallObjectMethod(env, jsm, g_SMGetPixelsMID, ++- 0, y, w, ++- maxLines, jdata, jdatabuffer); ++- dataP = (int *) (*env)->GetPrimitiveArrayCritical(env, jdata, ++- NULL); ++- if (dataP == NULL) { ++- (*env)->DeleteLocalRef(env, jdata); ++- return -1; ++- } ++- for (i=0; i < maxBytes; i++) { ++- bufferP[off++] = (unsigned short) dataP[i]; ++- } ++- ++- (*env)->ReleasePrimitiveArrayCritical(env, jdata, dataP, ++- JNI_ABORT); ++- } ++- ++- } ++- ++- (*env)->DeleteLocalRef(env, jdata); ++- return 0; ++-} ++-int awt_setPixelShort(JNIEnv *env, int band, RasterS_t *rasterP, ++- unsigned short *bufferP) { ++- int w = rasterP->width; ++- int h = rasterP->height; ++- int numBands = rasterP->numBands; ++- int y; ++- int i; ++- int maxLines = (h < MAX_TO_GRAB/w ? h : MAX_TO_GRAB/w); ++- jobject jsm; ++- int off; ++- jarray jdata = NULL; ++- jobject jdatabuffer; ++- int *dataP; ++- int maxBytes = w; ++- ++- jsm = (*env)->GetObjectField(env, rasterP->jraster, g_RasterSampleModelID); ++- jdatabuffer = (*env)->GetObjectField(env, rasterP->jraster, ++- g_RasterDataBufferID); ++- if (band >= numBands) { ++- JNU_ThrowInternalError(env, "Band out of range."); ++- return -1; ++- } ++- /* Here is the generic code */ ++- jdata = (*env)->NewIntArray(env, maxBytes*rasterP->numBands*maxLines); ++- if (JNU_IsNull(env, jdata)) { ++- JNU_ThrowOutOfMemoryError(env, "Out of Memory"); ++- return -1; ++- } ++- if (band >= 0) { ++- int dOff; ++- off = 0; ++- for (y=0; y < h; y+=maxLines) { ++- if (y+maxLines > h) { ++- maxBytes = w*numBands; ++- maxLines = h - y; ++- } ++- dataP = (int *) (*env)->GetPrimitiveArrayCritical(env, jdata, ++- NULL); ++- if (dataP == NULL) { ++- (*env)->DeleteLocalRef(env, jdata); ++- return -1; ++- } ++- dOff = band; ++- for (i=0; i < maxBytes; i++, dOff += numBands) { ++- dataP[dOff] = bufferP[off++]; ++- } ++- ++- (*env)->ReleasePrimitiveArrayCritical(env, jdata, dataP, ++- JNI_ABORT); ++- ++- (*env)->CallVoidMethod(env, jsm, g_SMSetPixelsMID, ++- 0, y, w, ++- maxLines, jdata, jdatabuffer); ++- } ++- } ++- else { ++- off = 0; ++- maxBytes *= numBands; ++- for (y=0; y < h; y+=maxLines) { ++- if (y+maxLines > h) { ++- maxBytes = w*numBands; ++- maxLines = h - y; ++- } ++- dataP = (int *) (*env)->GetPrimitiveArrayCritical(env, jdata, ++- NULL); ++- if (dataP == NULL) { ++- (*env)->DeleteLocalRef(env, jdata); ++- return -1; ++- } ++- for (i=0; i < maxBytes; i++) { ++- dataP[i] = bufferP[off++]; ++- } ++- ++- (*env)->ReleasePrimitiveArrayCritical(env, jdata, dataP, ++- JNI_ABORT); ++- ++- (*env)->CallVoidMethod(env, jsm, g_SMSetPixelsMID, ++- 0, y, w, ++- maxLines, jdata, jdatabuffer); ++- } ++- ++- } ++- ++- (*env)->DeleteLocalRef(env, jdata); ++- return 0; ++-} ++diff -r a9be60a78488 -r 5405d79569f7 src/share/native/sun/awt/image/awt_parseImage.h ++--- openjdk/jdk/src/share/native/sun/awt/image/awt_parseImage.h Thu Jun 20 08:51:47 2013 +0200 +++++ openjdk/jdk/src/share/native/sun/awt/image/awt_parseImage.h Fri May 17 16:47:51 2013 +0400 ++@@ -188,13 +188,8 @@ ++ ++ void awt_freeParsedImage(BufImageS_t *imageP, int freeImageP); ++ ++-int awt_getPixelByte(JNIEnv *env, int band, RasterS_t *rasterP, ++- unsigned char *bufferP); ++-int awt_setPixelByte(JNIEnv *env, int band, RasterS_t *rasterP, ++- unsigned char *bufferP); ++-int awt_getPixelShort(JNIEnv *env, int band, RasterS_t *rasterP, ++- unsigned short *bufferP); ++-int awt_setPixelShort(JNIEnv *env, int band, RasterS_t *rasterP, ++- unsigned short *bufferP); +++int awt_getPixels(JNIEnv *env, RasterS_t *rasterP, void *bufferP); +++ +++int awt_setPixels(JNIEnv *env, RasterS_t *rasterP, void *bufferP); ++ ++ #endif /* AWT_PARSE_IMAGE_H */ ++diff -r a9be60a78488 -r 5405d79569f7 src/share/native/sun/awt/medialib/awt_ImagingLib.c ++--- openjdk/jdk/src/share/native/sun/awt/medialib/awt_ImagingLib.c Thu Jun 20 08:51:47 2013 +0200 +++++ openjdk/jdk/src/share/native/sun/awt/medialib/awt_ImagingLib.c Fri May 17 16:47:51 2013 +0400 ++@@ -700,22 +700,7 @@ ++ ++ /* Means that we couldn't write directly into the destination buffer */ ++ if (ddata == NULL) { ++- unsigned char *bdataP; ++- unsigned short *sdataP; ++- ++- /* Punt for now */ ++- switch (dstRasterP->dataType) { ++- case BYTE_DATA_TYPE: ++- bdataP = (unsigned char *) mlib_ImageGetData(dst); ++- retStatus = (awt_setPixelByte(env, -1, dstRasterP, bdataP) >= 0) ; ++- break; ++- case SHORT_DATA_TYPE: ++- sdataP = (unsigned short *) mlib_ImageGetData(dst); ++- retStatus = (awt_setPixelShort(env, -1, dstRasterP, sdataP) >= 0) ; ++- break; ++- default: ++- retStatus = 0; ++- } +++ retStatus = awt_setPixels(env, dstRasterP, mlib_ImageGetData(dst)); ++ } ++ ++ /* Release the pinned memory */ ++@@ -1119,24 +1104,9 @@ ++ ++ /* Means that we couldn't write directly into the destination buffer */ ++ if (ddata == NULL) { ++- unsigned char *bdataP; ++- unsigned short *sdataP; ++- ++ /* Need to store it back into the array */ ++ if (storeRasterArray(env, srcRasterP, dstRasterP, dst) < 0) { ++- /* Punt for now */ ++- switch (dst->type) { ++- case MLIB_BYTE: ++- bdataP = (unsigned char *) mlib_ImageGetData(dst); ++- retStatus = (awt_setPixelByte(env, -1, dstRasterP, bdataP) >= 0) ; ++- break; ++- case MLIB_SHORT: ++- sdataP = (unsigned short *) mlib_ImageGetData(dst); ++- retStatus = (awt_setPixelShort(env, -1, dstRasterP, sdataP) >= 0) ; ++- break; ++- default: ++- retStatus = 0; ++- } +++ retStatus = awt_setPixels(env, dstRasterP, mlib_ImageGetData(dst)); ++ } ++ } ++ ++@@ -1705,21 +1675,7 @@ ++ * the destination buffer ++ */ ++ if (ddata == NULL) { ++- unsigned char* bdataP; ++- unsigned short* sdataP; ++- ++- switch (dstRasterP->dataType) { ++- case BYTE_DATA_TYPE: ++- bdataP = (unsigned char *) mlib_ImageGetData(dst); ++- retStatus = (awt_setPixelByte(env, -1, dstRasterP, bdataP) >= 0) ; ++- break; ++- case SHORT_DATA_TYPE: ++- sdataP = (unsigned short *) mlib_ImageGetData(dst); ++- retStatus = (awt_setPixelShort(env, -1, dstRasterP, sdataP) >= 0) ; ++- break; ++- default: ++- retStatus = 0; ++- } +++ retStatus = awt_setPixels(env, dstRasterP, mlib_ImageGetData(dst)); ++ } ++ ++ /* Release the LUT */ ++@@ -2299,7 +2255,6 @@ ++ mlib_image **mlibImagePP, void **dataPP, int isSrc) { ++ void *dataP; ++ unsigned char *cDataP; ++- unsigned short *sdataP; ++ int dataType = BYTE_DATA_TYPE; ++ int width; ++ int height; ++@@ -2485,8 +2440,7 @@ ++ return -1; ++ } ++ if (isSrc) { ++- cDataP = (unsigned char *) mlib_ImageGetData(*mlibImagePP); ++- if (awt_getPixelByte(env, -1, rasterP, cDataP) < 0) { +++ if (awt_getPixels(env, rasterP, mlib_ImageGetData(*mlibImagePP)) < 0) { ++ (*sMlibSysFns.deleteImageFP)(*mlibImagePP); ++ return -1; ++ } ++@@ -2500,8 +2454,7 @@ ++ return -1; ++ } ++ if (isSrc) { ++- sdataP = (unsigned short *) mlib_ImageGetData(*mlibImagePP); ++- if (awt_getPixelShort(env, -1, rasterP, sdataP) < 0) { +++ if (awt_getPixels(env, rasterP, mlib_ImageGetData(*mlibImagePP)) < 0) { ++ (*sMlibSysFns.deleteImageFP)(*mlibImagePP); ++ return -1; ++ } ++@@ -2551,60 +2504,6 @@ ++ } ++ } ++ ++-static int ++-storeDstArray(JNIEnv *env, BufImageS_t *srcP, BufImageS_t *dstP, ++- mlibHintS_t *hintP, mlib_image *mlibImP, void *ddata) { ++- RasterS_t *rasterP = &dstP->raster; ++- ++- /* Nothing to do since it is the same image type */ ++- if (srcP->imageType == dstP->imageType ++- && srcP->imageType != java_awt_image_BufferedImage_TYPE_CUSTOM ++- && srcP->imageType != java_awt_image_BufferedImage_TYPE_BYTE_INDEXED ++- && srcP->imageType != java_awt_image_BufferedImage_TYPE_BYTE_BINARY) { ++- /* REMIND: Should check the ICM LUTS to see if it is the same */ ++- return 0; ++- } ++- ++- /* These types are compatible with TYPE_INT_RGB */ ++- if (srcP->imageType == java_awt_image_BufferedImage_TYPE_INT_RGB ++- && (dstP->imageType == java_awt_image_BufferedImage_TYPE_INT_ARGB || ++- dstP->imageType == java_awt_image_BufferedImage_TYPE_INT_ARGB_PRE)){ ++- return 0; ++- } ++- ++- if (hintP->cvtSrcToDefault && ++- (srcP->cmodel.isAlphaPre == dstP->cmodel.isAlphaPre)) { ++- if (srcP->cmodel.isAlphaPre) { ++- if (dstP->imageType == ++- java_awt_image_BufferedImage_TYPE_INT_ARGB_PRE) ++- { ++- return 0; ++- } ++- if (!srcP->cmodel.supportsAlpha && ++- dstP->imageType == java_awt_image_BufferedImage_TYPE_INT_RGB){ ++- return 0; ++- } ++- } ++- else { ++- /* REMIND: */ ++- } ++- } ++- ++- if (dstP->cmodel.cmType == DIRECT_CM_TYPE) { ++- /* Just need to move bits */ ++- if (mlibImP->type == MLIB_BYTE) { ++- return awt_setPixelByte(env, -1, &dstP->raster, ++- (unsigned char *) mlibImP->data); ++- } ++- else if (mlibImP->type == MLIB_SHORT) { ++- return awt_setPixelByte(env, -1, &dstP->raster, ++- (unsigned char *) mlibImP->data); ++- } ++- } ++- ++- return 0; ++-} ++- ++ #define ERR_BAD_IMAGE_LAYOUT (-2) ++ ++ #define CHECK_DST_ARRAY(start_offset, elements_per_pixel) \ ++@@ -2717,8 +2616,7 @@ ++ } ++ } ++ else if (mlibImP->type == MLIB_SHORT) { ++- return awt_setPixelShort(env, -1, rasterP, ++- (unsigned short *) mlibImP->data); +++ return awt_setPixels(env, rasterP, mlibImP->data); ++ } ++ } ++ else { +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8014102-improve_image_conversion.patch openjdk-6-6b27-1.12.6/patches/openjdk/8014102-improve_image_conversion.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8014102-improve_image_conversion.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8014102-improve_image_conversion.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,190 @@ ++# HG changeset patch ++# User bae ++# Date 1369130199 -14400 ++# Tue May 21 13:56:39 2013 +0400 ++# Node ID d55d40616754cd93aa396719ddfd81bae584d4f0 ++# Parent 5405d79569f76d1285fd3c840489477a81bd9eff ++8014102: Improve image conversion ++Reviewed-by: prr ++ ++diff -r 5405d79569f7 -r d55d40616754 src/share/native/sun/awt/medialib/awt_ImagingLib.c ++--- openjdk/jdk/src/share/native/sun/awt/medialib/awt_ImagingLib.c Fri May 17 16:47:51 2013 +0400 +++++ openjdk/jdk/src/share/native/sun/awt/medialib/awt_ImagingLib.c Tue May 21 13:56:39 2013 +0400 ++@@ -1986,21 +1986,25 @@ ++ return 0; ++ } ++ +++#define NUM_LINES 10 +++ ++ static int ++ cvtCustomToDefault(JNIEnv *env, BufImageS_t *imageP, int component, ++ unsigned char *dataP) { ++- ColorModelS_t *cmP = &imageP->cmodel; ++- RasterS_t *rasterP = &imageP->raster; +++ const RasterS_t *rasterP = &imageP->raster; +++ const int w = rasterP->width; +++ const int h = rasterP->height; +++ ++ int y; ++- jobject jpixels = NULL; +++ jintArray jpixels = NULL; ++ jint *pixels; ++ unsigned char *dP = dataP; ++-#define NUM_LINES 10 ++- int numLines = NUM_LINES; +++ int numLines = h > NUM_LINES ? NUM_LINES : h; +++ ++ /* it is safe to calculate the scan length, because width has been verified ++ * on creation of the mlib image ++ */ ++- int scanLength = rasterP->width * 4; +++ const int scanLength = w * 4; ++ ++ int nbytes = 0; ++ if (!SAFE_TO_MULT(numLines, scanLength)) { ++@@ -2009,71 +2013,99 @@ ++ ++ nbytes = numLines * scanLength; ++ ++- for (y=0; y < rasterP->height; y+=numLines) { ++- /* getData, one scanline at a time */ ++- if (y+numLines > rasterP->height) { ++- numLines = rasterP->height - y; ++- nbytes = numLines * scanLength; ++- } ++- jpixels = (*env)->CallObjectMethod(env, imageP->jimage, ++- g_BImgGetRGBMID, 0, y, ++- rasterP->width, numLines, ++- jpixels,0, rasterP->width); ++- if (jpixels == NULL) { ++- JNU_ThrowInternalError(env, "Can't retrieve pixels."); ++- return -1; ++- } ++- ++- pixels = (*env)->GetPrimitiveArrayCritical(env, jpixels, NULL); ++- memcpy(dP, pixels, nbytes); ++- dP += nbytes; ++- (*env)->ReleasePrimitiveArrayCritical(env, jpixels, pixels, ++- JNI_ABORT); ++- } ++- return 0; ++-} ++- ++-static int ++-cvtDefaultToCustom(JNIEnv *env, BufImageS_t *imageP, int component, ++- unsigned char *dataP) { ++- ColorModelS_t *cmP = &imageP->cmodel; ++- RasterS_t *rasterP = &imageP->raster; ++- int y; ++- jint *pixels; ++- unsigned char *dP = dataP; ++-#define NUM_LINES 10 ++- int numLines = NUM_LINES; ++- int nbytes = rasterP->width*4*NUM_LINES; ++- jintArray jpixels; ++- ++ jpixels = (*env)->NewIntArray(env, nbytes); ++ if (JNU_IsNull(env, jpixels)) { ++ JNU_ThrowOutOfMemoryError(env, "Out of Memory"); ++ return -1; ++ } ++ ++- for (y=0; y < rasterP->height; y+=NUM_LINES) { ++- if (y+numLines > rasterP->height) { ++- numLines = rasterP->height - y; ++- nbytes = rasterP->width*4*numLines; +++ for (y = 0; y < h; y += numLines) { +++ if (y + numLines > h) { +++ numLines = h - y; +++ nbytes = numLines * scanLength; ++ } +++ +++ (*env)->CallObjectMethod(env, imageP->jimage, +++ g_BImgGetRGBMID, 0, y, +++ w, numLines, +++ jpixels, 0, w); +++ if ((*env)->ExceptionOccurred(env)) { +++ (*env)->DeleteLocalRef(env, jpixels); +++ return -1; +++ } +++ ++ pixels = (*env)->GetPrimitiveArrayCritical(env, jpixels, NULL); ++ if (pixels == NULL) { ++- /* JNI error */ +++ (*env)->DeleteLocalRef(env, jpixels); ++ return -1; ++ } ++ +++ memcpy(dP, pixels, nbytes); +++ dP += nbytes; +++ +++ (*env)->ReleasePrimitiveArrayCritical(env, jpixels, pixels, +++ JNI_ABORT); +++ } +++ +++ /* Need to release the array */ +++ (*env)->DeleteLocalRef(env, jpixels); +++ +++ return 0; +++} +++ +++static int +++cvtDefaultToCustom(JNIEnv *env, BufImageS_t *imageP, int component, +++ unsigned char *dataP) { +++ const RasterS_t *rasterP = &imageP->raster; +++ const int w = rasterP->width; +++ const int h = rasterP->height; +++ +++ int y; +++ jintArray jpixels = NULL; +++ jint *pixels; +++ unsigned char *dP = dataP; +++ int numLines = h > NUM_LINES ? NUM_LINES : h; +++ +++ /* it is safe to calculate the scan length, because width has been verified +++ * on creation of the mlib image +++ */ +++ const int scanLength = w * 4; +++ +++ int nbytes = 0; +++ if (!SAFE_TO_MULT(numLines, scanLength)) { +++ return -1; +++ } +++ +++ nbytes = numLines * scanLength; +++ +++ jpixels = (*env)->NewIntArray(env, nbytes); +++ if (JNU_IsNull(env, jpixels)) { +++ JNU_ThrowOutOfMemoryError(env, "Out of Memory"); +++ return -1; +++ } +++ +++ for (y = 0; y < h; y += numLines) { +++ if (y + numLines > h) { +++ numLines = h - y; +++ nbytes = numLines * scanLength; +++ } +++ +++ pixels = (*env)->GetPrimitiveArrayCritical(env, jpixels, NULL); +++ if (pixels == NULL) { +++ (*env)->DeleteLocalRef(env, jpixels); +++ return -1; +++ } +++ ++ memcpy(pixels, dP, nbytes); ++ dP += nbytes; ++ ++ (*env)->ReleasePrimitiveArrayCritical(env, jpixels, pixels, 0); ++ ++- /* setData, one scanline at a time */ ++- /* Fix 4223648, 4184283 */ ++ (*env)->CallVoidMethod(env, imageP->jimage, g_BImgSetRGBMID, 0, y, ++- rasterP->width, numLines, jpixels, 0, ++- rasterP->width); +++ w, numLines, jpixels, +++ 0, w); ++ if ((*env)->ExceptionOccurred(env)) { +++ (*env)->DeleteLocalRef(env, jpixels); ++ return -1; ++ } ++ } +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8014341-better_kerberos_service.patch openjdk-6-6b27-1.12.6/patches/openjdk/8014341-better_kerberos_service.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8014341-better_kerberos_service.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8014341-better_kerberos_service.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,66 @@ ++# HG changeset patch ++# User weijun ++# Date 1381852916 -3600 ++# Tue Oct 15 17:01:56 2013 +0100 ++# Node ID 698fe468e8b9385c2f74709dca823800b32e0b55 ++# Parent d55d40616754cd93aa396719ddfd81bae584d4f0 ++8014341: Better service from Kerberos servers ++Summary: read incoming data safely and take care of null return value ++Reviewed-by: valeriep, ahgross ++ ++diff -r d55d40616754 -r 698fe468e8b9 src/share/classes/sun/security/krb5/KrbKdcReq.java ++--- openjdk/jdk/src/share/classes/sun/security/krb5/KrbKdcReq.java Tue May 21 13:56:39 2013 +0400 +++++ openjdk/jdk/src/share/classes/sun/security/krb5/KrbKdcReq.java Tue Oct 15 17:01:56 2013 +0100 ++@@ -151,11 +151,15 @@ ++ savedException = e; ++ } ++ } ++- if (ibuf == null && savedException != null) { ++- if (savedException instanceof IOException) { ++- throw (IOException) savedException; +++ if (ibuf == null) { +++ if (savedException != null) { +++ if (savedException instanceof IOException) { +++ throw (IOException) savedException; +++ } else { +++ throw (KrbException) savedException; +++ } ++ } else { ++- throw (KrbException) savedException; +++ throw new IOException("Cannot get a KDC reply"); ++ } ++ } ++ return tempKdc; ++diff -r d55d40616754 -r 698fe468e8b9 src/share/classes/sun/security/krb5/internal/TCPClient.java ++--- openjdk/jdk/src/share/classes/sun/security/krb5/internal/TCPClient.java Tue May 21 13:56:39 2013 +0400 +++++ openjdk/jdk/src/share/classes/sun/security/krb5/internal/TCPClient.java Tue Oct 15 17:01:56 2013 +0100 ++@@ -30,6 +30,8 @@ ++ ++ package sun.security.krb5.internal; ++ +++import sun.misc.IOUtils; +++ ++ import java.io.*; ++ import java.net.*; ++ ++@@ -79,17 +81,15 @@ ++ return null; ++ } ++ ++- byte data[] = new byte[len]; ++- count = readFully(data, len); ++- if (count != len) { +++ try { +++ return IOUtils.readFully(in, len, true); +++ } catch (IOException ioe) { ++ if (Krb5.DEBUG) { ++ System.out.println( ++ ">>>DEBUG: TCPClient could not read complete packet (" + ++ len + "/" + count + ")"); ++ } ++ return null; ++- } else { ++- return data; ++ } ++ } ++ +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8014349-getdeclaredclass_fix.patch openjdk-6-6b27-1.12.6/patches/openjdk/8014349-getdeclaredclass_fix.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8014349-getdeclaredclass_fix.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8014349-getdeclaredclass_fix.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,43 @@ ++# HG changeset patch ++# User jfranck ++# Date 1382996803 0 ++# Mon Oct 28 21:46:43 2013 +0000 ++# Node ID e5a4a4ec7b21f3d092d0b29024ff903864d05543 ++# Parent 42fd9f22ae5e9aea017af28a2b5ff7a498753e15 ++8014349: (cl) Class.getDeclaredClass problematic in some class loader configurations ++Reviewed-by: mchung, ahgross, darcy ++ ++diff -r 42fd9f22ae5e -r e5a4a4ec7b21 src/share/classes/java/lang/Class.java ++--- openjdk/jdk/src/share/classes/java/lang/Class.java Mon Oct 28 20:09:40 2013 +0000 +++++ openjdk/jdk/src/share/classes/java/lang/Class.java Mon Oct 28 21:46:43 2013 +0000 ++@@ -1093,7 +1093,17 @@ ++ * @return the declaring class for this class ++ * @since JDK1.1 ++ */ ++- public native Class getDeclaringClass(); +++ @CallerSensitive +++ public Class getDeclaringClass() { +++ final Class candidate = getDeclaringClass0(); +++ +++ if (candidate != null) +++ candidate.checkPackageAccess( +++ ClassLoader.getClassLoader(Reflection.getCallerClass()), true); +++ return candidate; +++ } +++ +++ private native Class getDeclaringClass0(); ++ ++ ++ /** ++diff -r 42fd9f22ae5e -r e5a4a4ec7b21 src/share/native/java/lang/Class.c ++--- openjdk/jdk/src/share/native/java/lang/Class.c Mon Oct 28 20:09:40 2013 +0000 +++++ openjdk/jdk/src/share/native/java/lang/Class.c Mon Oct 28 21:46:43 2013 +0000 ++@@ -70,7 +70,7 @@ ++ {"getProtectionDomain0", "()" PD, (void *)&JVM_GetProtectionDomain}, ++ {"setProtectionDomain0", "(" PD ")V", (void *)&JVM_SetProtectionDomain}, ++ {"getDeclaredClasses0", "()[" CLS, (void *)&JVM_GetDeclaredClasses}, ++- {"getDeclaringClass", "()" CLS, (void *)&JVM_GetDeclaringClass}, +++ {"getDeclaringClass0", "()" CLS, (void *)&JVM_GetDeclaringClass}, ++ {"getGenericSignature", "()" STR, (void *)&JVM_GetClassSignature}, ++ {"getRawAnnotations", "()" BA, (void *)&JVM_GetClassAnnotations}, ++ {"getConstantPool", "()" CPL, (void *)&JVM_GetClassConstantPool}, +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8014530-better_dsp.patch openjdk-6-6b27-1.12.6/patches/openjdk/8014530-better_dsp.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8014530-better_dsp.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8014530-better_dsp.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,3121 @@ ++# HG changeset patch ++# User joehw ++# Date 1383033689 0 ++# Tue Oct 29 08:01:29 2013 +0000 ++# Node ID 0927621944ccb163d7dcdea7b94b10dfab58f5f1 ++# Parent 3dc769c632a1d6a8f69d2857b3c13c43a83481be ++8014530: Better digital signature processing ++Reviewed-by: alanb, dfuchs, mullan, lancea ++ ++diff -r 3dc769c632a1 -r 0927621944cc drop_included/jaxp_src/src/com/sun/org/apache/xalan/internal/XalanConstants.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xalan/internal/XalanConstants.java Tue Oct 29 08:01:29 2013 +0000 ++@@ -0,0 +1,151 @@ +++/* +++ * Copyright (c) 2011 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. +++ */ +++ +++package com.sun.org.apache.xalan.internal; +++ +++import com.sun.org.apache.xerces.internal.impl.*; +++ +++/** +++ * Commonly used constants. +++ * +++ * @author Huizhe Wang, Oracle +++ * +++ * @version $Id: Constants.java,v 1.14 2011-06-07 04:39:40 joehw Exp $ +++ */ +++public final class XalanConstants { +++ +++ // +++ // Constants +++ //Xerces security manager +++ public static final String SECURITY_MANAGER = +++ "http://apache.org/xml/properties/security-manager"; +++ +++ // +++ // Implementation limits: API properties +++ // +++ /** Oracle JAXP property prefix ("http://www.oracle.com/xml/jaxp/properties/"). */ +++ public static final String ORACLE_JAXP_PROPERTY_PREFIX = +++ "http://www.oracle.com/xml/jaxp/properties/"; +++ /** +++ * JDK entity expansion limit; Note that the existing system property +++ * "entityExpansionLimit" with no prefix is still observed +++ */ +++ public static final String JDK_ENTITY_EXPANSION_LIMIT = +++ ORACLE_JAXP_PROPERTY_PREFIX + "entityExpansionLimit"; +++ +++ /** +++ * JDK element attribute limit; Note that the existing system property +++ * "elementAttributeLimit" with no prefix is still observed +++ */ +++ public static final String JDK_ELEMENT_ATTRIBUTE_LIMIT = +++ ORACLE_JAXP_PROPERTY_PREFIX + "elementAttributeLimit"; +++ +++ /** +++ * JDK maxOccur limit; Note that the existing system property +++ * "maxOccurLimit" with no prefix is still observed +++ */ +++ public static final String JDK_MAX_OCCUR_LIMIT = +++ ORACLE_JAXP_PROPERTY_PREFIX + "maxOccurLimit"; +++ +++ /** +++ * JDK total entity size limit +++ */ +++ public static final String JDK_TOTAL_ENTITY_SIZE_LIMIT = +++ ORACLE_JAXP_PROPERTY_PREFIX + "totalEntitySizeLimit"; +++ +++ /** +++ * JDK maximum general entity size limit +++ */ +++ public static final String JDK_GENEAL_ENTITY_SIZE_LIMIT = +++ ORACLE_JAXP_PROPERTY_PREFIX + "maxGeneralEntitySizeLimit"; +++ /** +++ * JDK maximum parameter entity size limit +++ */ +++ public static final String JDK_PARAMETER_ENTITY_SIZE_LIMIT = +++ ORACLE_JAXP_PROPERTY_PREFIX + "maxParameterEntitySizeLimit"; +++ /** +++ * JDK maximum XML name limit +++ */ +++ public static final String JDK_XML_NAME_LIMIT = +++ ORACLE_JAXP_PROPERTY_PREFIX + "maxXMLNameLimit"; +++ /** +++ * JDK property indicating whether the parser shall print out entity +++ * count information +++ * Value: a string "yes" means print, "no" or any other string means not. +++ */ +++ public static final String JDK_ENTITY_COUNT_INFO = +++ ORACLE_JAXP_PROPERTY_PREFIX + "getEntityCountInfo"; +++ +++ // +++ // Implementation limits: corresponding System Properties of the above +++ // API properties +++ // +++ /** +++ * JDK entity expansion limit; Note that the existing system property +++ * "entityExpansionLimit" with no prefix is still observed +++ */ +++ public static final String SP_ENTITY_EXPANSION_LIMIT = "jdk.xml.entityExpansionLimit"; +++ +++ /** +++ * JDK element attribute limit; Note that the existing system property +++ * "elementAttributeLimit" with no prefix is still observed +++ */ +++ public static final String SP_ELEMENT_ATTRIBUTE_LIMIT = "jdk.xml.elementAttributeLimit"; +++ +++ /** +++ * JDK maxOccur limit; Note that the existing system property +++ * "maxOccurLimit" with no prefix is still observed +++ */ +++ public static final String SP_MAX_OCCUR_LIMIT = "jdk.xml.maxOccurLimit"; +++ +++ /** +++ * JDK total entity size limit +++ */ +++ public static final String SP_TOTAL_ENTITY_SIZE_LIMIT = "jdk.xml.totalEntitySizeLimit"; +++ +++ /** +++ * JDK maximum general entity size limit +++ */ +++ public static final String SP_GENEAL_ENTITY_SIZE_LIMIT = "jdk.xml.maxGeneralEntitySizeLimit"; +++ /** +++ * JDK maximum parameter entity size limit +++ */ +++ public static final String SP_PARAMETER_ENTITY_SIZE_LIMIT = "jdk.xml.maxParameterEntitySizeLimit"; +++ /** +++ * JDK maximum XML name limit +++ */ +++ public static final String SP_XML_NAME_LIMIT = "jdk.xml.maxXMLNameLimit"; +++ +++ //legacy System Properties +++ public final static String ENTITY_EXPANSION_LIMIT = "entityExpansionLimit"; +++ public static final String ELEMENT_ATTRIBUTE_LIMIT = "elementAttributeLimit" ; +++ public final static String MAX_OCCUR_LIMIT = "maxOccurLimit"; +++ +++ /** +++ * A string "yes" that can be used for properties such as getEntityCountInfo +++ */ +++ public static final String JDK_YES = "yes"; +++} +++ ++diff -r 3dc769c632a1 -r 0927621944cc drop_included/jaxp_src/src/com/sun/org/apache/xalan/internal/utils/SecuritySupport.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xalan/internal/utils/SecuritySupport.java Tue Oct 29 07:18:24 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xalan/internal/utils/SecuritySupport.java Tue Oct 29 08:01:29 2013 +0000 ++@@ -26,6 +26,7 @@ ++ import java.io.File; ++ import java.io.FileInputStream; ++ import java.io.FileNotFoundException; +++import java.io.IOException; ++ import java.io.InputStream; ++ ++ import java.security.AccessController; ++@@ -36,6 +37,7 @@ ++ import java.util.Locale; ++ import java.util.MissingResourceException; ++ import java.util.ResourceBundle; +++import java.util.Properties; ++ ++ /** ++ * This class is duplicated for each subpackage so keep it in sync. It is ++@@ -200,6 +202,54 @@ ++ })).longValue(); ++ } ++ +++ /** +++ * Read from $java.home/lib/jaxp.properties for the specified property +++ * The program +++ * +++ * @param propertyId the Id of the property +++ * @return the value of the property +++ */ +++ static String readJAXPProperty(String propertyId) { +++ String value = null; +++ InputStream is = null; +++ try { +++ if (firstTime) { +++ synchronized (cacheProps) { +++ if (firstTime) { +++ String configFile = getSystemProperty("java.home") + File.separator + +++ "lib" + File.separator + "jaxp.properties"; +++ File f = new File(configFile); +++ if (getFileExists(f)) { +++ is = getFileInputStream(f); +++ cacheProps.load(is); +++ } +++ firstTime = false; +++ } +++ } +++ } +++ value = cacheProps.getProperty(propertyId); +++ +++ } +++ catch (Exception ex) {} +++ finally { +++ if (is != null) { +++ try { +++ is.close(); +++ } catch (IOException ex) {} +++ } +++ } +++ return value; +++ } +++ +++ /** +++ * Cache for properties in java.home/lib/jaxp.properties +++ */ +++ static final Properties cacheProps = new Properties(); +++ +++ /** +++ * Flag indicating if the program has tried reading java.home/lib/jaxp.properties +++ */ +++ static volatile boolean firstTime = true; ++ ++ private SecuritySupport() { ++ } ++diff -r 3dc769c632a1 -r 0927621944cc drop_included/jaxp_src/src/com/sun/org/apache/xalan/internal/utils/XMLSecurityManager.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xalan/internal/utils/XMLSecurityManager.java Tue Oct 29 08:01:29 2013 +0000 ++@@ -0,0 +1,449 @@ +++/* +++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. +++ * +++ * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. +++ * +++ * The contents of this file are subject to the terms of either the GNU +++ * General Public License Version 2 only ("GPL") or the Common Development +++ * and Distribution License("CDDL") (collectively, the "License"). You +++ * may not use this file except in compliance with the License. You can +++ * obtain a copy of the License at +++ * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html +++ * or packager/legal/LICENSE.txt. See the License for the specific +++ * language governing permissions and limitations under the License. +++ * +++ * When distributing the software, include this License Header Notice in each +++ * file and include the License file at packager/legal/LICENSE.txt. +++ * +++ * GPL Classpath Exception: +++ * Oracle designates this particular file as subject to the "Classpath" +++ * exception as provided by Oracle in the GPL Version 2 section of the License +++ * file that accompanied this code. +++ * +++ * Modifications: +++ * If applicable, add the following below the License Header, with the fields +++ * enclosed by brackets [] replaced by your own identifying information: +++ * "Portions Copyright [year] [name of copyright owner]" +++ * +++ * Contributor(s): +++ * If you wish your version of this file to be governed by only the CDDL or +++ * only the GPL Version 2, indicate your decision by adding "[Contributor] +++ * elects to include this software in this distribution under the [CDDL or GPL +++ * Version 2] license." If you don't indicate a single choice of license, a +++ * recipient has the option to distribute your version of this file under +++ * either the CDDL, the GPL Version 2 or to extend the choice of license to +++ * its licensees as provided above. However, if you add GPL Version 2 code +++ * and therefore, elected the GPL Version 2 license, then the option applies +++ * only if the new code is made subject to such option by the copyright +++ * holder. +++ */ +++package com.sun.org.apache.xalan.internal.utils; +++ +++import com.sun.org.apache.xalan.internal.XalanConstants; +++ +++ +++/** +++ * This class is not the same as that in Xerces. It is used to manage the +++ * state of corresponding Xerces properties and pass the values over to +++ * the Xerces Security Manager. +++ * +++ * @author Joe Wang Oracle Corp. +++ * +++ */ +++public final class XMLSecurityManager { +++ +++ /** +++ * States of the settings of a property, in the order: default value, value +++ * set by FEATURE_SECURE_PROCESSING, jaxp.properties file, jaxp system +++ * properties, and jaxp api properties +++ */ +++ public static enum State { +++ //this order reflects the overriding order +++ +++ DEFAULT("default"), FSP("FEATURE_SECURE_PROCESSING"), +++ JAXPDOTPROPERTIES("jaxp.properties"), SYSTEMPROPERTY("system property"), +++ APIPROPERTY("property"); +++ +++ final String literal; +++ State(String literal) { +++ this.literal = literal; +++ } +++ +++ String literal() { +++ return literal; +++ } +++ } +++ +++ /** +++ * Limits managed by the security manager +++ */ +++ public static enum Limit { +++ +++ ENTITY_EXPANSION_LIMIT(XalanConstants.JDK_ENTITY_EXPANSION_LIMIT, +++ XalanConstants.SP_ENTITY_EXPANSION_LIMIT, 0, 64000), +++ MAX_OCCUR_NODE_LIMIT(XalanConstants.JDK_MAX_OCCUR_LIMIT, +++ XalanConstants.SP_MAX_OCCUR_LIMIT, 0, 5000), +++ ELEMENT_ATTRIBUTE_LIMIT(XalanConstants.JDK_ELEMENT_ATTRIBUTE_LIMIT, +++ XalanConstants.SP_ELEMENT_ATTRIBUTE_LIMIT, 0, 10000), +++ TOTAL_ENTITY_SIZE_LIMIT(XalanConstants.JDK_TOTAL_ENTITY_SIZE_LIMIT, +++ XalanConstants.SP_TOTAL_ENTITY_SIZE_LIMIT, 0, 50000000), +++ GENEAL_ENTITY_SIZE_LIMIT(XalanConstants.JDK_GENEAL_ENTITY_SIZE_LIMIT, +++ XalanConstants.SP_GENEAL_ENTITY_SIZE_LIMIT, 0, 0), +++ PARAMETER_ENTITY_SIZE_LIMIT(XalanConstants.JDK_PARAMETER_ENTITY_SIZE_LIMIT, +++ XalanConstants.SP_PARAMETER_ENTITY_SIZE_LIMIT, 0, 1000000); +++ +++ final String apiProperty; +++ final String systemProperty; +++ final int defaultValue; +++ final int secureValue; +++ +++ Limit(String apiProperty, String systemProperty, int value, int secureValue) { +++ this.apiProperty = apiProperty; +++ this.systemProperty = systemProperty; +++ this.defaultValue = value; +++ this.secureValue = secureValue; +++ } +++ +++ public boolean equalsAPIPropertyName(String propertyName) { +++ return (propertyName == null) ? false : apiProperty.equals(propertyName); +++ } +++ +++ public boolean equalsSystemPropertyName(String propertyName) { +++ return (propertyName == null) ? false : systemProperty.equals(propertyName); +++ } +++ +++ public String apiProperty() { +++ return apiProperty; +++ } +++ +++ String systemProperty() { +++ return systemProperty; +++ } +++ +++ int defaultValue() { +++ return defaultValue; +++ } +++ +++ int secureValue() { +++ return secureValue; +++ } +++ } +++ +++ /** +++ * Map old property names with the new ones +++ */ +++ public static enum NameMap { +++ +++ ENTITY_EXPANSION_LIMIT(XalanConstants.SP_ENTITY_EXPANSION_LIMIT, +++ XalanConstants.ENTITY_EXPANSION_LIMIT), +++ MAX_OCCUR_NODE_LIMIT(XalanConstants.SP_MAX_OCCUR_LIMIT, +++ XalanConstants.MAX_OCCUR_LIMIT), +++ ELEMENT_ATTRIBUTE_LIMIT(XalanConstants.SP_ELEMENT_ATTRIBUTE_LIMIT, +++ XalanConstants.ELEMENT_ATTRIBUTE_LIMIT); +++ final String newName; +++ final String oldName; +++ +++ NameMap(String newName, String oldName) { +++ this.newName = newName; +++ this.oldName = oldName; +++ } +++ +++ String getOldName(String newName) { +++ if (newName.equals(this.newName)) { +++ return oldName; +++ } +++ return null; +++ } +++ } +++ /** +++ * Values of the properties +++ */ +++ private final int[] values; +++ /** +++ * States of the settings for each property +++ */ +++ private State[] states; +++ /** +++ * States that determine if properties are set explicitly +++ */ +++ private boolean[] isSet; +++ +++ +++ /** +++ * Index of the special entityCountInfo property +++ */ +++ private int indexEntityCountInfo = 10000; +++ private String printEntityCountInfo = ""; +++ +++ /** +++ * Default constructor. Establishes default values for known security +++ * vulnerabilities. +++ */ +++ public XMLSecurityManager() { +++ this(false); +++ } +++ +++ /** +++ * Instantiate Security Manager in accordance with the status of +++ * secure processing +++ * @param secureProcessing +++ */ +++ public XMLSecurityManager(boolean secureProcessing) { +++ values = new int[Limit.values().length]; +++ states = new State[Limit.values().length]; +++ isSet = new boolean[Limit.values().length]; +++ for (Limit limit : Limit.values()) { +++ if (secureProcessing) { +++ values[limit.ordinal()] = limit.secureValue(); +++ states[limit.ordinal()] = State.FSP; +++ } else { +++ values[limit.ordinal()] = limit.defaultValue(); +++ states[limit.ordinal()] = State.DEFAULT; +++ } +++ } +++ //read system properties or jaxp.properties +++ readSystemProperties(); +++ } +++ +++ /** +++ * Setting FEATURE_SECURE_PROCESSING explicitly +++ */ +++ public void setSecureProcessing(boolean secure) { +++ for (Limit limit : Limit.values()) { +++ if (secure) { +++ setLimit(limit.ordinal(), State.FSP, limit.secureValue()); +++ } else { +++ setLimit(limit.ordinal(), State.FSP, limit.defaultValue()); +++ } +++ } +++ } +++ +++ /** +++ * Set limit by property name and state +++ * @param propertyName property name +++ * @param state the state of the property +++ * @param value the value of the property +++ * @return true if the property is managed by the security manager; false +++ * if otherwise. +++ */ +++ public boolean setLimit(String propertyName, State state, Object value) { +++ int index = getIndex(propertyName); +++ if (index > -1) { +++ setLimit(index, state, value); +++ return true; +++ } +++ return false; +++ } +++ +++ /** +++ * Set the value for a specific limit. +++ * +++ * @param limit the limit +++ * @param state the state of the property +++ * @param value the value of the property +++ */ +++ public void setLimit(Limit limit, State state, int value) { +++ setLimit(limit.ordinal(), state, value); +++ } +++ +++ /** +++ * Set the value of a property by its index +++ * +++ * @param index the index of the property +++ * @param state the state of the property +++ * @param value the value of the property +++ */ +++ public void setLimit(int index, State state, Object value) { +++ if (index == indexEntityCountInfo) { +++ //if it's explicitly set, it's treated as yes no matter the value +++ printEntityCountInfo = (String)value; +++ } else { +++ int temp = 0; +++ try { +++ temp = Integer.parseInt((String) value); +++ if (temp < 0) { +++ temp = 0; +++ } +++ } catch (NumberFormatException e) {} +++ setLimit(index, state, temp); } +++ } +++ +++ /** +++ * Set the value of a property by its index +++ * +++ * @param index the index of the property +++ * @param state the state of the property +++ * @param value the value of the property +++ */ +++ public void setLimit(int index, State state, int value) { +++ if (index == indexEntityCountInfo) { +++ //if it's explicitly set, it's treated as yes no matter the value +++ printEntityCountInfo = XalanConstants.JDK_YES; +++ } else { +++ //only update if it shall override +++ if (state.compareTo(states[index]) >= 0) { +++ values[index] = value; +++ states[index] = state; +++ isSet[index] = true; +++ } +++ } +++ } +++ +++ +++ /** +++ * Return the value of the specified property. +++ * +++ * @param propertyName the property name +++ * @return the value of the property as a string. If a property is managed +++ * by this manager, its value shall not be null. +++ */ +++ public String getLimitAsString(String propertyName) { +++ int index = getIndex(propertyName); +++ if (index > -1) { +++ return getLimitValueByIndex(index); +++ } +++ +++ return null; +++ } +++ +++ /** +++ * Return the value of a property by its ordinal +++ * +++ * @param limit the property +++ * @return value of a property +++ */ +++ public String getLimitValueAsString(Limit limit) { +++ return Integer.toString(values[limit.ordinal()]); +++ } +++ +++ /** +++ * Return the value of the specified property +++ * +++ * @param limit the property +++ * @return the value of the property +++ */ +++ public int getLimit(Limit limit) { +++ return values[limit.ordinal()]; +++ } +++ +++ /** +++ * Return the value of a property by its ordinal +++ * +++ * @param index the index of a property +++ * @return value of a property +++ */ +++ public int getLimitByIndex(int index) { +++ return values[index]; +++ } +++ /** +++ * Return the value of a property by its index +++ * +++ * @param index the index of a property +++ * @return limit of a property as a string +++ */ +++ public String getLimitValueByIndex(int index) { +++ if (index == indexEntityCountInfo) { +++ return printEntityCountInfo; +++ } +++ +++ return Integer.toString(values[index]); +++ } +++ /** +++ * Return the state of the limit property +++ * +++ * @param limit the limit +++ * @return the state of the limit property +++ */ +++ public State getState(Limit limit) { +++ return states[limit.ordinal()]; +++ } +++ +++ /** +++ * Return the state of the limit property +++ * +++ * @param limit the limit +++ * @return the state of the limit property +++ */ +++ public String getStateLiteral(Limit limit) { +++ return states[limit.ordinal()].literal(); +++ } +++ +++ /** +++ * Get the index by property name +++ * +++ * @param propertyName property name +++ * @return the index of the property if found; return -1 if not +++ */ +++ public int getIndex(String propertyName) { +++ for (Limit limit : Limit.values()) { +++ if (limit.equalsAPIPropertyName(propertyName)) { +++ //internally, ordinal is used as index +++ return limit.ordinal(); +++ } +++ } +++ //special property to return entity count info +++ if (propertyName.equals(XalanConstants.JDK_ENTITY_COUNT_INFO)) { +++ return indexEntityCountInfo; +++ } +++ return -1; +++ } +++ +++ /** +++ * Indicate if a property is set explicitly +++ * @param index +++ * @return +++ */ +++ public boolean isSet(int index) { +++ return isSet[index]; +++ } +++ +++ public boolean printEntityCountInfo() { +++ return printEntityCountInfo.equals(XalanConstants.JDK_YES); +++ } +++ /** +++ * Read from system properties, or those in jaxp.properties +++ */ +++ private void readSystemProperties() { +++ +++ for (Limit limit : Limit.values()) { +++ if (!getSystemProperty(limit, limit.systemProperty())) { +++ //if system property is not found, try the older form if any +++ for (NameMap nameMap : NameMap.values()) { +++ String oldName = nameMap.getOldName(limit.systemProperty()); +++ if (oldName != null) { +++ getSystemProperty(limit, oldName); +++ } +++ } +++ } +++ } +++ +++ } +++ +++ /** +++ * Read from system properties, or those in jaxp.properties +++ * +++ * @param property the type of the property +++ * @param sysPropertyName the name of system property +++ */ +++ private boolean getSystemProperty(Limit limit, String sysPropertyName) { +++ try { +++ String value = SecuritySupport.getSystemProperty(sysPropertyName); +++ if (value != null && !value.equals("")) { +++ values[limit.ordinal()] = Integer.parseInt(value); +++ states[limit.ordinal()] = State.SYSTEMPROPERTY; +++ return true; +++ } +++ +++ value = SecuritySupport.readJAXPProperty(sysPropertyName); +++ if (value != null && !value.equals("")) { +++ values[limit.ordinal()] = Integer.parseInt(value); +++ states[limit.ordinal()] = State.JAXPDOTPROPERTIES; +++ return true; +++ } +++ } catch (NumberFormatException e) { +++ //invalid setting +++ throw new NumberFormatException("Invalid setting for system property: " + limit.systemProperty()); +++ } +++ return false; +++ } +++} ++diff -r 3dc769c632a1 -r 0927621944cc drop_included/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/Parser.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/Parser.java Tue Oct 29 07:18:24 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/Parser.java Tue Oct 29 08:01:29 2013 +0000 ++@@ -40,10 +40,12 @@ ++ import javax.xml.parsers.SAXParser; ++ import javax.xml.parsers.SAXParserFactory; ++ +++import com.sun.org.apache.xalan.internal.XalanConstants; ++ import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg; ++ import com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodType; ++ import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type; ++ import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError; +++import com.sun.org.apache.xalan.internal.utils.XMLSecurityManager; ++ import org.xml.sax.Attributes; ++ import org.xml.sax.helpers.AttributesImpl; ++ import org.xml.sax.ContentHandler; ++@@ -466,6 +468,20 @@ ++ } ++ final SAXParser parser = factory.newSAXParser(); ++ final XMLReader reader = parser.getXMLReader(); +++ try { +++ XMLSecurityManager securityManager = +++ (XMLSecurityManager)_xsltc.getProperty(XalanConstants.SECURITY_MANAGER); +++ for (XMLSecurityManager.Limit limit : XMLSecurityManager.Limit.values()) { +++ reader.setProperty(limit.apiProperty(), securityManager.getLimitValueAsString(limit)); +++ } +++ if (securityManager.printEntityCountInfo()) { +++ parser.setProperty(XalanConstants.JDK_ENTITY_COUNT_INFO, XalanConstants.JDK_YES); +++ } +++ } catch (SAXException se) { +++ System.err.println("Warning: " + reader.getClass().getName() + ": " +++ + se.getMessage()); +++ } +++ ++ return(parse(reader, input)); ++ } ++ catch (ParserConfigurationException e) { ++diff -r 3dc769c632a1 -r 0927621944cc drop_included/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/XSLTC.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/XSLTC.java Tue Oct 29 07:18:24 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/XSLTC.java Tue Oct 29 08:01:29 2013 +0000 ++@@ -41,12 +41,13 @@ ++ import java.util.jar.Manifest; ++ ++ import com.sun.org.apache.bcel.internal.classfile.JavaClass; +++import com.sun.org.apache.xalan.internal.XalanConstants; ++ import com.sun.org.apache.xalan.internal.utils.SecuritySupport; +++import com.sun.org.apache.xalan.internal.utils.XMLSecurityManager; ++ import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg; ++ import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Util; ++ import com.sun.org.apache.xml.internal.dtm.DTM; ++ ++-import com.sun.org.apache.xalan.internal.utils.SecuritySupport; ++ import org.xml.sax.InputSource; ++ import org.xml.sax.XMLReader; ++ ++@@ -105,6 +106,7 @@ ++ public static final int BYTEARRAY_AND_FILE_OUTPUT = 4; ++ public static final int BYTEARRAY_AND_JAR_OUTPUT = 5; ++ +++ private XMLSecurityManager _xmlSecurityManager; ++ ++ // Compiler options (passed from command line or XSLTC client) ++ private boolean _debug = false; // -x ++@@ -898,4 +900,24 @@ ++ ++ return newDataOffset; ++ } +++ +++ /** +++ * Return allowed protocols for accessing external stylesheet. +++ */ +++ public Object getProperty(String name) { +++ if (name.equals(XalanConstants.SECURITY_MANAGER)) { +++ return _xmlSecurityManager; +++ } +++ return null; +++ } +++ +++ /** +++ * Set allowed protocols for accessing external stylesheet. +++ */ +++ public void setProperty(String name, Object value) { +++ if (name.equals(XalanConstants.SECURITY_MANAGER)) { +++ _xmlSecurityManager = (XMLSecurityManager)value; +++ } +++ } +++ ++ } ++diff -r 3dc769c632a1 -r 0927621944cc drop_included/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/trax/TemplatesHandlerImpl.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/trax/TemplatesHandlerImpl.java Tue Oct 29 07:18:24 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/trax/TemplatesHandlerImpl.java Tue Oct 29 08:01:29 2013 +0000 ++@@ -29,7 +29,7 @@ ++ import javax.xml.transform.TransformerException; ++ import javax.xml.transform.URIResolver; ++ import javax.xml.transform.sax.TemplatesHandler; ++- +++import com.sun.org.apache.xalan.internal.XalanConstants; ++ import com.sun.org.apache.xalan.internal.xsltc.compiler.CompilerException; ++ import com.sun.org.apache.xalan.internal.xsltc.compiler.Parser; ++ import com.sun.org.apache.xalan.internal.xsltc.compiler.SourceLoader; ++@@ -98,6 +98,8 @@ ++ XSLTC xsltc = new XSLTC(); ++ if (tfactory.getFeature(XMLConstants.FEATURE_SECURE_PROCESSING)) ++ xsltc.setSecureProcessing(true); +++ xsltc.setProperty(XalanConstants.SECURITY_MANAGER, +++ tfactory.getAttribute(XalanConstants.SECURITY_MANAGER)); ++ ++ _parser = xsltc.getParser(); ++ } ++diff -r 3dc769c632a1 -r 0927621944cc drop_included/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerFactoryImpl.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerFactoryImpl.java Tue Oct 29 07:18:24 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerFactoryImpl.java Tue Oct 29 08:01:29 2013 +0000 ++@@ -64,12 +64,14 @@ ++ import com.sun.org.apache.xml.internal.utils.StylesheetPIHandler; ++ import com.sun.org.apache.xml.internal.utils.StopParseException; ++ +++import com.sun.org.apache.xalan.internal.XalanConstants; ++ import com.sun.org.apache.xalan.internal.xsltc.compiler.Constants; ++ import com.sun.org.apache.xalan.internal.xsltc.compiler.SourceLoader; ++ import com.sun.org.apache.xalan.internal.xsltc.compiler.XSLTC; ++ import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg; ++ import com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager; ++ import com.sun.org.apache.xalan.internal.utils.SecuritySupport; +++import com.sun.org.apache.xalan.internal.utils.XMLSecurityManager; ++ ++ import org.xml.sax.InputSource; ++ import org.xml.sax.XMLFilter; ++@@ -221,8 +223,13 @@ ++ _isSecureMode = true; ++ _isNotSecureProcessing = false; ++ } +++ +++ //Parser's security manager +++ _xmlSecurityManager = new XMLSecurityManager(true); ++ } ++ +++ private XMLSecurityManager _xmlSecurityManager; +++ ++ /** ++ * javax.xml.transform.sax.TransformerFactory implementation. ++ * Set the error event listener for the TransformerFactory, which is used ++@@ -273,8 +280,9 @@ ++ } ++ else if (name.equals(AUTO_TRANSLET)) { ++ return new Boolean(_autoTranslet); +++ } else if (name.equals(XalanConstants.SECURITY_MANAGER)) { +++ return _xmlSecurityManager; ++ } ++- ++ // Throw an exception for all other attributes ++ ErrorMsg err = new ErrorMsg(ErrorMsg.JAXP_INVALID_ATTR_ERR, name); ++ throw new IllegalArgumentException(err.toString()); ++@@ -417,6 +425,7 @@ ++ throw new TransformerConfigurationException(err.toString()); ++ } ++ _isNotSecureProcessing = !value; +++ _xmlSecurityManager.setSecureProcessing(value); ++ // all done processing feature ++ return; ++ } ++@@ -757,6 +766,7 @@ ++ if (_debug) xsltc.setDebug(true); ++ if (_enableInlining) xsltc.setTemplateInlining(true); ++ if (!_isNotSecureProcessing) xsltc.setSecureProcessing(true); +++ xsltc.setProperty(XalanConstants.SECURITY_MANAGER, _xmlSecurityManager); ++ xsltc.init(); ++ ++ // Set a document loader (for xsl:include/import) if defined ++diff -r 3dc769c632a1 -r 0927621944cc drop_included/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerImpl.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerImpl.java Tue Oct 29 07:18:24 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerImpl.java Tue Oct 29 08:01:29 2013 +0000 ++@@ -64,6 +64,8 @@ ++ ++ import com.sun.org.apache.xml.internal.utils.SystemIDResolver; ++ +++import com.sun.org.apache.xalan.internal.XalanConstants; +++import com.sun.org.apache.xalan.internal.utils.XMLSecurityManager; ++ import com.sun.org.apache.xalan.internal.xsltc.DOM; ++ import com.sun.org.apache.xalan.internal.xsltc.DOMCache; ++ import com.sun.org.apache.xalan.internal.xsltc.DOMEnhancedForDTM; ++@@ -208,6 +210,7 @@ ++ */ ++ private Hashtable _parameters = null; ++ +++ private XMLSecurityManager _securityManager; ++ /** ++ * This class wraps an ErrorListener into a MessageHandler in order to ++ * capture messages reported via xsl:message. ++@@ -252,7 +255,9 @@ ++ _propertiesClone = (Properties) _properties.clone(); ++ _indentNumber = indentNumber; ++ _tfactory = tfactory; +++ _securityManager = (XMLSecurityManager)_tfactory.getAttribute(XalanConstants.SECURITY_MANAGER); ++ _readerManager.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, _isSecureProcessing); +++ _readerManager.setProperty(XalanConstants.SECURITY_MANAGER, _securityManager); ++ //_isIncremental = tfactory._incremental; ++ } ++ ++diff -r 3dc769c632a1 -r 0927621944cc drop_included/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/trax/Util.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/trax/Util.java Tue Oct 29 07:18:24 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/trax/Util.java Tue Oct 29 08:01:29 2013 +0000 ++@@ -23,6 +23,7 @@ ++ ++ package com.sun.org.apache.xalan.internal.xsltc.trax; ++ +++import com.sun.org.apache.xalan.internal.XalanConstants; ++ import java.io.InputStream; ++ import java.io.Reader; ++ ++@@ -42,6 +43,7 @@ ++ import javax.xml.transform.stax.StAXSource; ++ import javax.xml.transform.stream.StreamSource; ++ +++import com.sun.org.apache.xalan.internal.utils.XMLSecurityManager; ++ import com.sun.org.apache.xalan.internal.xsltc.compiler.XSLTC; ++ import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg; ++ ++@@ -143,6 +145,22 @@ ++ reader.setFeature ++ ("http://xml.org/sax/features/namespace-prefixes",false); ++ +++ try { +++ XMLSecurityManager securityManager = +++ (XMLSecurityManager)xsltc.getProperty(XalanConstants.SECURITY_MANAGER); +++ if (securityManager != null) { +++ for (XMLSecurityManager.Limit limit : XMLSecurityManager.Limit.values()) { +++ reader.setProperty(limit.apiProperty(), +++ securityManager.getLimitValueAsString(limit)); +++ } +++ if (securityManager.printEntityCountInfo()) { +++ reader.setProperty(XalanConstants.JDK_ENTITY_COUNT_INFO, XalanConstants.JDK_YES); +++ } +++ } +++ } catch (SAXException se) { +++ System.err.println("Warning: " + reader.getClass().getName() + ": " +++ + se.getMessage()); +++ } ++ xsltc.setXMLReader(reader); ++ }catch (SAXNotRecognizedException snre ) { ++ throw new TransformerConfigurationException ++diff -r 3dc769c632a1 -r 0927621944cc drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/dom/DOMConfigurationImpl.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/dom/DOMConfigurationImpl.java Tue Oct 29 07:18:24 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/dom/DOMConfigurationImpl.java Tue Oct 29 08:01:29 2013 +0000 ++@@ -53,6 +53,7 @@ ++ import com.sun.org.apache.xerces.internal.xni.parser.XMLErrorHandler; ++ import com.sun.org.apache.xerces.internal.xni.parser.XMLInputSource; ++ import com.sun.org.apache.xerces.internal.xni.parser.XMLParserConfiguration; +++import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; ++ import org.w3c.dom.DOMException; ++ import org.w3c.dom.ls.LSResourceResolver; ++ ++@@ -189,6 +190,9 @@ ++ private DOMStringList fRecognizedParameters; ++ ++ +++ /** Property identifier: Security manager. */ +++ private static final String SECURITY_MANAGER = Constants.SECURITY_MANAGER; +++ ++ // ++ // Constructors ++ // ++@@ -259,7 +263,8 @@ ++ GRAMMAR_POOL, ++ JAXP_SCHEMA_SOURCE, ++ JAXP_SCHEMA_LANGUAGE, ++- DTD_VALIDATOR_FACTORY_PROPERTY +++ DTD_VALIDATOR_FACTORY_PROPERTY, +++ SECURITY_MANAGER, ++ }; ++ addRecognizedProperties(recognizedProperties); ++ ++@@ -293,6 +298,8 @@ ++ fValidationManager = createValidationManager(); ++ setProperty(VALIDATION_MANAGER, fValidationManager); ++ +++ setProperty(SECURITY_MANAGER, new XMLSecurityManager(true)); +++ ++ ++ // add message formatters ++ if (fErrorReporter.getMessageFormatter(XMLMessageFormatter.XML_DOMAIN) == null) { ++diff -r 3dc769c632a1 -r 0927621944cc drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/Constants.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/Constants.java Tue Oct 29 07:18:24 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/Constants.java Tue Oct 29 08:01:29 2013 +0000 ++@@ -156,9 +156,111 @@ ++ /** JAXP schemaSource language: when used internally may include DTD namespace (DOM) */ ++ public static final String SCHEMA_LANGUAGE = "schemaLanguage"; ++ ++- public static final String SYSTEM_PROPERTY_ELEMENT_ATTRIBUTE_LIMIT = "elementAttributeLimit" ; +++ /** Oracle JAXP property prefix ("http://www.oracle.com/xml/jaxp/properties/"). */ +++ public static final String ORACLE_JAXP_PROPERTY_PREFIX = +++ "http://www.oracle.com/xml/jaxp/properties/"; ++ ++ // +++ // Implementation limits: corresponding System Properties of the above +++ // API properties +++ // +++ /** +++ * JDK entity expansion limit; Note that the existing system property +++ * "entityExpansionLimit" with no prefix is still observed +++ */ +++ public static final String JDK_ENTITY_EXPANSION_LIMIT = +++ ORACLE_JAXP_PROPERTY_PREFIX + "entityExpansionLimit"; +++ +++ /** +++ * JDK element attribute limit; Note that the existing system property +++ * "elementAttributeLimit" with no prefix is still observed +++ */ +++ public static final String JDK_ELEMENT_ATTRIBUTE_LIMIT = +++ ORACLE_JAXP_PROPERTY_PREFIX + "elementAttributeLimit"; +++ +++ /** +++ * JDK maxOccur limit; Note that the existing system property +++ * "maxOccurLimit" with no prefix is still observed +++ */ +++ public static final String JDK_MAX_OCCUR_LIMIT = +++ ORACLE_JAXP_PROPERTY_PREFIX + "maxOccurLimit"; +++ +++ /** +++ * JDK total entity size limit +++ */ +++ public static final String JDK_TOTAL_ENTITY_SIZE_LIMIT = +++ ORACLE_JAXP_PROPERTY_PREFIX + "totalEntitySizeLimit"; +++ +++ /** +++ * JDK maximum general entity size limit +++ */ +++ public static final String JDK_GENEAL_ENTITY_SIZE_LIMIT = +++ ORACLE_JAXP_PROPERTY_PREFIX + "maxGeneralEntitySizeLimit"; +++ /** +++ * JDK maximum parameter entity size limit +++ */ +++ public static final String JDK_PARAMETER_ENTITY_SIZE_LIMIT = +++ ORACLE_JAXP_PROPERTY_PREFIX + "maxParameterEntitySizeLimit"; +++ /** +++ * JDK maximum XML name limit +++ */ +++ public static final String JDK_XML_NAME_LIMIT = +++ ORACLE_JAXP_PROPERTY_PREFIX + "maxXMLNameLimit"; +++ /** +++ * JDK property to allow printing out information from the limit analyzer +++ */ +++ public static final String JDK_ENTITY_COUNT_INFO = +++ ORACLE_JAXP_PROPERTY_PREFIX + "getEntityCountInfo"; +++ +++ // +++ // Implementation limits: API properties +++ // +++ /** +++ * JDK entity expansion limit; Note that the existing system property +++ * "entityExpansionLimit" with no prefix is still observed +++ */ +++ public static final String SP_ENTITY_EXPANSION_LIMIT = "jdk.xml.entityExpansionLimit"; +++ +++ /** +++ * JDK element attribute limit; Note that the existing system property +++ * "elementAttributeLimit" with no prefix is still observed +++ */ +++ public static final String SP_ELEMENT_ATTRIBUTE_LIMIT = "jdk.xml.elementAttributeLimit"; +++ +++ /** +++ * JDK maxOccur limit; Note that the existing system property +++ * "maxOccurLimit" with no prefix is still observed +++ */ +++ public static final String SP_MAX_OCCUR_LIMIT = "jdk.xml.maxOccurLimit"; +++ +++ /** +++ * JDK total entity size limit +++ */ +++ public static final String SP_TOTAL_ENTITY_SIZE_LIMIT = "jdk.xml.totalEntitySizeLimit"; +++ +++ /** +++ * JDK maximum general entity size limit +++ */ +++ public static final String SP_GENEAL_ENTITY_SIZE_LIMIT = "jdk.xml.maxGeneralEntitySizeLimit"; +++ /** +++ * JDK maximum parameter entity size limit +++ */ +++ public static final String SP_PARAMETER_ENTITY_SIZE_LIMIT = "jdk.xml.maxParameterEntitySizeLimit"; +++ /** +++ * JDK maximum XML name limit +++ */ +++ public static final String SP_XML_NAME_LIMIT = "jdk.xml.maxXMLNameLimit"; +++ +++ //legacy System Properties +++ public final static String ENTITY_EXPANSION_LIMIT = "entityExpansionLimit"; +++ public static final String ELEMENT_ATTRIBUTE_LIMIT = "elementAttributeLimit" ; +++ public final static String MAX_OCCUR_LIMIT = "maxOccurLimit"; +++ +++ /** +++ * A string "yes" that can be used for properties such as getEntityCountInfo +++ */ +++ public static final String JDK_YES = "yes"; +++ // ++ // DOM features ++ // ++ ++@@ -387,7 +489,7 @@ ++ public static final String LOCALE_PROPERTY = "locale"; ++ ++ /** property identifier: security manager. */ ++- protected static final String SECURITY_MANAGER = +++ public static final String SECURITY_MANAGER = ++ Constants.XERCES_PROPERTY_PREFIX + Constants.SECURITY_MANAGER_PROPERTY; ++ ++ ++@@ -452,9 +554,6 @@ ++ */ ++ public final static String ATTRIBUTE_DECLARED = "ATTRIBUTE_DECLARED"; ++ ++- public final static String ENTITY_EXPANSION_LIMIT = "entityExpansionLimit"; ++- ++- public final static String MAX_OCCUR_LIMIT = "maxOccurLimit"; ++ ++ /** ++ * {@link org.w3c.dom.TypeInfo} associated with current element/attribute ++diff -r 3dc769c632a1 -r 0927621944cc drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/PropertyManager.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/PropertyManager.java Tue Oct 29 07:18:24 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/PropertyManager.java Tue Oct 29 08:01:29 2013 +0000 ++@@ -25,6 +25,7 @@ ++ ++ package com.sun.org.apache.xerces.internal.impl; ++ +++import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; ++ import java.util.HashMap; ++ import javax.xml.stream.XMLInputFactory; ++ import javax.xml.stream.XMLOutputFactory; ++@@ -50,9 +51,13 @@ ++ ++ private static final String STRING_INTERNING = "http://xml.org/sax/features/string-interning"; ++ +++ /** Property identifier: Security manager. */ +++ private static final String SECURITY_MANAGER = Constants.SECURITY_MANAGER; ++ ++ HashMap supportedProps = new HashMap(); ++ +++ private XMLSecurityManager fSecurityManager; +++ ++ public static final int CONTEXT_READER = 1; ++ public static final int CONTEXT_WRITER = 2; ++ ++@@ -77,6 +82,7 @@ ++ ++ HashMap properties = propertyManager.getProperties(); ++ supportedProps.putAll(properties); +++ fSecurityManager = (XMLSecurityManager)getProperty(SECURITY_MANAGER); ++ } ++ ++ private HashMap getProperties(){ ++@@ -117,6 +123,9 @@ ++ supportedProps.put(Constants.XERCES_FEATURE_PREFIX + Constants.WARN_ON_DUPLICATE_ATTDEF_FEATURE, new Boolean(false)); ++ supportedProps.put(Constants.XERCES_FEATURE_PREFIX + Constants.WARN_ON_DUPLICATE_ENTITYDEF_FEATURE, new Boolean(false)); ++ supportedProps.put(Constants.XERCES_FEATURE_PREFIX + Constants.WARN_ON_UNDECLARED_ELEMDEF_FEATURE, new Boolean(false)); +++ +++ fSecurityManager = new XMLSecurityManager(true); +++ supportedProps.put(SECURITY_MANAGER, fSecurityManager); ++ } ++ ++ private void initWriterProps(){ ++@@ -132,7 +141,8 @@ ++ * } ++ */ ++ public boolean containsProperty(String property){ ++- return supportedProps.containsKey(property) ; +++ return supportedProps.containsKey(property) || +++ (fSecurityManager != null && fSecurityManager.getIndex(property) > -1) ; ++ } ++ ++ public Object getProperty(String property){ ++diff -r 3dc769c632a1 -r 0927621944cc drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/XML11NSDocumentScannerImpl.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/XML11NSDocumentScannerImpl.java Tue Oct 29 07:18:24 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/XML11NSDocumentScannerImpl.java Tue Oct 29 08:01:29 2013 +0000 ++@@ -108,6 +108,7 @@ ++ * @author Elena Litani, IBM ++ * @author Michael Glavassevich, IBM ++ * @author Sunitha Reddy, Sun Microsystems +++ * @version $Id: XML11NSDocumentScannerImpl.java,v 1.6 2010-11-01 04:39:40 joehw Exp $ ++ */ ++ public class XML11NSDocumentScannerImpl extends XML11DocumentScannerImpl { ++ ++@@ -236,7 +237,8 @@ ++ ++ // attributes ++ scanAttribute(fAttributes); ++- if (fSecurityManager != null && fAttributes.getLength() > fElementAttributeLimit){ +++ if (fSecurityManager != null && (!fSecurityManager.isNoLimit(fElementAttributeLimit)) && +++ fAttributes.getLength() > fElementAttributeLimit){ ++ fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN, ++ "ElementAttributeLimit", ++ new Object[]{rawname, new Integer(fElementAttributeLimit) }, ++diff -r 3dc769c632a1 -r 0927621944cc drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/XMLDTDScannerImpl.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/XMLDTDScannerImpl.java Tue Oct 29 07:18:24 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/XMLDTDScannerImpl.java Tue Oct 29 08:01:29 2013 +0000 ++@@ -44,6 +44,8 @@ ++ import com.sun.org.apache.xerces.internal.impl.XMLErrorReporter; ++ import com.sun.org.apache.xerces.internal.impl.XMLEntityHandler; ++ import com.sun.org.apache.xerces.internal.impl.Constants; +++import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; +++import com.sun.xml.internal.stream.Entity; ++ ++ /** ++ * This class is responsible for scanning the declarations found ++@@ -66,7 +68,7 @@ ++ * @author Glenn Marcy, IBM ++ * @author Eric Ye, IBM ++ * ++- * @version $Id: XMLDTDScannerImpl.java,v 1.7 2007/09/26 12:52:40 ndw Exp $ +++ * @version $Id: XMLDTDScannerImpl.java,v 1.8 2010-11-01 04:39:41 joehw Exp $ ++ */ ++ public class XMLDTDScannerImpl ++ extends XMLScanner ++@@ -1545,7 +1547,7 @@ ++ ++ // internal entity ++ if (systemId == null) { ++- scanEntityValue(fLiteral, fLiteral2); +++ scanEntityValue(name, isPEDecl, fLiteral, fLiteral2); ++ // since we need it's value anyway, let's snag it so it doesn't get corrupted ++ // if a new load takes place before we store the entity values ++ fStringBuffer.clear(); ++@@ -1610,7 +1612,7 @@ ++ * the use of scanCharReferenceValue), and fStringBuffer2, anything in them ++ * at the time of calling is lost. ++ */ ++- protected final void scanEntityValue(XMLString value, +++ protected final void scanEntityValue(String entityName, boolean isPEDecl, XMLString value, ++ XMLString nonNormalizedValue) ++ throws IOException, XNIException { ++ int quote = fEntityScanner.scanChar(); ++@@ -1622,10 +1624,20 @@ ++ ++ XMLString literal = fString; ++ XMLString literal2 = fString; +++ int countChar = 0; +++ if (fLimitAnalyzer == null && fSecurityManager != null) { +++ fLimitAnalyzer = fSecurityManager.getLimitAnalyzer(); +++ fLimitAnalyzer.startEntity(entityName); +++ } +++ ++ if (fEntityScanner.scanLiteral(quote, fString) != quote) { ++ fStringBuffer.clear(); ++ fStringBuffer2.clear(); ++ do { +++ if (isPEDecl && fLimitAnalyzer != null) { +++ checkLimit("%" + entityName, fString.length + countChar); +++ } +++ countChar = 0; ++ fStringBuffer.append(fString); ++ fStringBuffer2.append(fString); ++ if (fEntityScanner.skipChar('&')) { ++@@ -1685,6 +1697,7 @@ ++ } ++ } ++ else { +++ countChar++; ++ int c = fEntityScanner.peekChar(); ++ if (XMLChar.isHighSurrogate(c)) { ++ scanSurrogates(fStringBuffer2); ++@@ -1708,9 +1721,17 @@ ++ fStringBuffer2.append(fString); ++ literal = fStringBuffer; ++ literal2 = fStringBuffer2; +++ } else { +++ if (isPEDecl) { +++ checkLimit("%" + entityName, literal); +++ } ++ } ++ value.setValues(literal); ++ nonNormalizedValue.setValues(literal2); +++ if (fLimitAnalyzer != null) { +++ fLimitAnalyzer.endEntity(XMLSecurityManager.Limit.PARAMETER_ENTITY_SIZE_LIMIT, entityName); +++ } +++ ++ if (!fEntityScanner.skipChar(quote)) { ++ reportFatalError("CloseQuoteMissingInDecl", null); ++ } ++@@ -2126,6 +2147,43 @@ ++ //new SymbolTable()); ++ } ++ +++ /** +++ * Add the count of the content buffer and check if the accumulated +++ * value exceeds the limit +++ * @param entityName entity name +++ * @param buffer content buffer +++ */ +++ private void checkLimit(String entityName, XMLString buffer) { +++ checkLimit(entityName, buffer.length); +++ } +++ +++ /** +++ * Add the count and check limit +++ * @param entityName entity name +++ * @param len length of the buffer +++ */ +++ private void checkLimit(String entityName, int len) { +++ if (fLimitAnalyzer == null) { +++ fLimitAnalyzer = fSecurityManager.getLimitAnalyzer(); +++ } +++ fLimitAnalyzer.addValue(XMLSecurityManager.Limit.PARAMETER_ENTITY_SIZE_LIMIT, entityName, len); +++ if (fSecurityManager.isOverLimit(XMLSecurityManager.Limit.PARAMETER_ENTITY_SIZE_LIMIT)) { +++ fSecurityManager.debugPrint(); +++ reportFatalError("MaxEntitySizeLimit", new Object[]{entityName, +++ fLimitAnalyzer.getValue(XMLSecurityManager.Limit.PARAMETER_ENTITY_SIZE_LIMIT), +++ fSecurityManager.getLimit(XMLSecurityManager.Limit.PARAMETER_ENTITY_SIZE_LIMIT), +++ fSecurityManager.getStateLiteral(XMLSecurityManager.Limit.PARAMETER_ENTITY_SIZE_LIMIT)}); +++ } +++ if (fSecurityManager.isOverLimit(XMLSecurityManager.Limit.TOTAL_ENTITY_SIZE_LIMIT)) { +++ fSecurityManager.debugPrint(); +++ reportFatalError("TotalEntitySizeLimit", +++ new Object[]{fLimitAnalyzer.getTotalValue(XMLSecurityManager.Limit.TOTAL_ENTITY_SIZE_LIMIT), +++ fSecurityManager.getLimit(XMLSecurityManager.Limit.TOTAL_ENTITY_SIZE_LIMIT), +++ fSecurityManager.getStateLiteral(XMLSecurityManager.Limit.TOTAL_ENTITY_SIZE_LIMIT)}); +++ } +++ +++ } +++ ++ public DTDGrammar getGrammar(){ ++ return nvGrammarInfo; ++ } ++diff -r 3dc769c632a1 -r 0927621944cc drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentFragmentScannerImpl.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentFragmentScannerImpl.java Tue Oct 29 07:18:24 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentFragmentScannerImpl.java Tue Oct 29 08:01:29 2013 +0000 ++@@ -18,7 +18,6 @@ ++ * limitations under the License. ++ */ ++ ++- ++ package com.sun.org.apache.xerces.internal.impl; ++ ++ import com.sun.xml.internal.stream.XMLBufferListener; ++@@ -51,7 +50,10 @@ ++ import com.sun.org.apache.xerces.internal.impl.Constants; ++ import com.sun.org.apache.xerces.internal.impl.XMLEntityHandler; ++ import com.sun.org.apache.xerces.internal.util.NamespaceSupport; +++import com.sun.org.apache.xerces.internal.utils.XMLLimitAnalyzer; ++ import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; +++import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager.Limit; +++import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager.State; ++ import com.sun.org.apache.xerces.internal.xni.NamespaceContext; ++ import javax.xml.stream.XMLStreamConstants; ++ import javax.xml.stream.events.XMLEvent; ++@@ -194,7 +196,7 @@ ++ }; ++ ++ protected static final char [] cdata = {'[','C','D','A','T','A','['}; ++- protected static final char [] xmlDecl = {'<','?','x','m','l'}; +++ static final char [] xmlDecl = {'<','?','x','m','l'}; ++ protected static final char [] endTag = {'<','/'}; ++ // debugging ++ ++@@ -350,7 +352,6 @@ ++ ++ protected boolean foundBuiltInRefs = false; ++ ++- protected XMLSecurityManager fSecurityManager = null; ++ ++ //skip element algorithm ++ static final short MAX_DEPTH_LIMIT = 5 ; ++@@ -559,6 +560,8 @@ ++ } catch (XMLConfigurationException e) { ++ fSecurityManager = null; ++ } +++ fLimitAnalyzer = fSecurityManager.getLimitAnalyzer(); +++ ++ fElementAttributeLimit = (fSecurityManager != null)? ++ fSecurityManager.getLimit(XMLSecurityManager.Limit.ELEMENT_ATTRIBUTE_LIMIT):0; ++ ++@@ -604,8 +607,7 @@ ++ fEntityStore = fEntityManager.getEntityStore(); ++ ++ dtdGrammarUtil = null; ++- ++- +++ ++ //fEntityManager.test(); ++ } // reset(XMLComponentManager) ++ ++@@ -655,6 +657,8 @@ ++ ++ dtdGrammarUtil = null; ++ +++ fSecurityManager = (XMLSecurityManager)propertyManager.getProperty(Constants.SECURITY_MANAGER); +++ fLimitAnalyzer = fSecurityManager.getLimitAnalyzer(); ++ } // reset(XMLComponentManager) ++ ++ /** ++@@ -931,7 +935,6 @@ ++ ++ // scan decl ++ super.scanXMLDeclOrTextDecl(scanningTextDecl, fStrings); ++- ++ fMarkupDepth--; ++ ++ // pseudo-attribute values ++@@ -1298,7 +1301,8 @@ ++ fAddDefaultAttr = true; ++ do { ++ scanAttribute(fAttributes); ++- if (fSecurityManager != null && fAttributes.getLength() > fElementAttributeLimit){ +++ if (fSecurityManager != null && !fSecurityManager.isNoLimit(fElementAttributeLimit) && +++ fAttributes.getLength() > fElementAttributeLimit){ ++ fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN, ++ "ElementAttributeLimit", ++ new Object[]{rawname, new Integer(fAttributes.getLength()) }, ++@@ -2800,6 +2804,8 @@ ++ if(DEBUG){ ++ System.out.println("NOT USING THE BUFFER, STRING = " + fTempString.toString()); ++ } +++ //check limit before returning event +++ checkLimit(fContentBuffer); ++ if(dtdGrammarUtil!= null && dtdGrammarUtil.isIgnorableWhiteSpace(fContentBuffer)){ ++ if(DEBUG)System.out.println("Return SPACE EVENT"); ++ return XMLEvent.SPACE; ++@@ -2898,6 +2904,8 @@ ++ fLastSectionWasCharacterData = true ; ++ return fDriver.next(); ++ }else{ +++ //check limit before returning event +++ checkLimit(fContentBuffer); ++ if(dtdGrammarUtil!= null && dtdGrammarUtil.isIgnorableWhiteSpace(fContentBuffer)){ ++ if(DEBUG)System.out.println("Return SPACE EVENT"); ++ return XMLEvent.SPACE; ++@@ -3108,6 +3116,31 @@ ++ ++ }//next ++ +++ +++ /** +++ * Add the count of the content buffer and check if the accumulated +++ * value exceeds the limit +++ * @param buffer content buffer +++ */ +++ protected void checkLimit(XMLStringBuffer buffer) { +++ if (fLimitAnalyzer.isTracking(fCurrentEntityName)) { +++ fLimitAnalyzer.addValue(Limit.GENEAL_ENTITY_SIZE_LIMIT, fCurrentEntityName, buffer.length); +++ if (fSecurityManager.isOverLimit(Limit.GENEAL_ENTITY_SIZE_LIMIT)) { +++ fSecurityManager.debugPrint(); +++ reportFatalError("MaxEntitySizeLimit", new Object[]{fCurrentEntityName, +++ fLimitAnalyzer.getValue(Limit.GENEAL_ENTITY_SIZE_LIMIT), +++ fSecurityManager.getLimit(Limit.GENEAL_ENTITY_SIZE_LIMIT), +++ fSecurityManager.getStateLiteral(Limit.GENEAL_ENTITY_SIZE_LIMIT)}); +++ } +++ if (fSecurityManager.isOverLimit(Limit.TOTAL_ENTITY_SIZE_LIMIT)) { +++ fSecurityManager.debugPrint(); +++ reportFatalError("TotalEntitySizeLimit", +++ new Object[]{fLimitAnalyzer.getTotalValue(Limit.TOTAL_ENTITY_SIZE_LIMIT), +++ fSecurityManager.getLimit(Limit.TOTAL_ENTITY_SIZE_LIMIT), +++ fSecurityManager.getStateLiteral(Limit.TOTAL_ENTITY_SIZE_LIMIT)}); +++ } +++ } +++ } ++ ++ // ++ // Protected methods ++diff -r 3dc769c632a1 -r 0927621944cc drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java Tue Oct 29 07:18:24 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java Tue Oct 29 08:01:29 2013 +0000 ++@@ -18,7 +18,7 @@ ++ * limitations under the License. ++ */ ++ ++-package com.sun.org.apache.xerces.internal.impl ; +++package com.sun.org.apache.xerces.internal.impl; ++ ++ import com.sun.xml.internal.stream.StaxEntityResolverWrapper; ++ import com.sun.xml.internal.stream.StaxXMLInputSource; ++@@ -65,6 +65,7 @@ ++ ++ import com.sun.org.apache.xerces.internal.impl.validation.ValidationManager; ++ import com.sun.org.apache.xerces.internal.util.URI; +++import com.sun.org.apache.xerces.internal.utils.XMLLimitAnalyzer; ++ import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; ++ ++ ++@@ -319,10 +320,13 @@ ++ */ ++ protected int fBufferSize = DEFAULT_BUFFER_SIZE; ++ ++- // stores defaults for entity expansion limit if it has ++- // been set on the configuration. +++ /** Security Manager */ ++ protected XMLSecurityManager fSecurityManager = null; ++ +++ protected XMLLimitAnalyzer fLimitAnalyzer = null; +++ +++ protected int entityExpansionIndex; +++ ++ /** ++ * True if the document entity is standalone. This should really ++ * only be set by the document source (e.g. XMLDocumentScanner). ++@@ -347,10 +351,6 @@ ++ /** XML 1.1 entity scanner. */ ++ protected XMLEntityScanner fXML11EntityScanner; ++ ++- /** entity expansion limit (contains useful data if and only if ++- fSecurityManager is non-null) */ ++- protected int fEntityExpansionLimit = 0; ++- ++ /** count of entities expanded: */ ++ protected int fEntityExpansionCount = 0; ++ ++@@ -848,6 +848,9 @@ ++ fCurrentEntity.setEncodingExternallySpecified(encodingExternallySpecified); ++ fEntityScanner.setCurrentEntity(fCurrentEntity); ++ fResourceIdentifier.setValues(publicId, literalSystemId, baseSystemId, expandedSystemId); +++ if (fLimitAnalyzer != null) { +++ fLimitAnalyzer.startEntity(name); +++ } ++ return encoding; ++ } //setupCurrentEntity(String, XMLInputSource, boolean, boolean): String ++ ++@@ -1297,10 +1300,13 @@ ++ //expansions exceeds the entity expansion limit, parser will throw fatal error. ++ // Note that this represents the nesting level of open entities. ++ fEntityExpansionCount++; ++- if( fSecurityManager != null && fEntityExpansionCount > fEntityExpansionLimit ){ ++- fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN, ++- "EntityExpansionLimitExceeded", ++- new Object[]{new Integer(fEntityExpansionLimit) }, +++ if(fLimitAnalyzer != null) { +++ fLimitAnalyzer.addValue(entityExpansionIndex, name, 1); +++ } +++ if( fSecurityManager != null && fSecurityManager.isOverLimit(entityExpansionIndex)){ +++ fSecurityManager.debugPrint(); +++ fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,"EntityExpansionLimitExceeded", +++ new Object[]{fSecurityManager.getLimitValueByIndex(entityExpansionIndex)}, ++ XMLErrorReporter.SEVERITY_FATAL_ERROR ); ++ // is there anything better to do than reset the counter? ++ // at least one can envision debugging applications where this might ++@@ -1381,6 +1387,12 @@ ++ if(fCurrentEntity != null){ ++ //close the reader ++ try{ +++ if (fLimitAnalyzer != null) { +++ fLimitAnalyzer.endEntity(XMLSecurityManager.Limit.GENEAL_ENTITY_SIZE_LIMIT, fCurrentEntity.name); +++ if (fCurrentEntity.name.equals("[xml]")) { +++ fSecurityManager.debugPrint(); +++ } +++ } ++ fCurrentEntity.close(); ++ }catch(IOException ex){ ++ throw new XNIException(ex); ++@@ -1425,6 +1437,9 @@ ++ fStaxEntityResolver = null; ++ } ++ +++ fSecurityManager = (XMLSecurityManager)propertyManager.getProperty(SECURITY_MANAGER); +++ fLimitAnalyzer = fSecurityManager.getLimitAnalyzer(); +++ ++ // initialize state ++ //fStandalone = false; ++ fEntities.clear(); ++@@ -1536,6 +1551,8 @@ ++ catch (XMLConfigurationException e) { ++ fSecurityManager = null; ++ } +++ fLimitAnalyzer = fSecurityManager.getLimitAnalyzer(); +++ entityExpansionIndex = fSecurityManager.getIndex(Constants.JDK_ENTITY_EXPANSION_LIMIT); ++ ++ //reset general state ++ reset(); ++@@ -1549,9 +1566,6 @@ ++ // a class acting as a component manager but not ++ // implementing that interface for whatever reason. ++ public void reset() { ++- fEntityExpansionLimit = (fSecurityManager != null)? ++- fSecurityManager.getLimit(XMLSecurityManager.Limit.ENTITY_EXPANSION_LIMIT):0; ++- ++ ++ // initialize state ++ fStandalone = false; ++@@ -1692,8 +1706,7 @@ ++ if (suffixLength == Constants.SECURITY_MANAGER_PROPERTY.length() && ++ propertyId.endsWith(Constants.SECURITY_MANAGER_PROPERTY)) { ++ fSecurityManager = (XMLSecurityManager)value; ++- fEntityExpansionLimit = (fSecurityManager != null)? ++- fSecurityManager.getLimit(XMLSecurityManager.Limit.ENTITY_EXPANSION_LIMIT):0; +++ fLimitAnalyzer = fSecurityManager.getLimitAnalyzer(); ++ } ++ } ++ ++diff -r 3dc769c632a1 -r 0927621944cc drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/XMLNSDocumentScannerImpl.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/XMLNSDocumentScannerImpl.java Tue Oct 29 07:18:24 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/XMLNSDocumentScannerImpl.java Tue Oct 29 08:01:29 2013 +0000 ++@@ -58,6 +58,7 @@ ++ * @author Neeraj Bajaj, Sun Microsystems ++ * @author Venugopal Rao K, Sun Microsystems ++ * @author Elena Litani, IBM +++ * @version $Id: XMLNSDocumentScannerImpl.java,v 1.11 2010-11-01 04:39:41 joehw Exp $ ++ */ ++ public class XMLNSDocumentScannerImpl ++ extends XMLDocumentScannerImpl { ++@@ -251,7 +252,8 @@ ++ ++ do { ++ scanAttribute(fAttributes); ++- if (fSecurityManager != null && fAttributes.getLength() > fElementAttributeLimit){ +++ if (fSecurityManager != null && (!fSecurityManager.isNoLimit(fElementAttributeLimit)) && +++ fAttributes.getLength() > fElementAttributeLimit){ ++ fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN, ++ "ElementAttributeLimit", ++ new Object[]{rawname, new Integer(fAttributes.getLength()) }, ++diff -r 3dc769c632a1 -r 0927621944cc drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/XMLScanner.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/XMLScanner.java Tue Oct 29 07:18:24 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/XMLScanner.java Tue Oct 29 08:01:29 2013 +0000 ++@@ -31,6 +31,8 @@ ++ import com.sun.org.apache.xerces.internal.util.XMLChar; ++ import com.sun.org.apache.xerces.internal.util.XMLResourceIdentifierImpl; ++ import com.sun.org.apache.xerces.internal.util.XMLStringBuffer; +++import com.sun.org.apache.xerces.internal.utils.XMLLimitAnalyzer; +++import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; ++ import com.sun.org.apache.xerces.internal.xni.Augmentations; ++ import com.sun.org.apache.xerces.internal.xni.XMLAttributes; ++ import com.sun.org.apache.xerces.internal.xni.XMLResourceIdentifier; ++@@ -105,6 +107,9 @@ ++ protected static final String ENTITY_MANAGER = ++ Constants.XERCES_PROPERTY_PREFIX + Constants.ENTITY_MANAGER_PROPERTY; ++ +++ /** Property identifier: Security manager. */ +++ private static final String SECURITY_MANAGER = Constants.SECURITY_MANAGER; +++ ++ // debugging ++ ++ /** Debug attribute normalization. */ ++@@ -158,6 +163,12 @@ ++ /** xxx this should be available from EntityManager Entity storage */ ++ protected XMLEntityStorage fEntityStore = null ; ++ +++ /** Security manager. */ +++ protected XMLSecurityManager fSecurityManager = null; +++ +++ /** Limit analyzer. */ +++ protected XMLLimitAnalyzer fLimitAnalyzer = null; +++ ++ // protected data ++ ++ /** event type */ ++@@ -259,6 +270,7 @@ ++ fSymbolTable = (SymbolTable)componentManager.getProperty(SYMBOL_TABLE); ++ fErrorReporter = (XMLErrorReporter)componentManager.getProperty(ERROR_REPORTER); ++ fEntityManager = (XMLEntityManager)componentManager.getProperty(ENTITY_MANAGER); +++ fSecurityManager = (XMLSecurityManager)componentManager.getProperty(SECURITY_MANAGER); ++ ++ //this step is extra because we have separated the storage of entity ++ fEntityStore = fEntityManager.getEntityStore() ; ++@@ -309,6 +321,10 @@ ++ fEntityManager = (XMLEntityManager)value; ++ } ++ } +++ +++ if (propertyId.equals(SECURITY_MANAGER)) { +++ fSecurityManager = (XMLSecurityManager)value; +++ } ++ /*else if(propertyId.equals(Constants.STAX_PROPERTIES)){ ++ fStaxProperties = (HashMap)value; ++ //TODO::discuss with neeraj what are his thoughts on passing properties. ++@@ -368,6 +384,8 @@ ++ fEntityManager = (XMLEntityManager)propertyManager.getProperty(ENTITY_MANAGER); ++ fEntityStore = fEntityManager.getEntityStore() ; ++ fEntityScanner = (XMLEntityScanner)fEntityManager.getEntityScanner() ; +++ fSecurityManager = (XMLSecurityManager)propertyManager.getProperty(SECURITY_MANAGER); +++ ++ //fEntityManager.reset(); ++ // DTD preparsing defaults: ++ fValidation = false; ++@@ -526,8 +544,9 @@ ++ sawSpace = fEntityScanner.skipSpaces(); ++ } ++ // restore original literal value ++- if(currLiteral) +++ if(currLiteral) { ++ currEnt.literal = true; +++ } ++ // REVISIT: should we remove this error reporting? ++ if (scanningTextDecl && state != STATE_DONE) { ++ reportFatalError("MorePseudoAttributes", null); ++diff -r 3dc769c632a1 -r 0927621944cc drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages.properties ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages.properties Tue Oct 29 07:18:24 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages.properties Tue Oct 29 08:01:29 2013 +0000 ++@@ -289,8 +289,10 @@ ++ InvalidCharInLiteral=InvalidCharInLiteral ++ ++ ++-#Application can set the limit of number of entities that should be expanded by the parser. ++-EntityExpansionLimitExceeded=The parser has encountered more than \"{0}\" entity expansions in this document; this is the limit imposed by the application. +++# Implementation limits +++ EntityExpansionLimitExceeded=JAXP00010001: The parser has encountered more than \"{0}\" entity expansions in this document; this is the limit imposed by the JDK. +++ ElementAttributeLimit=JAXP00010002: Element \"{0}\" has more than \"{1}\" attributes, \"{1}\" is the limit imposed by the JDK. +++ MaxEntitySizeLimit=JAXP00010003: The length of entity \"{0}\" is \"{1}\" that exceeds the \"{2}\" limit set by \"{3}\". +++ TotalEntitySizeLimit=JAXP00010004: The accumulated size \"{0}\" of entities exceeded the \"{1}\" limit set by \"{2}\". +++ MaxXMLNameLimit=JAXP00010005: The name \"{0}\" exceeded the \"{1}\" limit set by \"{2}\". ++ ++-# Application can set the limit of number of attributes of entity that should be expanded by the parser. ++-ElementAttributeLimit= Element \"{0}\" has more than \"{1}\" attributes, \"{1}\" is the limit imposed by the application. ++diff -r 3dc769c632a1 -r 0927621944cc drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/xs/models/CMNodeFactory.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/xs/models/CMNodeFactory.java Tue Oct 29 07:18:24 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/xs/models/CMNodeFactory.java Tue Oct 29 08:01:29 2013 +0000 ++@@ -111,7 +111,8 @@ ++ } ++ ++ public void nodeCountCheck(){ ++- if( fSecurityManager != null && nodeCount++ > maxNodeLimit){ +++ if( fSecurityManager != null && !fSecurityManager.isNoLimit(maxNodeLimit) && +++ nodeCount++ > maxNodeLimit){ ++ if(DEBUG){ ++ System.out.println("nodeCount = " + nodeCount ) ; ++ System.out.println("nodeLimit = " + maxNodeLimit ) ; ++diff -r 3dc769c632a1 -r 0927621944cc drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/DocumentBuilderImpl.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/DocumentBuilderImpl.java Tue Oct 29 07:18:24 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/DocumentBuilderImpl.java Tue Oct 29 08:01:29 2013 +0000 ++@@ -108,6 +108,8 @@ ++ /** Initial EntityResolver */ ++ private final EntityResolver fInitEntityResolver; ++ +++ private XMLSecurityManager fSecurityManager; +++ ++ DocumentBuilderImpl(DocumentBuilderFactoryImpl dbf, Hashtable dbfAttrs, Hashtable features) ++ throws SAXNotRecognizedException, SAXNotSupportedException { ++ this(dbf, dbfAttrs, features, false); ++@@ -151,10 +153,8 @@ ++ domParser.setFeature(XINCLUDE_FEATURE, true); ++ } ++ ++- // If the secure processing feature is on set a security manager. ++- if (secureProcessing) { ++- domParser.setProperty(SECURITY_MANAGER, new XMLSecurityManager()); ++- } +++ fSecurityManager = new XMLSecurityManager(secureProcessing); +++ domParser.setProperty(SECURITY_MANAGER, fSecurityManager); ++ ++ this.grammar = dbf.getSchema(); ++ if (grammar != null) { ++@@ -202,9 +202,9 @@ ++ String feature = (String)e.nextElement(); ++ boolean value = ((Boolean)features.get(feature)).booleanValue(); ++ domParser.setFeature(feature, value); ++- } ++ } ++ } +++ } ++ ++ /** ++ * Set any DocumentBuilderFactory attributes of our underlying DOMParser ++diff -r 3dc769c632a1 -r 0927621944cc drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/SAXParserImpl.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/SAXParserImpl.java Tue Oct 29 07:18:24 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/SAXParserImpl.java Tue Oct 29 08:01:29 2013 +0000 ++@@ -105,6 +105,8 @@ ++ /** Initial EntityResolver */ ++ private final EntityResolver fInitEntityResolver; ++ +++ private final XMLSecurityManager fSecurityManager; +++ ++ /** ++ * Create a SAX parser with the associated features ++ * @param features Hashtable of SAX features, may be null ++@@ -121,8 +123,9 @@ ++ SAXParserImpl(SAXParserFactoryImpl spf, Hashtable features, boolean secureProcessing) ++ throws SAXException ++ { +++ fSecurityManager = new XMLSecurityManager(secureProcessing); ++ // Instantiate a SAXParser directly and not through SAX so that we use the right ClassLoader ++- xmlReader = new JAXPSAXParser(this); +++ xmlReader = new JAXPSAXParser(this, fSecurityManager); ++ ++ // JAXP "namespaceAware" == SAX Namespaces feature ++ // Note: there is a compatibility problem here with default values: ++@@ -141,10 +144,7 @@ ++ xmlReader.setFeature0(XINCLUDE_FEATURE, true); ++ } ++ ++- // If the secure processing feature is on set a security manager. ++- if (secureProcessing) { ++- xmlReader.setProperty0(SECURITY_MANAGER, new XMLSecurityManager()); ++- } +++ xmlReader.setProperty0(SECURITY_MANAGER, fSecurityManager); ++ ++ // Set application's features, followed by validation features. ++ setFeatures(features); ++@@ -326,14 +326,28 @@ ++ private HashMap fInitFeatures = new HashMap(); ++ private HashMap fInitProperties = new HashMap(); ++ private SAXParserImpl fSAXParser; +++ private XMLSecurityManager fSecurityManager; ++ ++ public JAXPSAXParser() { ++- super(); +++ this(null, null); ++ } ++ ++- JAXPSAXParser(SAXParserImpl saxParser) { +++ JAXPSAXParser(SAXParserImpl saxParser, XMLSecurityManager securityManager) { ++ super(); ++ fSAXParser = saxParser; +++ fSecurityManager = securityManager; +++ /** +++ * This class may be used directly. So initialize the security manager if +++ * it is null. +++ */ +++ if (fSecurityManager == null) { +++ fSecurityManager = new XMLSecurityManager(true); +++ try { +++ super.setProperty(SECURITY_MANAGER, fSecurityManager); +++ } catch (Exception ex) { +++ //shall not happen +++ } +++ } ++ } ++ ++ /** ++@@ -349,7 +363,8 @@ ++ } ++ if (name.equals(XMLConstants.FEATURE_SECURE_PROCESSING)) { ++ try { ++- setProperty(SECURITY_MANAGER, value ? new XMLSecurityManager() : null); +++ fSecurityManager.setSecureProcessing(value); +++ setProperty(SECURITY_MANAGER, fSecurityManager); ++ } ++ catch (SAXNotRecognizedException exc) { ++ // If the property is not supported ++@@ -385,13 +400,7 @@ ++ throw new NullPointerException(); ++ } ++ if (name.equals(XMLConstants.FEATURE_SECURE_PROCESSING)) { ++- try { ++- return (super.getProperty(SECURITY_MANAGER) != null); ++- } ++- // If the property is not supported the value must be false. ++- catch (SAXException exc) { ++- return false; ++- } +++ return fSecurityManager.isSecureProcessing(); ++ } ++ return super.getFeature(name); ++ } ++diff -r 3dc769c632a1 -r 0927621944cc drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/AbstractXMLSchema.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/AbstractXMLSchema.java Tue Oct 29 07:18:24 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/AbstractXMLSchema.java Tue Oct 29 08:01:29 2013 +0000 ++@@ -40,8 +40,15 @@ ++ */ ++ private final HashMap fFeatures; ++ +++ /** +++ * Map containing the initial values of properties for +++ * validators created using this grammar pool container. +++ */ +++ private final HashMap fProperties; +++ ++ public AbstractXMLSchema() { ++ fFeatures = new HashMap(); +++ fProperties = new HashMap(); ++ } ++ ++ /* ++@@ -83,4 +90,20 @@ ++ fFeatures.put(featureId, state ? Boolean.TRUE : Boolean.FALSE); ++ } ++ +++ /** +++ * Returns the initial value of a property for validators created +++ * using this grammar pool container or null if the validators +++ * should use the default value. +++ */ +++ public final Object getProperty(String propertyId) { +++ return fProperties.get(propertyId); +++ } +++ +++ /* +++ * Set a property on the schema +++ */ +++ public final void setProperty(String propertyId, Object state) { +++ fProperties.put(propertyId, state); +++ } +++ ++ } // AbstractXMLSchema ++diff -r 3dc769c632a1 -r 0927621944cc drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/StAXValidatorHelper.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/StAXValidatorHelper.java Tue Oct 29 07:18:24 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/StAXValidatorHelper.java Tue Oct 29 08:01:29 2013 +0000 ++@@ -25,6 +25,9 @@ ++ ++ package com.sun.org.apache.xerces.internal.jaxp.validation; ++ +++import com.sun.org.apache.xerces.internal.impl.Constants; +++import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; +++ ++ import java.io.IOException; ++ ++ import javax.xml.transform.Result; ++@@ -68,6 +71,19 @@ ++ if( identityTransformer1==null ) { ++ try { ++ SAXTransformerFactory tf = (SAXTransformerFactory)SAXTransformerFactory.newInstance(); +++ XMLSecurityManager securityManager = (XMLSecurityManager)fComponentManager.getProperty(Constants.SECURITY_MANAGER); +++ if (securityManager != null) { +++ for (XMLSecurityManager.Limit limit : XMLSecurityManager.Limit.values()) { +++ if (securityManager.isSet(limit.ordinal())){ +++ tf.setAttribute(limit.apiProperty(), +++ securityManager.getLimitValueAsString(limit)); +++ } +++ } +++ if (securityManager.printEntityCountInfo()) { +++ tf.setAttribute(Constants.JDK_ENTITY_COUNT_INFO, "yes"); +++ } +++ } +++ ++ identityTransformer1 = tf.newTransformer(); ++ identityTransformer2 = tf.newTransformerHandler(); ++ } catch (TransformerConfigurationException e) { ++diff -r 3dc769c632a1 -r 0927621944cc drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/StreamValidatorHelper.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/StreamValidatorHelper.java Tue Oct 29 07:18:24 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/StreamValidatorHelper.java Tue Oct 29 08:01:29 2013 +0000 ++@@ -184,6 +184,8 @@ ++ config.setDocumentHandler(fSchemaValidator); ++ config.setDTDHandler(null); ++ config.setDTDContentModelHandler(null); +++ config.setProperty(Constants.SECURITY_MANAGER, +++ fComponentManager.getProperty(Constants.SECURITY_MANAGER)); ++ fConfiguration = new SoftReference(config); ++ return config; ++ } ++diff -r 3dc769c632a1 -r 0927621944cc drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaFactory.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaFactory.java Tue Oct 29 07:18:24 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaFactory.java Tue Oct 29 08:01:29 2013 +0000 ++@@ -97,7 +97,7 @@ ++ /** The ErrorHandlerWrapper */ ++ private ErrorHandlerWrapper fErrorHandlerWrapper; ++ ++- /** The XMLSecurityManager. */ +++ /** The SecurityManager. */ ++ private XMLSecurityManager fSecurityManager; ++ ++ /** The container for the real grammar pool. */ ++@@ -113,7 +113,7 @@ ++ fXMLSchemaLoader.setErrorHandler(fErrorHandlerWrapper); ++ ++ // Enable secure processing feature by default ++- fSecurityManager = new XMLSecurityManager(); +++ fSecurityManager = new XMLSecurityManager(true); ++ fXMLSchemaLoader.setProperty(SECURITY_MANAGER, fSecurityManager); ++ } ++ ++@@ -292,7 +292,7 @@ ++ "property-not-supported", new Object [] {name})); ++ } ++ try { ++- return fXMLSchemaLoader.getProperty(name); +++ return fXMLSchemaLoader.getProperty(name); ++ } ++ catch (XMLConfigurationException e) { ++ String identifier = e.getIdentifier(); ++@@ -321,7 +321,9 @@ ++ SAXMessageFormatter.formatMessage(null, ++ "jaxp-secureprocessing-feature", null)); ++ } +++ ++ fSecurityManager = value ? new XMLSecurityManager() : null; +++ fSecurityManager.setSecureProcessing(value); ++ fXMLSchemaLoader.setProperty(SECURITY_MANAGER, fSecurityManager); ++ return; ++ } ++diff -r 3dc769c632a1 -r 0927621944cc drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaValidatorComponentManager.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaValidatorComponentManager.java Tue Oct 29 07:18:24 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaValidatorComponentManager.java Tue Oct 29 08:01:29 2013 +0000 ++@@ -173,7 +173,7 @@ ++ private final HashMap fInitProperties = new HashMap(); ++ ++ /** Stores the initial security manager. */ ++- private final XMLSecurityManager fInitSecurityManager; +++ private XMLSecurityManager fInitSecurityManager; ++ ++ // ++ // User Objects ++@@ -210,12 +210,6 @@ ++ fComponents.put(ENTITY_RESOLVER, null); ++ fComponents.put(ERROR_HANDLER, null); ++ ++- if (System.getSecurityManager() != null) { ++- _isSecureMode = true; ++- setProperty(SECURITY_MANAGER, new XMLSecurityManager()); ++- } else { ++- fComponents.put(SECURITY_MANAGER, null); ++- } ++ fComponents.put(SYMBOL_TABLE, new SymbolTable()); ++ ++ // setup grammar pool ++@@ -230,15 +224,21 @@ ++ addRecognizedParamsAndSetDefaults(fErrorReporter, grammarContainer); ++ addRecognizedParamsAndSetDefaults(fSchemaValidator, grammarContainer); ++ ++- // if the secure processing feature is set to true, add a security manager to the configuration ++- Boolean secureProcessing = grammarContainer.getFeature(XMLConstants.FEATURE_SECURE_PROCESSING); ++- if (Boolean.TRUE.equals(secureProcessing)) { ++- fInitSecurityManager = new XMLSecurityManager(); +++ boolean secureProcessing = grammarContainer.getFeature(XMLConstants.FEATURE_SECURE_PROCESSING); +++ if (System.getSecurityManager() != null) { +++ _isSecureMode = true; +++ secureProcessing = true; ++ } ++- else { ++- fInitSecurityManager = null; +++ +++ fInitSecurityManager = (XMLSecurityManager) +++ grammarContainer.getProperty(SECURITY_MANAGER); +++ if (fInitSecurityManager != null ) { +++ fInitSecurityManager.setSecureProcessing(secureProcessing); +++ } else { +++ fInitSecurityManager = new XMLSecurityManager(secureProcessing); ++ } ++- fComponents.put(SECURITY_MANAGER, fInitSecurityManager); +++ +++ setProperty(SECURITY_MANAGER, fInitSecurityManager); ++ ++ } ++ ++@@ -266,7 +266,7 @@ ++ return fUseGrammarPoolOnly; ++ } ++ else if (XMLConstants.FEATURE_SECURE_PROCESSING.equals(featureId)) { ++- return getProperty(SECURITY_MANAGER) != null; +++ return fInitSecurityManager.isSecureProcessing(); ++ } ++ else if (SCHEMA_ELEMENT_DEFAULT.equals(featureId)) { ++ return true; //pre-condition: VALIDATION and SCHEMA_VALIDATION are always true ++@@ -296,7 +296,8 @@ ++ if (_isSecureMode && !value) { ++ throw new XMLConfigurationException(XMLConfigurationException.NOT_ALLOWED, XMLConstants.FEATURE_SECURE_PROCESSING); ++ } ++- setProperty(SECURITY_MANAGER, value ? new XMLSecurityManager() : null); +++ fInitSecurityManager.setSecureProcessing(value); +++ setProperty(SECURITY_MANAGER, fInitSecurityManager); ++ return; ++ } ++ fConfigUpdated = true; ++@@ -366,10 +367,12 @@ ++ fComponents.put(propertyId, value); ++ return; ++ } ++- if (!fInitProperties.containsKey(propertyId)) { ++- fInitProperties.put(propertyId, super.getProperty(propertyId)); ++- } ++- super.setProperty(propertyId, value); +++ +++ //fall back to the existing property manager +++ if (!fInitProperties.containsKey(propertyId)) { +++ fInitProperties.put(propertyId, super.getProperty(propertyId)); +++ } +++ super.setProperty(propertyId, value); ++ } ++ ++ /** ++diff -r 3dc769c632a1 -r 0927621944cc drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/XSGrammarPoolContainer.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/XSGrammarPoolContainer.java Tue Oct 29 07:18:24 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/XSGrammarPoolContainer.java Tue Oct 29 08:01:29 2013 +0000 ++@@ -54,4 +54,11 @@ ++ */ ++ public Boolean getFeature(String featureId); ++ +++ /** +++ * Returns the initial value of a property for validators created +++ * using this grammar pool container or null if the validators +++ * should use the default value. +++ */ +++ public Object getProperty(String propertyId); +++ ++ } ++diff -r 3dc769c632a1 -r 0927621944cc drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/SAXParser.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/SAXParser.java Tue Oct 29 07:18:24 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/SAXParser.java Tue Oct 29 08:01:29 2013 +0000 ++@@ -22,6 +22,7 @@ ++ ++ import com.sun.org.apache.xerces.internal.impl.Constants; ++ import com.sun.org.apache.xerces.internal.util.SymbolTable; +++import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; ++ import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarPool; ++ import com.sun.org.apache.xerces.internal.xni.parser.XMLParserConfiguration; ++ ++@@ -73,6 +74,7 @@ ++ XMLGRAMMAR_POOL, ++ }; ++ +++ XMLSecurityManager securityManager; ++ // ++ // Constructors ++ // ++diff -r 3dc769c632a1 -r 0927621944cc drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/SecurityConfiguration.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/SecurityConfiguration.java Tue Oct 29 07:18:24 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/SecurityConfiguration.java Tue Oct 29 08:01:29 2013 +0000 ++@@ -44,6 +44,7 @@ ++ * ++ * @author Neil Graham, IBM ++ * +++ * @version $Id: SecurityConfiguration.java,v 1.6 2010-11-01 04:40:09 joehw Exp $ ++ */ ++ public class SecurityConfiguration extends XIncludeAwareParserConfiguration ++ { ++@@ -106,8 +107,8 @@ ++ XMLComponentManager parentSettings) { ++ super(symbolTable, grammarPool, parentSettings); ++ ++- // create the XMLSecurityManager property: ++- setProperty(SECURITY_MANAGER_PROPERTY, new XMLSecurityManager()); +++ // create the SecurityManager property: +++ setProperty(SECURITY_MANAGER_PROPERTY, new XMLSecurityManager(true)); ++ } // (SymbolTable,XMLGrammarPool) ++ ++ } // class SecurityConfiguration ++diff -r 3dc769c632a1 -r 0927621944cc drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/XML11Configuration.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/XML11Configuration.java Tue Oct 29 07:18:24 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/XML11Configuration.java Tue Oct 29 08:01:29 2013 +0000 ++@@ -20,6 +20,12 @@ ++ ++ package com.sun.org.apache.xerces.internal.parsers; ++ +++import java.io.IOException; +++import java.util.ArrayList; +++import java.util.HashMap; +++import java.util.Locale; +++import javax.xml.XMLConstants; +++ ++ import com.sun.org.apache.xerces.internal.impl.Constants; ++ import com.sun.org.apache.xerces.internal.impl.XML11DTDScannerImpl; ++ import com.sun.org.apache.xerces.internal.impl.XML11DocumentScannerImpl; ++@@ -44,6 +50,7 @@ ++ import com.sun.org.apache.xerces.internal.impl.xs.XSMessageFormatter; ++ import com.sun.org.apache.xerces.internal.util.ParserConfigurationSettings; ++ import com.sun.org.apache.xerces.internal.util.SymbolTable; +++import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; ++ import com.sun.org.apache.xerces.internal.xni.XMLDTDContentModelHandler; ++ import com.sun.org.apache.xerces.internal.xni.XMLDTDHandler; ++ import com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler; ++@@ -60,11 +67,6 @@ ++ import com.sun.org.apache.xerces.internal.xni.parser.XMLErrorHandler; ++ import com.sun.org.apache.xerces.internal.xni.parser.XMLInputSource; ++ import com.sun.org.apache.xerces.internal.xni.parser.XMLPullParserConfiguration; ++-import java.io.IOException; ++-import java.util.ArrayList; ++-import java.util.HashMap; ++-import java.util.Locale; ++-import javax.xml.XMLConstants; ++ ++ /** ++ * This class is the configuration used to parse XML 1.0 and XML 1.1 documents. ++@@ -259,6 +261,9 @@ ++ protected static final String LOCALE = ++ Constants.XERCES_PROPERTY_PREFIX + Constants.LOCALE_PROPERTY; ++ +++ /** Property identifier: Security manager. */ +++ private static final String SECURITY_MANAGER = Constants.SECURITY_MANAGER; +++ ++ // debugging ++ ++ /** Set to true and recompile to print exception stack trace. */ ++@@ -268,33 +273,33 @@ ++ // Data ++ // ++ ++- protected SymbolTable fSymbolTable; +++ protected SymbolTable fSymbolTable; ++ protected XMLInputSource fInputSource; ++ protected ValidationManager fValidationManager; ++- protected XMLVersionDetector fVersionDetector; +++ protected XMLVersionDetector fVersionDetector; ++ protected XMLLocator fLocator; ++- protected Locale fLocale; +++ protected Locale fLocale; ++ ++- /** XML 1.0 Components. */ ++- protected ArrayList fComponents; +++ /** XML 1.0 Components. */ +++ protected ArrayList fComponents; ++ ++- /** XML 1.1. Components. */ ++- protected ArrayList fXML11Components = null; ++- ++- /** Common components: XMLEntityManager, XMLErrorReporter, XMLSchemaValidator */ ++- protected ArrayList fCommonComponents = null; +++ /** XML 1.1. Components. */ +++ protected ArrayList fXML11Components = null; +++ +++ /** Common components: XMLEntityManager, XMLErrorReporter, XMLSchemaValidator */ +++ protected ArrayList fCommonComponents = null; ++ ++- /** The document handler. */ ++- protected XMLDocumentHandler fDocumentHandler; +++ /** The document handler. */ +++ protected XMLDocumentHandler fDocumentHandler; ++ ++- /** The DTD handler. */ ++- protected XMLDTDHandler fDTDHandler; +++ /** The DTD handler. */ +++ protected XMLDTDHandler fDTDHandler; +++ +++ /** The DTD content model handler. */ +++ protected XMLDTDContentModelHandler fDTDContentModelHandler; ++ ++- /** The DTD content model handler. */ ++- protected XMLDTDContentModelHandler fDTDContentModelHandler; ++- ++- /** Last component in the document pipeline */ ++- protected XMLDocumentSource fLastComponent; +++ /** Last component in the document pipeline */ +++ protected XMLDocumentSource fLastComponent; ++ ++ /** ++ * True if a parse is in progress. This state is needed because ++@@ -510,6 +515,7 @@ ++ SCHEMA_LOCATION, ++ SCHEMA_NONS_LOCATION, ++ LOCALE, +++ SECURITY_MANAGER, ++ }; ++ addRecognizedProperties(recognizedProperties); ++ ++@@ -557,6 +563,8 @@ ++ ++ fVersionDetector = new XMLVersionDetector(); ++ +++ fProperties.put(SECURITY_MANAGER, new XMLSecurityManager(true)); +++ ++ // add message formatters ++ if (fErrorReporter.getMessageFormatter(XMLMessageFormatter.XML_DOMAIN) == null) { ++ XMLMessageFormatter xmft = new XMLMessageFormatter(); ++diff -r 3dc769c632a1 -r 0927621944cc drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/utils/SecuritySupport.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/utils/SecuritySupport.java Tue Oct 29 07:18:24 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/utils/SecuritySupport.java Tue Oct 29 08:01:29 2013 +0000 ++@@ -23,6 +23,7 @@ ++ import java.io.File; ++ import java.io.FileInputStream; ++ import java.io.FileNotFoundException; +++import java.io.IOException; ++ import java.io.InputStream; ++ ++ import java.security.AccessController; ++@@ -31,6 +32,7 @@ ++ import java.security.PrivilegedExceptionAction; ++ import java.util.Locale; ++ import java.util.MissingResourceException; +++import java.util.Properties; ++ import java.util.PropertyResourceBundle; ++ import java.util.ResourceBundle; ++ ++@@ -195,5 +197,55 @@ ++ })).longValue(); ++ } ++ +++ /** +++ * Read from $java.home/lib/jaxp.properties for the specified property +++ * The program +++ * +++ * @param propertyId the Id of the property +++ * @return the value of the property +++ */ +++ static String readJAXPProperty(String propertyId) { +++ String value = null; +++ InputStream is = null; +++ try { +++ if (firstTime) { +++ synchronized (cacheProps) { +++ if (firstTime) { +++ String configFile = getSystemProperty("java.home") + File.separator + +++ "lib" + File.separator + "jaxp.properties"; +++ File f = new File(configFile); +++ if (getFileExists(f)) { +++ is = getFileInputStream(f); +++ cacheProps.load(is); +++ } +++ firstTime = false; +++ } +++ } +++ } +++ value = cacheProps.getProperty(propertyId); +++ +++ } +++ catch (Exception ex) {} +++ finally { +++ if (is != null) { +++ try { +++ is.close(); +++ } catch (IOException ex) {} +++ } +++ } +++ +++ return value; +++ } +++ +++ /** +++ * Cache for properties in java.home/lib/jaxp.properties +++ */ +++ static final Properties cacheProps = new Properties(); +++ +++ /** +++ * Flag indicating if the program has tried reading java.home/lib/jaxp.properties +++ */ +++ static volatile boolean firstTime = true; +++ ++ private SecuritySupport () {} ++ } ++diff -r 3dc769c632a1 -r 0927621944cc drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/utils/XMLLimitAnalyzer.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/utils/XMLLimitAnalyzer.java Tue Oct 29 08:01:29 2013 +0000 ++@@ -0,0 +1,236 @@ +++/* +++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. +++ * +++ * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. +++ * +++ * The contents of this file are subject to the terms of either the GNU +++ * General Public License Version 2 only ("GPL") or the Common Development +++ * and Distribution License("CDDL") (collectively, the "License"). You +++ * may not use this file except in compliance with the License. You can +++ * obtain a copy of the License at +++ * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html +++ * or packager/legal/LICENSE.txt. See the License for the specific +++ * language governing permissions and limitations under the License. +++ * +++ * When distributing the software, include this License Header Notice in each +++ * file and include the License file at packager/legal/LICENSE.txt. +++ * +++ * GPL Classpath Exception: +++ * Oracle designates this particular file as subject to the "Classpath" +++ * exception as provided by Oracle in the GPL Version 2 section of the License +++ * file that accompanied this code. +++ * +++ * Modifications: +++ * If applicable, add the following below the License Header, with the fields +++ * enclosed by brackets [] replaced by your own identifying information: +++ * "Portions Copyright [year] [name of copyright owner]" +++ * +++ * Contributor(s): +++ * If you wish your version of this file to be governed by only the CDDL or +++ * only the GPL Version 2, indicate your decision by adding "[Contributor] +++ * elects to include this software in this distribution under the [CDDL or GPL +++ * Version 2] license." If you don't indicate a single choice of license, a +++ * recipient has the option to distribute your version of this file under +++ * either the CDDL, the GPL Version 2 or to extend the choice of license to +++ * its licensees as provided above. However, if you add GPL Version 2 code +++ * and therefore, elected the GPL Version 2 license, then the option applies +++ * only if the new code is made subject to such option by the copyright +++ * holder. +++ */ +++package com.sun.org.apache.xerces.internal.utils; +++ +++import com.sun.org.apache.xerces.internal.impl.Constants; +++import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager.Limit; +++import java.util.Formatter; +++import java.util.HashMap; +++import java.util.Map; +++ +++/** +++ * A helper for analyzing entity expansion limits +++ * +++ * @author Joe Wang Oracle Corp. +++ * +++ */ +++public final class XMLLimitAnalyzer { +++ +++ /** +++ * Map old property names with the new ones +++ */ +++ public static enum NameMap { +++ ENTITY_EXPANSION_LIMIT(Constants.SP_ENTITY_EXPANSION_LIMIT, Constants.ENTITY_EXPANSION_LIMIT), +++ MAX_OCCUR_NODE_LIMIT(Constants.SP_MAX_OCCUR_LIMIT, Constants.MAX_OCCUR_LIMIT), +++ ELEMENT_ATTRIBUTE_LIMIT(Constants.SP_ELEMENT_ATTRIBUTE_LIMIT, Constants.ELEMENT_ATTRIBUTE_LIMIT); +++ +++ final String newName; +++ final String oldName; +++ +++ NameMap(String newName, String oldName) { +++ this.newName = newName; +++ this.oldName = oldName; +++ } +++ +++ String getOldName(String newName) { +++ if (newName.equals(this.newName)) { +++ return oldName; +++ } +++ return null; +++ } +++ } +++ +++ private XMLSecurityManager securityManager; +++ /** +++ * Max value accumulated for each property +++ */ +++ private final int[] values; +++ /** +++ * Names of the entities corresponding to their max values +++ */ +++ private final String[] names; +++ /** +++ * Total value of accumulated entities +++ */ +++ private final int[] totalValue; +++ +++ /** +++ * Maintain values of the top 10 elements in the process of parsing +++ */ +++ private final Map[] caches; +++ +++ private String entityStart, entityEnd; +++ /** +++ * Default constructor. Establishes default values for known security +++ * vulnerabilities. +++ */ +++ public XMLLimitAnalyzer(XMLSecurityManager securityManager) { +++ this.securityManager = securityManager; +++ values = new int[Limit.values().length]; +++ totalValue = new int[Limit.values().length]; +++ names = new String[Limit.values().length]; +++ caches = new Map[Limit.values().length]; +++ } +++ +++ /** +++ * Add the value to the current max count for the specified property +++ * To find the max value of all entities, set no limit +++ * +++ * @param limit the type of the property +++ * @param entityName the name of the entity +++ * @param value the value of the entity +++ */ +++ public void addValue(Limit limit, String entityName, int value) { +++ addValue(limit.ordinal(), entityName, value); +++ } +++ +++ /** +++ * Add the value to the current count by the index of the property +++ * @param index the index of the property +++ * @param entityName the name of the entity +++ * @param value the value of the entity +++ */ +++ public void addValue(int index, String entityName, int value) { +++ if (index == Limit.ENTITY_EXPANSION_LIMIT.ordinal() || +++ index == Limit.MAX_OCCUR_NODE_LIMIT.ordinal() || +++ index == Limit.ELEMENT_ATTRIBUTE_LIMIT.ordinal()) { +++ totalValue[index] += value; +++ return; +++ } +++ +++ Map cache; +++ if (caches[index] == null) { +++ cache = new HashMap(10); +++ caches[index] = cache; +++ } else { +++ cache = caches[index]; +++ } +++ +++ int accumulatedValue = value; +++ if (cache.containsKey(entityName)) { +++ accumulatedValue += cache.get(entityName).intValue(); +++ cache.put(entityName, Integer.valueOf(accumulatedValue)); +++ } else { +++ cache.put(entityName, Integer.valueOf(value)); +++ } +++ +++ if (accumulatedValue > values[index]) { +++ values[index] = accumulatedValue; +++ names[index] = entityName; +++ } +++ +++ +++ if (index == Limit.GENEAL_ENTITY_SIZE_LIMIT.ordinal() || +++ index == Limit.PARAMETER_ENTITY_SIZE_LIMIT.ordinal()) { +++ totalValue[Limit.TOTAL_ENTITY_SIZE_LIMIT.ordinal()] += value; +++ } +++ } +++ +++ /** +++ * Return the value of the current max count for the specified property +++ * +++ * @param limit the property +++ * @return the value of the property +++ */ +++ public int getValue(Limit limit) { +++ return values[limit.ordinal()]; +++ } +++ +++ public int getValue(int index) { +++ return values[index]; +++ } +++ /** +++ * Return the total value accumulated so far +++ * +++ * @param limit the property +++ * @return the accumulated value of the property +++ */ +++ public int getTotalValue(Limit limit) { +++ return totalValue[limit.ordinal()]; +++ } +++ +++ public int getTotalValue(int index) { +++ return totalValue[index]; +++ } +++ /** +++ * Return the current max value (count or length) by the index of a property +++ * @param index the index of a property +++ * @return count of a property +++ */ +++ public int getValueByIndex(int index) { +++ return values[index]; +++ } +++ +++ public void startEntity(String name) { +++ entityStart = name; +++ } +++ +++ public boolean isTracking(String name) { +++ return entityStart.equals(name); +++ } +++ /** +++ * Stop tracking the entity +++ * @param limit the limit property +++ * @param name the name of an entity +++ */ +++ public void endEntity(Limit limit, String name) { +++ entityStart = ""; +++ Map cache = caches[limit.ordinal()]; +++ if (cache != null) { +++ cache.remove(name); +++ } +++ } +++ +++ public void debugPrint() { +++ Formatter formatter = new Formatter(); +++ System.out.println(formatter.format("%30s %15s %15s %15s %30s", +++ "Property","Limit","Total size","Size","Entity Name")); +++ +++ for (Limit limit : Limit.values()) { +++ formatter = new Formatter(); +++ System.out.println(formatter.format("%30s %15d %15d %15d %30s", +++ limit.name(), +++ securityManager.getLimit(limit), +++ totalValue[limit.ordinal()], +++ values[limit.ordinal()], +++ names[limit.ordinal()])); +++ } +++ } +++} ++diff -r 3dc769c632a1 -r 0927621944cc drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/utils/XMLSecurityManager.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/utils/XMLSecurityManager.java Tue Oct 29 07:18:24 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/utils/XMLSecurityManager.java Tue Oct 29 08:01:29 2013 +0000 ++@@ -40,108 +40,482 @@ ++ */ ++ public static enum State { ++ //this order reflects the overriding order ++- DEFAULT, FSP, JAXPDOTPROPERTIES, SYSTEMPROPERTY, APIPROPERTY +++ +++ DEFAULT("default"), FSP("FEATURE_SECURE_PROCESSING"), +++ JAXPDOTPROPERTIES("jaxp.properties"), SYSTEMPROPERTY("system property"), +++ APIPROPERTY("property"); +++ +++ final String literal; +++ State(String literal) { +++ this.literal = literal; +++ } +++ +++ String literal() { +++ return literal; +++ } ++ } ++ ++ /** ++ * Limits managed by the security manager ++ */ ++ public static enum Limit { ++- ENTITY_EXPANSION_LIMIT(64000), ++- MAX_OCCUR_NODE_LIMIT(5000), ++- ELEMENT_ATTRIBUTE_LIMIT(10000); ++ +++ ENTITY_EXPANSION_LIMIT(Constants.JDK_ENTITY_EXPANSION_LIMIT, Constants.SP_ENTITY_EXPANSION_LIMIT, 0, 64000), +++ MAX_OCCUR_NODE_LIMIT(Constants.JDK_MAX_OCCUR_LIMIT, Constants.SP_MAX_OCCUR_LIMIT, 0, 5000), +++ ELEMENT_ATTRIBUTE_LIMIT(Constants.JDK_ELEMENT_ATTRIBUTE_LIMIT, Constants.SP_ELEMENT_ATTRIBUTE_LIMIT, 0, 10000), +++ TOTAL_ENTITY_SIZE_LIMIT(Constants.JDK_TOTAL_ENTITY_SIZE_LIMIT, Constants.SP_TOTAL_ENTITY_SIZE_LIMIT, 0, 50000000), +++ GENEAL_ENTITY_SIZE_LIMIT(Constants.JDK_GENEAL_ENTITY_SIZE_LIMIT, Constants.SP_GENEAL_ENTITY_SIZE_LIMIT, 0, 0), +++ PARAMETER_ENTITY_SIZE_LIMIT(Constants.JDK_PARAMETER_ENTITY_SIZE_LIMIT, Constants.SP_PARAMETER_ENTITY_SIZE_LIMIT, 0, 1000000); +++ +++ final String apiProperty; +++ final String systemProperty; ++ final int defaultValue; +++ final int secureValue; ++ ++- Limit(int value) { +++ Limit(String apiProperty, String systemProperty, int value, int secureValue) { +++ this.apiProperty = apiProperty; +++ this.systemProperty = systemProperty; ++ this.defaultValue = value; +++ this.secureValue = secureValue; +++ } +++ +++ public boolean equalsAPIPropertyName(String propertyName) { +++ return (propertyName == null) ? false : apiProperty.equals(propertyName); +++ } +++ +++ public boolean equalsSystemPropertyName(String propertyName) { +++ return (propertyName == null) ? false : systemProperty.equals(propertyName); +++ } +++ +++ public String apiProperty() { +++ return apiProperty; +++ } +++ +++ String systemProperty() { +++ return systemProperty; ++ } ++ ++ int defaultValue() { ++ return defaultValue; ++ } +++ +++ int secureValue() { +++ return secureValue; +++ } ++ } ++ ++ /** ++- * Values of the limits as defined in enum Limit +++ * Map old property names with the new ones ++ */ ++- private final int[] limits; +++ public static enum NameMap { +++ +++ ENTITY_EXPANSION_LIMIT(Constants.SP_ENTITY_EXPANSION_LIMIT, Constants.ENTITY_EXPANSION_LIMIT), +++ MAX_OCCUR_NODE_LIMIT(Constants.SP_MAX_OCCUR_LIMIT, Constants.MAX_OCCUR_LIMIT), +++ ELEMENT_ATTRIBUTE_LIMIT(Constants.SP_ELEMENT_ATTRIBUTE_LIMIT, Constants.ELEMENT_ATTRIBUTE_LIMIT); +++ final String newName; +++ final String oldName; +++ +++ NameMap(String newName, String oldName) { +++ this.newName = newName; +++ this.oldName = oldName; +++ } +++ +++ String getOldName(String newName) { +++ if (newName.equals(this.newName)) { +++ return oldName; +++ } +++ return null; +++ } +++ } +++ private static final int NO_LIMIT = 0; ++ /** ++- * States of the settings for each limit in limits above +++ * Values of the properties ++ */ ++- private State[] states = {State.DEFAULT, State.DEFAULT, State.DEFAULT, State.DEFAULT}; +++ private final int[] values; +++ /** +++ * States of the settings for each property +++ */ +++ private State[] states; +++ /** +++ * Flag indicating if secure processing is set +++ */ +++ boolean secureProcessing; +++ +++ /** +++ * States that determine if properties are set explicitly +++ */ +++ private boolean[] isSet; +++ +++ +++ private XMLLimitAnalyzer limitAnalyzer; +++ /** +++ * Index of the special entityCountInfo property +++ */ +++ private int indexEntityCountInfo = 10000; +++ private String printEntityCountInfo = ""; ++ ++ /** ++ * Default constructor. Establishes default values for known security ++ * vulnerabilities. ++ */ ++ public XMLSecurityManager() { ++- limits = new int[Limit.values().length]; +++ this(false); +++ } +++ +++ /** +++ * Instantiate Security Manager in accordance with the status of +++ * secure processing +++ * @param secureProcessing +++ */ +++ public XMLSecurityManager(boolean secureProcessing) { +++ limitAnalyzer = new XMLLimitAnalyzer(this); +++ values = new int[Limit.values().length]; +++ states = new State[Limit.values().length]; +++ isSet = new boolean[Limit.values().length]; +++ this.secureProcessing = secureProcessing; ++ for (Limit limit : Limit.values()) { ++- limits[limit.ordinal()] = limit.defaultValue(); +++ if (secureProcessing) { +++ values[limit.ordinal()] = limit.secureValue; +++ states[limit.ordinal()] = State.FSP; +++ } else { +++ values[limit.ordinal()] = limit.defaultValue(); +++ states[limit.ordinal()] = State.DEFAULT; +++ } ++ } ++ //read system properties or jaxp.properties ++ readSystemProperties(); ++ } ++ ++ /** ++- * Sets the limit for a specific type of XML constructs. This can be either ++- * the size or the number of the constructs. ++- * ++- * @param type the type of limitation ++- * @param state the state of limitation ++- * @param limit the limit to the type +++ * Setting FEATURE_SECURE_PROCESSING explicitly ++ */ ++- public void setLimit(Limit limit, State state, int value) { ++- //only update if it shall override ++- if (state.compareTo(states[limit.ordinal()]) >= 0) { ++- limits[limit.ordinal()] = value; ++- states[limit.ordinal()] = state; +++ public void setSecureProcessing(boolean secure) { +++ secureProcessing = secure; +++ for (Limit limit : Limit.values()) { +++ if (secure) { +++ setLimit(limit.ordinal(), State.FSP, limit.secureValue()); +++ } else { +++ setLimit(limit.ordinal(), State.FSP, limit.defaultValue()); +++ } ++ } ++ } ++ ++ /** ++- * Returns the limit set for the type specified +++ * Return the state of secure processing +++ * @return the state of secure processing +++ */ +++ public boolean isSecureProcessing() { +++ return secureProcessing; +++ } +++ +++ +++ /** +++ * Set limit by property name and state +++ * @param propertyName property name +++ * @param state the state of the property +++ * @param value the value of the property +++ * @return true if the property is managed by the security manager; false +++ * if otherwise. +++ */ +++ public boolean setLimit(String propertyName, State state, Object value) { +++ int index = getIndex(propertyName); +++ if (index > -1) { +++ setLimit(index, state, value); +++ return true; +++ } +++ return false; +++ } +++ +++ /** +++ * Set the value for a specific limit. ++ * ++- * @param limit the type of limitation ++- * @return the limit to the type +++ * @param limit the limit +++ * @param state the state of the property +++ * @param value the value of the property +++ */ +++ public void setLimit(Limit limit, State state, int value) { +++ setLimit(limit.ordinal(), state, value); +++ } +++ +++ /** +++ * Set the value of a property by its index +++ * +++ * @param index the index of the property +++ * @param state the state of the property +++ * @param value the value of the property +++ */ +++ public void setLimit(int index, State state, Object value) { +++ if (index == indexEntityCountInfo) { +++ printEntityCountInfo = (String)value; +++ } else { +++ int temp = 0; +++ try { +++ temp = Integer.parseInt((String) value); +++ if (temp < 0) { +++ temp = 0; +++ } +++ } catch (NumberFormatException e) {} +++ setLimit(index, state, temp); +++ } +++ } +++ +++ /** +++ * Set the value of a property by its index +++ * +++ * @param index the index of the property +++ * @param state the state of the property +++ * @param value the value of the property +++ */ +++ public void setLimit(int index, State state, int value) { +++ if (index == indexEntityCountInfo) { +++ //if it's explicitly set, it's treated as yes no matter the value +++ printEntityCountInfo = Constants.JDK_YES; +++ } else { +++ //only update if it shall override +++ if (state.compareTo(states[index]) >= 0) { +++ values[index] = value; +++ states[index] = state; +++ isSet[index] = true; +++ } +++ } +++ } +++ +++ /** +++ * Return the value of the specified property +++ * +++ * @param propertyName the property name +++ * @return the value of the property as a string. If a property is managed +++ * by this manager, its value shall not be null. +++ */ +++ public String getLimitAsString(String propertyName) { +++ int index = getIndex(propertyName); +++ if (index > -1) { +++ return getLimitValueByIndex(index); +++ } +++ +++ return null; +++ } +++ /** +++ * Return the value of the specified property +++ * +++ * @param limit the property +++ * @return the value of the property ++ */ ++ public int getLimit(Limit limit) { ++- return limits[limit.ordinal()]; +++ return values[limit.ordinal()]; +++ } +++ +++ /** +++ * Return the value of a property by its ordinal +++ * +++ * @param limit the property +++ * @return value of a property +++ */ +++ public String getLimitValueAsString(Limit limit) { +++ return Integer.toString(values[limit.ordinal()]); +++ } +++ +++ /** +++ * Return the value of a property by its ordinal +++ * +++ * @param index the index of a property +++ * @return limit of a property as a string +++ */ +++ public String getLimitValueByIndex(int index) { +++ if (index == indexEntityCountInfo) { +++ return printEntityCountInfo; +++ } +++ +++ return Integer.toString(values[index]); +++ } +++ +++ /** +++ * Return the state of the limit property +++ * +++ * @param limit the limit +++ * @return the state of the limit property +++ */ +++ public State getState(Limit limit) { +++ return states[limit.ordinal()]; +++ } +++ +++ /** +++ * Return the state of the limit property +++ * +++ * @param limit the limit +++ * @return the state of the limit property +++ */ +++ public String getStateLiteral(Limit limit) { +++ return states[limit.ordinal()].literal(); +++ } +++ +++ /** +++ * Get the index by property name +++ * +++ * @param propertyName property name +++ * @return the index of the property if found; return -1 if not +++ */ +++ public int getIndex(String propertyName) { +++ for (Limit limit : Limit.values()) { +++ if (limit.equalsAPIPropertyName(propertyName)) { +++ //internally, ordinal is used as index +++ return limit.ordinal(); +++ } +++ } +++ //special property to return entity count info +++ if (propertyName.equals(Constants.JDK_ENTITY_COUNT_INFO)) { +++ return indexEntityCountInfo; +++ } +++ return -1; +++ } +++ +++ /** +++ * Check if there's no limit defined by the Security Manager +++ * @param limit +++ * @return +++ */ +++ public boolean isNoLimit(int limit) { +++ return limit==NO_LIMIT; +++ } +++ /** +++ * Check if the size (length or count) of the specified limit property is +++ * over the limit +++ * +++ * @param limit the type of the limit property +++ * @param entityName the name of the entity +++ * @param size the size (count or length) of the entity +++ * @return true if the size is over the limit, false otherwise +++ */ +++ public boolean isOverLimit(Limit limit, String entityName, int size) { +++ return isOverLimit(limit.ordinal(), entityName, size); +++ } +++ +++ /** +++ * Check if the value (length or count) of the specified limit property is +++ * over the limit +++ * +++ * @param index the index of the limit property +++ * @param entityName the name of the entity +++ * @param size the size (count or length) of the entity +++ * @return true if the size is over the limit, false otherwise +++ */ +++ public boolean isOverLimit(int index, String entityName, int size) { +++ if (values[index] == NO_LIMIT) { +++ return false; +++ } +++ if (size > values[index]) { +++ limitAnalyzer.addValue(index, entityName, size); +++ return true; +++ } +++ return false; +++ } +++ +++ /** +++ * Check against cumulated value +++ * +++ * @param limit the type of the limit property +++ * @param size the size (count or length) of the entity +++ * @return true if the size is over the limit, false otherwise +++ */ +++ public boolean isOverLimit(Limit limit) { +++ return isOverLimit(limit.ordinal()); +++ } +++ +++ public boolean isOverLimit(int index) { +++ if (values[index] == NO_LIMIT) { +++ return false; +++ } +++ +++ if (index==Limit.ELEMENT_ATTRIBUTE_LIMIT.ordinal() || +++ index==Limit.ENTITY_EXPANSION_LIMIT.ordinal() || +++ index==Limit.TOTAL_ENTITY_SIZE_LIMIT.ordinal()) { +++ return (limitAnalyzer.getTotalValue(index) > values[index]); +++ } else { +++ return (limitAnalyzer.getValue(index) > values[index]); +++ } +++ } +++ +++ public void debugPrint() { +++ if (printEntityCountInfo.equals(Constants.JDK_YES)) { +++ limitAnalyzer.debugPrint(); +++ } +++ } +++ +++ /** +++ * Return the limit analyzer +++ * +++ * @return the limit analyzer +++ */ +++ public XMLLimitAnalyzer getLimitAnalyzer() { +++ return limitAnalyzer; +++ } +++ +++ /** +++ * Set limit analyzer +++ * +++ * @param analyzer a limit analyzer +++ */ +++ public void setLimitAnalyzer(XMLLimitAnalyzer analyzer) { +++ limitAnalyzer = analyzer; +++ } +++ +++ /** +++ * Indicate if a property is set explicitly +++ * @param index +++ * @return +++ */ +++ public boolean isSet(int index) { +++ return isSet[index]; +++ } +++ +++ public boolean printEntityCountInfo() { +++ return printEntityCountInfo.equals(Constants.JDK_YES); ++ } ++ ++ /** ++ * Read from system properties, or those in jaxp.properties ++ */ ++ private void readSystemProperties() { ++- getSystemProperty(Limit.ENTITY_EXPANSION_LIMIT, Constants.ENTITY_EXPANSION_LIMIT); ++- getSystemProperty(Limit.MAX_OCCUR_NODE_LIMIT, Constants.MAX_OCCUR_LIMIT); ++- getSystemProperty(Limit.ELEMENT_ATTRIBUTE_LIMIT, ++- Constants.SYSTEM_PROPERTY_ELEMENT_ATTRIBUTE_LIMIT); +++ +++ for (Limit limit : Limit.values()) { +++ if (!getSystemProperty(limit, limit.systemProperty())) { +++ //if system property is not found, try the older form if any +++ for (NameMap nameMap : NameMap.values()) { +++ String oldName = nameMap.getOldName(limit.systemProperty()); +++ if (oldName != null) { +++ getSystemProperty(limit, oldName); +++ } +++ } +++ } +++ } +++ ++ } ++ ++ /** ++ * Read from system properties, or those in jaxp.properties ++ * ++- * @param limit the type of the property ++- * @param property the property name +++ * @param property the type of the property +++ * @param sysPropertyName the name of system property ++ */ ++- private void getSystemProperty(Limit limit, String property) { +++ private boolean getSystemProperty(Limit limit, String sysPropertyName) { ++ try { ++- String value = SecuritySupport.getSystemProperty(property); +++ String value = SecuritySupport.getSystemProperty(sysPropertyName); ++ if (value != null && !value.equals("")) { ++- limits[limit.ordinal()] = Integer.parseInt(value); +++ values[limit.ordinal()] = Integer.parseInt(value); ++ states[limit.ordinal()] = State.SYSTEMPROPERTY; ++- return; +++ return true; ++ } ++ ++- value = SecuritySupport.readJAXPProperty(property); +++ value = SecuritySupport.readJAXPProperty(sysPropertyName); ++ if (value != null && !value.equals("")) { ++- limits[limit.ordinal()] = Integer.parseInt(value); +++ values[limit.ordinal()] = Integer.parseInt(value); ++ states[limit.ordinal()] = State.JAXPDOTPROPERTIES; +++ return true; ++ } ++ } catch (NumberFormatException e) { ++- //invalid setting ignored +++ //invalid setting +++ throw new NumberFormatException("Invalid setting for system property: " + limit.systemProperty()); ++ } +++ return false; ++ } ++ } ++diff -r 3dc769c632a1 -r 0927621944cc drop_included/jaxp_src/src/com/sun/org/apache/xml/internal/utils/XMLReaderManager.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xml/internal/utils/XMLReaderManager.java Tue Oct 29 07:18:24 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xml/internal/utils/XMLReaderManager.java Tue Oct 29 08:01:29 2013 +0000 ++@@ -22,6 +22,9 @@ ++ */ ++ package com.sun.org.apache.xml.internal.utils; ++ +++import com.sun.org.apache.xalan.internal.XalanConstants; +++import com.sun.org.apache.xalan.internal.utils.XMLSecurityManager; +++ ++ import java.util.HashMap; ++ ++ import javax.xml.XMLConstants; ++@@ -64,6 +67,8 @@ ++ ++ ++ private boolean _secureProcessing; +++ +++ private XMLSecurityManager _xmlSecurityManager; ++ /** ++ * Hidden constructor ++ */ ++@@ -156,6 +161,21 @@ ++ } ++ } ++ +++ try { +++ if (_xmlSecurityManager != null) { +++ for (XMLSecurityManager.Limit limit : XMLSecurityManager.Limit.values()) { +++ reader.setProperty(limit.apiProperty(), +++ _xmlSecurityManager.getLimitValueAsString(limit)); +++ } +++ if (_xmlSecurityManager.printEntityCountInfo()) { +++ reader.setProperty(XalanConstants.JDK_ENTITY_COUNT_INFO, XalanConstants.JDK_YES); +++ } +++ } +++ } catch (SAXException se) { +++ System.err.println("Warning: " + reader.getClass().getName() + ": " +++ + se.getMessage()); +++ } +++ ++ return reader; ++ } ++ ++@@ -168,6 +188,24 @@ ++ } ++ } ++ +++ /** +++ * Get property value +++ */ +++ public Object getProperty(String name) { +++ if (name.equals(XalanConstants.SECURITY_MANAGER)) { +++ return _xmlSecurityManager; +++ } +++ return null; +++ } +++ +++ /** +++ * Set property. +++ */ +++ public void setProperty(String name, Object value) { +++ if (name.equals(XalanConstants.SECURITY_MANAGER)) { +++ _xmlSecurityManager = (XMLSecurityManager)value; +++ } +++ } ++ /** ++ * Mark the cached XMLReader as available. If the reader was not ++ * actually in the cache, do nothing. +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8014534-better_profiling.patch openjdk-6-6b27-1.12.6/patches/openjdk/8014534-better_profiling.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8014534-better_profiling.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8014534-better_profiling.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,156 @@ ++# HG changeset patch ++# User sjiang ++# Date 1374135176 -7200 ++# Thu Jul 18 10:12:56 2013 +0200 ++# Node ID 1e7a5ebc8013b812de73e452e809a3b545dd252f ++# Parent 698fe468e8b9385c2f74709dca823800b32e0b55 ++8014534: Better profiling support ++Summary: Validation of parameters ++Reviewed-by: sspitsyn, skoivu, mchung ++ ++diff -r 698fe468e8b9 -r 1e7a5ebc8013 src/share/classes/com/sun/demo/jvmti/hprof/Tracker.java ++--- openjdk/jdk/src/share/classes/com/sun/demo/jvmti/hprof/Tracker.java Tue Oct 15 17:01:56 2013 +0100 +++++ openjdk/jdk/src/share/classes/com/sun/demo/jvmti/hprof/Tracker.java Thu Jul 18 10:12:56 2013 +0200 ++@@ -53,7 +53,10 @@ ++ ++ public static void ObjectInit(Object obj) ++ { ++- if ( engaged != 0 ) { +++ if ( engaged != 0) { +++ if (obj == null) { +++ throw new IllegalArgumentException("Null object."); +++ } ++ nativeObjectInit(Thread.currentThread(), obj); ++ } ++ } ++@@ -66,7 +69,10 @@ ++ ++ public static void NewArray(Object obj) ++ { ++- if ( engaged != 0 ) { +++ if ( engaged != 0) { +++ if (obj == null) { +++ throw new IllegalArgumentException("Null object."); +++ } ++ nativeNewArray(Thread.currentThread(), obj); ++ } ++ } ++@@ -82,6 +88,14 @@ ++ public static void CallSite(int cnum, int mnum) ++ { ++ if ( engaged != 0 ) { +++ if (cnum < 0) { +++ throw new IllegalArgumentException("Negative class index"); +++ } +++ +++ if (mnum < 0) { +++ throw new IllegalArgumentException("Negative method index"); +++ } +++ ++ nativeCallSite(Thread.currentThread(), cnum, mnum); ++ } ++ } ++@@ -95,6 +109,14 @@ ++ public static void ReturnSite(int cnum, int mnum) ++ { ++ if ( engaged != 0 ) { +++ if (cnum < 0) { +++ throw new IllegalArgumentException("Negative class index"); +++ } +++ +++ if (mnum < 0) { +++ throw new IllegalArgumentException("Negative method index"); +++ } +++ ++ nativeReturnSite(Thread.currentThread(), cnum, mnum); ++ } ++ } ++diff -r 698fe468e8b9 -r 1e7a5ebc8013 src/share/demo/jvmti/hprof/hprof_class.c ++--- openjdk/jdk/src/share/demo/jvmti/hprof/hprof_class.c Tue Oct 15 17:01:56 2013 +0100 +++++ openjdk/jdk/src/share/demo/jvmti/hprof/hprof_class.c Thu Jul 18 10:12:56 2013 +0200 ++@@ -518,7 +518,12 @@ ++ jmethodID method; ++ ++ info = get_info(index); ++- HPROF_ASSERT(mnum < info->method_count); +++ if (mnum >= info->method_count) { +++ jclass newExcCls = (*env)->FindClass(env, "java/lang/IllegalArgumentException"); +++ (*env)->ThrowNew(env, newExcCls, "Illegal mnum"); +++ +++ return NULL; +++ } ++ method = info->method[mnum].method_id; ++ if ( method == NULL ) { ++ char * name; ++@@ -526,7 +531,12 @@ ++ jclass clazz; ++ ++ name = (char *)string_get(info->method[mnum].name_index); ++- HPROF_ASSERT(name!=NULL); +++ if (name==NULL) { +++ jclass newExcCls = (*env)->FindClass(env, "java/lang/IllegalArgumentException"); +++ (*env)->ThrowNew(env, newExcCls, "Name not found"); +++ +++ return NULL; +++ } ++ sig = (char *)string_get(info->method[mnum].sig_index); ++ HPROF_ASSERT(sig!=NULL); ++ clazz = class_get_class(env, index); ++diff -r 698fe468e8b9 -r 1e7a5ebc8013 src/share/demo/jvmti/hprof/hprof_event.c ++--- openjdk/jdk/src/share/demo/jvmti/hprof/hprof_event.c Tue Oct 15 17:01:56 2013 +0100 +++++ openjdk/jdk/src/share/demo/jvmti/hprof/hprof_event.c Thu Jul 18 10:12:56 2013 +0200 ++@@ -186,7 +186,12 @@ ++ ++ HPROF_ASSERT(env!=NULL); ++ HPROF_ASSERT(thread!=NULL); ++- HPROF_ASSERT(cnum!=0 && cnum!=gdata->tracker_cnum); +++ if (cnum == 0 || cnum == gdata->tracker_cnum) { +++ jclass newExcCls = (*env)->FindClass(env, "java/lang/IllegalArgumentException"); +++ (*env)->ThrowNew(env, newExcCls, "Illegal cnum."); +++ +++ return; +++ } ++ ++ /* Prevent recursion into any BCI function for this thread (pstatus). */ ++ if ( tls_get_tracker_status(env, thread, JNI_FALSE, ++@@ -195,8 +200,10 @@ ++ ++ (*pstatus) = 1; ++ method = class_get_methodID(env, cnum, mnum); ++- HPROF_ASSERT(method!=NULL); ++- tls_push_method(tls_index, method); +++ if (method != NULL) { +++ tls_push_method(tls_index, method); +++ } +++ ++ (*pstatus) = 0; ++ } ++ } ++@@ -239,7 +246,13 @@ ++ ++ HPROF_ASSERT(env!=NULL); ++ HPROF_ASSERT(thread!=NULL); ++- HPROF_ASSERT(cnum!=0 && cnum!=gdata->tracker_cnum); +++ +++ if (cnum == 0 || cnum == gdata->tracker_cnum) { +++ jclass newExcCls = (*env)->FindClass(env, "java/lang/IllegalArgumentException"); +++ (*env)->ThrowNew(env, newExcCls, "Illegal cnum."); +++ +++ return; +++ } ++ ++ /* Prevent recursion into any BCI function for this thread (pstatus). */ ++ if ( tls_get_tracker_status(env, thread, JNI_FALSE, ++@@ -248,8 +261,10 @@ ++ ++ (*pstatus) = 1; ++ method = class_get_methodID(env, cnum, mnum); ++- HPROF_ASSERT(method!=NULL); ++- tls_pop_method(tls_index, thread, method); +++ if (method != NULL) { +++ tls_pop_method(tls_index, thread, method); +++ } +++ ++ (*pstatus) = 0; ++ } ++ } +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8014718-remove_logging_suntoolkit.patch openjdk-6-6b27-1.12.6/patches/openjdk/8014718-remove_logging_suntoolkit.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8014718-remove_logging_suntoolkit.patch 2013-07-10 09:13:47.000000000 -0500 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8014718-remove_logging_suntoolkit.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -1,14 +1,16 @@ + # HG changeset patch + # User leonidr +-# Date 1369061494 -14400 +-# Node ID d2a1f8885e65ed180240b4d1c298260dd328340e +-# Parent 529e737ece0c08c9de2aa4f3faa1a5e3887ee51e ++# Date 1382726240 -3600 ++# Fri Oct 25 19:37:20 2013 +0100 ++# Node ID e7ed5dad88eefc49130ae02bcbf329d72f18f12e ++# Parent 47c881c5439a4542b19ab85f376e94fc2c0a5a57 + 8014718: Netbeans IDE begins to throw a lot exceptions since 7u25 b10 + Summary: Removed logging from SunToolkit +-Reviewed-by: art ++Reviewed-by: art, omajid + +---- openjdk/jdk/src/share/classes/java/awt/Toolkit.java +-+++ openjdk/jdk/src/share/classes/java/awt/Toolkit.java ++diff -r 47c881c5439a -r e7ed5dad88ee src/share/classes/java/awt/Toolkit.java ++--- openjdk/jdk/src/share/classes/java/awt/Toolkit.java Wed May 01 00:49:21 2013 +0200 +++++ openjdk/jdk/src/share/classes/java/awt/Toolkit.java Fri Oct 25 19:37:20 2013 +0100 + @@ -48,8 +48,6 @@ + import java.io.FileInputStream; + +@@ -18,7 +20,7 @@ Reviewed-by: art + import java.beans.PropertyChangeListener; + import java.beans.PropertyChangeSupport; + import sun.awt.AppContext; +-@@ -1978,7 +1976,7 @@ ++@@ -1922,7 +1920,7 @@ + */ + public abstract boolean isModalExclusionTypeSupported(Dialog.ModalExclusionType modalExclusionType); + +@@ -27,7 +29,7 @@ Reviewed-by: art + + private static final int LONG_BITS = 64; + private int[] calls = new int[LONG_BITS]; +-@@ -2145,12 +2143,6 @@ ++@@ -2089,12 +2087,6 @@ + } + + synchronized int countAWTEventListeners(long eventMask) { +@@ -40,20 +42,21 @@ Reviewed-by: art + int ci = 0; + for (; eventMask != 0; eventMask >>>= 1, ci++) { + } +---- openjdk/jdk/src/share/classes/sun/awt/SunToolkit.java +-+++ openjdk/jdk/src/share/classes/sun/awt/SunToolkit.java +-@@ -55,7 +55,7 @@ ++diff -r 47c881c5439a -r e7ed5dad88ee src/share/classes/sun/awt/SunToolkit.java ++--- openjdk/jdk/src/share/classes/sun/awt/SunToolkit.java Wed May 01 00:49:21 2013 +0200 +++++ openjdk/jdk/src/share/classes/sun/awt/SunToolkit.java Fri Oct 25 19:37:20 2013 +0100 ++@@ -58,7 +58,7 @@ + implements WindowClosingSupport, WindowClosingListener, +- ComponentFactory, InputMethodSupport, KeyboardFocusManagerPeerProvider { ++ ComponentFactory, InputMethodSupport { + + - private static final Logger log = Logger.getLogger("sun.awt.SunToolkit"); + + // 8014736: logging has been removed from SunToolkit + + /* Load debug settings for native code */ + static { +-@@ -520,10 +520,6 @@ ++@@ -554,10 +554,6 @@ + if (event == null) { +- throw new NullPointerException(); ++ throw new NullPointerException(); + } + - AppContext eventContext = targetToAppContext(event.getSource()); + - if (eventContext != null && !eventContext.equals(appContext)) { +@@ -61,30 +64,30 @@ Reviewed-by: art + - } + PostEventQueue postEventQueue = + (PostEventQueue)appContext.get(POST_EVENT_QUEUE_KEY); +- if (postEventQueue != null) { +-@@ -924,10 +920,6 @@ ++ if(postEventQueue != null) { ++@@ -938,10 +934,6 @@ + //with scale factors x1, x3/4, x2/3, xN, x1/N. + Image im = i.next(); + if (im == null) { + - if (log.isLoggable(Level.FINER)) { + - log.log(Level.FINER, "SunToolkit.getScaledIconImage: " + +-- "Skipping the image passed into Java because it's null."); ++- "Skipping the image passed into Java because it's null."); + - } + continue; + } + if (im instanceof ToolkitImage) { +-@@ -940,10 +932,6 @@ ++@@ -954,10 +946,6 @@ + iw = im.getWidth(null); + ih = im.getHeight(null); + } catch (Exception e){ + - if (log.isLoggable(Level.FINER)) { + - log.log(Level.FINER, "SunToolkit.getScaledIconImage: " + +-- "Perhaps the image passed into Java is broken. Skipping this icon."); ++- "Perhaps the image passed into Java is broken. Skipping this icon."); + - } + continue; + } + if (iw > 0 && ih > 0) { +-@@ -1015,14 +1003,6 @@ ++@@ -1029,14 +1017,6 @@ + try { + int x = (width - bestWidth) / 2; + int y = (height - bestHeight) / 2; +@@ -99,13 +102,13 @@ Reviewed-by: art + g.drawImage(bestImage, x, y, bestWidth, bestHeight, null); + } finally { + g.dispose(); +-@@ -1033,10 +1013,6 @@ ++@@ -1047,10 +1027,6 @@ + public static DataBufferInt getScaledIconData(java.util.List imageList, int width, int height) { + BufferedImage bimage = getScaledIconImage(imageList, width, height); + if (bimage == null) { + - if (log.isLoggable(Level.FINER)) { + - log.log(Level.FINER, "SunToolkit.getScaledIconData: " + +-- "Perhaps the image passed into Java is broken. Skipping this icon."); ++- "Perhaps the image passed into Java is broken. Skipping this icon."); + - } + return null; + } +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8014745-logger_stack_walk_switch.patch openjdk-6-6b27-1.12.6/patches/openjdk/8014745-logger_stack_walk_switch.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8014745-logger_stack_walk_switch.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8014745-logger_stack_walk_switch.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,205 @@ ++# HG changeset patch ++# User mchung ++# Date 1368826191 25200 ++# Fri May 17 14:29:51 2013 -0700 ++# Node ID 0bf55b4c8a7bbea02a9d848b2a5451adbd6a6ac4 ++# Parent 8733761ca20bb4e46405e274c514bda0e0616a21 ++8014745: Provide a switch to allow stack walk search of resource bundle ++Reviewed-by: alanb, jgish ++ ++diff -r 8733761ca20b -r 0bf55b4c8a7b make/java/java/mapfile-vers ++--- openjdk/jdk/make/java/java/mapfile-vers Wed Jun 26 22:50:47 2013 -0500 +++++ openjdk/jdk/make/java/java/mapfile-vers Fri May 17 14:29:51 2013 -0700 ++@@ -271,6 +271,7 @@ ++ Java_sun_reflect_NativeConstructorAccessorImpl_newInstance0; ++ Java_sun_reflect_NativeMethodAccessorImpl_invoke0; ++ Java_sun_reflect_Reflection_getCallerClass; +++ Java_sun_reflect_Reflection_getCallerClass0; ++ Java_sun_reflect_Reflection_getClassAccessFlags; ++ Java_sun_misc_Version_getJdkVersionInfo; ++ Java_sun_misc_Version_getJdkSpecialVersion; ++diff -r 8733761ca20b -r 0bf55b4c8a7b src/share/classes/java/util/logging/Logger.java ++--- openjdk/jdk/src/share/classes/java/util/logging/Logger.java Wed Jun 26 22:50:47 2013 -0500 +++++ openjdk/jdk/src/share/classes/java/util/logging/Logger.java Fri May 17 14:29:51 2013 -0700 ++@@ -303,8 +303,13 @@ ++ // null, we assume it's a system logger and add it to the system context. ++ // These system loggers only set the resource bundle to the given ++ // resource bundle name (rather than the default system resource bundle). ++- private static class SystemLoggerHelper { ++- static boolean disableCallerCheck = getBooleanProperty("sun.util.logging.disableCallerCheck"); +++ private static class LoggerHelper { +++ static boolean disableCallerCheck = +++ getBooleanProperty("sun.util.logging.disableCallerCheck"); +++ +++ // workaround to turn on the old behavior for resource bundle search +++ static boolean allowStackWalkSearch = +++ getBooleanProperty("jdk.logging.allowStackWalkSearch"); ++ private static boolean getBooleanProperty(final String key) { ++ String s = AccessController.doPrivileged(new PrivilegedAction() { ++ public String run() { ++@@ -318,7 +323,7 @@ ++ private static Logger demandLogger(String name, String resourceBundleName, Class caller) { ++ LogManager manager = LogManager.getLogManager(); ++ SecurityManager sm = System.getSecurityManager(); ++- if (sm != null && !SystemLoggerHelper.disableCallerCheck) { +++ if (sm != null && !LoggerHelper.disableCallerCheck) { ++ if (caller.getClassLoader() == null) { ++ return manager.demandSystemLogger(name, resourceBundleName); ++ } ++@@ -1407,25 +1412,61 @@ ++ if (useCallersClassLoader) { ++ // Try with the caller's ClassLoader ++ ClassLoader callersClassLoader = getCallersClassLoader(); +++ if (callersClassLoader != null && callersClassLoader != cl) { +++ try { +++ catalog = ResourceBundle.getBundle(name, currentLocale, +++ callersClassLoader); +++ catalogName = name; +++ catalogLocale = currentLocale; +++ return catalog; +++ } catch (MissingResourceException ex) { +++ } +++ } +++ } ++ ++- if (callersClassLoader == null || callersClassLoader == cl) { ++- return null; ++- } ++- ++- try { ++- catalog = ResourceBundle.getBundle(name, currentLocale, ++- callersClassLoader); ++- catalogName = name; ++- catalogLocale = currentLocale; ++- return catalog; ++- } catch (MissingResourceException ex) { ++- return null; // no luck ++- } +++ // If -Djdk.logging.allowStackWalkSearch=true is set, +++ // does stack walk to search for the resource bundle +++ if (LoggerHelper.allowStackWalkSearch) { +++ return findResourceBundleFromStack(name, currentLocale, cl); ++ } else { ++ return null; ++ } ++ } ++ +++ /** +++ * This method will fail when running with a VM that enforces caller-sensitive +++ * methods and only allows to get the immediate caller. +++ */ +++ @CallerSensitive +++ private synchronized ResourceBundle findResourceBundleFromStack(String name, +++ Locale locale, +++ ClassLoader cl) +++ { +++ for (int ix = 0; ; ix++) { +++ Class clz = sun.reflect.Reflection.getCallerClass(ix); +++ if (clz == null) { +++ break; +++ } +++ ClassLoader cl2 = clz.getClassLoader(); +++ if (cl2 == null) { +++ cl2 = ClassLoader.getSystemClassLoader(); +++ } +++ if (cl == cl2) { +++ // We've already checked this classloader. +++ continue; +++ } +++ cl = cl2; +++ try { +++ catalog = ResourceBundle.getBundle(name, locale, cl); +++ catalogName = name; +++ catalogLocale = locale; +++ return catalog; +++ } catch (MissingResourceException ex) { +++ } +++ } +++ return null; +++ } +++ ++ // Private utility method to initialize our one entry ++ // resource bundle name cache and the callers ClassLoader ++ // Note: for consistency reasons, we are careful to check ++diff -r 8733761ca20b -r 0bf55b4c8a7b src/share/classes/sun/reflect/Reflection.java ++--- openjdk/jdk/src/share/classes/sun/reflect/Reflection.java Wed Jun 26 22:50:47 2013 -0500 +++++ openjdk/jdk/src/share/classes/sun/reflect/Reflection.java Fri May 17 14:29:51 2013 -0700 ++@@ -58,6 +58,21 @@ ++ @CallerSensitive ++ public static native Class getCallerClass(); ++ +++ /** +++ * @deprecated No replacement. This method will be removed in the next +++ * JDK 7 update release. +++ */ +++ @Deprecated +++ @CallerSensitive +++ public static Class getCallerClass(int depth) { +++ return getCallerClass0(depth); +++ } +++ +++ // If the VM enforces getting caller class with @CallerSensitive, +++ // this will fail anyway. +++ @CallerSensitive +++ private static native Class getCallerClass0(int depth); +++ ++ /** Retrieves the access flags written to the class file. For ++ inner classes these flags may differ from those returned by ++ Class.getModifiers(), which searches the InnerClasses ++diff -r 8733761ca20b -r 0bf55b4c8a7b src/share/native/sun/reflect/Reflection.c ++--- openjdk/jdk/src/share/native/sun/reflect/Reflection.c Wed Jun 26 22:50:47 2013 -0500 +++++ openjdk/jdk/src/share/native/sun/reflect/Reflection.c Fri May 17 14:29:51 2013 -0700 ++@@ -34,6 +34,12 @@ ++ return JVM_GetCallerClass(env, 2); ++ } ++ +++JNIEXPORT jclass JNICALL Java_sun_reflect_Reflection_getCallerClass0 +++(JNIEnv *env, jclass unused, jint depth) +++{ +++ return JVM_GetCallerClass(env, depth); +++} +++ ++ JNIEXPORT jint JNICALL Java_sun_reflect_Reflection_getClassAccessFlags ++ (JNIEnv *env, jclass unused, jclass cls) ++ { ++diff -r 8733761ca20b -r 0bf55b4c8a7b test/java/util/logging/bundlesearch/ResourceBundleSearchTest.java ++--- openjdk/jdk/test/java/util/logging/bundlesearch/ResourceBundleSearchTest.java Wed Jun 26 22:50:47 2013 -0500 +++++ openjdk/jdk/test/java/util/logging/bundlesearch/ResourceBundleSearchTest.java Fri May 17 14:29:51 2013 -0700 ++@@ -28,6 +28,7 @@ ++ * @author Jim Gish ++ * @build ResourceBundleSearchTest IndirectlyLoadABundle LoadItUp1 LoadItUp2 TwiceIndirectlyLoadABundle LoadItUp2Invoker ++ * @run main/othervm ResourceBundleSearchTest +++ * @run main/othervm -Djdk.logging.allowStackWalkSearch=true ResourceBundleSearchTest ++ */ ++ import java.net.URL; ++ import java.net.URLClassLoader; ++@@ -79,7 +80,15 @@ ++ ++ // Test 1 - can we find a Logger bundle from doing a stack search? ++ // We shouldn't be able to ++- assertFalse(testGetBundleFromStackSearch(), "1-testGetBundleFromStackSearch"); +++ // unless -Djdk.logging.allowStackWalkSearch=true is set +++ +++ boolean allowStackWalkSearch = Boolean.getBoolean("jdk.logging.allowStackWalkSearch"); +++ if (allowStackWalkSearch) { +++ assertTrue(testGetBundleFromStackSearch(), "1-testGetBundleFromStackSearch"); +++ } else { +++ // default behavior +++ assertFalse(testGetBundleFromStackSearch(), "1-testGetBundleFromStackSearch"); +++ } ++ ++ // Test 2 - can we find a Logger bundle off of the Thread context class ++ // loader? We should be able to. ++@@ -111,8 +120,10 @@ ++ // Test 6 - first call getLogger("myLogger"). ++ // Then call getLogger("myLogger","bundleName") from a different ClassLoader ++ // Make sure we find the bundle ++- assertTrue(testGetBundleFromSecondCallersClassLoader(), ++- "6-testGetBundleFromSecondCallersClassLoader"); +++ if (!allowStackWalkSearch) { +++ assertTrue(testGetBundleFromSecondCallersClassLoader(), +++ "6-testGetBundleFromSecondCallersClassLoader"); +++ } ++ ++ report(); ++ } +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8014987-augment_serialization.patch openjdk-6-6b27-1.12.6/patches/openjdk/8014987-augment_serialization.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8014987-augment_serialization.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8014987-augment_serialization.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,100 @@ ++# HG changeset patch ++# User smarks ++# Date 1381854512 -3600 ++# Tue Oct 15 17:28:32 2013 +0100 ++# Node ID a1bc92467cc07e1cb3c93d0b3b629eda4c45238f ++# Parent 1e7a5ebc8013b812de73e452e809a3b545dd252f ++8014987: Augment serialization handling ++Reviewed-by: alanb, coffeys, skoivu ++ ++diff -r 1e7a5ebc8013 -r a1bc92467cc0 src/share/classes/java/io/ObjectInputStream.java ++--- openjdk/jdk/src/share/classes/java/io/ObjectInputStream.java Thu Jul 18 10:12:56 2013 +0200 +++++ openjdk/jdk/src/share/classes/java/io/ObjectInputStream.java Tue Oct 15 17:28:32 2013 +0100 ++@@ -489,11 +489,12 @@ ++ public void defaultReadObject() ++ throws IOException, ClassNotFoundException ++ { ++- if (curContext == null) { +++ SerialCallbackContext ctx = curContext; +++ if (ctx == null) { ++ throw new NotActiveException("not in call to readObject"); ++ } ++- Object curObj = curContext.getObj(); ++- ObjectStreamClass curDesc = curContext.getDesc(); +++ Object curObj = ctx.getObj(); +++ ObjectStreamClass curDesc = ctx.getDesc(); ++ bin.setBlockDataMode(false); ++ defaultReadFields(curObj, curDesc); ++ bin.setBlockDataMode(true); ++@@ -527,11 +528,12 @@ ++ public ObjectInputStream.GetField readFields() ++ throws IOException, ClassNotFoundException ++ { ++- if (curContext == null) { +++ SerialCallbackContext ctx = curContext; +++ if (ctx == null) { ++ throw new NotActiveException("not in call to readObject"); ++ } ++- Object curObj = curContext.getObj(); ++- ObjectStreamClass curDesc = curContext.getDesc(); +++ Object curObj = ctx.getObj(); +++ ObjectStreamClass curDesc = ctx.getDesc(); ++ bin.setBlockDataMode(false); ++ GetFieldImpl getField = new GetFieldImpl(curDesc); ++ getField.readFields(); ++@@ -1964,7 +1966,6 @@ ++ private void defaultReadFields(Object obj, ObjectStreamClass desc) ++ throws IOException ++ { ++- // REMIND: is isInstance check necessary? ++ Class cl = desc.forClass(); ++ if (cl != null && obj != null && !cl.isInstance(obj)) { ++ throw new ClassCastException(); ++diff -r 1e7a5ebc8013 -r a1bc92467cc0 src/share/classes/java/io/ObjectOutputStream.java ++--- openjdk/jdk/src/share/classes/java/io/ObjectOutputStream.java Thu Jul 18 10:12:56 2013 +0200 +++++ openjdk/jdk/src/share/classes/java/io/ObjectOutputStream.java Tue Oct 15 17:28:32 2013 +0100 ++@@ -430,11 +430,12 @@ ++ * OutputStream ++ */ ++ public void defaultWriteObject() throws IOException { ++- if ( curContext == null ) { +++ SerialCallbackContext ctx = curContext; +++ if (ctx == null) { ++ throw new NotActiveException("not in call to writeObject"); ++ } ++- Object curObj = curContext.getObj(); ++- ObjectStreamClass curDesc = curContext.getDesc(); +++ Object curObj = ctx.getObj(); +++ ObjectStreamClass curDesc = ctx.getDesc(); ++ bout.setBlockDataMode(false); ++ defaultWriteFields(curObj, curDesc); ++ bout.setBlockDataMode(true); ++@@ -452,11 +453,12 @@ ++ */ ++ public ObjectOutputStream.PutField putFields() throws IOException { ++ if (curPut == null) { ++- if (curContext == null) { +++ SerialCallbackContext ctx = curContext; +++ if (ctx == null) { ++ throw new NotActiveException("not in call to writeObject"); ++ } ++- Object curObj = curContext.getObj(); ++- ObjectStreamClass curDesc = curContext.getDesc(); +++ Object curObj = ctx.getObj(); +++ ObjectStreamClass curDesc = ctx.getDesc(); ++ curPut = new PutFieldImpl(curDesc); ++ } ++ return curPut; ++@@ -1516,7 +1518,11 @@ ++ private void defaultWriteFields(Object obj, ObjectStreamClass desc) ++ throws IOException ++ { ++- // REMIND: perform conservative isInstance check here? +++ Class cl = desc.forClass(); +++ if (cl != null && obj != null && !cl.isInstance(obj)) { +++ throw new ClassCastException(); +++ } +++ ++ desc.checkDefaultSerialize(); ++ ++ int primDataSize = desc.getPrimDataSize(); +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8015144-performance_regression.patch openjdk-6-6b27-1.12.6/patches/openjdk/8015144-performance_regression.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8015144-performance_regression.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8015144-performance_regression.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,273 @@ ++# HG changeset patch ++# User prr ++# Date 1383010378 0 ++# Tue Oct 29 01:32:58 2013 +0000 ++# Node ID bac5d0b011562017738501f02f7db4f39522a62e ++# Parent 35c5b3f404aac29ec5cccaeb32106af47546b6db ++8015144: Performance regression in ICU OpenType Layout library ++Reviewed-by: srl, jgodinez ++ ++diff -r 35c5b3f404aa -r bac5d0b01156 src/share/native/sun/font/layout/GlyphIterator.cpp ++--- openjdk/jdk/src/share/native/sun/font/layout/GlyphIterator.cpp Wed Jun 05 18:39:44 2013 +0100 +++++ openjdk/jdk/src/share/native/sun/font/layout/GlyphIterator.cpp Tue Oct 29 01:32:58 2013 +0000 ++@@ -66,6 +66,7 @@ ++ nextLimit = -1; ++ prevLimit = glyphCount; ++ } +++ filterResetCache(); ++ } ++ ++ GlyphIterator::GlyphIterator(GlyphIterator &that) ++@@ -84,6 +85,7 @@ ++ glyphGroup = that.glyphGroup; ++ glyphClassDefinitionTable = that.glyphClassDefinitionTable; ++ markAttachClassDefinitionTable = that.markAttachClassDefinitionTable; +++ filterResetCache(); ++ } ++ ++ GlyphIterator::GlyphIterator(GlyphIterator &that, FeatureMask newFeatureMask) ++@@ -102,6 +104,7 @@ ++ glyphGroup = 0; ++ glyphClassDefinitionTable = that.glyphClassDefinitionTable; ++ markAttachClassDefinitionTable = that.markAttachClassDefinitionTable; +++ filterResetCache(); ++ } ++ ++ GlyphIterator::GlyphIterator(GlyphIterator &that, le_uint16 newLookupFlags) ++@@ -120,6 +123,7 @@ ++ glyphGroup = that.glyphGroup; ++ glyphClassDefinitionTable = that.glyphClassDefinitionTable; ++ markAttachClassDefinitionTable = that.markAttachClassDefinitionTable; +++ filterResetCache(); ++ } ++ ++ GlyphIterator::~GlyphIterator() ++@@ -133,6 +137,7 @@ ++ featureMask = newFeatureMask; ++ glyphGroup = 0; ++ lookupFlags = newLookupFlags; +++ filterResetCache(); ++ } ++ ++ LEGlyphID *GlyphIterator::insertGlyphs(le_int32 count, LEErrorCode& success) ++@@ -381,53 +386,68 @@ ++ glyphPositionAdjustments->setCursiveGlyph(position, baselineIsLogicalEnd()); ++ } ++ ++-le_bool GlyphIterator::filterGlyph(le_uint32 index) const ++-{ ++- LEErrorCode success = LE_NO_ERROR; ++- LEGlyphID glyphID = glyphStorage[index]; ++- le_int32 glyphClass = gcdNoGlyphClass; ++- ++- if (LE_GET_GLYPH(glyphID) >= 0xFFFE) { ++- return TRUE; +++void GlyphIterator::filterResetCache(void) { +++ filterCacheValid = FALSE; ++ } ++ +++le_bool GlyphIterator::filterGlyph(le_uint32 index) +++{ +++ LEGlyphID glyphID = glyphStorage[index]; +++ +++ if (!filterCacheValid || filterCache.id != glyphID) { +++ filterCache.id = glyphID; +++ +++ le_bool &filterResult = filterCache.result; // NB: Making this a reference to accept the updated value, in case +++ // we want more fancy cacheing in the future. +++ if (LE_GET_GLYPH(glyphID) >= 0xFFFE) { +++ filterResult = TRUE; +++ } else { +++ LEErrorCode success = LE_NO_ERROR; +++ le_int32 glyphClass = gcdNoGlyphClass; ++ if (glyphClassDefinitionTable.isValid()) { ++ glyphClass = glyphClassDefinitionTable->getGlyphClass(glyphClassDefinitionTable, glyphID, success); ++ } ++- ++- switch (glyphClass) ++- { +++ switch (glyphClass) { ++ case gcdNoGlyphClass: ++- return FALSE; +++ filterResult = FALSE; +++ break; ++ ++ case gcdSimpleGlyph: ++- return (lookupFlags & lfIgnoreBaseGlyphs) != 0; +++ filterResult = (lookupFlags & lfIgnoreBaseGlyphs) != 0; +++ break; ++ ++ case gcdLigatureGlyph: ++- return (lookupFlags & lfIgnoreLigatures) != 0; +++ filterResult = (lookupFlags & lfIgnoreLigatures) != 0; +++ break; ++ ++ case gcdMarkGlyph: ++- { ++ if ((lookupFlags & lfIgnoreMarks) != 0) { ++- return TRUE; ++- } ++- +++ filterResult = TRUE; +++ } else { ++ le_uint16 markAttachType = (lookupFlags & lfMarkAttachTypeMask) >> lfMarkAttachTypeShift; ++ ++ if ((markAttachType != 0) && (markAttachClassDefinitionTable.isValid())) { ++- return markAttachClassDefinitionTable ++- -> getGlyphClass(markAttachClassDefinitionTable, glyphID, success) != markAttachType; +++ filterResult = (markAttachClassDefinitionTable +++ -> getGlyphClass(markAttachClassDefinitionTable, glyphID, success) != markAttachType); +++ } else { +++ filterResult = FALSE; +++ } +++ } +++ break; +++ +++ case gcdComponentGlyph: +++ filterResult = ((lookupFlags & lfIgnoreBaseGlyphs) != 0); +++ break; +++ +++ default: +++ filterResult = FALSE; +++ break; +++ } +++ } +++ filterCacheValid = TRUE; ++ } ++ ++- return FALSE; ++- } ++- ++- case gcdComponentGlyph: ++- return (lookupFlags & lfIgnoreBaseGlyphs) != 0; ++- ++- default: ++- return FALSE; ++- } +++ return filterCache.result; ++ } ++ ++ le_bool GlyphIterator::hasFeatureTag(le_bool matchGroup) const ++diff -r 35c5b3f404aa -r bac5d0b01156 src/share/native/sun/font/layout/GlyphIterator.h ++--- openjdk/jdk/src/share/native/sun/font/layout/GlyphIterator.h Wed Jun 05 18:39:44 2013 +0100 +++++ openjdk/jdk/src/share/native/sun/font/layout/GlyphIterator.h Tue Oct 29 01:32:58 2013 +0000 ++@@ -98,7 +98,7 @@ ++ le_int32 applyInsertions(); ++ ++ private: ++- le_bool filterGlyph(le_uint32 index) const; +++ le_bool filterGlyph(le_uint32 index); ++ le_bool hasFeatureTag(le_bool matchGroup) const; ++ le_bool nextInternal(le_uint32 delta = 1); ++ le_bool prevInternal(le_uint32 delta = 1); ++@@ -121,6 +121,14 @@ ++ LEReferenceTo markAttachClassDefinitionTable; ++ ++ GlyphIterator &operator=(const GlyphIterator &other); // forbid copying of this class +++ +++ struct { +++ LEGlyphID id; +++ le_bool result; +++ } filterCache; +++ le_bool filterCacheValid; +++ +++ void filterResetCache(void); ++ }; ++ ++ U_NAMESPACE_END ++diff -r 35c5b3f404aa -r bac5d0b01156 src/share/native/sun/font/layout/LETableReference.h ++--- openjdk/jdk/src/share/native/sun/font/layout/LETableReference.h Wed Jun 05 18:39:44 2013 +0100 +++++ openjdk/jdk/src/share/native/sun/font/layout/LETableReference.h Tue Oct 29 01:32:58 2013 +0000 ++@@ -431,7 +431,7 @@ ++ * @param success error status ++ * @param atPtr location of reference - if NULL, will be at offset zero (i.e. downcast of parent). Otherwise must be a pointer within parent's bounds. ++ */ ++- LEReferenceTo(const LETableReference &parent, LEErrorCode &success, const void* atPtr) +++ inline LEReferenceTo(const LETableReference &parent, LEErrorCode &success, const void* atPtr) ++ : LETableReference(parent, parent.ptrToOffset(atPtr, success), LE_UINTPTR_MAX, success) { ++ verifyLength(parent.ptrToOffset(atPtr,success), LETableVarSizer::getSize(), success); ++ if(LE_FAILURE(success)) clear(); ++@@ -439,31 +439,31 @@ ++ /** ++ * ptr plus offset ++ */ ++- LEReferenceTo(const LETableReference &parent, LEErrorCode &success, const void* atPtr, size_t offset) +++ inline LEReferenceTo(const LETableReference &parent, LEErrorCode &success, const void* atPtr, size_t offset) ++ : LETableReference(parent, parent.ptrToOffset(atPtr, success)+offset, LE_UINTPTR_MAX, success) { ++ verifyLength(0, LETableVarSizer::getSize(), success); ++ if(LE_FAILURE(success)) clear(); ++ } ++- LEReferenceTo(const LETableReference &parent, LEErrorCode &success, size_t offset) +++ inline LEReferenceTo(const LETableReference &parent, LEErrorCode &success, size_t offset) ++ : LETableReference(parent, offset, LE_UINTPTR_MAX, success) { ++ verifyLength(0, LETableVarSizer::getSize(), success); ++ if(LE_FAILURE(success)) clear(); ++ } ++- LEReferenceTo(const LETableReference &parent, LEErrorCode &success) +++ inline LEReferenceTo(const LETableReference &parent, LEErrorCode &success) ++ : LETableReference(parent, 0, LE_UINTPTR_MAX, success) { ++ verifyLength(0, LETableVarSizer::getSize(), success); ++ if(LE_FAILURE(success)) clear(); ++ } ++- LEReferenceTo(const LEFontInstance *font, LETag tableTag, LEErrorCode &success) +++ inline LEReferenceTo(const LEFontInstance *font, LETag tableTag, LEErrorCode &success) ++ : LETableReference(font, tableTag, success) { ++ verifyLength(0, LETableVarSizer::getSize(), success); ++ if(LE_FAILURE(success)) clear(); ++ } ++- LEReferenceTo(const le_uint8 *data, size_t length = LE_UINTPTR_MAX) : LETableReference(data, length) {} ++- LEReferenceTo(const T *data, size_t length = LE_UINTPTR_MAX) : LETableReference((const le_uint8*)data, length) {} ++- LEReferenceTo() : LETableReference(NULL) {} +++ inline LEReferenceTo(const le_uint8 *data, size_t length = LE_UINTPTR_MAX) : LETableReference(data, length) {} +++ inline LEReferenceTo(const T *data, size_t length = LE_UINTPTR_MAX) : LETableReference((const le_uint8*)data, length) {} +++ inline LEReferenceTo() : LETableReference(NULL) {} ++ ++- LEReferenceTo& operator=(const T* other) { +++ inline LEReferenceTo& operator=(const T* other) { ++ setRaw(other); ++ return *this; ++ } ++diff -r 35c5b3f404aa -r bac5d0b01156 src/share/native/sun/font/layout/OpenTypeUtilities.cpp ++--- openjdk/jdk/src/share/native/sun/font/layout/OpenTypeUtilities.cpp Wed Jun 05 18:39:44 2013 +0100 +++++ openjdk/jdk/src/share/native/sun/font/layout/OpenTypeUtilities.cpp Tue Oct 29 01:32:58 2013 +0000 ++@@ -79,6 +79,7 @@ ++ ++ Offset OpenTypeUtilities::getTagOffset(LETag tag, const LEReferenceToArrayOf &records, LEErrorCode &success) ++ { +++ const TagAndOffsetRecord *r0 = (const TagAndOffsetRecord*)records.getAlias(); ++ if(LE_FAILURE(success)) return 0; ++ ++ le_uint32 recordCount = records.getCount(); ++@@ -89,17 +90,17 @@ ++ le_int32 index = 0; ++ ++ { ++- const ATag &aTag = records.getAlias(extra,success)->tag; +++ const ATag &aTag = (r0+extra)->tag; ++ if (SWAPT(aTag) <= tag) { ++ index = extra; ++ } ++ } ++ ++- while (probe > (1 << 0) && LE_SUCCESS(success)) { +++ while (probe > (1 << 0)) { ++ probe >>= 1; ++ ++ { ++- const ATag &aTag = records.getAlias(index+probe,success)->tag; +++ const ATag &aTag = (r0+index+probe)->tag; ++ if (SWAPT(aTag) <= tag) { ++ index += probe; ++ } ++@@ -107,9 +108,9 @@ ++ } ++ ++ { ++- const ATag &aTag = records.getAlias(index,success)->tag; +++ const ATag &aTag = (r0+index)->tag; ++ if (SWAPT(aTag) == tag) { ++- return SWAPW(records.getAlias(index,success)->offset); +++ return SWAPW((r0+index)->offset); ++ } ++ } ++ +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8015614-update_build.patch openjdk-6-6b27-1.12.6/patches/openjdk/8015614-update_build.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8015614-update_build.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8015614-update_build.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,60 @@ ++# HG changeset patch ++# User erikj ++# Date 1381419677 -3600 ++# Thu Oct 10 16:41:17 2013 +0100 ++# Node ID 918a90950fa69e5247e3af2599d2e7674d64e3d6 ++# Parent d0b5dc55e72cde11331399cbb960458b8f45ea4a ++8015614: Update build settings ++Reviewed-by: tbell, dholmes, ahgross ++ ++diff -r d0b5dc55e72c -r 918a90950fa6 make/windows/makefiles/compile.make ++--- openjdk/hotspot/make/windows/makefiles/compile.make Tue Sep 17 12:04:11 2013 +0200 +++++ openjdk/hotspot/make/windows/makefiles/compile.make Thu Oct 10 16:41:17 2013 +0100 ++@@ -140,6 +140,7 @@ ++ !if "$(MSC_VER)" == "1600" ++ COMPILER_NAME=VS2010 ++ !endif +++SAFESEH_FLAG = /SAFESEH ++ !endif ++ ++ # By default, we do not want to use the debug version of the msvcrt.dll file ++@@ -170,6 +171,7 @@ ++ PRODUCT_OPT_OPTION = /O2 /Oy- ++ FASTDEBUG_OPT_OPTION = /O2 /Oy- ++ DEBUG_OPT_OPTION = /Od +++SAFESEH_FLAG = /SAFESEH ++ !endif ++ ++ !if "$(COMPILER_NAME)" == "VS2005" ++@@ -186,6 +188,7 @@ ++ # Manifest Tool - used in VS2005 and later to adjust manifests stored ++ # as resources inside build artifacts. ++ MT=mt.exe +++SAFESEH_FLAG = /SAFESEH ++ !endif ++ ++ !if "$(COMPILER_NAME)" == "VS2008" ++@@ -209,8 +212,8 @@ ++ # as resources inside build artifacts. ++ MT=mt.exe ++ !if "$(BUILDARCH)" == "i486" ++-LD_FLAGS = /SAFESEH $(LD_FLAGS) ++-!endif +++LD_FLAGS = $(SAFESEH_FLAG) $(LD_FLAGS) +++SAFESEH_FLAG = /SAFESEH ++ !endif ++ ++ # Compile for space above time. ++diff -r d0b5dc55e72c -r 918a90950fa6 make/windows/makefiles/sa.make ++--- openjdk/hotspot/make/windows/makefiles/sa.make Tue Sep 17 12:04:11 2013 +0200 +++++ openjdk/hotspot/make/windows/makefiles/sa.make Thu Oct 10 16:41:17 2013 +0100 ++@@ -107,6 +107,9 @@ ++ !if "$(ENABLE_FULL_DEBUG_SYMBOLS)" == "1" ++ SA_LFLAGS = $(SA_LFLAGS) /map /debug ++ !endif +++!if "$(BUILDARCH)" == "i486" +++SA_LFLAGS = $(SAFESEH_FLAG) $(SA_LFLAGS) +++!endif ++ ++ # Note that we do not keep sawindbj.obj around as it would then ++ # get included in the dumpbin command in build_vm_def.sh +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8015731-auth_improvements.patch openjdk-6-6b27-1.12.6/patches/openjdk/8015731-auth_improvements.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8015731-auth_improvements.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8015731-auth_improvements.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,28 @@ ++# HG changeset patch ++# User weijun ++# Date 1371090681 -28800 ++# Thu Jun 13 10:31:21 2013 +0800 ++# Node ID e10e9bfb11b073ee1c108e7a51078d3ead7a2d72 ++# Parent a1bc92467cc07e1cb3c93d0b3b629eda4c45238f ++8015731: Subject java.security.auth.subject to improvements ++Reviewed-by: skoivu, mullan ++ ++diff -r a1bc92467cc0 -r e10e9bfb11b0 src/share/classes/javax/security/auth/Subject.java ++--- openjdk/jdk/src/share/classes/javax/security/auth/Subject.java Tue Oct 15 17:28:32 2013 +0100 +++++ openjdk/jdk/src/share/classes/javax/security/auth/Subject.java Thu Jun 13 10:31:21 2013 +0800 ++@@ -1305,8 +1305,14 @@ ++ { ++ ObjectInputStream.GetField fields = ois.readFields(); ++ subject = (Subject) fields.get("this$0", null); ++- elements = (LinkedList) fields.get("elements", null); ++ which = fields.get("which", 0); +++ +++ LinkedList tmp = (LinkedList) fields.get("elements", null); +++ if (tmp.getClass() != LinkedList.class) { +++ elements = new LinkedList(tmp); +++ } else { +++ elements = tmp; +++ } ++ } ++ } ++ +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8015743-address_internet_addresses.patch openjdk-6-6b27-1.12.6/patches/openjdk/8015743-address_internet_addresses.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8015743-address_internet_addresses.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8015743-address_internet_addresses.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,1290 @@ ++# HG changeset patch ++# User michaelm ++# Date 1381868930 -3600 ++# Tue Oct 15 21:28:50 2013 +0100 ++# Node ID 96aee3742c52d2d1a83a3db0be2c14892a511c67 ++# Parent e10e9bfb11b073ee1c108e7a51078d3ead7a2d72 ++8015743: Address internet addresses ++Summary: moved Inet6Address fields to holder class ++Reviewed-by: chegar, alanb, skoivu, khazra ++ ++diff -r e10e9bfb11b0 -r 96aee3742c52 src/share/classes/java/net/Inet6Address.java ++--- openjdk/jdk/src/share/classes/java/net/Inet6Address.java Thu Jun 13 10:31:21 2013 +0800 +++++ openjdk/jdk/src/share/classes/java/net/Inet6Address.java Tue Oct 15 21:28:50 2013 +0100 ++@@ -27,6 +27,8 @@ ++ ++ import java.security.AccessController; ++ import java.io.ObjectInputStream; +++import java.io.ObjectOutputStream; +++import java.io.ObjectStreamField; ++ import java.io.IOException; ++ import java.io.ObjectStreamException; ++ import java.io.InvalidObjectException; ++@@ -174,36 +176,196 @@ ++ */ ++ private transient int cached_scope_id = 0; ++ ++- /** ++- * Holds a 128-bit (16 bytes) IPv6 address. ++- * ++- * @serial ++- */ ++- byte[] ipaddress; +++ private class Inet6AddressHolder { ++ ++- /** ++- * scope_id. The scope specified when the object is created. If the object is created ++- * with an interface name, then the scope_id is not determined until the time it is needed. ++- */ ++- private int scope_id = 0; +++ private Inet6AddressHolder() { +++ ipaddress = new byte[INADDRSZ]; +++ } ++ ++- /** ++- * This will be set to true when the scope_id field contains a valid ++- * integer scope_id. ++- */ ++- private boolean scope_id_set = false; +++ private Inet6AddressHolder( +++ byte[] ipaddress, int scope_id, boolean scope_id_set, +++ NetworkInterface ifname, boolean scope_ifname_set) +++ { +++ this.ipaddress = ipaddress; +++ this.scope_id = scope_id; +++ this.scope_id_set = scope_id_set; +++ this.scope_ifname_set = scope_ifname_set; +++ this.scope_ifname = ifname; +++ } ++ ++- /** ++- * scoped interface. scope_id is derived from this as the scope_id of the first ++- * address whose scope is the same as this address for the named interface. ++- */ ++- private transient NetworkInterface scope_ifname = null; +++ /** +++ * Holds a 128-bit (16 bytes) IPv6 address. +++ */ +++ byte[] ipaddress; ++ ++- /** ++- * set if the object is constructed with a scoped interface instead of a ++- * numeric scope id. ++- */ ++- private boolean scope_ifname_set = false; +++ /** +++ * scope_id. The scope specified when the object is created. If the object is created +++ * with an interface name, then the scope_id is not determined until the time it is needed. +++ */ +++ int scope_id = 0; +++ +++ /** +++ * This will be set to true when the scope_id field contains a valid +++ * integer scope_id. +++ */ +++ boolean scope_id_set = false; +++ +++ /** +++ * scoped interface. scope_id is derived from this as the scope_id of the first +++ * address whose scope is the same as this address for the named interface. +++ */ +++ NetworkInterface scope_ifname = null; +++ +++ /** +++ * set if the object is constructed with a scoped interface instead of a +++ * numeric scope id. +++ */ +++ boolean scope_ifname_set = false; +++ +++ void setAddr(byte addr[]) { +++ if (addr.length == INADDRSZ) { // normal IPv6 address +++ System.arraycopy(addr, 0, ipaddress, 0, INADDRSZ); +++ } +++ } +++ +++ void init(byte addr[], int scope_id) { +++ setAddr(addr); +++ +++ if (scope_id >= 0) { +++ this.scope_id = scope_id; +++ this.scope_id_set = true; +++ } +++ } +++ +++ void init(byte addr[], NetworkInterface nif) +++ throws UnknownHostException +++ { +++ setAddr(addr); +++ +++ if (nif != null) { +++ this.scope_id = deriveNumericScope(ipaddress, nif); +++ this.scope_id_set = true; +++ this.scope_ifname = nif; +++ this.scope_ifname_set = true; +++ } +++ } +++ +++ String getHostAddress() { +++ String s = numericToTextFormat(ipaddress); +++ if (scope_ifname_set) { /* must check this first */ +++ s = s + "%" + scope_ifname.getName(); +++ } else if (scope_id_set) { +++ s = s + "%" + scope_id; +++ } +++ return s; +++ } +++ +++ public boolean equals(Object o) { +++ if (! (o instanceof Inet6AddressHolder)) { +++ return false; +++ } +++ Inet6AddressHolder that = (Inet6AddressHolder)o; +++ +++ for (int i = 0; i < INADDRSZ; i++) { +++ if (this.ipaddress[i] != that.ipaddress[i]) +++ return false; +++ } +++ +++ return true; +++ } +++ +++ public int hashCode() { +++ if (ipaddress != null) { +++ +++ int hash = 0; +++ int i=0; +++ while (i= 0, or -1 to indicate not being set ++ */ ++ Inet6Address(String hostName, byte addr[], int scope_id) { ++- holder().hostName = hostName; ++- if (addr.length == INADDRSZ) { // normal IPv6 address ++- holder().family = IPv6; ++- ipaddress = addr.clone(); ++- } ++- if (scope_id >= 0) { ++- this.scope_id = scope_id; ++- scope_id_set = true; ++- } +++ holder.init(hostName, IPv6); +++ holder6 = new Inet6AddressHolder(); +++ holder6.init(addr, scope_id); ++ } ++ ++ Inet6Address(String hostName, byte addr[]) { +++ holder6 = new Inet6AddressHolder(); ++ try { ++ initif (hostName, addr, null); ++ } catch (UnknownHostException e) {} /* cant happen if ifname is null */ ++ } ++ ++ Inet6Address (String hostName, byte addr[], NetworkInterface nif) throws UnknownHostException { +++ holder6 = new Inet6AddressHolder(); ++ initif (hostName, addr, nif); ++ } ++ ++ Inet6Address (String hostName, byte addr[], String ifname) throws UnknownHostException { +++ holder6 = new Inet6AddressHolder(); ++ initstr (hostName, addr, ifname); ++ } ++ ++@@ -328,17 +486,13 @@ ++ } ++ ++ private void initif(String hostName, byte addr[],NetworkInterface nif) throws UnknownHostException { ++- holder().hostName = hostName; +++ int family = -1; +++ holder6.init(addr, nif); +++ ++ if (addr.length == INADDRSZ) { // normal IPv6 address ++- holder().family = IPv6; ++- ipaddress = addr.clone(); +++ family = IPv6; ++ } ++- if (nif != null) { ++- this.scope_ifname = nif; ++- scope_ifname_set = true; ++- scope_id = deriveNumericScope (nif); ++- scope_id_set = true; ++- } +++ holder.init(hostName, family); ++ } ++ ++ /* check the two Ipv6 addresses and return false if they are both ++@@ -346,18 +500,21 @@ ++ * (ie. one is sitelocal and the other linklocal) ++ * return true otherwise. ++ */ ++- private boolean differentLocalAddressTypes(Inet6Address other) { +++ private static boolean differentLocalAddressTypes( +++ byte[] thisAddr, byte[] otherAddr) { ++ ++- if (isLinkLocalAddress() && !other.isLinkLocalAddress()) { +++ if (Inet6Address.isLinkLocalAddress(thisAddr) && +++ !Inet6Address.isLinkLocalAddress(otherAddr)) { ++ return false; ++ } ++- if (isSiteLocalAddress() && !other.isSiteLocalAddress()) { +++ if (Inet6Address.isSiteLocalAddress(thisAddr) && +++ !Inet6Address.isSiteLocalAddress(otherAddr)) { ++ return false; ++ } ++ return true; ++ } ++ ++- private int deriveNumericScope (NetworkInterface ifc) throws UnknownHostException { +++ private static int deriveNumericScope (byte[] thisAddr, NetworkInterface ifc) throws UnknownHostException { ++ Enumeration addresses = ifc.getInetAddresses(); ++ while (addresses.hasMoreElements()) { ++ InetAddress address = (InetAddress)addresses.nextElement(); ++@@ -366,12 +523,12 @@ ++ } ++ Inet6Address ia6_addr = (Inet6Address)address; ++ /* check if site or link local prefixes match */ ++- if (!differentLocalAddressTypes(ia6_addr)){ +++ if (!differentLocalAddressTypes(thisAddr, ia6_addr.getAddress())){ ++ /* type not the same, so carry on searching */ ++ continue; ++ } ++ /* found a matching address - return its scope_id */ ++- return ia6_addr.scope_id; +++ return ia6_addr.getScopeId(); ++ } ++ throw new UnknownHostException ("no scope_id found"); ++ } ++@@ -386,47 +543,67 @@ ++ while (en.hasMoreElements()) { ++ NetworkInterface ifc = (NetworkInterface)en.nextElement(); ++ if (ifc.getName().equals (ifname)) { ++- Enumeration addresses = ifc.getInetAddresses(); ++- while (addresses.hasMoreElements()) { ++- InetAddress address = (InetAddress)addresses.nextElement(); ++- if (!(address instanceof Inet6Address)) { ++- continue; ++- } ++- Inet6Address ia6_addr = (Inet6Address)address; ++- /* check if site or link local prefixes match */ ++- if (!differentLocalAddressTypes(ia6_addr)){ ++- /* type not the same, so carry on searching */ ++- continue; ++- } ++- /* found a matching address - return its scope_id */ ++- return ia6_addr.scope_id; ++- } +++ return deriveNumericScope(holder6.ipaddress, ifc); ++ } ++ } ++ throw new UnknownHostException ("No matching address found for interface : " +ifname); ++ } ++ ++ /** +++ * @serialField ipaddress byte[] +++ * @serialField scope_id int +++ * @serialField scope_id_set boolean +++ * @serialField scope_ifname_set boolean +++ * @serialField ifname String +++ */ +++ +++ private static final ObjectStreamField[] serialPersistentFields = { +++ new ObjectStreamField("ipaddress", byte[].class), +++ new ObjectStreamField("scope_id", int.class), +++ new ObjectStreamField("scope_id_set", boolean.class), +++ new ObjectStreamField("scope_ifname_set", boolean.class), +++ new ObjectStreamField("ifname", String.class) +++ }; +++ +++ private static final long FIELDS_OFFSET; +++ private static final sun.misc.Unsafe UNSAFE; +++ +++ static { +++ try { +++ sun.misc.Unsafe unsafe = sun.misc.Unsafe.getUnsafe(); +++ FIELDS_OFFSET = unsafe.objectFieldOffset( +++ Inet6Address.class.getDeclaredField("holder6")); +++ UNSAFE = unsafe; +++ } catch (NoSuchFieldException e) { +++ throw new Error(e); +++ } +++ } +++ +++ /** ++ * restore the state of this object from stream ++ * including the scope information, only if the ++ * scoped interface name is valid on this system ++ */ ++ private void readObject(ObjectInputStream s) ++ throws IOException, ClassNotFoundException { ++- scope_ifname = null; ++- scope_ifname_set = false; +++ NetworkInterface scope_ifname = null; ++ ++ if (getClass().getClassLoader() != null) { ++ throw new SecurityException ("invalid address type"); ++ } ++ ++- s.defaultReadObject(); +++ ObjectInputStream.GetField gf = s.readFields(); +++ byte[] ipaddress = (byte[])gf.get("ipaddress", null); +++ int scope_id = (int)gf.get("scope_id", -1); +++ boolean scope_id_set = (boolean)gf.get("scope_id_set", false); +++ boolean scope_ifname_set = (boolean)gf.get("scope_ifname_set", false); +++ String ifname = (String)gf.get("ifname", null); ++ ++ if (ifname != null && !"".equals (ifname)) { ++ try { ++ scope_ifname = NetworkInterface.getByName(ifname); ++ try { ++- scope_id = deriveNumericScope (scope_ifname); +++ scope_id = deriveNumericScope (ipaddress, scope_ifname); ++ } catch (UnknownHostException e) { ++ // should not happen ++ assert false; ++@@ -451,9 +628,37 @@ ++ ipaddress.length); ++ } ++ ++- if (holder().getFamily() != IPv6) { +++ if (holder.getFamily() != IPv6) { ++ throw new InvalidObjectException("invalid address family type"); ++ } +++ +++ Inet6AddressHolder h = new Inet6AddressHolder( +++ ipaddress, scope_id, scope_id_set, scope_ifname, scope_ifname_set +++ ); +++ +++ UNSAFE.putObject(this, FIELDS_OFFSET, h); +++ } +++ +++ /** +++ * default behavior is overridden in order to write the +++ * scope_ifname field as a String, rather than a NetworkInterface +++ * which is not serializable +++ */ +++ private synchronized void writeObject(ObjectOutputStream s) +++ throws IOException +++ { +++ String ifname = null; +++ +++ if (holder6.scope_ifname_set) { +++ ifname = holder6.scope_ifname.getName(); +++ } +++ ObjectOutputStream.PutField pfields = s.putFields(); +++ pfields.put("ipaddress", holder6.ipaddress); +++ pfields.put("scope_id", holder6.scope_id); +++ pfields.put("scope_id_set", holder6.scope_id_set); +++ pfields.put("scope_ifname_set", holder6.scope_ifname_set); +++ pfields.put("ifname", ifname); +++ s.writeFields(); ++ } ++ ++ /** ++@@ -466,7 +671,7 @@ ++ * @since JDK1.1 ++ */ ++ public boolean isMulticastAddress() { ++- return ((ipaddress[0] & 0xff) == 0xff); +++ return holder6.isMulticastAddress(); ++ } ++ ++ /** ++@@ -476,11 +681,7 @@ ++ * @since 1.4 ++ */ ++ public boolean isAnyLocalAddress() { ++- byte test = 0x00; ++- for (int i = 0; i < INADDRSZ; i++) { ++- test |= ipaddress[i]; ++- } ++- return (test == 0x00); +++ return holder6.isAnyLocalAddress(); ++ } ++ ++ /** ++@@ -491,11 +692,7 @@ ++ * @since 1.4 ++ */ ++ public boolean isLoopbackAddress() { ++- byte test = 0x00; ++- for (int i = 0; i < 15; i++) { ++- test |= ipaddress[i]; ++- } ++- return (test == 0x00) && (ipaddress[15] == 0x01); +++ return holder6.isLoopbackAddress(); ++ } ++ ++ /** ++@@ -506,6 +703,11 @@ ++ * @since 1.4 ++ */ ++ public boolean isLinkLocalAddress() { +++ return holder6.isLinkLocalAddress(); +++ } +++ +++ /* static version of above */ +++ static boolean isLinkLocalAddress(byte[] ipaddress) { ++ return ((ipaddress[0] & 0xff) == 0xfe ++ && (ipaddress[1] & 0xc0) == 0x80); ++ } ++@@ -518,6 +720,11 @@ ++ * @since 1.4 ++ */ ++ public boolean isSiteLocalAddress() { +++ return holder6.isSiteLocalAddress(); +++ } +++ +++ /* static version of above */ +++ static boolean isSiteLocalAddress(byte[] ipaddress) { ++ return ((ipaddress[0] & 0xff) == 0xfe ++ && (ipaddress[1] & 0xc0) == 0xc0); ++ } ++@@ -531,8 +738,7 @@ ++ * @since 1.4 ++ */ ++ public boolean isMCGlobal() { ++- return ((ipaddress[0] & 0xff) == 0xff ++- && (ipaddress[1] & 0x0f) == 0x0e); +++ return holder6.isMCGlobal(); ++ } ++ ++ /** ++@@ -544,8 +750,7 @@ ++ * @since 1.4 ++ */ ++ public boolean isMCNodeLocal() { ++- return ((ipaddress[0] & 0xff) == 0xff ++- && (ipaddress[1] & 0x0f) == 0x01); +++ return holder6.isMCNodeLocal(); ++ } ++ ++ /** ++@@ -557,8 +762,7 @@ ++ * @since 1.4 ++ */ ++ public boolean isMCLinkLocal() { ++- return ((ipaddress[0] & 0xff) == 0xff ++- && (ipaddress[1] & 0x0f) == 0x02); +++ return holder6.isMCLinkLocal(); ++ } ++ ++ /** ++@@ -570,8 +774,7 @@ ++ * @since 1.4 ++ */ ++ public boolean isMCSiteLocal() { ++- return ((ipaddress[0] & 0xff) == 0xff ++- && (ipaddress[1] & 0x0f) == 0x05); +++ return holder6.isMCSiteLocal(); ++ } ++ ++ /** ++@@ -584,10 +787,8 @@ ++ * @since 1.4 ++ */ ++ public boolean isMCOrgLocal() { ++- return ((ipaddress[0] & 0xff) == 0xff ++- && (ipaddress[1] & 0x0f) == 0x08); +++ return holder6.isMCOrgLocal(); ++ } ++- ++ /** ++ * Returns the raw IP address of this InetAddress ++ * object. The result is in network byte order: the highest order ++@@ -596,7 +797,7 @@ ++ * @return the raw IP address of this object. ++ */ ++ public byte[] getAddress() { ++- return ipaddress.clone(); +++ return holder6.ipaddress.clone(); ++ } ++ ++ /** ++@@ -607,7 +808,7 @@ ++ * @since 1.5 ++ */ ++ public int getScopeId () { ++- return scope_id; +++ return holder6.scope_id; ++ } ++ ++ /** ++@@ -618,7 +819,7 @@ ++ * @since 1.5 ++ */ ++ public NetworkInterface getScopedInterface () { ++- return scope_ifname; +++ return holder6.scope_ifname; ++ } ++ ++ /** ++@@ -630,13 +831,7 @@ ++ * @return the raw IP address in a string format. ++ */ ++ public String getHostAddress() { ++- String s = numericToTextFormat(ipaddress); ++- if (scope_ifname_set) { /* must check this first */ ++- s = s + "%" + scope_ifname.getName(); ++- } else if (scope_id_set) { ++- s = s + "%" + scope_id; ++- } ++- return s; +++ return holder6.getHostAddress(); ++ } ++ ++ /** ++@@ -645,25 +840,7 @@ ++ * @return a hash code value for this IP address. ++ */ ++ public int hashCode() { ++- if (ipaddress != null) { ++- ++- int hash = 0; ++- int i=0; ++- while (iFindClass(env, "java/net/Inet6Address"); ++ CHECK_NULL(c); ++ ia6_class = (*env)->NewGlobalRef(env, c); ++ CHECK_NULL(ia6_class); ++- ia6_ipaddressID = (*env)->GetFieldID(env, ia6_class, "ipaddress", "[B"); +++ ia6h_class = (*env)->FindClass(env, "java/net/Inet6Address$Inet6AddressHolder"); +++ CHECK_NULL(ia6h_class); +++ ia6_holder6ID = (*env)->GetFieldID(env, ia6_class, "holder6", "Ljava/net/Inet6Address$Inet6AddressHolder;"); +++ CHECK_NULL(ia6_holder6ID); +++ ia6_ipaddressID = (*env)->GetFieldID(env, ia6h_class, "ipaddress", "[B"); ++ CHECK_NULL(ia6_ipaddressID); ++- ia6_scopeidID = (*env)->GetFieldID(env, ia6_class, "scope_id", "I"); +++ ia6_scopeidID = (*env)->GetFieldID(env, ia6h_class, "scope_id", "I"); ++ CHECK_NULL(ia6_scopeidID); ++ ia6_cachedscopeidID = (*env)->GetFieldID(env, ia6_class, "cached_scope_id", "I"); ++ CHECK_NULL(ia6_cachedscopeidID); ++- ia6_scopeidsetID = (*env)->GetFieldID(env, ia6_class, "scope_id_set", "Z"); +++ ia6_scopeidsetID = (*env)->GetFieldID(env, ia6h_class, "scope_id_set", "Z"); ++ CHECK_NULL(ia6_scopeidID); ++- ia6_scopeifnameID = (*env)->GetFieldID(env, ia6_class, "scope_ifname", "Ljava/net/NetworkInterface;"); +++ ia6_scopeifnameID = (*env)->GetFieldID(env, ia6h_class, "scope_ifname", "Ljava/net/NetworkInterface;"); ++ CHECK_NULL(ia6_scopeifnameID); ++- ia6_scopeifnamesetID = (*env)->GetFieldID(env, ia6_class, "scope_ifname_set", "Z"); +++ ia6_scopeifnamesetID = (*env)->GetFieldID(env, ia6h_class, "scope_ifname_set", "Z"); ++ CHECK_NULL(ia6_scopeifnamesetID); ++ ia6_ctrID = (*env)->GetMethodID(env, ia6_class, "", "()V"); ++ CHECK_NULL(ia6_ctrID); ++diff -r e10e9bfb11b0 -r 96aee3742c52 src/share/native/java/net/net_util.c ++--- openjdk/jdk/src/share/native/java/net/net_util.c Thu Jun 13 10:31:21 2013 +0800 +++++ openjdk/jdk/src/share/native/java/net/net_util.c Tue Oct 15 21:28:50 2013 +0100 ++@@ -94,6 +94,111 @@ ++ extern jfieldID iac_addressID; ++ extern jfieldID iac_familyID; ++ +++/** +++ * set_ methods return JNI_TRUE on success JNI_FALSE on error +++ * get_ methods that return +ve int return -1 on error +++ * get_ methods that return objects return NULL on error. +++ */ +++jobject getInet6Address_scopeifname(JNIEnv *env, jobject iaObj) { +++ jobject holder; +++ +++ init(env); +++ holder = (*env)->GetObjectField(env, iaObj, ia6_holder6ID); +++ CHECK_NULL_RETURN(holder, NULL); +++ return (*env)->GetObjectField(env, holder, ia6_scopeifnameID); +++} +++ +++int setInet6Address_scopeifname(JNIEnv *env, jobject iaObj, jobject scopeifname) { +++ jobject holder; +++ +++ init(env); +++ holder = (*env)->GetObjectField(env, iaObj, ia6_holder6ID); +++ CHECK_NULL_RETURN(holder, JNI_FALSE); +++ (*env)->SetObjectField(env, holder, ia6_scopeifnameID, scopeifname); +++ return JNI_TRUE; +++} +++ +++int getInet6Address_scopeifname_set(JNIEnv *env, jobject iaObj) { +++ jobject holder; +++ +++ init(env); +++ holder = (*env)->GetObjectField(env, iaObj, ia6_holder6ID); +++ CHECK_NULL_RETURN(holder, -1); +++ return (*env)->GetBooleanField(env, holder, ia6_scopeifnamesetID); +++} +++ +++int setInet6Address_scopeifname_set(JNIEnv *env, jobject iaObj, int scopeifname_set) { +++ jobject holder; +++ +++ init(env); +++ holder = (*env)->GetObjectField(env, iaObj, ia6_holder6ID); +++ CHECK_NULL_RETURN(holder, JNI_FALSE); +++ (*env)->SetBooleanField(env, holder, ia6_scopeifnamesetID, scopeifname_set); +++ return JNI_TRUE; +++} +++ +++int getInet6Address_scopeid_set(JNIEnv *env, jobject iaObj) { +++ jobject holder; +++ +++ init(env); +++ holder = (*env)->GetObjectField(env, iaObj, ia6_holder6ID); +++ CHECK_NULL_RETURN(holder, -1); +++ return (*env)->GetBooleanField(env, holder, ia6_scopeidsetID); +++} +++ +++int getInet6Address_scopeid(JNIEnv *env, jobject iaObj) { +++ jobject holder; +++ +++ init(env); +++ holder = (*env)->GetObjectField(env, iaObj, ia6_holder6ID); +++ CHECK_NULL_RETURN(holder, -1); +++ return (*env)->GetIntField(env, holder, ia6_scopeidID); +++} +++ +++int setInet6Address_scopeid(JNIEnv *env, jobject iaObj, int scopeid) { +++ jobject holder; +++ +++ init(env); +++ holder = (*env)->GetObjectField(env, iaObj, ia6_holder6ID); +++ CHECK_NULL_RETURN(holder, JNI_FALSE); +++ (*env)->SetIntField(env, holder, ia6_scopeidID, scopeid); +++ if (scopeid > 0) { +++ (*env)->SetBooleanField(env, holder, ia6_scopeidsetID, JNI_TRUE); +++ } +++ return JNI_TRUE; +++} +++ +++ +++int getInet6Address_ipaddress(JNIEnv *env, jobject iaObj, char *dest) { +++ jobject holder, addr; +++ jbyteArray barr; +++ +++ init(env); +++ holder = (*env)->GetObjectField(env, iaObj, ia6_holder6ID); +++ CHECK_NULL_RETURN(holder, JNI_FALSE); +++ addr = (*env)->GetObjectField(env, holder, ia6_ipaddressID); +++ CHECK_NULL_RETURN(addr, JNI_FALSE); +++ (*env)->GetByteArrayRegion(env, addr, 0, 16, (jbyte *)dest); +++ return JNI_TRUE; +++} +++ +++int setInet6Address_ipaddress(JNIEnv *env, jobject iaObj, char *address) { +++ jobject holder; +++ jbyteArray addr; +++ +++ init(env); +++ holder = (*env)->GetObjectField(env, iaObj, ia6_holder6ID); +++ CHECK_NULL_RETURN(holder, JNI_FALSE); +++ addr = (jbyteArray)(*env)->GetObjectField(env, holder, ia6_ipaddressID); +++ if (addr == NULL) { +++ addr = (*env)->NewByteArray(env, 16); +++ CHECK_NULL_RETURN(addr, JNI_FALSE); +++ (*env)->SetObjectField(env, holder, ia6_ipaddressID, addr); +++ } +++ (*env)->SetByteArrayRegion(env, addr, 0, 16, (jbyte *)address); +++ return JNI_TRUE; +++} +++ ++ void setInetAddress_addr(JNIEnv *env, jobject iaObj, int address) { ++ jobject holder; ++ init(env); ++@@ -166,6 +271,7 @@ ++ setInetAddress_family(env, iaObj, IPv4); ++ } else { ++ static jclass inet6Cls = 0; +++ int ret; ++ if (inet6Cls == 0) { ++ jclass c = (*env)->FindClass(env, "java/net/Inet6Address"); ++ CHECK_NULL_RETURN(c, NULL); ++@@ -175,15 +281,10 @@ ++ } ++ iaObj = (*env)->NewObject(env, inet6Cls, ia6_ctrID); ++ CHECK_NULL_RETURN(iaObj, NULL); ++- ipaddress = (*env)->NewByteArray(env, 16); ++- CHECK_NULL_RETURN(ipaddress, NULL); ++- (*env)->SetByteArrayRegion(env, ipaddress, 0, 16, ++- (jbyte *)&(him6->sin6_addr)); ++- ++- (*env)->SetObjectField(env, iaObj, ia6_ipaddressID, ipaddress); ++- +++ ret = setInet6Address_ipaddress(env, iaObj, (char *)&(him6->sin6_addr)); +++ CHECK_NULL_RETURN(ret, NULL); ++ setInetAddress_family(env, iaObj, IPv6); ++- (*env)->SetIntField(env, iaObj, ia6_scopeidID, getScopeID(him)); +++ setInet6Address_scopeid(env, iaObj, getScopeID(him)); ++ } ++ *port = ntohs(him6->sin6_port); ++ } else ++@@ -242,9 +343,8 @@ ++ if (family == AF_INET) { ++ return JNI_FALSE; ++ } ++- ipaddress = (*env)->GetObjectField(env, iaObj, ia6_ipaddressID); ++- scope = (*env)->GetIntField(env, iaObj, ia6_scopeidID); ++- (*env)->GetByteArrayRegion(env, ipaddress, 0, 16, caddrCur); +++ scope = getInet6Address_scopeid(env, iaObj); +++ getInet6Address_ipaddress(env, iaObj, (char *)caddrCur); ++ if (NET_IsEqual(caddrNew, caddrCur) && cmpScopeID(scope, him)) { ++ return JNI_TRUE; ++ } else { ++diff -r e10e9bfb11b0 -r 96aee3742c52 src/share/native/java/net/net_util.h ++--- openjdk/jdk/src/share/native/java/net/net_util.h Thu Jun 13 10:31:21 2013 +0800 +++++ openjdk/jdk/src/share/native/java/net/net_util.h Tue Oct 15 21:28:50 2013 +0100 ++@@ -58,6 +58,22 @@ ++ extern jfieldID iac_hostNameID; ++ extern jfieldID ia_preferIPv6AddressID; ++ +++/** (Inet6Address accessors) +++ * set_ methods return JNI_TRUE on success JNI_FALSE on error +++ * get_ methods that return int/boolean, return -1 on error +++ * get_ methods that return objects return NULL on error. +++ */ +++extern jobject getInet6Address_scopeifname(JNIEnv *env, jobject ia6Obj); +++extern int setInet6Address_scopeifname(JNIEnv *env, jobject ia6Obj, jobject scopeifname); +++extern int getInet6Address_scopeifname_set(JNIEnv *env, jobject ia6Obj); +++extern int setInet6Address_scopeifname_set(JNIEnv *env, jobject ia6Obj, +++ int scopeifname_set); +++extern int getInet6Address_scopeid_set(JNIEnv *env, jobject ia6Obj); +++extern int getInet6Address_scopeid(JNIEnv *env, jobject ia6Obj); +++extern int setInet6Address_scopeid(JNIEnv *env, jobject ia6Obj, int scopeid); +++extern int getInet6Address_ipaddress(JNIEnv *env, jobject ia6Obj, char *dest); +++extern int setInet6Address_ipaddress(JNIEnv *env, jobject ia6Obj, char *address); +++ ++ extern void setInetAddress_addr(JNIEnv *env, jobject iaObj, int address); ++ extern void setInetAddress_family(JNIEnv *env, jobject iaObj, int family); ++ extern void setInetAddress_hostName(JNIEnv *env, jobject iaObj, jobject h); ++@@ -93,6 +109,7 @@ ++ ++ /* Inet6Address fields */ ++ extern jclass ia6_class; +++extern jfieldID ia6_holder6ID; ++ extern jfieldID ia6_ipaddressID; ++ extern jfieldID ia6_scopeidID; ++ extern jfieldID ia6_cachedscopeidID; ++diff -r e10e9bfb11b0 -r 96aee3742c52 src/solaris/native/java/net/Inet6AddressImpl.c ++--- openjdk/jdk/src/solaris/native/java/net/Inet6AddressImpl.c Thu Jun 13 10:31:21 2013 +0800 +++++ openjdk/jdk/src/solaris/native/java/net/Inet6AddressImpl.c Tue Oct 15 21:28:50 2013 +0100 ++@@ -120,7 +120,6 @@ ++ static jclass ni_ia6cls; ++ static jmethodID ni_ia4ctrID; ++ static jmethodID ni_ia6ctrID; ++-static jfieldID ni_ia6ipaddressID; ++ static int initialized = 0; ++ ++ /* ++@@ -158,7 +157,6 @@ ++ ni_ia6cls = (*env)->NewGlobalRef(env, ni_ia6cls); ++ ni_ia4ctrID = (*env)->GetMethodID(env, ni_ia4cls, "", "()V"); ++ ni_ia6ctrID = (*env)->GetMethodID(env, ni_ia6cls, "", "()V"); ++- ni_ia6ipaddressID = (*env)->GetFieldID(env, ni_ia6cls, "ipaddress", "[B"); ++ initialized = 1; ++ } ++ ++@@ -310,6 +308,7 @@ ++ goto cleanupAndReturn; ++ } ++ while (iterator != NULL) { +++ int ret1; ++ if (iterator->ai_family == AF_INET) { ++ jobject iaObj = (*env)->NewObject(env, ni_ia4cls, ni_ia4ctrID); ++ if (IS_NULL(iaObj)) { ++@@ -322,20 +321,17 @@ ++ inetIndex++; ++ } else if (iterator->ai_family == AF_INET6) { ++ jint scope = 0; ++- jbyteArray ipaddress; ++ ++ jobject iaObj = (*env)->NewObject(env, ni_ia6cls, ni_ia6ctrID); ++ if (IS_NULL(iaObj)) { ++ ret = NULL; ++ goto cleanupAndReturn; ++ } ++- ipaddress = (*env)->NewByteArray(env, 16); ++- if (IS_NULL(ipaddress)) { ++- ret = NULL; ++- goto cleanupAndReturn; +++ ret1 = setInet6Address_ipaddress(env, iaObj, (char *)&(((struct sockaddr_in6*)iterator->ai_addr)->sin6_addr)); +++ if (!ret1) { +++ ret = NULL; +++ goto cleanupAndReturn; ++ } ++- (*env)->SetByteArrayRegion(env, ipaddress, 0, 16, ++- (jbyte *)&(((struct sockaddr_in6*)iterator->ai_addr)->sin6_addr)); ++ #ifdef __linux__ ++ if (!kernelIsV22()) { ++ scope = ((struct sockaddr_in6*)iterator->ai_addr)->sin6_scope_id; ++@@ -344,10 +340,8 @@ ++ scope = ((struct sockaddr_in6*)iterator->ai_addr)->sin6_scope_id; ++ #endif ++ if (scope != 0) { /* zero is default value, no need to set */ ++- (*env)->SetIntField(env, iaObj, ia6_scopeidID, scope); ++- (*env)->SetBooleanField(env, iaObj, ia6_scopeidsetID, JNI_TRUE); +++ setInet6Address_scopeid(env, iaObj, scope); ++ } ++- (*env)->SetObjectField(env, iaObj, ni_ia6ipaddressID, ipaddress); ++ setInetAddress_hostName(env, iaObj, name); ++ (*env)->SetObjectArrayElement(env, ret, inet6Index, iaObj); ++ inet6Index++; ++diff -r e10e9bfb11b0 -r 96aee3742c52 src/solaris/native/java/net/NetworkInterface.c ++--- openjdk/jdk/src/solaris/native/java/net/NetworkInterface.c Thu Jun 13 10:31:21 2013 +0800 +++++ openjdk/jdk/src/solaris/native/java/net/NetworkInterface.c Tue Oct 15 21:28:50 2013 +0100 ++@@ -101,7 +101,6 @@ ++ static jmethodID ni_ia4ctrID; ++ static jmethodID ni_ia6ctrID; ++ static jmethodID ni_ibctrID; ++-static jfieldID ni_ia6ipaddressID; ++ static jfieldID ni_ibaddressID; ++ static jfieldID ni_ib4broadcastID; ++ static jfieldID ni_ib4maskID; ++@@ -151,7 +150,6 @@ ++ ni_ia4ctrID = (*env)->GetMethodID(env, ni_ia4cls, "", "()V"); ++ ni_ia6ctrID = (*env)->GetMethodID(env, ni_ia6cls, "", "()V"); ++ ni_ibctrID = (*env)->GetMethodID(env, ni_ibcls, "", "()V"); ++- ni_ia6ipaddressID = (*env)->GetFieldID(env, ni_ia6cls, "ipaddress", "[B"); ++ ni_ibaddressID = (*env)->GetFieldID(env, ni_ibcls, "address", "Ljava/net/InetAddress;"); ++ ni_ib4broadcastID = (*env)->GetFieldID(env, ni_ibcls, "broadcast", "Ljava/net/Inet4Address;"); ++ ni_ib4maskID = (*env)->GetFieldID(env, ni_ibcls, "maskLength", "S"); ++@@ -281,11 +279,9 @@ ++ #ifdef AF_INET6 ++ if (family == AF_INET6) { ++ jbyte *bytes = (jbyte *)&(((struct sockaddr_in6*)addrP->addr)->sin6_addr); ++- jbyteArray ipaddress = (*env)->GetObjectField(env, iaObj, ni_ia6ipaddressID); ++ jbyte caddr[16]; ++ int i; ++- ++- (*env)->GetByteArrayRegion(env, ipaddress, 0, 16, caddr); +++ getInet6Address_ipaddress(env, iaObj, (char *)caddr); ++ i = 0; ++ while (i < 16) { ++ if (caddr[i] != bytes[i]) { ++@@ -468,12 +464,10 @@ ++ int scope=0; ++ iaObj = (*env)->NewObject(env, ni_ia6cls, ni_ia6ctrID); ++ if (iaObj) { ++- jbyteArray ipaddress = (*env)->NewByteArray(env, 16); ++- if (ipaddress == NULL) { +++ int ret = setInet6Address_ipaddress(env, iaObj, (char *)&(((struct sockaddr_in6*)addrP->addr)->sin6_addr)); +++ if (ret == JNI_FALSE) { ++ return NULL; ++ } ++- (*env)->SetByteArrayRegion(env, ipaddress, 0, 16, ++- (jbyte *)&(((struct sockaddr_in6*)addrP->addr)->sin6_addr)); ++ #ifdef __linux__ ++ if (!kernelIsV22()) { ++ scope = ((struct sockaddr_in6*)addrP->addr)->sin6_scope_id; ++@@ -482,11 +476,9 @@ ++ scope = ((struct sockaddr_in6*)addrP->addr)->sin6_scope_id; ++ #endif ++ if (scope != 0) { /* zero is default value, no need to set */ ++- (*env)->SetIntField(env, iaObj, ia6_scopeidID, scope); ++- (*env)->SetBooleanField(env, iaObj, ia6_scopeidsetID, JNI_TRUE); ++- (*env)->SetObjectField(env, iaObj, ia6_scopeifnameID, netifObj); +++ setInet6Address_scopeid(env, iaObj, scope); +++ setInet6Address_scopeifname(env, iaObj, netifObj); ++ } ++- (*env)->SetObjectField(env, iaObj, ni_ia6ipaddressID, ipaddress); ++ } ++ ibObj = (*env)->NewObject(env, ni_ibcls, ni_ibctrID); ++ if (ibObj) { ++diff -r e10e9bfb11b0 -r 96aee3742c52 src/solaris/native/java/net/PlainDatagramSocketImpl.c ++--- openjdk/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c Thu Jun 13 10:31:21 2013 +0800 +++++ openjdk/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c Tue Oct 15 21:28:50 2013 +0100 ++@@ -2311,8 +2311,7 @@ ++ caddr[14] = ((address >> 8) & 0xff); ++ caddr[15] = (address & 0xff); ++ } else { ++- ipaddress = (*env)->GetObjectField(env, iaObj, ia6_ipaddressID); ++- (*env)->GetByteArrayRegion(env, ipaddress, 0, 16, caddr); +++ getInet6Address_ipaddress(env, iaObj, caddr); ++ } ++ ++ memcpy((void *)&(mname6.ipv6mr_multiaddr), caddr, sizeof(struct in6_addr)); ++diff -r e10e9bfb11b0 -r 96aee3742c52 src/solaris/native/java/net/net_util_md.c ++--- openjdk/jdk/src/solaris/native/java/net/net_util_md.c Thu Jun 13 10:31:21 2013 +0800 +++++ openjdk/jdk/src/solaris/native/java/net/net_util_md.c Tue Oct 15 21:28:50 2013 +0100 ++@@ -680,7 +680,6 @@ ++ /* needs work. 1. family 2. clean up him6 etc deallocate memory */ ++ if (ipv6_available() && !(family == IPv4 && v4MappedAddress == JNI_FALSE)) { ++ struct sockaddr_in6 *him6 = (struct sockaddr_in6 *)him; ++- jbyteArray ipaddress; ++ jbyte caddr[16]; ++ jint address; ++ ++@@ -701,8 +700,7 @@ ++ caddr[15] = (address & 0xff); ++ } ++ } else { ++- ipaddress = (*env)->GetObjectField(env, iaObj, ia6_ipaddressID); ++- (*env)->GetByteArrayRegion(env, ipaddress, 0, 16, caddr); +++ getInet6Address_ipaddress(env, iaObj, (char *)caddr); ++ } ++ memset((char *)him6, 0, sizeof(struct sockaddr_in6)); ++ him6->sin6_port = htons(port); ++@@ -734,7 +732,7 @@ ++ */ ++ if (!cached_scope_id) { ++ if (ia6_scopeidID) { ++- scope_id = (int)(*env)->GetIntField(env,iaObj,ia6_scopeidID); +++ scope_id = getInet6Address_scopeid(env, iaObj); ++ } ++ if (scope_id != 0) { ++ /* check user-specified value for loopback case ++@@ -780,7 +778,7 @@ ++ ++ if (family != IPv4) { ++ if (ia6_scopeidID) { ++- him6->sin6_scope_id = (int)(*env)->GetIntField(env, iaObj, ia6_scopeidID); +++ him6->sin6_scope_id = getInet6Address_scopeid(env, iaObj); ++ } ++ } ++ #endif ++diff -r e10e9bfb11b0 -r 96aee3742c52 src/windows/native/java/net/Inet6AddressImpl.c ++--- openjdk/jdk/src/windows/native/java/net/Inet6AddressImpl.c Thu Jun 13 10:31:21 2013 +0800 +++++ openjdk/jdk/src/windows/native/java/net/Inet6AddressImpl.c Tue Oct 15 21:28:50 2013 +0100 ++@@ -76,7 +76,6 @@ ++ static jclass ni_ia6cls; ++ static jmethodID ni_ia4ctrID; ++ static jmethodID ni_ia6ctrID; ++-static jfieldID ni_ia6ipaddressID; ++ static int initialized = 0; ++ ++ JNIEXPORT jobjectArray JNICALL ++@@ -100,7 +99,6 @@ ++ ni_ia6cls = (*env)->NewGlobalRef(env, ni_ia6cls); ++ ni_ia4ctrID = (*env)->GetMethodID(env, ni_ia4cls, "", "()V"); ++ ni_ia6ctrID = (*env)->GetMethodID(env, ni_ia6cls, "", "()V"); ++- ni_ia6ipaddressID = (*env)->GetFieldID(env, ni_ia6cls, "ipaddress", "[B"); ++ initialized = 1; ++ } ++ if (IS_NULL(host)) { ++@@ -249,26 +247,22 @@ ++ (*env)->SetObjectArrayElement(env, ret, inetIndex, iaObj); ++ inetIndex ++; ++ } else if (iterator->ai_family == AF_INET6) { ++- jint scope = 0; ++- jbyteArray ipaddress; +++ jint scope = 0, ret1; ++ jobject iaObj = (*env)->NewObject(env, ni_ia6cls, ni_ia6ctrID); ++ if (IS_NULL(iaObj)) { ++ ret = NULL; ++ goto cleanupAndReturn; ++ } ++- ipaddress = (*env)->NewByteArray(env, 16); ++- if (IS_NULL(ipaddress)) { +++ ret1 = setInet6Address_ipaddress(env, iaObj, (jbyte *)&(((struct sockaddr_in6*)iterator->ai_addr)->sin6_addr)); +++ +++ if (ret1 == JNI_FALSE) { ++ ret = NULL; ++ goto cleanupAndReturn; ++ } ++- (*env)->SetByteArrayRegion(env, ipaddress, 0, 16, ++- (jbyte *)&(((struct sockaddr_in6*)iterator->ai_addr)->sin6_addr)); ++ scope = ((struct sockaddr_in6*)iterator->ai_addr)->sin6_scope_id; ++ if (scope != 0) { /* zero is default value, no need to set */ ++- (*env)->SetIntField(env, iaObj, ia6_scopeidID, scope); ++- (*env)->SetBooleanField(env, iaObj, ia6_scopeidsetID, JNI_TRUE); +++ setInet6Address_scopeid(env, iaObj, scope); ++ } ++- (*env)->SetObjectField(env, iaObj, ni_ia6ipaddressID, ipaddress); ++ setInetAddress_hostName(env, iaObj, name); ++ (*env)->SetObjectArrayElement(env, ret, inet6Index, iaObj); ++ inet6Index ++; ++diff -r e10e9bfb11b0 -r 96aee3742c52 src/windows/native/java/net/NetworkInterface.c ++--- openjdk/jdk/src/windows/native/java/net/NetworkInterface.c Thu Jun 13 10:31:21 2013 +0800 +++++ openjdk/jdk/src/windows/native/java/net/NetworkInterface.c Tue Oct 15 21:28:50 2013 +0100 ++@@ -103,8 +103,6 @@ ++ ++ jclass ni_ia6cls; /* Inet6Address */ ++ jmethodID ni_ia6ctrID; /* Inet6Address() */ ++-jfieldID ni_ia6ipaddressID; ++-jfieldID ni_ia6ipaddressID; ++ ++ jclass ni_ibcls; /* InterfaceAddress */ ++ jmethodID ni_ibctrID; /* InterfaceAddress() */ ++@@ -565,7 +563,6 @@ ++ ni_ia6cls = (*env)->FindClass(env, "java/net/Inet6Address"); ++ ni_ia6cls = (*env)->NewGlobalRef(env, ni_ia6cls); ++ ni_ia6ctrID = (*env)->GetMethodID(env, ni_ia6cls, "", "()V"); ++- ni_ia6ipaddressID = (*env)->GetFieldID(env, ni_ia6cls, "ipaddress", "[B"); ++ ++ ni_ibcls = (*env)->FindClass(env, "java/net/InterfaceAddress"); ++ ni_ibcls = (*env)->NewGlobalRef(env, ni_ibcls); ++@@ -665,19 +662,16 @@ ++ int scope; ++ iaObj = (*env)->NewObject(env, ni_ia6cls, ni_ia6ctrID); ++ if (iaObj) { ++- jbyteArray ipaddress = (*env)->NewByteArray(env, 16); ++- if (ipaddress == NULL) { +++ int ret = setInet6Address_ipaddress(env, iaObj, (jbyte *)&(addrs->addr.him6.sin6_addr.s6_addr)); +++ if (ret == JNI_FALSE) { ++ return NULL; ++ } ++- (*env)->SetByteArrayRegion(env, ipaddress, 0, 16, ++- (jbyte *)&(addrs->addr.him6.sin6_addr.s6_addr)); +++ ++ scope = addrs->addr.him6.sin6_scope_id; ++ if (scope != 0) { /* zero is default value, no need to set */ ++- (*env)->SetIntField(env, iaObj, ia6_scopeidID, scope); ++- (*env)->SetBooleanField(env, iaObj, ia6_scopeidsetID, JNI_TRUE); ++- (*env)->SetObjectField(env, iaObj, ia6_scopeifnameID, netifObj); +++ setInet6Address_scopeid(env, iaObj, scope); +++ setInet6Address_scopeifname(env, iaObj, netifObj); ++ } ++- (*env)->SetObjectField(env, iaObj, ni_ia6ipaddressID, ipaddress); ++ ibObj = (*env)->NewObject(env, ni_ibcls, ni_ibctrID); ++ if (ibObj == NULL) { ++ free_netaddr(netaddrP); ++diff -r e10e9bfb11b0 -r 96aee3742c52 src/windows/native/java/net/NetworkInterface_winXP.c ++--- openjdk/jdk/src/windows/native/java/net/NetworkInterface_winXP.c Thu Jun 13 10:31:21 2013 +0800 +++++ openjdk/jdk/src/windows/native/java/net/NetworkInterface_winXP.c Tue Oct 15 21:28:50 2013 +0100 ++@@ -490,19 +490,15 @@ ++ int scope; ++ iaObj = (*env)->NewObject(env, ni_ia6cls, ni_ia6ctrID); ++ if (iaObj) { ++- jbyteArray ipaddress = (*env)->NewByteArray(env, 16); ++- if (ipaddress == NULL) { +++ int ret = setInet6Address_ipaddress(env, iaObj, (jbyte *)&(addrs->addr.him6.sin6_addr.s6_addr)); +++ if (ret == JNI_FALSE) { ++ return NULL; ++ } ++- (*env)->SetByteArrayRegion(env, ipaddress, 0, 16, ++- (jbyte *)&(addrs->addr.him6.sin6_addr.s6_addr)); ++ scope = addrs->addr.him6.sin6_scope_id; ++ if (scope != 0) { /* zero is default value, no need to set */ ++- (*env)->SetIntField(env, iaObj, ia6_scopeidID, scope); ++- (*env)->SetBooleanField(env, iaObj, ia6_scopeidsetID, JNI_TRUE); ++- (*env)->SetObjectField(env, iaObj, ia6_scopeifnameID, netifObj); +++ setInet6Address_scopeid(env, iaObj, scope); +++ setInet6Address_scopeifname(env, iaObj, netifObj); ++ } ++- (*env)->SetObjectField(env, iaObj, ni_ia6ipaddressID, ipaddress); ++ ibObj = (*env)->NewObject(env, ni_ibcls, ni_ibctrID); ++ if (ibObj == NULL) { ++ free_netaddr(netaddrP); ++diff -r e10e9bfb11b0 -r 96aee3742c52 src/windows/native/java/net/TwoStacksPlainSocketImpl.c ++--- openjdk/jdk/src/windows/native/java/net/TwoStacksPlainSocketImpl.c Thu Jun 13 10:31:21 2013 +0800 +++++ openjdk/jdk/src/windows/native/java/net/TwoStacksPlainSocketImpl.c Tue Oct 15 21:28:50 2013 +0100 ++@@ -726,7 +726,6 @@ ++ setInetAddress_family(env, socketAddressObj, IPv4); ++ (*env)->SetObjectField(env, socket, psi_addressID, socketAddressObj); ++ } else { ++- jbyteArray addr; ++ /* AF_INET6 -> Inet6Address */ ++ if (inet6Cls == 0) { ++ jclass c = (*env)->FindClass(env, "java/net/Inet6Address"); ++@@ -749,10 +748,10 @@ ++ NET_SocketClose(fd); ++ return; ++ } ++- addr = (*env)->GetObjectField (env, socketAddressObj, ia6_ipaddressID); ++- (*env)->SetByteArrayRegion (env, addr, 0, 16, (const char *)&him.him6.sin6_addr); +++ setInet6Address_ipaddress(env, socketAddressObj, (const char *)&him.him6.sin6_addr); +++ ++ setInetAddress_family(env, socketAddressObj, IPv6); ++- (*env)->SetIntField(env, socketAddressObj, ia6_scopeidID, him.him6.sin6_scope_id); +++ setInet6Address_scopeid(env, socketAddressObj, him.him6.sin6_scope_id); ++ } ++ /* fields common to AF_INET and AF_INET6 */ ++ +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8015965-typo_in_property_name.patch openjdk-6-6b27-1.12.6/patches/openjdk/8015965-typo_in_property_name.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8015965-typo_in_property_name.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8015965-typo_in_property_name.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,42 @@ ++# HG changeset patch ++# User coffeys ++# Date 1370453984 -3600 ++# Wed Jun 05 18:39:44 2013 +0100 ++# Node ID 35c5b3f404aac29ec5cccaeb32106af47546b6db ++# Parent 20c88fd14959c6a4df2e0f36bd759b56efa6f2cb ++8015965: (process) Typo in name of property to allow ambiguous commands ++Reviewed-by: alanb ++ ++diff -r 20c88fd14959 -r 35c5b3f404aa src/windows/classes/java/lang/ProcessImpl.java ++--- openjdk/jdk/src/windows/classes/java/lang/ProcessImpl.java Tue Oct 29 01:07:01 2013 +0000 +++++ openjdk/jdk/src/windows/classes/java/lang/ProcessImpl.java Wed Jun 05 18:39:44 2013 +0100 ++@@ -218,13 +218,13 @@ ++ { ++ String cmdstr; ++ SecurityManager security = System.getSecurityManager(); ++- boolean allowAmbigousCommands = false; +++ boolean allowAmbiguousCommands = false; ++ if (security == null) { ++- String value = System.getProperty("jdk.lang.Process.allowAmbigousCommands"); +++ String value = System.getProperty("jdk.lang.Process.allowAmbiguousCommands"); ++ if (value != null) ++- allowAmbigousCommands = !"false".equalsIgnoreCase(value); +++ allowAmbiguousCommands = !"false".equalsIgnoreCase(value); ++ } ++- if (allowAmbigousCommands) { +++ if (allowAmbiguousCommands) { ++ // Legacy mode. ++ ++ // Normalize path if possible. ++diff -r 20c88fd14959 -r 35c5b3f404aa test/java/lang/Runtime/exec/ExecCommand.java ++--- openjdk/jdk/test/java/lang/Runtime/exec/ExecCommand.java Tue Oct 29 01:07:01 2013 +0000 +++++ openjdk/jdk/test/java/lang/Runtime/exec/ExecCommand.java Wed Jun 05 18:39:44 2013 +0100 ++@@ -129,7 +129,7 @@ ++ for (int k = 0; k < 3; ++k) { ++ switch (k) { ++ case 1: ++- System.setProperty("jdk.lang.Process.allowAmbigousCommands", ""); +++ System.setProperty("jdk.lang.Process.allowAmbiguousCommands", ""); ++ break; ++ case 2: ++ System.setSecurityManager( new SecurityMan() ); +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8015978-incorrect_transformation.patch openjdk-6-6b27-1.12.6/patches/openjdk/8015978-incorrect_transformation.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8015978-incorrect_transformation.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8015978-incorrect_transformation.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,22 @@ ++# HG changeset patch ++# User aefimov ++# Date 1383034304 0 ++# Tue Oct 29 08:11:44 2013 +0000 ++# Node ID efb24af909a020f3a3b3d446f6db15fc8b1c309a ++# Parent 20ffb814205c67b5ded678ee6c69b2aa0d6cebb1 ++8015978: Incorrect transformation of XPath expression "string(-0)" ++Reviewed-by: darcy, joehw ++ ++diff -r 20ffb814205c -r efb24af909a0 drop_included/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/runtime/BasisLibrary.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/runtime/BasisLibrary.java Tue Oct 29 08:10:15 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/runtime/BasisLibrary.java Tue Oct 29 08:11:44 2013 +0000 ++@@ -950,6 +950,9 @@ ++ if (Double.isNaN(d) || Double.isInfinite(d)) ++ return(Double.toString(d)); ++ +++ //Convert -0.0 to +0.0 other values remains the same +++ d = d + 0.0; +++ ++ // Use the XPath formatter to ignore locales ++ StringBuffer result = threadLocalStringBuffer.get(); ++ result.setLength(0); +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8016256-finalization_final.patch openjdk-6-6b27-1.12.6/patches/openjdk/8016256-finalization_final.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8016256-finalization_final.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8016256-finalization_final.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,24 @@ ++# HG changeset patch ++# User sgabdura ++# Date 1373869363 -14400 ++# Mon Jul 15 10:22:43 2013 +0400 ++# Node ID bbd051c9089f61c65fe7d95487d47920164c7ee0 ++# Parent 918a90950fa69e5247e3af2599d2e7674d64e3d6 ++8016256: Make finalization final ++Reviewed-by: hseigel ++ ++diff -r 918a90950fa6 -r bbd051c9089f src/share/vm/classfile/classFileParser.cpp ++--- openjdk/hotspot/src/share/vm/classfile/classFileParser.cpp Thu Oct 10 16:41:17 2013 +0100 +++++ openjdk/hotspot/src/share/vm/classfile/classFileParser.cpp Mon Jul 15 10:22:43 2013 +0400 ++@@ -3762,9 +3762,8 @@ ++ for (int index = 0; index < num_methods; index++) { ++ methodOop m = (methodOop)methods->obj_at(index); ++ ++- // skip private, static and methods ++- if ((!m->is_private()) && ++- (!m->is_static()) && +++ // skip static and methods +++ if ((!m->is_static()) && ++ (m->name() != vmSymbols::object_initializer_name())) { ++ ++ Symbol* name = m->name(); +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8016357-update_hs_diagnostic_class.patch openjdk-6-6b27-1.12.6/patches/openjdk/8016357-update_hs_diagnostic_class.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8016357-update_hs_diagnostic_class.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8016357-update_hs_diagnostic_class.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,71 @@ ++# HG changeset patch ++# User sgabdura ++# Date 1381896654 -3600 ++# Wed Oct 16 05:10:54 2013 +0100 ++# Node ID 1ed7c9cea8c508e60d6df30c046ab48b1f1d3ab9 ++# Parent 96aee3742c52d2d1a83a3db0be2c14892a511c67 ++8016357: Update hotspot diagnostic class ++Summary: Add security check to HotSpotDiagnostic.dumpHeap ++Reviewed-by: fparain, sla, ahgross ++ ++diff -r 96aee3742c52 -r 1ed7c9cea8c5 make/java/management/mapfile-vers ++--- openjdk/jdk/make/java/management/mapfile-vers Tue Oct 15 21:28:50 2013 +0100 +++++ openjdk/jdk/make/java/management/mapfile-vers Wed Oct 16 05:10:54 2013 +0100 ++@@ -50,7 +50,7 @@ ++ Java_sun_management_GcInfoBuilder_fillGcAttributeInfo; ++ Java_sun_management_GcInfoBuilder_getLastGcInfo0; ++ Java_sun_management_GcInfoBuilder_getNumGcExtAttributes; ++- Java_sun_management_HotSpotDiagnostic_dumpHeap; +++ Java_sun_management_HotSpotDiagnostic_dumpHeap0; ++ Java_sun_management_HotspotThread_getInternalThreadCount; ++ Java_sun_management_HotspotThread_getInternalThreadTimes0; ++ Java_sun_management_MemoryImpl_getMemoryManagers0; ++diff -r 96aee3742c52 -r 1ed7c9cea8c5 src/share/classes/com/sun/management/HotSpotDiagnosticMXBean.java ++--- openjdk/jdk/src/share/classes/com/sun/management/HotSpotDiagnosticMXBean.java Tue Oct 15 21:28:50 2013 +0100 +++++ openjdk/jdk/src/share/classes/com/sun/management/HotSpotDiagnosticMXBean.java Wed Oct 16 05:10:54 2013 +0100 ++@@ -54,6 +54,11 @@ ++ * cannot be created, opened, or written to. ++ * @throws UnsupportedOperationException if this operation is not supported. ++ * @throws NullPointerException if outputFile is null. +++ * @throws SecurityException +++ * If a security manager exists and its {@link +++ * java.lang.SecurityManager#checkWrite(java.lang.String)} +++ * method denies write access to the named file +++ * or the caller does not have ManagmentPermission("control"). ++ */ ++ public void dumpHeap(String outputFile, boolean live) throws java.io.IOException; ++ ++diff -r 96aee3742c52 -r 1ed7c9cea8c5 src/share/classes/sun/management/HotSpotDiagnostic.java ++--- openjdk/jdk/src/share/classes/sun/management/HotSpotDiagnostic.java Tue Oct 15 21:28:50 2013 +0100 +++++ openjdk/jdk/src/share/classes/sun/management/HotSpotDiagnostic.java Wed Oct 16 05:10:54 2013 +0100 ++@@ -38,7 +38,17 @@ ++ public HotSpotDiagnostic() { ++ } ++ ++- public native void dumpHeap(String outputFile, boolean live) throws IOException; +++ public void dumpHeap(String outputFile, boolean live) throws IOException { +++ SecurityManager security = System.getSecurityManager(); +++ if (security != null) { +++ security.checkWrite(outputFile); +++ ManagementFactory.checkControlAccess(); +++ } +++ +++ dumpHeap0(outputFile, live); +++ } +++ +++ private native void dumpHeap0(String outputFile, boolean live) throws IOException; ++ ++ public List getDiagnosticOptions() { ++ List allFlags = Flag.getAllFlags(); ++diff -r 96aee3742c52 -r 1ed7c9cea8c5 src/share/native/sun/management/HotSpotDiagnostic.c ++--- openjdk/jdk/src/share/native/sun/management/HotSpotDiagnostic.c Tue Oct 15 21:28:50 2013 +0100 +++++ openjdk/jdk/src/share/native/sun/management/HotSpotDiagnostic.c Wed Oct 16 05:10:54 2013 +0100 ++@@ -29,7 +29,7 @@ ++ #include "sun_management_HotSpotDiagnostic.h" ++ ++ JNIEXPORT void JNICALL ++-Java_sun_management_HotSpotDiagnostic_dumpHeap +++Java_sun_management_HotSpotDiagnostic_dumpHeap0 ++ (JNIEnv *env, jobject dummy, jstring outputfile, jboolean live) ++ { ++ jmm_interface->DumpHeap0(env, outputfile, live); +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8016653-ignoreable_characters.patch openjdk-6-6b27-1.12.6/patches/openjdk/8016653-ignoreable_characters.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8016653-ignoreable_characters.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8016653-ignoreable_characters.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,101 @@ ++# HG changeset patch ++# User robm ++# Date 1383034867 0 ++# Tue Oct 29 08:21:07 2013 +0000 ++# Node ID e6d4480e2b11853e5ec5bbced3d351564e174632 ++# Parent 843659ece699889459239c6470e67265de2b3f73 ++8016653: javadoc should ignore ignoreable characters in names ++Reviewed-by: jjg ++ ++diff -r 843659ece699 -r e6d4480e2b11 src/share/classes/com/sun/tools/javac/parser/Scanner.java ++--- openjdk/langtools/src/share/classes/com/sun/tools/javac/parser/Scanner.java Fri Jul 19 16:02:59 2013 -0700 +++++ openjdk/langtools/src/share/classes/com/sun/tools/javac/parser/Scanner.java Tue Oct 29 08:21:07 2013 +0000 ++@@ -1,5 +1,5 @@ ++ /* ++- * Copyright (c) 1999, 2006, Oracle and/or its affiliates. All rights reserved. +++ * Copyright (c) 1999, 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 ++@@ -514,11 +514,10 @@ ++ private void scanIdent() { ++ boolean isJavaIdentifierPart; ++ char high; +++ if (sp == sbuf.length) putChar(ch); else sbuf[sp++] = ch; +++ // optimization, was: putChar(ch); +++ scanChar(); ++ do { ++- if (sp == sbuf.length) putChar(ch); else sbuf[sp++] = ch; ++- // optimization, was: putChar(ch); ++- ++- scanChar(); ++ switch (ch) { ++ case 'A': case 'B': case 'C': case 'D': case 'E': ++ case 'F': case 'G': case 'H': case 'I': case 'J': ++@@ -535,6 +534,7 @@ ++ case '$': case '_': ++ case '0': case '1': case '2': case '3': case '4': ++ case '5': case '6': case '7': case '8': case '9': +++ break; ++ case '\u0000': case '\u0001': case '\u0002': case '\u0003': ++ case '\u0004': case '\u0005': case '\u0006': case '\u0007': ++ case '\u0008': case '\u000E': case '\u000F': case '\u0010': ++@@ -542,30 +542,37 @@ ++ case '\u0015': case '\u0016': case '\u0017': ++ case '\u0018': case '\u0019': case '\u001B': ++ case '\u007F': ++- break; +++ scanChar(); +++ continue; ++ case '\u001A': // EOI is also a legal identifier part ++ if (bp >= buflen) { ++ name = names.fromChars(sbuf, 0, sp); ++ token = keywords.key(name); ++ return; ++ } ++- break; +++ scanChar(); +++ continue; ++ default: ++ if (ch < '\u0080') { ++ // all ASCII range chars already handled, above ++ isJavaIdentifierPart = false; ++ } else { ++- high = scanSurrogates(); ++- if (high != 0) { ++- if (sp == sbuf.length) { ++- putChar(high); +++ if (Character.isIdentifierIgnorable(ch)) { +++ scanChar(); +++ continue; +++ } else { +++ high = scanSurrogates(); +++ if (high != 0) { +++ if (sp == sbuf.length) { +++ putChar(high); +++ } else { +++ sbuf[sp++] = high; +++ } +++ isJavaIdentifierPart = Character.isJavaIdentifierPart( +++ Character.toCodePoint(high, ch)); ++ } else { ++- sbuf[sp++] = high; +++ isJavaIdentifierPart = Character.isJavaIdentifierPart(ch); ++ } ++- isJavaIdentifierPart = Character.isJavaIdentifierPart( ++- Character.toCodePoint(high, ch)); ++- } else { ++- isJavaIdentifierPart = Character.isJavaIdentifierPart(ch); ++ } ++ } ++ if (!isJavaIdentifierPart) { ++@@ -574,6 +581,9 @@ ++ return; ++ } ++ } +++ if (sp == sbuf.length) putChar(ch); else sbuf[sp++] = ch; +++ // optimization, was: putChar(ch); +++ scanChar(); ++ } while (true); ++ } ++ +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8016675-robust_javadoc.patch openjdk-6-6b27-1.12.6/patches/openjdk/8016675-robust_javadoc.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8016675-robust_javadoc.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8016675-robust_javadoc.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,75 @@ ++# HG changeset patch ++# User bpatel ++# Date 1374274979 25200 ++# Fri Jul 19 16:02:59 2013 -0700 ++# Node ID 843659ece699889459239c6470e67265de2b3f73 ++# Parent 9083313d5733ca9be66bc52cf64b9b5d4dd2e39a ++8016675: Make Javadoc pages more robust ++Reviewed-by: jlaskey, ksrini ++ ++diff -r 9083313d5733 -r 843659ece699 src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java ++--- openjdk/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java Fri Oct 25 16:10:09 2013 +0100 +++++ openjdk/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java Fri Jul 19 16:02:59 2013 -0700 ++@@ -289,7 +289,7 @@ ++ script.addAttr(HtmlAttr.TYPE, "text/javascript"); ++ String scriptCode = "" + DocletConstants.NL; ++ RawHtml scriptContent = new RawHtml(scriptCode); ++@@ -299,6 +299,53 @@ ++ } ++ ++ /** +++ * Returns a String with escaped special JavaScript characters. +++ * +++ * @param s String that needs to be escaped +++ * @return a valid escaped JavaScript string +++ */ +++ private static String escapeJavaScriptChars(String s) { +++ StringBuilder sb = new StringBuilder(); +++ for (int i = 0; i < s.length(); i++) { +++ char ch = s.charAt(i); +++ switch (ch) { +++ case '\b': +++ sb.append("\\b"); +++ break; +++ case '\t': +++ sb.append("\\t"); +++ break; +++ case '\n': +++ sb.append("\\n"); +++ break; +++ case '\f': +++ sb.append("\\f"); +++ break; +++ case '\r': +++ sb.append("\\r"); +++ break; +++ case '"': +++ sb.append("\\\""); +++ break; +++ case '\'': +++ sb.append("\\\'"); +++ break; +++ case '\\': +++ sb.append("\\\\"); +++ break; +++ default: +++ if (ch < 32 || ch >= 127) { +++ sb.append(String.format("\\u%04X", (int)ch)); +++ } else { +++ sb.append(ch); +++ } +++ break; +++ } +++ } +++ return sb.toString(); +++ } +++ +++ /** ++ * Returns a content tree for the SCRIPT tag for the main page(index.html). ++ * ++ * @return a content for the SCRIPT tag +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8017196-ensure_proxies_are_handled_appropriately-jdk.patch openjdk-6-6b27-1.12.6/patches/openjdk/8017196-ensure_proxies_are_handled_appropriately-jdk.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8017196-ensure_proxies_are_handled_appropriately-jdk.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8017196-ensure_proxies_are_handled_appropriately-jdk.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,107 @@ ++# HG changeset patch ++# User mchung ++# Date 1382731288 -3600 ++# Fri Oct 25 21:01:28 2013 +0100 ++# Node ID 43b600fed0e8ac9d5ffe7556617d4850143e2dcd ++# Parent a2b63addc0633a5ef8d196d1019d78b920cb4b1a ++8017196: Ensure Proxies are handled appropriately ++Reviewed-by: dfuchs, jrose, jdn, ahgross, chegar ++ ++diff -r a2b63addc063 -r 43b600fed0e8 src/share/classes/java/lang/reflect/Proxy.java ++--- openjdk/jdk/src/share/classes/java/lang/reflect/Proxy.java Fri Oct 25 19:45:04 2013 +0100 +++++ openjdk/jdk/src/share/classes/java/lang/reflect/Proxy.java Fri Oct 25 21:01:28 2013 +0100 ++@@ -787,6 +787,7 @@ ++ * @throws IllegalArgumentException if the argument is not a ++ * proxy instance ++ */ +++ @CallerSensitive ++ public static InvocationHandler getInvocationHandler(Object proxy) ++ throws IllegalArgumentException ++ { ++@@ -797,8 +798,19 @@ ++ throw new IllegalArgumentException("not a proxy instance"); ++ } ++ ++- Proxy p = (Proxy) proxy; ++- return p.h; +++ final Proxy p = (Proxy) proxy; +++ final InvocationHandler ih = p.h; +++ if (System.getSecurityManager() != null) { +++ Class ihClass = ih.getClass(); +++ Class caller = Reflection.getCallerClass(); +++ if (ReflectUtil.needsPackageAccessCheck(caller.getClassLoader(), +++ ihClass.getClassLoader())) +++ { +++ ReflectUtil.checkPackageAccess(ihClass); +++ } +++ } +++ +++ return ih; ++ } ++ ++ private static native Class defineClass0(ClassLoader loader, String name, ++diff -r a2b63addc063 -r 43b600fed0e8 src/share/classes/sun/reflect/misc/ReflectUtil.java ++--- openjdk/jdk/src/share/classes/sun/reflect/misc/ReflectUtil.java Fri Oct 25 19:45:04 2013 +0100 +++++ openjdk/jdk/src/share/classes/sun/reflect/misc/ReflectUtil.java Fri Oct 25 21:01:28 2013 +0100 ++@@ -26,8 +26,10 @@ ++ ++ package sun.reflect.misc; ++ +++import java.lang.reflect.Method; ++ import java.lang.reflect.Modifier; ++ import java.lang.reflect.Proxy; +++import java.util.Arrays; ++ import sun.reflect.Reflection; ++ ++ public final class ReflectUtil { ++@@ -257,4 +259,50 @@ ++ String pkg = (i != -1) ? name.substring(0, i) : ""; ++ return Proxy.isProxyClass(cls) && !pkg.equals(PROXY_PACKAGE); ++ } +++ +++ /** +++ * Check if the given method is a method declared in the proxy interface +++ * implemented by the given proxy instance. +++ * +++ * @param proxy a proxy instance +++ * @param method an interface method dispatched to a InvocationHandler +++ * +++ * @throws IllegalArgumentException if the given proxy or method is invalid. +++ */ +++ public static void checkProxyMethod(Object proxy, Method method) { +++ // check if it is a valid proxy instance +++ if (proxy == null || !Proxy.isProxyClass(proxy.getClass())) { +++ throw new IllegalArgumentException("Not a Proxy instance"); ++ } +++ if (Modifier.isStatic(method.getModifiers())) { +++ throw new IllegalArgumentException("Can't handle static method"); +++ } +++ +++ Class c = method.getDeclaringClass(); +++ if (c == Object.class) { +++ String name = method.getName(); +++ if (name.equals("hashCode") || name.equals("equals") || name.equals("toString")) { +++ return; +++ } +++ } +++ +++ if (isSuperInterface(proxy.getClass(), c)) { +++ return; +++ } +++ +++ // disallow any method not declared in one of the proxy intefaces +++ throw new IllegalArgumentException("Can't handle: " + method); +++ } +++ +++ private static boolean isSuperInterface(Class c, Class intf) { +++ for (Class i : c.getInterfaces()) { +++ if (i == intf) { +++ return true; +++ } +++ if (isSuperInterface(i, intf)) { +++ return true; +++ } +++ } +++ return false; +++ } +++} +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8017196-ensure_proxies_are_handled_appropriately.patch openjdk-6-6b27-1.12.6/patches/openjdk/8017196-ensure_proxies_are_handled_appropriately.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8017196-ensure_proxies_are_handled_appropriately.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8017196-ensure_proxies_are_handled_appropriately.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,94 @@ ++# HG changeset patch ++# User mchung ++# Date 1374193345 25200 ++# Thu Jul 18 17:22:25 2013 -0700 ++# Node ID 2a415f9ee0976719ac79e6e5e2b1f00b29636427 ++# Parent 9e7e1b6ab5cdf0096c9c16d991e6a982771a15f1 ++8017196: Ensure Proxies are handled appropriately ++Reviewed-by: dfuchs, jrose, jdn, ahgross, chegar ++ ++diff -r 9e7e1b6ab5cd -r 2a415f9ee097 src/share/classes/com/sun/corba/se/impl/presentation/rmi/InvocationHandlerFactoryImpl.java ++--- openjdk/corba/src/share/classes/com/sun/corba/se/impl/presentation/rmi/InvocationHandlerFactoryImpl.java Tue Oct 15 15:24:25 2013 +0100 +++++ openjdk/corba/src/share/classes/com/sun/corba/se/impl/presentation/rmi/InvocationHandlerFactoryImpl.java Thu Jul 18 17:22:25 2013 -0700 ++@@ -43,6 +43,8 @@ ++ import com.sun.corba.se.spi.orbutil.proxy.DelegateInvocationHandlerImpl ; ++ import com.sun.corba.se.spi.orbutil.proxy.CompositeInvocationHandler ; ++ import com.sun.corba.se.spi.orbutil.proxy.CompositeInvocationHandlerImpl ; +++import java.security.AccessController; +++import java.security.PrivilegedAction; ++ ++ public class InvocationHandlerFactoryImpl implements InvocationHandlerFactory ++ { ++@@ -114,24 +116,32 @@ ++ // which extends org.omg.CORBA.Object. This handler delegates all ++ // calls directly to a DynamicStubImpl, which extends ++ // org.omg.CORBA.portable.ObjectImpl. ++- InvocationHandler dynamicStubHandler = +++ final InvocationHandler dynamicStubHandler = ++ DelegateInvocationHandlerImpl.create( stub ) ; ++ ++ // Create an invocation handler that handles any remote interface ++ // methods. ++- InvocationHandler stubMethodHandler = new StubInvocationHandlerImpl( +++ final InvocationHandler stubMethodHandler = new StubInvocationHandlerImpl( ++ pm, classData, stub ) ; ++ ++ // Create a composite handler that handles the DynamicStub interface ++ // as well as the remote interfaces. ++ final CompositeInvocationHandler handler = ++ new CustomCompositeInvocationHandlerImpl( stub ) ; +++ +++ AccessController.doPrivileged(new PrivilegedAction() { +++ @Override +++ public Void run() { ++ handler.addInvocationHandler( DynamicStub.class, ++ dynamicStubHandler ) ; ++ handler.addInvocationHandler( org.omg.CORBA.Object.class, ++ dynamicStubHandler ) ; ++ handler.addInvocationHandler( Object.class, ++ dynamicStubHandler ) ; +++ return null; +++ } +++ }); +++ ++ ++ // If the method passed to invoke is not from DynamicStub or its superclasses, ++ // it must be from an implemented interface, so we just handle ++diff -r 9e7e1b6ab5cd -r 2a415f9ee097 src/share/classes/com/sun/corba/se/spi/orbutil/proxy/CompositeInvocationHandlerImpl.java ++--- openjdk/corba/src/share/classes/com/sun/corba/se/spi/orbutil/proxy/CompositeInvocationHandlerImpl.java Tue Oct 15 15:24:25 2013 +0100 +++++ openjdk/corba/src/share/classes/com/sun/corba/se/spi/orbutil/proxy/CompositeInvocationHandlerImpl.java Thu Jul 18 17:22:25 2013 -0700 ++@@ -36,6 +36,7 @@ ++ ++ import com.sun.corba.se.spi.logging.CORBALogDomains ; ++ import com.sun.corba.se.impl.logging.ORBUtilSystemException ; +++import com.sun.corba.se.impl.presentation.rmi.DynamicAccessPermission; ++ ++ public class CompositeInvocationHandlerImpl implements ++ CompositeInvocationHandler ++@@ -46,11 +47,13 @@ ++ public void addInvocationHandler( Class interf, ++ InvocationHandler handler ) ++ { +++ checkAccess(); ++ classToInvocationHandler.put( interf, handler ) ; ++ } ++ ++ public void setDefaultHandler( InvocationHandler handler ) ++ { +++ checkAccess(); ++ defaultHandler = handler ; ++ } ++ ++@@ -78,4 +81,12 @@ ++ ++ return handler.invoke( proxy, method, args ) ; ++ } +++ +++ private static final DynamicAccessPermission perm = new DynamicAccessPermission("access"); +++ private void checkAccess() { +++ final SecurityManager sm = System.getSecurityManager(); +++ if (sm != null) { +++ sm.checkPermission(perm); ++ } +++ } +++} +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8017287-better_resource_disposal.patch openjdk-6-6b27-1.12.6/patches/openjdk/8017287-better_resource_disposal.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8017287-better_resource_disposal.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8017287-better_resource_disposal.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,22 @@ ++# HG changeset patch ++# User bae ++# Date 1382732366 -3600 ++# Fri Oct 25 21:19:26 2013 +0100 ++# Node ID 768afb4062fb6653278e5f7e5304a623fcd80c9c ++# Parent 43b600fed0e8ac9d5ffe7556617d4850143e2dcd ++8017287: Better resource disposal ++Reviewed-by: vadim ++ ++diff -r 43b600fed0e8 -r 768afb4062fb src/share/classes/sun/java2d/Disposer.java ++--- openjdk/jdk/src/share/classes/sun/java2d/Disposer.java Fri Oct 25 21:01:28 2013 +0100 +++++ openjdk/jdk/src/share/classes/sun/java2d/Disposer.java Fri Oct 25 21:19:26 2013 +0100 ++@@ -147,8 +147,7 @@ ++ obj = null; ++ rec = null; ++ } catch (Exception e) { ++- System.out.println("Exception while removing reference: " + e); ++- e.printStackTrace(); +++ System.out.println("Exception while removing reference."); ++ } ++ } ++ } +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8017291-cast_proxies_aside.patch openjdk-6-6b27-1.12.6/patches/openjdk/8017291-cast_proxies_aside.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8017291-cast_proxies_aside.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8017291-cast_proxies_aside.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,34 @@ ++# HG changeset patch ++# User mchung ++# Date 1373884816 25200 ++# Mon Jul 15 03:40:16 2013 -0700 ++# Node ID 011d86bdcbf8d4fe0016351b775ff1f48f3620a1 ++# Parent 768afb4062fb6653278e5f7e5304a623fcd80c9c ++8017291: Cast Proxies Aside ++Reviewed-by: alanb, ahgross ++ ++diff -r 768afb4062fb -r 011d86bdcbf8 src/share/classes/java/lang/ClassLoader.java ++--- openjdk/jdk/src/share/classes/java/lang/ClassLoader.java Fri Oct 25 21:19:26 2013 +0100 +++++ openjdk/jdk/src/share/classes/java/lang/ClassLoader.java Mon Jul 15 03:40:16 2013 -0700 ++@@ -54,6 +54,7 @@ ++ import sun.misc.VM; ++ import sun.reflect.CallerSensitive; ++ import sun.reflect.Reflection; +++import sun.reflect.misc.ReflectUtil; ++ import sun.security.util.SecurityConstants; ++ ++ /** ++@@ -338,6 +339,13 @@ ++ private void checkPackageAccess(Class cls, ProtectionDomain pd) { ++ final SecurityManager sm = System.getSecurityManager(); ++ if (sm != null) { +++ if (ReflectUtil.isNonPublicProxyClass(cls)) { +++ for (Class intf: cls.getInterfaces()) { +++ checkPackageAccess(intf, pd); +++ } +++ return; +++ } +++ ++ final String name = cls.getName(); ++ final int i = name.lastIndexOf('.'); ++ if (i != -1) { +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8017298-better_xml_support.patch openjdk-6-6b27-1.12.6/patches/openjdk/8017298-better_xml_support.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8017298-better_xml_support.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8017298-better_xml_support.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,999 @@ ++# HG changeset patch ++# User joehw ++# Date 1383031104 0 ++# Tue Oct 29 07:18:24 2013 +0000 ++# Node ID 3dc769c632a1d6a8f69d2857b3c13c43a83481be ++# Parent 7799c3bd00f5a4fda6448cb8bcd7768c66ec166d ++8017298: Better XML support ++Reviewed-by: alanb, dfuchs, mullan ++ ++diff -r 7799c3bd00f5 -r 3dc769c632a1 drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentFragmentScannerImpl.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentFragmentScannerImpl.java Tue Oct 29 05:50:44 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentFragmentScannerImpl.java Tue Oct 29 07:18:24 2013 +0000 ++@@ -50,8 +50,8 @@ ++ import com.sun.org.apache.xerces.internal.xni.Augmentations; ++ import com.sun.org.apache.xerces.internal.impl.Constants; ++ import com.sun.org.apache.xerces.internal.impl.XMLEntityHandler; ++-import com.sun.org.apache.xerces.internal.util.SecurityManager; ++ import com.sun.org.apache.xerces.internal.util.NamespaceSupport; +++import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; ++ import com.sun.org.apache.xerces.internal.xni.NamespaceContext; ++ import javax.xml.stream.XMLStreamConstants; ++ import javax.xml.stream.events.XMLEvent; ++@@ -350,7 +350,7 @@ ++ ++ protected boolean foundBuiltInRefs = false; ++ ++- protected SecurityManager fSecurityManager = null; +++ protected XMLSecurityManager fSecurityManager = null; ++ ++ //skip element algorithm ++ static final short MAX_DEPTH_LIMIT = 5 ; ++@@ -555,11 +555,13 @@ ++ } ++ ++ try { ++- fSecurityManager = (SecurityManager)componentManager.getProperty(Constants.SECURITY_MANAGER); +++ fSecurityManager = (XMLSecurityManager)componentManager.getProperty(Constants.SECURITY_MANAGER); ++ } catch (XMLConfigurationException e) { ++ fSecurityManager = null; ++ } ++- fElementAttributeLimit = (fSecurityManager != null)?fSecurityManager.getElementAttrLimit():0; +++ fElementAttributeLimit = (fSecurityManager != null)? +++ fSecurityManager.getLimit(XMLSecurityManager.Limit.ELEMENT_ATTRIBUTE_LIMIT):0; +++ ++ ++ try { ++ fNotifyBuiltInRefs = componentManager.getFeature(NOTIFY_BUILTIN_REFS); ++@@ -929,6 +931,7 @@ ++ ++ // scan decl ++ super.scanXMLDeclOrTextDecl(scanningTextDecl, fStrings); +++ ++ fMarkupDepth--; ++ ++ // pseudo-attribute values ++diff -r 7799c3bd00f5 -r 3dc769c632a1 drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java Tue Oct 29 05:50:44 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java Tue Oct 29 07:18:24 2013 +0000 ++@@ -64,8 +64,8 @@ ++ import com.sun.org.apache.xerces.internal.xinclude.XIncludeHandler; ++ ++ import com.sun.org.apache.xerces.internal.impl.validation.ValidationManager; ++-import com.sun.org.apache.xerces.internal.util.SecurityManager; ++ import com.sun.org.apache.xerces.internal.util.URI; +++import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; ++ ++ ++ /** ++@@ -321,7 +321,7 @@ ++ ++ // stores defaults for entity expansion limit if it has ++ // been set on the configuration. ++- protected SecurityManager fSecurityManager = null; +++ protected XMLSecurityManager fSecurityManager = null; ++ ++ /** ++ * True if the document entity is standalone. This should really ++@@ -1531,7 +1531,7 @@ ++ fValidationManager = null; ++ } ++ try { ++- fSecurityManager = (SecurityManager)componentManager.getProperty(SECURITY_MANAGER); +++ fSecurityManager = (XMLSecurityManager)componentManager.getProperty(SECURITY_MANAGER); ++ } ++ catch (XMLConfigurationException e) { ++ fSecurityManager = null; ++@@ -1549,7 +1549,9 @@ ++ // a class acting as a component manager but not ++ // implementing that interface for whatever reason. ++ public void reset() { ++- fEntityExpansionLimit = (fSecurityManager != null)?fSecurityManager.getEntityExpansionLimit():0; +++ fEntityExpansionLimit = (fSecurityManager != null)? +++ fSecurityManager.getLimit(XMLSecurityManager.Limit.ENTITY_EXPANSION_LIMIT):0; +++ ++ ++ // initialize state ++ fStandalone = false; ++@@ -1689,8 +1691,9 @@ ++ } ++ if (suffixLength == Constants.SECURITY_MANAGER_PROPERTY.length() && ++ propertyId.endsWith(Constants.SECURITY_MANAGER_PROPERTY)) { ++- fSecurityManager = (SecurityManager)value; ++- fEntityExpansionLimit = (fSecurityManager != null)?fSecurityManager.getEntityExpansionLimit():0; +++ fSecurityManager = (XMLSecurityManager)value; +++ fEntityExpansionLimit = (fSecurityManager != null)? +++ fSecurityManager.getLimit(XMLSecurityManager.Limit.ENTITY_EXPANSION_LIMIT):0; ++ } ++ } ++ ++diff -r 7799c3bd00f5 -r 3dc769c632a1 drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/XMLScanner.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/XMLScanner.java Tue Oct 29 05:50:44 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/XMLScanner.java Tue Oct 29 07:18:24 2013 +0000 ++@@ -515,7 +515,7 @@ ++ reportFatalError("SDDeclInvalid", new Object[] {standalone}); ++ } ++ } else { ++- reportFatalError("EncodingDeclRequired", null); +++ reportFatalError("SDDeclNameInvalid", null); ++ } ++ break; ++ } ++@@ -580,7 +580,7 @@ ++ XMLString value) ++ throws IOException, XNIException { ++ ++- String name = fEntityScanner.scanName(); +++ String name = scanPseudoAttributeName(); ++ // XMLEntityManager.print(fEntityManager.getCurrentEntity()); ++ ++ if (name == null) { ++@@ -633,6 +633,35 @@ ++ } // scanPseudoAttribute(XMLString):String ++ ++ /** +++ * Scans the name of a pseudo attribute. The only legal names +++ * in XML 1.0/1.1 documents are 'version', 'encoding' and 'standalone'. +++ * +++ * @return the name of the pseudo attribute or null +++ * if a legal pseudo attribute name could not be scanned. +++ */ +++ private String scanPseudoAttributeName() throws IOException, XNIException { +++ final int ch = fEntityScanner.peekChar(); +++ switch (ch) { +++ case 'v': +++ if (fEntityScanner.skipString(fVersionSymbol)) { +++ return fVersionSymbol; +++ } +++ break; +++ case 'e': +++ if (fEntityScanner.skipString(fEncodingSymbol)) { +++ return fEncodingSymbol; +++ } +++ break; +++ case 's': +++ if (fEntityScanner.skipString(fStandaloneSymbol)) { +++ return fStandaloneSymbol; +++ } +++ break; +++ } +++ return null; +++ } // scanPseudoAttributeName() +++ +++ /** ++ * Scans a processing instruction. ++ *

++ *

++diff -r 7799c3bd00f5 -r 3dc769c632a1 drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages.properties
++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages.properties	Tue Oct 29 05:50:44 2013 +0000
+++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages.properties	Tue Oct 29 07:18:24 2013 +0000
++@@ -43,6 +43,7 @@
++         
++ # 2.9 Standalone Document Declaration
++         SDDeclInvalid = The standalone document declaration value must be \"yes\" or \"no\", not \"{0}\".
+++        SDDeclNameInvalid = The standalone name in XML declaration may be misspelled.
++ # 2.12 Language Identification
++         XMLLangInvalid = The xml:lang attribute value \"{0}\" is an invalid language identifier.
++ # 3. Logical Structures
++diff -r 7799c3bd00f5 -r 3dc769c632a1 drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/xs/models/CMNodeFactory.java
++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/xs/models/CMNodeFactory.java	Tue Oct 29 05:50:44 2013 +0000
+++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/xs/models/CMNodeFactory.java	Tue Oct 29 07:18:24 2013 +0000
++@@ -21,13 +21,13 @@
++ 
++ package com.sun.org.apache.xerces.internal.impl.xs.models;
++ 
+++import com.sun.org.apache.xerces.internal.impl.Constants;
++ import com.sun.org.apache.xerces.internal.impl.XMLErrorReporter;
+++import com.sun.org.apache.xerces.internal.impl.dtd.models.CMNode;
+++import com.sun.org.apache.xerces.internal.impl.xs.XSMessageFormatter;
+++import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager;
++ import com.sun.org.apache.xerces.internal.xni.parser.XMLComponentManager;
++-import com.sun.org.apache.xerces.internal.util.SecurityManager ;
++-import com.sun.org.apache.xerces.internal.impl.dtd.models.CMNode;
++ import com.sun.org.apache.xerces.internal.xni.parser.XMLConfigurationException;
++-import com.sun.org.apache.xerces.internal.impl.xs.XSMessageFormatter;
++-import com.sun.org.apache.xerces.internal.impl.Constants;
++ 
++ /**
++  *
++@@ -68,7 +68,7 @@
++ 
++     // stores defaults for different security holes (maxOccurLimit in current context) if it has
++     // been set on the configuration.
++-    private SecurityManager fSecurityManager = null;
+++    private XMLSecurityManager fSecurityManager = null;
++ 
++     /** default constructor */
++     public CMNodeFactory() {
++@@ -77,10 +77,10 @@
++     public void reset(XMLComponentManager componentManager){
++         fErrorReporter = (XMLErrorReporter)componentManager.getProperty(ERROR_REPORTER);
++         try {
++-            fSecurityManager = (SecurityManager)componentManager.getProperty(SECURITY_MANAGER);
+++            fSecurityManager = (XMLSecurityManager)componentManager.getProperty(SECURITY_MANAGER);
++             //we are setting the limit of number of nodes to 3times the maxOccur value..
++             if(fSecurityManager != null){
++-                maxNodeLimit = fSecurityManager.getMaxOccurNodeLimit() * MULTIPLICITY ;
+++                maxNodeLimit = fSecurityManager.getLimit(XMLSecurityManager.Limit.MAX_OCCUR_NODE_LIMIT) * MULTIPLICITY ;
++             }
++         }
++         catch (XMLConfigurationException e) {
++@@ -152,8 +152,9 @@
++ 
++             if (suffixLength == Constants.SECURITY_MANAGER_PROPERTY.length() &&
++                 propertyId.endsWith(Constants.SECURITY_MANAGER_PROPERTY)) {
++-                fSecurityManager = (SecurityManager)value;
++-                maxNodeLimit = (fSecurityManager != null) ? fSecurityManager.getMaxOccurNodeLimit() * MULTIPLICITY : 0 ;
+++                fSecurityManager = (XMLSecurityManager)value;
+++                maxNodeLimit = (fSecurityManager != null) ?
+++                        fSecurityManager.getLimit(XMLSecurityManager.Limit.MAX_OCCUR_NODE_LIMIT) * MULTIPLICITY : 0 ;
++                 return;
++             }
++             if (suffixLength == Constants.ERROR_REPORTER_PROPERTY.length() &&
++diff -r 7799c3bd00f5 -r 3dc769c632a1 drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSAttributeChecker.java
++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSAttributeChecker.java	Tue Oct 29 05:50:44 2013 +0000
+++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSAttributeChecker.java	Tue Oct 29 07:18:24 2013 +0000
++@@ -38,6 +38,7 @@
++ import com.sun.org.apache.xerces.internal.util.DOMUtil;
++ import com.sun.org.apache.xerces.internal.util.SymbolTable;
++ import com.sun.org.apache.xerces.internal.util.XMLSymbols;
+++import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager;
++ import com.sun.org.apache.xerces.internal.xni.QName;
++ import com.sun.org.apache.xerces.internal.xs.XSConstants;
++ import org.w3c.dom.Attr;
++@@ -1235,7 +1236,7 @@
++                     if (!optimize) {
++                     //Revisit :: IMO this is not right place to check
++                     // maxOccurNodeLimit.
++-                    int maxOccurNodeLimit = fSchemaHandler.fSecureProcessing.getMaxOccurNodeLimit();
+++                    int maxOccurNodeLimit = fSchemaHandler.fSecureProcessing.getLimit(XMLSecurityManager.Limit.MAX_OCCUR_NODE_LIMIT);
++                     if (max > maxOccurNodeLimit) {
++                         reportSchemaFatalError("maxOccurLimit", new Object[] {new Integer(maxOccurNodeLimit)}, element);
++                     
++diff -r 7799c3bd00f5 -r 3dc769c632a1 drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDHandler.java
++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDHandler.java	Tue Oct 29 05:50:44 2013 +0000
+++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDHandler.java	Tue Oct 29 07:18:24 2013 +0000
++@@ -56,10 +56,10 @@
++ import com.sun.org.apache.xerces.internal.util.DOMInputSource;
++ import com.sun.org.apache.xerces.internal.util.DefaultErrorHandler;
++ import com.sun.org.apache.xerces.internal.util.SAXInputSource;
++-import com.sun.org.apache.xerces.internal.util.SecurityManager;
++ import com.sun.org.apache.xerces.internal.util.SymbolTable;
++ import com.sun.org.apache.xerces.internal.util.XMLSymbols;
++ import com.sun.org.apache.xerces.internal.util.URI.MalformedURIException;
+++import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager;
++ import com.sun.org.apache.xerces.internal.xni.QName;
++ import com.sun.org.apache.xerces.internal.xni.grammars.Grammar;
++ import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarDescription;
++@@ -210,7 +210,7 @@
++      * 
++      * 

Protected to allow access by any traverser.

++ */ ++- protected SecurityManager fSecureProcessing = null; +++ protected XMLSecurityManager fSecureProcessing = null; ++ ++ ++ // These tables correspond to the symbol spaces defined in the ++@@ -1963,7 +1963,7 @@ ++ fSecureProcessing = null; ++ if( componentManager!=null ) { ++ try { ++- fSecureProcessing = (SecurityManager) componentManager.getProperty(SECURE_PROCESSING); +++ fSecureProcessing = (XMLSecurityManager) componentManager.getProperty(SECURE_PROCESSING); ++ } catch (XMLConfigurationException xmlConfigurationException) { ++ ; ++ } ++diff -r 7799c3bd00f5 -r 3dc769c632a1 drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/DocumentBuilderImpl.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/DocumentBuilderImpl.java Tue Oct 29 05:50:44 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/DocumentBuilderImpl.java Tue Oct 29 07:18:24 2013 +0000 ++@@ -34,7 +34,7 @@ ++ import com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator; ++ import com.sun.org.apache.xerces.internal.jaxp.validation.XSGrammarPoolContainer; ++ import com.sun.org.apache.xerces.internal.parsers.DOMParser; ++-import com.sun.org.apache.xerces.internal.util.SecurityManager; +++import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; ++ import com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler; ++ import com.sun.org.apache.xerces.internal.xni.parser.XMLComponent; ++ import com.sun.org.apache.xerces.internal.xni.parser.XMLComponentManager; ++@@ -153,7 +153,7 @@ ++ ++ // If the secure processing feature is on set a security manager. ++ if (secureProcessing) { ++- domParser.setProperty(SECURITY_MANAGER, new SecurityManager()); +++ domParser.setProperty(SECURITY_MANAGER, new XMLSecurityManager()); ++ } ++ ++ this.grammar = dbf.getSchema(); ++diff -r 7799c3bd00f5 -r 3dc769c632a1 drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/SAXParserImpl.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/SAXParserImpl.java Tue Oct 29 05:50:44 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/SAXParserImpl.java Tue Oct 29 07:18:24 2013 +0000 ++@@ -36,7 +36,7 @@ ++ import com.sun.org.apache.xerces.internal.impl.xs.XSMessageFormatter; ++ import com.sun.org.apache.xerces.internal.jaxp.validation.XSGrammarPoolContainer; ++ import com.sun.org.apache.xerces.internal.util.SAXMessageFormatter; ++-import com.sun.org.apache.xerces.internal.util.SecurityManager; +++import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; ++ import com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler; ++ import com.sun.org.apache.xerces.internal.xni.parser.XMLComponent; ++ import com.sun.org.apache.xerces.internal.xni.parser.XMLComponentManager; ++@@ -143,7 +143,7 @@ ++ ++ // If the secure processing feature is on set a security manager. ++ if (secureProcessing) { ++- xmlReader.setProperty0(SECURITY_MANAGER, new SecurityManager()); +++ xmlReader.setProperty0(SECURITY_MANAGER, new XMLSecurityManager()); ++ } ++ ++ // Set application's features, followed by validation features. ++@@ -349,7 +349,7 @@ ++ } ++ if (name.equals(XMLConstants.FEATURE_SECURE_PROCESSING)) { ++ try { ++- setProperty(SECURITY_MANAGER, value ? new SecurityManager() : null); +++ setProperty(SECURITY_MANAGER, value ? new XMLSecurityManager() : null); ++ } ++ catch (SAXNotRecognizedException exc) { ++ // If the property is not supported ++diff -r 7799c3bd00f5 -r 3dc769c632a1 drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/StreamValidatorHelper.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/StreamValidatorHelper.java Tue Oct 29 05:50:44 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/StreamValidatorHelper.java Tue Oct 29 07:18:24 2013 +0000 ++@@ -24,7 +24,7 @@ ++ import com.sun.org.apache.xerces.internal.impl.XMLErrorReporter; ++ import com.sun.org.apache.xerces.internal.impl.msg.XMLMessageFormatter; ++ import com.sun.org.apache.xerces.internal.parsers.XML11Configuration; ++-import com.sun.org.apache.xerces.internal.util.SecurityManager; +++import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; ++ import com.sun.org.apache.xerces.internal.xni.XNIException; ++ import com.sun.org.apache.xerces.internal.xni.parser.XMLInputSource; ++ import com.sun.org.apache.xerces.internal.xni.parser.XMLParseException; ++@@ -167,7 +167,7 @@ ++ private XMLParserConfiguration initialize() { ++ XML11Configuration config = new XML11Configuration(); ++ if (fComponentManager.getFeature(XMLConstants.FEATURE_SECURE_PROCESSING)) { ++- config.setProperty(SECURITY_MANAGER, new SecurityManager()); +++ config.setProperty(SECURITY_MANAGER, new XMLSecurityManager()); ++ } ++ config.setProperty(ENTITY_RESOLVER, fComponentManager.getProperty(ENTITY_RESOLVER)); ++ config.setProperty(ERROR_HANDLER, fComponentManager.getProperty(ERROR_HANDLER)); ++diff -r 7799c3bd00f5 -r 3dc769c632a1 drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/ValidatorHandlerImpl.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/ValidatorHandlerImpl.java Tue Oct 29 05:50:44 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/ValidatorHandlerImpl.java Tue Oct 29 07:18:24 2013 +0000 ++@@ -47,10 +47,10 @@ ++ import com.sun.org.apache.xerces.internal.util.SAXLocatorWrapper; ++ import com.sun.org.apache.xerces.internal.util.SAXMessageFormatter; ++ import com.sun.org.apache.xerces.internal.util.SymbolTable; ++-import com.sun.org.apache.xerces.internal.util.SecurityManager; ++ import com.sun.org.apache.xerces.internal.util.URI; ++ import com.sun.org.apache.xerces.internal.util.XMLAttributesImpl; ++ import com.sun.org.apache.xerces.internal.util.XMLSymbols; +++import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; ++ import com.sun.org.apache.xerces.internal.xni.Augmentations; ++ import com.sun.org.apache.xerces.internal.xni.NamespaceContext; ++ import com.sun.org.apache.xerces.internal.xni.QName; ++@@ -677,7 +677,7 @@ ++ reader = spf.newSAXParser().getXMLReader(); ++ // If this is a Xerces SAX parser, set the security manager if there is one ++ if (reader instanceof com.sun.org.apache.xerces.internal.parsers.SAXParser) { ++- SecurityManager securityManager = (SecurityManager) fComponentManager.getProperty(SECURITY_MANAGER); +++ XMLSecurityManager securityManager = (XMLSecurityManager) fComponentManager.getProperty(SECURITY_MANAGER); ++ if (securityManager != null) { ++ try { ++ reader.setProperty(SECURITY_MANAGER, securityManager); ++diff -r 7799c3bd00f5 -r 3dc769c632a1 drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaFactory.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaFactory.java Tue Oct 29 05:50:44 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaFactory.java Tue Oct 29 07:18:24 2013 +0000 ++@@ -39,8 +39,8 @@ ++ import com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper; ++ import com.sun.org.apache.xerces.internal.util.SAXInputSource; ++ import com.sun.org.apache.xerces.internal.util.SAXMessageFormatter; ++-import com.sun.org.apache.xerces.internal.util.SecurityManager; ++ import com.sun.org.apache.xerces.internal.util.XMLGrammarPoolImpl; +++import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; ++ import com.sun.org.apache.xerces.internal.xni.XNIException; ++ import com.sun.org.apache.xerces.internal.xni.grammars.Grammar; ++ import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarDescription; ++@@ -74,7 +74,7 @@ ++ private static final String XMLGRAMMAR_POOL = ++ Constants.XERCES_PROPERTY_PREFIX + Constants.XMLGRAMMAR_POOL_PROPERTY; ++ ++- /** Property identifier: SecurityManager. */ +++ /** Property identifier: XMLSecurityManager. */ ++ private static final String SECURITY_MANAGER = ++ Constants.XERCES_PROPERTY_PREFIX + Constants.SECURITY_MANAGER_PROPERTY; ++ ++@@ -97,8 +97,8 @@ ++ /** The ErrorHandlerWrapper */ ++ private ErrorHandlerWrapper fErrorHandlerWrapper; ++ ++- /** The SecurityManager. */ ++- private SecurityManager fSecurityManager; +++ /** The XMLSecurityManager. */ +++ private XMLSecurityManager fSecurityManager; ++ ++ /** The container for the real grammar pool. */ ++ private XMLGrammarPoolWrapper fXMLGrammarPoolWrapper; ++@@ -113,7 +113,7 @@ ++ fXMLSchemaLoader.setErrorHandler(fErrorHandlerWrapper); ++ ++ // Enable secure processing feature by default ++- fSecurityManager = new SecurityManager(); +++ fSecurityManager = new XMLSecurityManager(); ++ fXMLSchemaLoader.setProperty(SECURITY_MANAGER, fSecurityManager); ++ } ++ ++@@ -321,7 +321,7 @@ ++ SAXMessageFormatter.formatMessage(null, ++ "jaxp-secureprocessing-feature", null)); ++ } ++- fSecurityManager = value ? new SecurityManager() : null; +++ fSecurityManager = value ? new XMLSecurityManager() : null; ++ fXMLSchemaLoader.setProperty(SECURITY_MANAGER, fSecurityManager); ++ return; ++ } ++@@ -350,7 +350,7 @@ ++ "ProperyNameNull", null)); ++ } ++ if (name.equals(SECURITY_MANAGER)) { ++- fSecurityManager = (SecurityManager) object; +++ fSecurityManager = (XMLSecurityManager) object; ++ fXMLSchemaLoader.setProperty(SECURITY_MANAGER, fSecurityManager); ++ return; ++ } ++diff -r 7799c3bd00f5 -r 3dc769c632a1 drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaValidatorComponentManager.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaValidatorComponentManager.java Tue Oct 29 05:50:44 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaValidatorComponentManager.java Tue Oct 29 07:18:24 2013 +0000 ++@@ -37,8 +37,8 @@ ++ import com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper; ++ import com.sun.org.apache.xerces.internal.util.NamespaceSupport; ++ import com.sun.org.apache.xerces.internal.util.ParserConfigurationSettings; ++-import com.sun.org.apache.xerces.internal.util.SecurityManager; ++ import com.sun.org.apache.xerces.internal.util.SymbolTable; +++import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; ++ import com.sun.org.apache.xerces.internal.xni.NamespaceContext; ++ import com.sun.org.apache.xerces.internal.xni.XNIException; ++ import com.sun.org.apache.xerces.internal.xni.parser.XMLComponent; ++@@ -173,7 +173,7 @@ ++ private final HashMap fInitProperties = new HashMap(); ++ ++ /** Stores the initial security manager. */ ++- private final SecurityManager fInitSecurityManager; +++ private final XMLSecurityManager fInitSecurityManager; ++ ++ // ++ // User Objects ++@@ -212,7 +212,7 @@ ++ ++ if (System.getSecurityManager() != null) { ++ _isSecureMode = true; ++- setProperty(SECURITY_MANAGER, new SecurityManager()); +++ setProperty(SECURITY_MANAGER, new XMLSecurityManager()); ++ } else { ++ fComponents.put(SECURITY_MANAGER, null); ++ } ++@@ -233,7 +233,7 @@ ++ // if the secure processing feature is set to true, add a security manager to the configuration ++ Boolean secureProcessing = grammarContainer.getFeature(XMLConstants.FEATURE_SECURE_PROCESSING); ++ if (Boolean.TRUE.equals(secureProcessing)) { ++- fInitSecurityManager = new SecurityManager(); +++ fInitSecurityManager = new XMLSecurityManager(); ++ } ++ else { ++ fInitSecurityManager = null; ++@@ -296,7 +296,7 @@ ++ if (_isSecureMode && !value) { ++ throw new XMLConfigurationException(XMLConfigurationException.NOT_ALLOWED, XMLConstants.FEATURE_SECURE_PROCESSING); ++ } ++- setProperty(SECURITY_MANAGER, value ? new SecurityManager() : null); +++ setProperty(SECURITY_MANAGER, value ? new XMLSecurityManager() : null); ++ return; ++ } ++ fConfigUpdated = true; ++diff -r 7799c3bd00f5 -r 3dc769c632a1 drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/AbstractSAXParser.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/AbstractSAXParser.java Tue Oct 29 05:50:44 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/AbstractSAXParser.java Tue Oct 29 07:18:24 2013 +0000 ++@@ -25,9 +25,9 @@ ++ import com.sun.org.apache.xerces.internal.util.EntityResolverWrapper; ++ import com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper; ++ import com.sun.org.apache.xerces.internal.util.SAXMessageFormatter; ++-import com.sun.org.apache.xerces.internal.util.SecurityManager; ++ import com.sun.org.apache.xerces.internal.util.SymbolHash; ++ import com.sun.org.apache.xerces.internal.util.XMLSymbols; +++import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; ++ import com.sun.org.apache.xerces.internal.xni.Augmentations; ++ import com.sun.org.apache.xerces.internal.xni.NamespaceContext; ++ import com.sun.org.apache.xerces.internal.xni.QName; ++@@ -1649,7 +1649,7 @@ ++ else if (featureId.equals(XMLConstants.FEATURE_SECURE_PROCESSING)) { ++ if (state) { ++ if (fConfiguration.getProperty(SECURITY_MANAGER )==null) { ++- fConfiguration.setProperty(SECURITY_MANAGER, new SecurityManager()); +++ fConfiguration.setProperty(SECURITY_MANAGER, new XMLSecurityManager()); ++ } ++ } ++ } ++diff -r 7799c3bd00f5 -r 3dc769c632a1 drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/SecurityConfiguration.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/SecurityConfiguration.java Tue Oct 29 05:50:44 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/SecurityConfiguration.java Tue Oct 29 07:18:24 2013 +0000 ++@@ -23,8 +23,8 @@ ++ import com.sun.org.apache.xerces.internal.impl.Constants; ++ import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarPool; ++ import com.sun.org.apache.xerces.internal.xni.parser.XMLComponentManager; ++-import com.sun.org.apache.xerces.internal.util.SecurityManager; ++ import com.sun.org.apache.xerces.internal.util.SymbolTable; +++import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; ++ ++ /** ++ * This configuration allows Xerces to behave in a security-conscious manner; that is, ++@@ -106,8 +106,8 @@ ++ XMLComponentManager parentSettings) { ++ super(symbolTable, grammarPool, parentSettings); ++ ++- // create the SecurityManager property: ++- setProperty(SECURITY_MANAGER_PROPERTY, new SecurityManager()); +++ // create the XMLSecurityManager property: +++ setProperty(SECURITY_MANAGER_PROPERTY, new XMLSecurityManager()); ++ } // (SymbolTable,XMLGrammarPool) ++ ++ } // class SecurityConfiguration ++diff -r 7799c3bd00f5 -r 3dc769c632a1 drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/util/SecurityManager.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/util/SecurityManager.java Tue Oct 29 05:50:44 2013 +0000 +++++ /dev/null Thu Jan 01 00:00:00 1970 +0000 ++@@ -1,226 +0,0 @@ ++-/* ++- * reserved comment block ++- * DO NOT REMOVE OR ALTER! ++- */ ++-/* ++- * The Apache Software License, Version 1.1 ++- * ++- * ++- * Copyright (c) 2003 The Apache Software Foundation. ++- * All rights reserved. ++- * ++- * Redistribution and use in source and binary forms, with or without ++- * modification, are permitted provided that the following conditions ++- * are met: ++- * ++- * 1. Redistributions of source code must retain the above copyright ++- * notice, this list of conditions and the following disclaimer. ++- * ++- * 2. Redistributions in binary form must reproduce the above copyright ++- * notice, this list of conditions and the following disclaimer in ++- * the documentation and/or other materials provided with the ++- * distribution. ++- * ++- * 3. The end-user documentation included with the redistribution, ++- * if any, must include the following acknowledgment: ++- * "This product includes software developed by the ++- * Apache Software Foundation (http://www.apache.org/)." ++- * Alternately, this acknowledgment may appear in the software itself, ++- * if and wherever such third-party acknowledgments normally appear. ++- * ++- * 4. The names "Xerces" and "Apache Software Foundation" must ++- * not be used to endorse or promote products derived from this ++- * software without prior written permission. For written ++- * permission, please contact apache@apache.org. ++- * ++- * 5. Products derived from this software may not be called "Apache", ++- * nor may "Apache" appear in their name, without prior written ++- * permission of the Apache Software Foundation. ++- * ++- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED ++- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES ++- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ++- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR ++- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ++- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ++- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF ++- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ++- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, ++- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT ++- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ++- * SUCH DAMAGE. ++- * ==================================================================== ++- * ++- * This software consists of voluntary contributions made by many ++- * individuals on behalf of the Apache Software Foundation and was ++- * originally based on software copyright (c) 1999, International ++- * Business Machines, Inc., http://www.apache.org. For more ++- * information on the Apache Software Foundation, please see ++- * . ++- */ ++- ++-package com.sun.org.apache.xerces.internal.util; ++-import com.sun.org.apache.xerces.internal.impl.Constants; ++-import java.security.AccessController; ++-import java.security.PrivilegedAction; ++-/** ++- * This class is a container for parser settings that relate to ++- * security, or more specifically, it is intended to be used to prevent denial-of-service ++- * attacks from being launched against a system running Xerces. ++- * Any component that is aware of a denial-of-service attack that can arise ++- * from its processing of a certain kind of document may query its Component Manager ++- * for the property (http://apache.org/xml/properties/security-manager) ++- * whose value will be an instance of this class. ++- * If no value has been set for the property, the component should proceed in the "usual" (spec-compliant) ++- * manner. If a value has been set, then it must be the case that the component in ++- * question needs to know what method of this class to query. This class ++- * will provide defaults for all known security issues, but will also provide ++- * setters so that those values can be tailored by applications that care. ++- * ++- * @author Neil Graham, IBM ++- * ++- * @version $Id: SecurityManager.java,v 1.5 2010-11-01 04:40:14 joehw Exp $ ++- */ ++-public final class SecurityManager { ++- ++- // ++- // Constants ++- // ++- ++- // default value for entity expansion limit ++- private final static int DEFAULT_ENTITY_EXPANSION_LIMIT = 64000; ++- ++- /** Default value of number of nodes created. **/ ++- private final static int DEFAULT_MAX_OCCUR_NODE_LIMIT = 5000; ++- ++- // ++- // Data ++- // ++- ++- private final static int DEFAULT_ELEMENT_ATTRIBUTE_LIMIT = 10000; ++- ++- /** Entity expansion limit. **/ ++- private int entityExpansionLimit; ++- ++- /** W3C XML Schema maxOccurs limit. **/ ++- private int maxOccurLimit; ++- ++- private int fElementAttributeLimit; ++- // default constructor. Establishes default values for ++- // all known security holes. ++- /** ++- * Default constructor. Establishes default values ++- * for known security vulnerabilities. ++- */ ++- public SecurityManager() { ++- entityExpansionLimit = DEFAULT_ENTITY_EXPANSION_LIMIT; ++- maxOccurLimit = DEFAULT_MAX_OCCUR_NODE_LIMIT ; ++- fElementAttributeLimit = DEFAULT_ELEMENT_ATTRIBUTE_LIMIT; ++- //We are reading system properties only once , ++- //at the time of creation of this object , ++- readSystemProperties(); ++- } ++- ++- /** ++- *

Sets the number of entity expansions that the ++- * parser should permit in a document.

++- * ++- * @param limit the number of entity expansions ++- * permitted in a document ++- */ ++- public void setEntityExpansionLimit(int limit) { ++- entityExpansionLimit = limit; ++- } ++- ++- /** ++- *

Returns the number of entity expansions ++- * that the parser permits in a document.

++- * ++- * @return the number of entity expansions ++- * permitted in a document ++- */ ++- public int getEntityExpansionLimit() { ++- return entityExpansionLimit; ++- } ++- ++- /** ++- *

Sets the limit of the number of content model nodes ++- * that may be created when building a grammar for a W3C ++- * XML Schema that contains maxOccurs attributes with values ++- * other than "unbounded".

++- * ++- * @param limit the maximum value for maxOccurs other ++- * than "unbounded" ++- */ ++- public void setMaxOccurNodeLimit(int limit){ ++- maxOccurLimit = limit; ++- } ++- ++- /** ++- *

Returns the limit of the number of content model nodes ++- * that may be created when building a grammar for a W3C ++- * XML Schema that contains maxOccurs attributes with values ++- * other than "unbounded".

++- * ++- * @return the maximum value for maxOccurs other ++- * than "unbounded" ++- */ ++- public int getMaxOccurNodeLimit(){ ++- return maxOccurLimit; ++- } ++- ++- public int getElementAttrLimit(){ ++- return fElementAttributeLimit; ++- } ++- ++- public void setElementAttrLimit(int limit){ ++- fElementAttributeLimit = limit; ++- } ++- ++- private void readSystemProperties(){ ++- ++- //TODO: also read SYSTEM_PROPERTY_ELEMENT_ATTRIBUTE_LIMIT ++- try { ++- String value = getSystemProperty(Constants.ENTITY_EXPANSION_LIMIT); ++- if(value != null && !value.equals("")){ ++- entityExpansionLimit = Integer.parseInt(value); ++- if (entityExpansionLimit < 0) ++- entityExpansionLimit = DEFAULT_ENTITY_EXPANSION_LIMIT; ++- } ++- else ++- entityExpansionLimit = DEFAULT_ENTITY_EXPANSION_LIMIT; ++- }catch(Exception ex){} ++- ++- try { ++- String value = getSystemProperty(Constants.MAX_OCCUR_LIMIT); ++- if(value != null && !value.equals("")){ ++- maxOccurLimit = Integer.parseInt(value); ++- if (maxOccurLimit < 0) ++- maxOccurLimit = DEFAULT_MAX_OCCUR_NODE_LIMIT; ++- } ++- else ++- maxOccurLimit = DEFAULT_MAX_OCCUR_NODE_LIMIT; ++- }catch(Exception ex){} ++- ++- try { ++- String value = getSystemProperty(Constants.SYSTEM_PROPERTY_ELEMENT_ATTRIBUTE_LIMIT); ++- if(value != null && !value.equals("")){ ++- fElementAttributeLimit = Integer.parseInt(value); ++- if ( fElementAttributeLimit < 0) ++- fElementAttributeLimit = DEFAULT_ELEMENT_ATTRIBUTE_LIMIT; ++- } ++- else ++- fElementAttributeLimit = DEFAULT_ELEMENT_ATTRIBUTE_LIMIT; ++- ++- }catch(Exception ex){} ++- ++- } ++- ++- private String getSystemProperty(final String propName) { ++- return AccessController.doPrivileged(new PrivilegedAction() { ++- public String run() { ++- return System.getProperty(propName); ++- } ++- }); ++- } ++-} // class SecurityManager ++diff -r 7799c3bd00f5 -r 3dc769c632a1 drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/util/SymbolTable.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/util/SymbolTable.java Tue Oct 29 05:50:44 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/util/SymbolTable.java Tue Oct 29 07:18:24 2013 +0000 ++@@ -173,7 +173,7 @@ ++ for (int i = 0; i < length; i++) { ++ code = code * 37 + symbol.charAt(i); ++ } ++- return code & 0x7FFFFFF; +++ return code & 0x7FFFFFFF; ++ ++ } // hash(String):int ++ ++@@ -194,7 +194,7 @@ ++ for (int i = 0; i < length; i++) { ++ code = code * 37 + buffer[offset + i]; ++ } ++- return code & 0x7FFFFFF; +++ return code & 0x7FFFFFFF; ++ ++ } // hash(char[],int,int):int ++ ++diff -r 7799c3bd00f5 -r 3dc769c632a1 drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/utils/XMLSecurityManager.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/utils/XMLSecurityManager.java Tue Oct 29 07:18:24 2013 +0000 ++@@ -0,0 +1,147 @@ +++/* +++ * Copyright (c) 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. +++ */ +++ +++package com.sun.org.apache.xerces.internal.utils; +++ +++import com.sun.org.apache.xerces.internal.impl.Constants; +++ +++/** +++ * This class manages standard and implementation-specific limitations. +++ * +++ */ +++public final class XMLSecurityManager { +++ +++ /** +++ * States of the settings of a property, in the order: default value, value +++ * set by FEATURE_SECURE_PROCESSING, jaxp.properties file, jaxp system +++ * properties, and jaxp api properties +++ */ +++ public static enum State { +++ //this order reflects the overriding order +++ DEFAULT, FSP, JAXPDOTPROPERTIES, SYSTEMPROPERTY, APIPROPERTY +++ } +++ +++ /** +++ * Limits managed by the security manager +++ */ +++ public static enum Limit { +++ ENTITY_EXPANSION_LIMIT(64000), +++ MAX_OCCUR_NODE_LIMIT(5000), +++ ELEMENT_ATTRIBUTE_LIMIT(10000); +++ +++ final int defaultValue; +++ +++ Limit(int value) { +++ this.defaultValue = value; +++ } +++ +++ int defaultValue() { +++ return defaultValue; +++ } +++ } +++ +++ /** +++ * Values of the limits as defined in enum Limit +++ */ +++ private final int[] limits; +++ /** +++ * States of the settings for each limit in limits above +++ */ +++ private State[] states = {State.DEFAULT, State.DEFAULT, State.DEFAULT, State.DEFAULT}; +++ +++ /** +++ * Default constructor. Establishes default values for known security +++ * vulnerabilities. +++ */ +++ public XMLSecurityManager() { +++ limits = new int[Limit.values().length]; +++ for (Limit limit : Limit.values()) { +++ limits[limit.ordinal()] = limit.defaultValue(); +++ } +++ //read system properties or jaxp.properties +++ readSystemProperties(); +++ } +++ +++ /** +++ * Sets the limit for a specific type of XML constructs. This can be either +++ * the size or the number of the constructs. +++ * +++ * @param type the type of limitation +++ * @param state the state of limitation +++ * @param limit the limit to the type +++ */ +++ public void setLimit(Limit limit, State state, int value) { +++ //only update if it shall override +++ if (state.compareTo(states[limit.ordinal()]) >= 0) { +++ limits[limit.ordinal()] = value; +++ states[limit.ordinal()] = state; +++ } +++ } +++ +++ /** +++ * Returns the limit set for the type specified +++ * +++ * @param limit the type of limitation +++ * @return the limit to the type +++ */ +++ public int getLimit(Limit limit) { +++ return limits[limit.ordinal()]; +++ } +++ +++ /** +++ * Read from system properties, or those in jaxp.properties +++ */ +++ private void readSystemProperties() { +++ getSystemProperty(Limit.ENTITY_EXPANSION_LIMIT, Constants.ENTITY_EXPANSION_LIMIT); +++ getSystemProperty(Limit.MAX_OCCUR_NODE_LIMIT, Constants.MAX_OCCUR_LIMIT); +++ getSystemProperty(Limit.ELEMENT_ATTRIBUTE_LIMIT, +++ Constants.SYSTEM_PROPERTY_ELEMENT_ATTRIBUTE_LIMIT); +++ } +++ +++ /** +++ * Read from system properties, or those in jaxp.properties +++ * +++ * @param limit the type of the property +++ * @param property the property name +++ */ +++ private void getSystemProperty(Limit limit, String property) { +++ try { +++ String value = SecuritySupport.getSystemProperty(property); +++ if (value != null && !value.equals("")) { +++ limits[limit.ordinal()] = Integer.parseInt(value); +++ states[limit.ordinal()] = State.SYSTEMPROPERTY; +++ return; +++ } +++ +++ value = SecuritySupport.readJAXPProperty(property); +++ if (value != null && !value.equals("")) { +++ limits[limit.ordinal()] = Integer.parseInt(value); +++ states[limit.ordinal()] = State.JAXPDOTPROPERTIES; +++ } +++ } catch (NumberFormatException e) { +++ //invalid setting ignored +++ } +++ } +++} ++diff -r 7799c3bd00f5 -r 3dc769c632a1 drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/xinclude/XIncludeHandler.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/xinclude/XIncludeHandler.java Tue Oct 29 05:50:44 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/xinclude/XIncludeHandler.java Tue Oct 29 07:18:24 2013 +0000 ++@@ -36,7 +36,6 @@ ++ import com.sun.org.apache.xerces.internal.util.HTTPInputSource; ++ import com.sun.org.apache.xerces.internal.util.IntStack; ++ import com.sun.org.apache.xerces.internal.util.ParserConfigurationSettings; ++-import com.sun.org.apache.xerces.internal.util.SecurityManager; ++ import com.sun.org.apache.xerces.internal.util.SymbolTable; ++ import com.sun.org.apache.xerces.internal.util.URI; ++ import com.sun.org.apache.xerces.internal.util.XMLAttributesImpl; ++@@ -44,6 +43,7 @@ ++ import com.sun.org.apache.xerces.internal.util.XMLChar; ++ import com.sun.org.apache.xerces.internal.util.XMLSymbols; ++ import com.sun.org.apache.xerces.internal.util.URI.MalformedURIException; +++import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; ++ import com.sun.org.apache.xerces.internal.xni.Augmentations; ++ import com.sun.org.apache.xerces.internal.xni.NamespaceContext; ++ import com.sun.org.apache.xerces.internal.xni.QName; ++@@ -280,7 +280,7 @@ ++ protected SymbolTable fSymbolTable; ++ protected XMLErrorReporter fErrorReporter; ++ protected XMLEntityResolver fEntityResolver; ++- protected SecurityManager fSecurityManager; +++ protected XMLSecurityManager fSecurityManager; ++ ++ // these are needed for text include processing ++ protected XIncludeTextReader fXInclude10TextReader; ++@@ -506,8 +506,8 @@ ++ ++ // Get security manager. ++ try { ++- SecurityManager value = ++- (SecurityManager)componentManager.getProperty( +++ XMLSecurityManager value = +++ (XMLSecurityManager)componentManager.getProperty( ++ SECURITY_MANAGER); ++ ++ if (value != null) { ++@@ -656,7 +656,7 @@ ++ return; ++ } ++ if (propertyId.equals(SECURITY_MANAGER)) { ++- fSecurityManager = (SecurityManager)value; +++ fSecurityManager = (XMLSecurityManager)value; ++ if (fChildConfig != null) { ++ fChildConfig.setProperty(propertyId, value); ++ } ++diff -r 7799c3bd00f5 -r 3dc769c632a1 drop_included/jaxp_src/src/com/sun/xml/internal/stream/Entity.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/xml/internal/stream/Entity.java Tue Oct 29 05:50:44 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/xml/internal/stream/Entity.java Tue Oct 29 07:18:24 2013 +0000 ++@@ -248,7 +248,7 @@ ++ public int fBufferSize = DEFAULT_BUFFER_SIZE; ++ ++ /** Default buffer size before we've finished with the XMLDecl: */ ++- public static final int DEFAULT_XMLDECL_BUFFER_SIZE = 28; +++ public static final int DEFAULT_XMLDECL_BUFFER_SIZE = 64; ++ ++ /** Default internal entity buffer size (1024). */ ++ public static final int DEFAULT_INTERNAL_BUFFER_SIZE = 1024; +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8017300-improve_interface_implementation.patch openjdk-6-6b27-1.12.6/patches/openjdk/8017300-improve_interface_implementation.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8017300-improve_interface_implementation.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8017300-improve_interface_implementation.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,129 @@ ++# HG changeset patch ++# User sundar ++# Date 1382737389 -3600 ++# Fri Oct 25 22:43:09 2013 +0100 ++# Node ID de490a43861e05f3da489db136687b1dc6f1949a ++# Parent 0b0490779c5b643b7a3e90ac6870c1ee4bd5a155 ++8017300: Improve Interface Implementation ++Reviewed-by: ahgross, jlaskey, mchung ++ ++diff -r 0b0490779c5b -r de490a43861e src/share/classes/com/sun/script/util/InterfaceImplementor.java ++--- openjdk/jdk/src/share/classes/com/sun/script/util/InterfaceImplementor.java Tue Jul 16 10:58:46 2013 +0100 +++++ openjdk/jdk/src/share/classes/com/sun/script/util/InterfaceImplementor.java Fri Oct 25 22:43:09 2013 +0100 ++@@ -28,6 +28,7 @@ ++ import javax.script.*; ++ import java.lang.reflect.*; ++ import java.security.*; +++import sun.reflect.misc.ReflectUtil; ++ ++ /* ++ * java.lang.reflect.Proxy based interface implementor. This is meant ++@@ -82,8 +83,18 @@ ++ if (iface == null || !iface.isInterface()) { ++ throw new IllegalArgumentException("interface Class expected"); ++ } +++ +++ if (System.getSecurityManager() != null && +++ !Modifier.isPublic(iface.getModifiers())) { +++ throw new SecurityException("attempt to implement non-public interface"); +++ } +++ +++ // make sure restricted package interfaces are not attempted. +++ ReflectUtil.checkPackageAccess(iface.getName()); +++ ++ AccessControlContext accCtxt = AccessController.getContext(); ++- return iface.cast(Proxy.newProxyInstance(iface.getClassLoader(), +++ return iface.cast(Proxy.newProxyInstance( +++ getLoaderForProxy(iface), ++ new Class[]{iface}, ++ new InterfaceImplementorInvocationHandler(thiz, accCtxt))); ++ } ++@@ -101,4 +112,20 @@ ++ // default is identity conversion ++ return args; ++ } +++ +++ // get appropriate ClassLoader for generated Proxy class +++ private static ClassLoader getLoaderForProxy(Class iface) { +++ ClassLoader loader = iface.getClassLoader(); +++ +++ // if bootstrap class, try TCCL +++ if (loader == null) { +++ loader = Thread.currentThread().getContextClassLoader(); +++ } +++ +++ // if TCCL is also null, try System class loader +++ if (loader == null) { +++ loader = ClassLoader.getSystemClassLoader(); +++ } +++ return loader; +++ } ++ } ++diff -r 0b0490779c5b -r de490a43861e src/share/lib/security/java.security-linux ++--- openjdk/jdk/src/share/lib/security/java.security-linux Tue Jul 16 10:58:46 2013 +0100 +++++ openjdk/jdk/src/share/lib/security/java.security-linux Fri Oct 25 22:43:09 2013 +0100 ++@@ -133,6 +133,7 @@ ++ com.sun.istack.internal.,\ ++ com.sun.jmx.,\ ++ com.sun.proxy.,\ +++ com.sun.script.,\ ++ com.sun.org.apache.bcel.internal.,\ ++ com.sun.org.apache.regexp.internal.,\ ++ com.sun.org.apache.xerces.internal.,\ ++@@ -169,6 +170,7 @@ ++ com.sun.istack.internal.,\ ++ com.sun.jmx.,\ ++ com.sun.proxy.,\ +++ com.sun.script.,\ ++ com.sun.org.apache.bcel.internal.,\ ++ com.sun.org.apache.regexp.internal.,\ ++ com.sun.org.apache.xerces.internal.,\ ++diff -r 0b0490779c5b -r de490a43861e src/share/lib/security/java.security-solaris ++--- openjdk/jdk/src/share/lib/security/java.security-solaris Tue Jul 16 10:58:46 2013 +0100 +++++ openjdk/jdk/src/share/lib/security/java.security-solaris Fri Oct 25 22:43:09 2013 +0100 ++@@ -134,6 +134,7 @@ ++ com.sun.istack.internal.,\ ++ com.sun.jmx.,\ ++ com.sun.proxy.,\ +++ com.sun.script.,\ ++ com.sun.org.apache.bcel.internal.,\ ++ com.sun.org.apache.regexp.internal.,\ ++ com.sun.org.apache.xerces.internal.,\ ++@@ -171,6 +172,7 @@ ++ com.sun.istack.internal.,\ ++ com.sun.jmx.,\ ++ com.sun.proxy.,\ +++ com.sun.script.,\ ++ com.sun.org.apache.bcel.internal.,\ ++ com.sun.org.apache.regexp.internal.,\ ++ com.sun.org.apache.xerces.internal.,\ ++diff -r 0b0490779c5b -r de490a43861e src/share/lib/security/java.security-windows ++--- openjdk/jdk/src/share/lib/security/java.security-windows Tue Jul 16 10:58:46 2013 +0100 +++++ openjdk/jdk/src/share/lib/security/java.security-windows Fri Oct 25 22:43:09 2013 +0100 ++@@ -134,6 +134,7 @@ ++ com.sun.istack.internal.,\ ++ com.sun.jmx.,\ ++ com.sun.proxy.,\ +++ com.sun.script.,\ ++ com.sun.org.apache.bcel.internal.,\ ++ com.sun.org.apache.regexp.internal.,\ ++ com.sun.org.apache.xerces.internal.,\ ++@@ -172,6 +173,7 @@ ++ com.sun.istack.internal.,\ ++ com.sun.jmx.,\ ++ com.sun.proxy.,\ +++ com.sun.script.,\ ++ com.sun.org.apache.bcel.internal.,\ ++ com.sun.org.apache.regexp.internal.,\ ++ com.sun.org.apache.xerces.internal.,\ ++diff -r 0b0490779c5b -r de490a43861e test/java/lang/SecurityManager/CheckPackageAccess.java ++--- openjdk/jdk/test/java/lang/SecurityManager/CheckPackageAccess.java Tue Jul 16 10:58:46 2013 +0100 +++++ openjdk/jdk/test/java/lang/SecurityManager/CheckPackageAccess.java Fri Oct 25 22:43:09 2013 +0100 ++@@ -74,6 +74,7 @@ ++ "com.sun.org.apache.xml.internal.serializer.utils.", ++ "com.sun.org.apache.xml.internal.utils.", ++ "com.sun.org.glassfish.", +++ "com.sun.script.", ++ "oracle.jrockit.jfr.", ++ "org.jcp.xml.dsig.internal.", ++ }; +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8017505-better_client_service.patch openjdk-6-6b27-1.12.6/patches/openjdk/8017505-better_client_service.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8017505-better_client_service.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8017505-better_client_service.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,560 @@ ++# HG changeset patch ++# User mkos ++# Date 1383022122 0 ++# Tue Oct 29 04:48:42 2013 +0000 ++# Node ID 4ea4a060f3748510aedf4355ae2dbf2921f15494 ++# Parent 60ca74797572c7fb8682802738dda073e44aeea0 ++8017505: Better Client Service ++Reviewed-by: mullan, ahgross, mgrebac ++ ++diff -r 60ca74797572 -r 4ea4a060f374 drop_included/jaxws_src/src/com/sun/xml/internal/ws/api/server/InstanceResolver.java ++--- openjdk/jaxws/drop_included/jaxws_src/src/com/sun/xml/internal/ws/api/server/InstanceResolver.java Fri Oct 04 12:22:34 2013 -0400 +++++ openjdk/jaxws/drop_included/jaxws_src/src/com/sun/xml/internal/ws/api/server/InstanceResolver.java Tue Oct 29 04:48:42 2013 +0000 ++@@ -1,5 +1,5 @@ ++ /* ++- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. +++ * Copyright (c) 1997, 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 ++@@ -232,7 +232,7 @@ ++ public Object invoke(Packet p, Method m, Object... args) throws InvocationTargetException, IllegalAccessException { ++ T t = resolve(p); ++ try { ++- return m.invoke(t, args ); +++ return MethodUtil.invoke(t, m, args ); ++ } finally { ++ postInvoke(p,t); ++ } ++diff -r 60ca74797572 -r 4ea4a060f374 drop_included/jaxws_src/src/com/sun/xml/internal/ws/api/server/MethodUtil.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/jaxws/drop_included/jaxws_src/src/com/sun/xml/internal/ws/api/server/MethodUtil.java Tue Oct 29 04:48:42 2013 +0000 ++@@ -0,0 +1,109 @@ +++/* +++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. +++ * +++ * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. +++ * +++ * The contents of this file are subject to the terms of either the GNU +++ * General Public License Version 2 only ("GPL") or the Common Development +++ * and Distribution License("CDDL") (collectively, the "License"). You +++ * may not use this file except in compliance with the License. You can +++ * obtain a copy of the License at +++ * http://glassfish.java.net/public/CDDL+GPL_1_1.html +++ * or packager/legal/LICENSE.txt. See the License for the specific +++ * language governing permissions and limitations under the License. +++ * +++ * When distributing the software, include this License Header Notice in each +++ * file and include the License file at packager/legal/LICENSE.txt. +++ * +++ * GPL Classpath Exception: +++ * Oracle designates this particular file as subject to the "Classpath" +++ * exception as provided by Oracle in the GPL Version 2 section of the License +++ * file that accompanied this code. +++ * +++ * Modifications: +++ * If applicable, add the following below the License Header, with the fields +++ * enclosed by brackets [] replaced by your own identifying information: +++ * "Portions Copyright [year] [name of copyright owner]" +++ * +++ * Contributor(s): +++ * If you wish your version of this file to be governed by only the CDDL or +++ * only the GPL Version 2, indicate your decision by adding "[Contributor] +++ * elects to include this software in this distribution under the [CDDL or GPL +++ * Version 2] license." If you don't indicate a single choice of license, a +++ * recipient has the option to distribute your version of this file under +++ * either the CDDL, the GPL Version 2 or to extend the choice of license to +++ * its licensees as provided above. However, if you add GPL Version 2 code +++ * and therefore, elected the GPL Version 2 license, then the option applies +++ * only if the new code is made subject to such option by the copyright +++ * holder. +++ */ +++ +++package com.sun.xml.internal.ws.api.server; +++ +++import java.lang.reflect.InvocationTargetException; +++import java.lang.reflect.Method; +++import java.util.logging.Level; +++import java.util.logging.Logger; +++ +++/** +++ * Utility class to invoke sun.reflect.misc.MethodUtil.invoke() if available. If not (other then Oracle JDK) fallbacks +++ * to java.lang,reflect.Method.invoke() +++ * +++ * Be careful, copy of this class exists in several packages, iny modification must be done to other copies too! +++ */ +++class MethodUtil { +++ +++ private static final Logger LOGGER = Logger.getLogger(MethodUtil.class.getName()); +++ private static final Method INVOKE_METHOD; +++ +++ static { +++ Method method; +++ try { +++ Class clazz = Class.forName("sun.reflect.misc.MethodUtil"); +++ method = clazz.getMethod("invoke", Method.class, Object.class, Object[].class); +++ if (LOGGER.isLoggable(Level.FINE)) { +++ LOGGER.log(Level.FINE, "Class sun.reflect.misc.MethodUtil found; it will be used to invoke methods."); +++ } +++ } catch (Throwable t) { +++ method = null; +++ if (LOGGER.isLoggable(Level.FINE)) { +++ LOGGER.log(Level.FINE, "Class sun.reflect.misc.MethodUtil not found, probably non-Oracle JVM"); +++ } +++ } +++ INVOKE_METHOD = method; +++ } +++ +++ static Object invoke(Object target, Method method, Object[] args) throws IllegalAccessException, InvocationTargetException { +++ if (INVOKE_METHOD != null) { +++ // sun.reflect.misc.MethodUtil.invoke(method, owner, args) +++ if (LOGGER.isLoggable(Level.FINE)) { +++ LOGGER.log(Level.FINE, "Invoking method using sun.reflect.misc.MethodUtil"); +++ } +++ try { +++ return INVOKE_METHOD.invoke(null, method, target, args); +++ } catch (InvocationTargetException ite) { +++ // unwrap invocation exception added by reflection code ... +++ throw unwrapException(ite); +++ } +++ } else { +++ // other then Oracle JDK ... +++ if (LOGGER.isLoggable(Level.FINE)) { +++ LOGGER.log(Level.FINE, "Invoking method directly, probably non-Oracle JVM"); +++ } +++ return method.invoke(target, args); +++ } +++ } +++ +++ private static InvocationTargetException unwrapException(InvocationTargetException ite) { +++ Throwable targetException = ite.getTargetException(); +++ if (targetException != null && targetException instanceof InvocationTargetException) { +++ if (LOGGER.isLoggable(Level.FINE)) { +++ LOGGER.log(Level.FINE, "Unwrapping invocation target exception"); +++ } +++ return (InvocationTargetException) targetException; +++ } else { +++ return ite; +++ } +++ } +++ +++} ++diff -r 60ca74797572 -r 4ea4a060f374 drop_included/jaxws_src/src/com/sun/xml/internal/ws/client/sei/MethodUtil.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/jaxws/drop_included/jaxws_src/src/com/sun/xml/internal/ws/client/sei/MethodUtil.java Tue Oct 29 04:48:42 2013 +0000 ++@@ -0,0 +1,109 @@ +++/* +++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. +++ * +++ * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. +++ * +++ * The contents of this file are subject to the terms of either the GNU +++ * General Public License Version 2 only ("GPL") or the Common Development +++ * and Distribution License("CDDL") (collectively, the "License"). You +++ * may not use this file except in compliance with the License. You can +++ * obtain a copy of the License at +++ * http://glassfish.java.net/public/CDDL+GPL_1_1.html +++ * or packager/legal/LICENSE.txt. See the License for the specific +++ * language governing permissions and limitations under the License. +++ * +++ * When distributing the software, include this License Header Notice in each +++ * file and include the License file at packager/legal/LICENSE.txt. +++ * +++ * GPL Classpath Exception: +++ * Oracle designates this particular file as subject to the "Classpath" +++ * exception as provided by Oracle in the GPL Version 2 section of the License +++ * file that accompanied this code. +++ * +++ * Modifications: +++ * If applicable, add the following below the License Header, with the fields +++ * enclosed by brackets [] replaced by your own identifying information: +++ * "Portions Copyright [year] [name of copyright owner]" +++ * +++ * Contributor(s): +++ * If you wish your version of this file to be governed by only the CDDL or +++ * only the GPL Version 2, indicate your decision by adding "[Contributor] +++ * elects to include this software in this distribution under the [CDDL or GPL +++ * Version 2] license." If you don't indicate a single choice of license, a +++ * recipient has the option to distribute your version of this file under +++ * either the CDDL, the GPL Version 2 or to extend the choice of license to +++ * its licensees as provided above. However, if you add GPL Version 2 code +++ * and therefore, elected the GPL Version 2 license, then the option applies +++ * only if the new code is made subject to such option by the copyright +++ * holder. +++ */ +++ +++package com.sun.xml.internal.ws.client.sei; +++ +++import java.lang.reflect.InvocationTargetException; +++import java.lang.reflect.Method; +++import java.util.logging.Level; +++import java.util.logging.Logger; +++ +++/** +++ * Utility class to invoke sun.reflect.misc.MethodUtil.invoke() if available. If not (other then Oracle JDK) fallbacks +++ * to java.lang,reflect.Method.invoke() +++ *

+++ * Be careful, copy of this class exists in several packages, iny modification must be done to other copies too! +++ */ +++class MethodUtil { +++ +++ private static final Logger LOGGER = Logger.getLogger(MethodUtil.class.getName()); +++ private static final Method INVOKE_METHOD; +++ +++ static { +++ Method method; +++ try { +++ Class clazz = Class.forName("sun.reflect.misc.MethodUtil"); +++ method = clazz.getMethod("invoke", Method.class, Object.class, Object[].class); +++ if (LOGGER.isLoggable(Level.FINE)) { +++ LOGGER.log(Level.FINE, "Class sun.reflect.misc.MethodUtil found; it will be used to invoke methods."); +++ } +++ } catch (Throwable t) { +++ method = null; +++ if (LOGGER.isLoggable(Level.FINE)) { +++ LOGGER.log(Level.FINE, "Class sun.reflect.misc.MethodUtil not found, probably non-Oracle JVM"); +++ } +++ } +++ INVOKE_METHOD = method; +++ } +++ +++ static Object invoke(Object target, Method method, Object[] args) throws IllegalAccessException, InvocationTargetException { +++ if (INVOKE_METHOD != null) { +++ // sun.reflect.misc.MethodUtil.invoke(method, owner, args) +++ if (LOGGER.isLoggable(Level.FINE)) { +++ LOGGER.log(Level.FINE, "Invoking method using sun.reflect.misc.MethodUtil"); +++ } +++ try { +++ return INVOKE_METHOD.invoke(null, method, target, args); +++ } catch (InvocationTargetException ite) { +++ // unwrap invocation exception added by reflection code ... +++ throw unwrapException(ite); +++ } +++ } else { +++ // other then Oracle JDK ... +++ if (LOGGER.isLoggable(Level.FINE)) { +++ LOGGER.log(Level.FINE, "Invoking method directly, probably non-Oracle JVM"); +++ } +++ return method.invoke(target, args); +++ } +++ } +++ +++ private static InvocationTargetException unwrapException(InvocationTargetException ite) { +++ Throwable targetException = ite.getTargetException(); +++ if (targetException != null && targetException instanceof InvocationTargetException) { +++ if (LOGGER.isLoggable(Level.FINE)) { +++ LOGGER.log(Level.FINE, "Unwrapping invocation target exception"); +++ } +++ return (InvocationTargetException) targetException; +++ } else { +++ return ite; +++ } +++ } +++ +++} ++diff -r 60ca74797572 -r 4ea4a060f374 drop_included/jaxws_src/src/com/sun/xml/internal/ws/client/sei/SEIStub.java ++--- openjdk/jaxws/drop_included/jaxws_src/src/com/sun/xml/internal/ws/client/sei/SEIStub.java Fri Oct 04 12:22:34 2013 -0400 +++++ openjdk/jaxws/drop_included/jaxws_src/src/com/sun/xml/internal/ws/client/sei/SEIStub.java Tue Oct 29 04:48:42 2013 +0000 ++@@ -1,5 +1,5 @@ ++ /* ++- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. +++ * Copyright (c) 1997, 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 ++@@ -33,8 +33,8 @@ ++ import com.sun.xml.internal.ws.api.message.Packet; ++ import com.sun.xml.internal.ws.api.model.MEP; ++ import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundOperation; +++import com.sun.xml.internal.ws.api.pipe.Fiber; ++ import com.sun.xml.internal.ws.api.pipe.Tube; ++-import com.sun.xml.internal.ws.api.pipe.Fiber; ++ import com.sun.xml.internal.ws.binding.BindingImpl; ++ import com.sun.xml.internal.ws.client.RequestContext; ++ import com.sun.xml.internal.ws.client.ResponseContextReceiver; ++@@ -47,6 +47,8 @@ ++ import java.lang.reflect.InvocationHandler; ++ import java.lang.reflect.InvocationTargetException; ++ import java.lang.reflect.Method; +++import java.lang.reflect.Modifier; +++import java.lang.reflect.Proxy; ++ import java.util.HashMap; ++ import java.util.Map; ++ ++@@ -102,13 +104,14 @@ ++ private final Map methodHandlers = new HashMap(); ++ ++ public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { +++ validateInputs(proxy, method); ++ MethodHandler handler = methodHandlers.get(method); ++ if (handler != null) { ++ return handler.invoke(proxy, args); ++ } else { ++ // we handle the other method invocations by ourselves ++ try { ++- return method.invoke(this, args); +++ return MethodUtil.invoke(this, method, args); ++ } catch (IllegalAccessException e) { ++ // impossible ++ throw new AssertionError(e); ++@@ -120,6 +123,17 @@ ++ } ++ } ++ +++ private void validateInputs(Object proxy, Method method) { +++ if (proxy == null || !Proxy.isProxyClass(proxy.getClass())) { +++ throw new IllegalStateException("Passed object is not proxy!"); +++ } +++ Class declaringClass = method.getDeclaringClass(); +++ if (method == null || declaringClass == null +++ || Modifier.isStatic(method.getModifiers())) { +++ throw new IllegalStateException("Invoking static method is not allowed!"); +++ } +++ } +++ ++ public final Packet doProcess(Packet request, RequestContext rc, ResponseContextReceiver receiver) { ++ return super.process(request, rc, receiver); ++ } ++diff -r 60ca74797572 -r 4ea4a060f374 drop_included/jaxws_src/src/com/sun/xml/internal/ws/policy/privateutil/MethodUtil.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/jaxws/drop_included/jaxws_src/src/com/sun/xml/internal/ws/policy/privateutil/MethodUtil.java Tue Oct 29 04:48:42 2013 +0000 ++@@ -0,0 +1,107 @@ +++/* +++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. +++ * +++ * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. +++ * +++ * The contents of this file are subject to the terms of either the GNU +++ * General Public License Version 2 only ("GPL") or the Common Development +++ * and Distribution License("CDDL") (collectively, the "License"). You +++ * may not use this file except in compliance with the License. You can +++ * obtain a copy of the License at +++ * http://glassfish.java.net/public/CDDL+GPL_1_1.html +++ * or packager/legal/LICENSE.txt. See the License for the specific +++ * language governing permissions and limitations under the License. +++ * +++ * When distributing the software, include this License Header Notice in each +++ * file and include the License file at packager/legal/LICENSE.txt. +++ * +++ * GPL Classpath Exception: +++ * Oracle designates this particular file as subject to the "Classpath" +++ * exception as provided by Oracle in the GPL Version 2 section of the License +++ * file that accompanied this code. +++ * +++ * Modifications: +++ * If applicable, add the following below the License Header, with the fields +++ * enclosed by brackets [] replaced by your own identifying information: +++ * "Portions Copyright [year] [name of copyright owner]" +++ * +++ * Contributor(s): +++ * If you wish your version of this file to be governed by only the CDDL or +++ * only the GPL Version 2, indicate your decision by adding "[Contributor] +++ * elects to include this software in this distribution under the [CDDL or GPL +++ * Version 2] license." If you don't indicate a single choice of license, a +++ * recipient has the option to distribute your version of this file under +++ * either the CDDL, the GPL Version 2 or to extend the choice of license to +++ * its licensees as provided above. However, if you add GPL Version 2 code +++ * and therefore, elected the GPL Version 2 license, then the option applies +++ * only if the new code is made subject to such option by the copyright +++ * holder. +++ */ +++ +++package com.sun.xml.internal.ws.policy.privateutil; +++ +++import java.lang.reflect.InvocationTargetException; +++import java.lang.reflect.Method; +++import java.util.logging.Level; +++import java.util.logging.Logger; +++ +++/** +++ * Utility class to invoke sun.reflect.misc.MethodUtil.invoke() if available. If not (other then Oracle JDK) fallbacks +++ * to java.lang,reflect.Method.invoke() +++ */ +++class MethodUtil { +++ +++ private static final Logger LOGGER = Logger.getLogger(MethodUtil.class.getName()); +++ private static final Method INVOKE_METHOD; +++ +++ static { +++ Method method; +++ try { +++ Class clazz = Class.forName("sun.reflect.misc.MethodUtil"); +++ method = clazz.getMethod("invoke", Method.class, Object.class, Object[].class); +++ if (LOGGER.isLoggable(Level.FINE)) { +++ LOGGER.log(Level.FINE, "Class sun.reflect.misc.MethodUtil found; it will be used to invoke methods."); +++ } +++ } catch (Throwable t) { +++ method = null; +++ if (LOGGER.isLoggable(Level.FINE)) { +++ LOGGER.log(Level.FINE, "Class sun.reflect.misc.MethodUtil not found, probably non-Oracle JVM"); +++ } +++ } +++ INVOKE_METHOD = method; +++ } +++ +++ static Object invoke(Object target, Method method, Object[] args) throws IllegalAccessException, InvocationTargetException { +++ if (INVOKE_METHOD != null) { +++ // sun.reflect.misc.MethodUtil.invoke(method, owner, args) +++ if (LOGGER.isLoggable(Level.FINE)) { +++ LOGGER.log(Level.FINE, "Invoking method using sun.reflect.misc.MethodUtil"); +++ } +++ try { +++ return INVOKE_METHOD.invoke(null, method, target, args); +++ } catch (InvocationTargetException ite) { +++ // unwrap invocation exception added by reflection code ... +++ throw unwrapException(ite); +++ } +++ } else { +++ // other then Oracle JDK ... +++ if (LOGGER.isLoggable(Level.FINE)) { +++ LOGGER.log(Level.FINE, "Invoking method directly, probably non-Oracle JVM"); +++ } +++ return method.invoke(target, args); +++ } +++ } +++ +++ private static InvocationTargetException unwrapException(InvocationTargetException ite) { +++ Throwable targetException = ite.getTargetException(); +++ if (targetException != null && targetException instanceof InvocationTargetException) { +++ if (LOGGER.isLoggable(Level.FINE)) { +++ LOGGER.log(Level.FINE, "Unwrapping invocation target exception"); +++ } +++ return (InvocationTargetException) targetException; +++ } else { +++ return ite; +++ } +++ } +++ +++} ++diff -r 60ca74797572 -r 4ea4a060f374 drop_included/jaxws_src/src/com/sun/xml/internal/ws/server/AbstractInstanceResolver.java ++--- openjdk/jaxws/drop_included/jaxws_src/src/com/sun/xml/internal/ws/server/AbstractInstanceResolver.java Fri Oct 04 12:22:34 2013 -0400 +++++ openjdk/jaxws/drop_included/jaxws_src/src/com/sun/xml/internal/ws/server/AbstractInstanceResolver.java Tue Oct 29 04:48:42 2013 +0000 ++@@ -1,5 +1,5 @@ ++ /* ++- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. +++ * Copyright (c) 1997, 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 ++@@ -157,7 +157,7 @@ ++ if (!method.isAccessible()) { ++ method.setAccessible(true); ++ } ++- method.invoke(instance,args); +++ MethodUtil.invoke(instance,method,args); ++ } catch (IllegalAccessException e) { ++ throw new ServerRtException("server.rt.err",e); ++ } catch (InvocationTargetException e) { ++diff -r 60ca74797572 -r 4ea4a060f374 drop_included/jaxws_src/src/com/sun/xml/internal/ws/server/MethodUtil.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/jaxws/drop_included/jaxws_src/src/com/sun/xml/internal/ws/server/MethodUtil.java Tue Oct 29 04:48:42 2013 +0000 ++@@ -0,0 +1,109 @@ +++/* +++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. +++ * +++ * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. +++ * +++ * The contents of this file are subject to the terms of either the GNU +++ * General Public License Version 2 only ("GPL") or the Common Development +++ * and Distribution License("CDDL") (collectively, the "License"). You +++ * may not use this file except in compliance with the License. You can +++ * obtain a copy of the License at +++ * http://glassfish.java.net/public/CDDL+GPL_1_1.html +++ * or packager/legal/LICENSE.txt. See the License for the specific +++ * language governing permissions and limitations under the License. +++ * +++ * When distributing the software, include this License Header Notice in each +++ * file and include the License file at packager/legal/LICENSE.txt. +++ * +++ * GPL Classpath Exception: +++ * Oracle designates this particular file as subject to the "Classpath" +++ * exception as provided by Oracle in the GPL Version 2 section of the License +++ * file that accompanied this code. +++ * +++ * Modifications: +++ * If applicable, add the following below the License Header, with the fields +++ * enclosed by brackets [] replaced by your own identifying information: +++ * "Portions Copyright [year] [name of copyright owner]" +++ * +++ * Contributor(s): +++ * If you wish your version of this file to be governed by only the CDDL or +++ * only the GPL Version 2, indicate your decision by adding "[Contributor] +++ * elects to include this software in this distribution under the [CDDL or GPL +++ * Version 2] license." If you don't indicate a single choice of license, a +++ * recipient has the option to distribute your version of this file under +++ * either the CDDL, the GPL Version 2 or to extend the choice of license to +++ * its licensees as provided above. However, if you add GPL Version 2 code +++ * and therefore, elected the GPL Version 2 license, then the option applies +++ * only if the new code is made subject to such option by the copyright +++ * holder. +++ */ +++ +++package com.sun.xml.internal.ws.server; +++ +++import java.lang.reflect.InvocationTargetException; +++import java.lang.reflect.Method; +++import java.util.logging.Level; +++import java.util.logging.Logger; +++ +++/** +++ * Utility class to invoke sun.reflect.misc.MethodUtil.invoke() if available. If not (other then Oracle JDK) fallbacks +++ * to java.lang,reflect.Method.invoke() +++ * +++ * Be careful, copy of this class exists in several packages, iny modification must be done to other copies too! +++ */ +++class MethodUtil { +++ +++ private static final Logger LOGGER = Logger.getLogger(MethodUtil.class.getName()); +++ private static final Method INVOKE_METHOD; +++ +++ static { +++ Method method; +++ try { +++ Class clazz = Class.forName("sun.reflect.misc.MethodUtil"); +++ method = clazz.getMethod("invoke", Method.class, Object.class, Object[].class); +++ if (LOGGER.isLoggable(Level.FINE)) { +++ LOGGER.log(Level.FINE, "Class sun.reflect.misc.MethodUtil found; it will be used to invoke methods."); +++ } +++ } catch (Throwable t) { +++ method = null; +++ if (LOGGER.isLoggable(Level.FINE)) { +++ LOGGER.log(Level.FINE, "Class sun.reflect.misc.MethodUtil not found, probably non-Oracle JVM"); +++ } +++ } +++ INVOKE_METHOD = method; +++ } +++ +++ static Object invoke(Object target, Method method, Object[] args) throws IllegalAccessException, InvocationTargetException { +++ if (INVOKE_METHOD != null) { +++ // sun.reflect.misc.MethodUtil.invoke(method, owner, args) +++ if (LOGGER.isLoggable(Level.FINE)) { +++ LOGGER.log(Level.FINE, "Invoking method using sun.reflect.misc.MethodUtil"); +++ } +++ try { +++ return INVOKE_METHOD.invoke(null, method, target, args); +++ } catch (InvocationTargetException ite) { +++ // unwrap invocation exception added by reflection code ... +++ throw unwrapException(ite); +++ } +++ } else { +++ // other then Oracle JDK ... +++ if (LOGGER.isLoggable(Level.FINE)) { +++ LOGGER.log(Level.FINE, "Invoking method directly, probably non-Oracle JVM"); +++ } +++ return method.invoke(target, args); +++ } +++ } +++ +++ private static InvocationTargetException unwrapException(InvocationTargetException ite) { +++ Throwable targetException = ite.getTargetException(); +++ if (targetException != null && targetException instanceof InvocationTargetException) { +++ if (LOGGER.isLoggable(Level.FINE)) { +++ LOGGER.log(Level.FINE, "Unwrapping invocation target exception"); +++ } +++ return (InvocationTargetException) targetException; +++ } else { +++ return ite; +++ } +++ } +++ +++} +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8017566-backout_part_of_8000450.patch openjdk-6-6b27-1.12.6/patches/openjdk/8017566-backout_part_of_8000450.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8017566-backout_part_of_8000450.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8017566-backout_part_of_8000450.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,77 @@ ++# HG changeset patch ++# User coffeys ++# Date 1373968726 -3600 ++# Tue Jul 16 10:58:46 2013 +0100 ++# Node ID 0b0490779c5b643b7a3e90ac6870c1ee4bd5a155 ++# Parent 2a023db33371ce5ee42134cf0d860ab9f0adff92 ++8017566: Backout 8000450 - Cannot access to com.sun.corba.se.impl.orb.ORBImpl ++Reviewed-by: mchung, chegar ++ ++diff -r 2a023db33371 -r 0b0490779c5b src/share/lib/security/java.security-linux ++--- openjdk/jdk/src/share/lib/security/java.security-linux Fri Oct 25 22:35:06 2013 +0100 +++++ openjdk/jdk/src/share/lib/security/java.security-linux Tue Jul 16 10:58:46 2013 +0100 ++@@ -128,7 +128,6 @@ ++ # corresponding RuntimePermission ("accessClassInPackage."+package) has ++ # been granted. ++ package.access=sun.,\ ++- com.sun.corba.se.impl.,\ ++ com.sun.xml.internal.,\ ++ com.sun.imageio.,\ ++ com.sun.istack.internal.,\ ++@@ -165,7 +164,6 @@ ++ # checkPackageDefinition. ++ # ++ package.definition=sun.,\ ++- com.sun.corba.se.impl.,\ ++ com.sun.xml.internal.,\ ++ com.sun.imageio.,\ ++ com.sun.istack.internal.,\ ++diff -r 2a023db33371 -r 0b0490779c5b src/share/lib/security/java.security-solaris ++--- openjdk/jdk/src/share/lib/security/java.security-solaris Fri Oct 25 22:35:06 2013 +0100 +++++ openjdk/jdk/src/share/lib/security/java.security-solaris Tue Jul 16 10:58:46 2013 +0100 ++@@ -129,7 +129,6 @@ ++ # corresponding RuntimePermission ("accessClassInPackage."+package) has ++ # been granted. ++ package.access=sun.,\ ++- com.sun.corba.se.impl.,\ ++ com.sun.xml.internal.,\ ++ com.sun.imageio.,\ ++ com.sun.istack.internal.,\ ++@@ -167,7 +166,6 @@ ++ # checkPackageDefinition. ++ # ++ package.definition=sun.,\ ++- com.sun.corba.se.impl.,\ ++ com.sun.xml.internal.,\ ++ com.sun.imageio.,\ ++ com.sun.istack.internal.,\ ++diff -r 2a023db33371 -r 0b0490779c5b src/share/lib/security/java.security-windows ++--- openjdk/jdk/src/share/lib/security/java.security-windows Fri Oct 25 22:35:06 2013 +0100 +++++ openjdk/jdk/src/share/lib/security/java.security-windows Tue Jul 16 10:58:46 2013 +0100 ++@@ -129,7 +129,6 @@ ++ # corresponding RuntimePermission ("accessClassInPackage."+package) has ++ # been granted. ++ package.access=sun.,\ ++- com.sun.corba.se.impl.,\ ++ com.sun.xml.internal.,\ ++ com.sun.imageio.,\ ++ com.sun.istack.internal.,\ ++@@ -168,7 +167,6 @@ ++ # checkPackageDefinition. ++ # ++ package.definition=sun.,\ ++- com.sun.corba.se.impl.,\ ++ com.sun.xml.internal.,\ ++ com.sun.imageio.,\ ++ com.sun.istack.internal.,\ ++diff -r 2a023db33371 -r 0b0490779c5b test/java/lang/SecurityManager/CheckPackageAccess.java ++--- openjdk/jdk/test/java/lang/SecurityManager/CheckPackageAccess.java Fri Oct 25 22:35:06 2013 +0100 +++++ openjdk/jdk/test/java/lang/SecurityManager/CheckPackageAccess.java Tue Jul 16 10:58:46 2013 +0100 ++@@ -50,7 +50,6 @@ ++ */ ++ private static final String[] packages = { ++ "sun.", ++- "com.sun.corba.se.impl.", ++ "com.sun.xml.internal.", ++ "com.sun.imageio.", ++ "com.sun.istack.internal.", +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8019292-better_attribute_value_exceptions.patch openjdk-6-6b27-1.12.6/patches/openjdk/8019292-better_attribute_value_exceptions.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8019292-better_attribute_value_exceptions.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8019292-better_attribute_value_exceptions.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,57 @@ ++# HG changeset patch ++# User sjiang ++# Date 1375797854 -7200 ++# Tue Aug 06 16:04:14 2013 +0200 ++# Node ID d80e6f4a4eec26137af6726cfb8abfe108ce23ea ++# Parent de490a43861e05f3da489db136687b1dc6f1949a ++8019292: Better Attribute Value Exceptions ++Reviewed-by: dfuchs, dholmes, ahgross ++ ++diff -r de490a43861e -r d80e6f4a4eec src/share/classes/javax/management/BadAttributeValueExpException.java ++--- openjdk/jdk/src/share/classes/javax/management/BadAttributeValueExpException.java Fri Oct 25 22:43:09 2013 +0100 +++++ openjdk/jdk/src/share/classes/javax/management/BadAttributeValueExpException.java Tue Aug 06 16:04:14 2013 +0200 ++@@ -25,6 +25,9 @@ ++ ++ package javax.management; ++ +++import java.io.IOException; +++import java.io.ObjectInputStream; +++ ++ ++ /** ++ * Thrown when an invalid MBean attribute is passed to a query ++@@ -51,7 +54,7 @@ ++ * @param val the inappropriate value. ++ */ ++ public BadAttributeValueExpException (Object val) { ++- this.val = val; +++ this.val = val == null ? null : val.toString(); ++ } ++ ++ ++@@ -62,4 +65,25 @@ ++ return "BadAttributeValueException: " + val; ++ } ++ +++ private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException { +++ ObjectInputStream.GetField gf = ois.readFields(); +++ Object valObj = gf.get("val", null); +++ +++ if (valObj == null) { +++ val = null; +++ } else if (valObj instanceof String) { +++ val= valObj; +++ } else if (System.getSecurityManager() == null +++ || valObj instanceof Long +++ || valObj instanceof Integer +++ || valObj instanceof Float +++ || valObj instanceof Double +++ || valObj instanceof Byte +++ || valObj instanceof Short +++ || valObj instanceof Boolean) { +++ val = valObj.toString(); +++ } else { // the serialized object is from a version without JDK-8019292 fix +++ val = System.identityHashCode(valObj) + "@" + valObj.getClass().getName(); +++ } +++ } ++ } +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8019584-invalid_notification_fix.patch openjdk-6-6b27-1.12.6/patches/openjdk/8019584-invalid_notification_fix.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8019584-invalid_notification_fix.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8019584-invalid_notification_fix.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,69 @@ ++# HG changeset patch ++# User jbachorik ++# Date 1374244166 -7200 ++# Fri Jul 19 16:29:26 2013 +0200 ++# Node ID 42cdf6988c2b81b322bf89778ddeb47265cd3bba ++# Parent a8132d72370c1f2467c9bb966d9355b387c35039 ++8019584: javax/management/remote/mandatory/loading/MissingClassTest.java failed in nightly against jdk7u45: java.io.InvalidObjectException: Invalid notification: null ++Reviewed-by: mchung, sjiang, dfuchs, ahgross ++ ++diff -r a8132d72370c -r 42cdf6988c2b src/share/classes/javax/management/remote/NotificationResult.java ++--- openjdk/jdk/src/share/classes/javax/management/remote/NotificationResult.java Mon Jul 15 16:00:57 2013 +0100 +++++ openjdk/jdk/src/share/classes/javax/management/remote/NotificationResult.java Fri Jul 19 16:29:26 2013 +0200 ++@@ -132,16 +132,17 @@ ++ } ++ ++ private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException { ++- ObjectInputStream.GetField gf = ois.readFields(); ++- TargetedNotification[] tNotifs = (TargetedNotification[])gf.get("targetedNotifications", null); ++- long snStart = gf.get("earliestSequenceNumber", -1L); ++- long snNext = gf.get("nextSequenceNumber", -1L); +++ ois.defaultReadObject(); ++ try { ++- validate(tNotifs, snStart, snNext); +++ validate( +++ this.targetedNotifications, +++ this.earliestSequenceNumber, +++ this.nextSequenceNumber +++ ); ++ ++- this.targetedNotifications = tNotifs.length == 0 ? tNotifs : tNotifs.clone(); ++- this.earliestSequenceNumber = snStart; ++- this.nextSequenceNumber = snNext; +++ this.targetedNotifications = this.targetedNotifications.length == 0 ? +++ this.targetedNotifications : +++ this.targetedNotifications.clone(); ++ } catch (IllegalArgumentException e) { ++ throw new InvalidObjectException(e.getMessage()); ++ } ++diff -r a8132d72370c -r 42cdf6988c2b src/share/classes/javax/management/remote/TargetedNotification.java ++--- openjdk/jdk/src/share/classes/javax/management/remote/TargetedNotification.java Mon Jul 15 16:00:57 2013 +0100 +++++ openjdk/jdk/src/share/classes/javax/management/remote/TargetedNotification.java Fri Jul 19 16:29:26 2013 +0200 ++@@ -132,13 +132,9 @@ ++ // } ++ ++ private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException { ++- ObjectInputStream.GetField gf = ois.readFields(); ++- Notification notification = (Notification)gf.get("notif", null); ++- Integer listenerId = (Integer)gf.get("id", null); +++ ois.defaultReadObject(); ++ try { ++- validate(notification, listenerId); ++- this.notif = notification; ++- this.id = listenerId; +++ validate(this.notif, this.id); ++ } catch (IllegalArgumentException e) { ++ throw new InvalidObjectException(e.getMessage()); ++ } ++diff -r a8132d72370c -r 42cdf6988c2b test/javax/management/remote/mandatory/loading/MissingClassTest.java ++--- openjdk/jdk/test/javax/management/remote/mandatory/loading/MissingClassTest.java Mon Jul 15 16:00:57 2013 +0100 +++++ openjdk/jdk/test/javax/management/remote/mandatory/loading/MissingClassTest.java Fri Jul 19 16:29:26 2013 +0200 ++@@ -23,7 +23,7 @@ ++ ++ /* ++ * @test ++- * @bug 4915825 4921009 4934965 4977469 +++ * @bug 4915825 4921009 4934965 4977469 8019584 ++ * @summary Tests behavior when client or server gets object of unknown class ++ * @author Eamonn McManus ++ * @run clean MissingClassTest SingleClassLoader +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8019617-better_view_of_objects.patch openjdk-6-6b27-1.12.6/patches/openjdk/8019617-better_view_of_objects.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8019617-better_view_of_objects.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8019617-better_view_of_objects.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,68 @@ ++# HG changeset patch ++# User malenkov ++# Date 1373994034 -14400 ++# Tue Jul 16 21:00:34 2013 +0400 ++# Node ID 9cfb9105241489a5fbc3fcfdea15a6aee15b2cfc ++# Parent d80e6f4a4eec26137af6726cfb8abfe108ce23ea ++8019617: Better view of objects ++Reviewed-by: art, skoivu ++ ++diff -r d80e6f4a4eec -r 9cfb91052414 src/share/classes/javax/swing/text/html/ObjectView.java ++--- openjdk/jdk/src/share/classes/javax/swing/text/html/ObjectView.java Tue Aug 06 16:04:14 2013 +0200 +++++ openjdk/jdk/src/share/classes/javax/swing/text/html/ObjectView.java Tue Jul 16 21:00:34 2013 +0400 ++@@ -31,6 +31,9 @@ ++ import java.beans.*; ++ import java.lang.reflect.*; ++ +++import sun.reflect.misc.MethodUtil; +++import sun.reflect.misc.ReflectUtil; +++ ++ /** ++ * Component decorator that implements the view interface ++ * for <object> elements. ++@@ -87,6 +90,7 @@ ++ AttributeSet attr = getElement().getAttributes(); ++ String classname = (String) attr.getAttribute(HTML.Attribute.CLASSID); ++ try { +++ ReflectUtil.checkPackageAccess(classname); ++ Class c = Class.forName(classname, true,Thread.currentThread(). ++ getContextClassLoader()); ++ Object o = c.newInstance(); ++@@ -116,28 +120,6 @@ ++ } ++ ++ /** ++- * Get a Class object to use for loading the ++- * classid. If possible, the Classloader ++- * used to load the associated Document is used. ++- * This would typically be the same as the ClassLoader ++- * used to load the EditorKit. If the documents ++- * ClassLoader is null, ++- * Class.forName is used. ++- */ ++- private Class getClass(String classname) throws ClassNotFoundException { ++- Class klass; ++- ++- Class docClass = getDocument().getClass(); ++- ClassLoader loader = docClass.getClassLoader(); ++- if (loader != null) { ++- klass = loader.loadClass(classname); ++- } else { ++- klass = Class.forName(classname); ++- } ++- return klass; ++- } ++- ++- /** ++ * Initialize this component according the KEY/VALUEs passed in ++ * via the <param> elements in the corresponding ++ * <object> element. ++@@ -170,7 +152,7 @@ ++ } ++ Object [] args = { value }; ++ try { ++- writer.invoke(comp, args); +++ MethodUtil.invoke(writer, comp, args); ++ } catch (Exception ex) { ++ System.err.println("Invocation failed"); ++ // invocation code +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8019969-inet6_test_case_fix.patch openjdk-6-6b27-1.12.6/patches/openjdk/8019969-inet6_test_case_fix.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8019969-inet6_test_case_fix.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8019969-inet6_test_case_fix.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,33 @@ ++# HG changeset patch ++# User michaelm ++# Date 1373900457 -3600 ++# Mon Jul 15 16:00:57 2013 +0100 ++# Node ID a8132d72370c1f2467c9bb966d9355b387c35039 ++# Parent bac5d0b011562017738501f02f7db4f39522a62e ++8019969: nioNetworkChannelInet6/SetOptionGetOptionTestInet6 test case crashes ++Reviewed-by: chegar ++ ++diff -r bac5d0b01156 -r a8132d72370c src/windows/native/java/net/net_util_md.c ++--- openjdk/jdk/src/windows/native/java/net/net_util_md.c Tue Oct 29 01:32:58 2013 +0000 +++++ openjdk/jdk/src/windows/native/java/net/net_util_md.c Mon Jul 15 16:00:57 2013 +0100 ++@@ -879,7 +879,6 @@ ++ family = (iafam == IPv4)? AF_INET : AF_INET6; ++ if (ipv6_available() && !(family == AF_INET && v4MappedAddress == JNI_FALSE)) { ++ struct SOCKADDR_IN6 *him6 = (struct SOCKADDR_IN6 *)him; ++- jbyteArray ipaddress; ++ jbyte caddr[16]; ++ jint address, scopeid = 0; ++ jint cached_scope_id = 0; ++@@ -900,10 +899,9 @@ ++ caddr[15] = (address & 0xff); ++ } ++ } else { ++- ipaddress = (*env)->GetObjectField(env, iaObj, ia6_ipaddressID); ++- scopeid = (jint)(*env)->GetIntField(env, iaObj, ia6_scopeidID); +++ getInet6Address_ipaddress(env, iaObj, (char *)caddr); +++ scopeid = getInet6Address_scopeid(env, iaObj); ++ cached_scope_id = (jint)(*env)->GetIntField(env, iaObj, ia6_cachedscopeidID); ++- (*env)->GetByteArrayRegion(env, ipaddress, 0, 16, caddr); ++ } ++ ++ memset((char *)him6, 0, sizeof(struct SOCKADDR_IN6)); +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8019979-better_access_test.patch openjdk-6-6b27-1.12.6/patches/openjdk/8019979-better_access_test.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8019979-better_access_test.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8019979-better_access_test.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,154 @@ ++# HG changeset patch ++# User coffeys ++# Date 1373625375 -3600 ++# Fri Jul 12 11:36:15 2013 +0100 ++# Node ID 3b6f55f02122398ba662fb581352c9c9b102c2e3 ++# Parent f7a7c7d70e4968eb99e42f812c59900f545d7fa7 ++8019979: Replace CheckPackageAccess test with better one from closed repo ++Reviewed-by: mullan, robilad ++ ++diff -r f7a7c7d70e49 -r 3b6f55f02122 test/java/lang/SecurityManager/CheckPackageAccess.java ++--- openjdk/jdk/test/java/lang/SecurityManager/CheckPackageAccess.java Fri Oct 25 22:18:57 2013 +0100 +++++ openjdk/jdk/test/java/lang/SecurityManager/CheckPackageAccess.java Fri Jul 12 11:36:15 2013 +0100 ++@@ -22,31 +22,128 @@ ++ */ ++ ++ /* ++- * @test ++- * @bug 7146431 8000450 ++- * @summary Test that internal packages cannot be accessed +++ * @test +++ * @bug 6741606 7146431 8000450 +++ * @summary Make sure all restricted packages listed in the package.access +++ * property in the java.security file are blocked +++ * @run main/othervm CheckPackageAccess ++ */ ++ +++import java.security.Security; +++import java.util.Collections; +++import java.util.Arrays; +++import java.util.ArrayList; +++import java.util.List; +++import java.util.StringTokenizer; +++ +++/* +++ * The main benefit of this test is to catch merge errors or other types +++ * of issues where one or more of the packages are accidentally +++ * removed. This is why the packages that are known to be restricted have to +++ * be explicitly listed below. +++ */ ++ public class CheckPackageAccess { ++ +++ /* +++ * This array should be updated whenever new packages are added to the +++ * package.access property in the java.security file +++ */ +++ private static final String[] packages = { +++ "sun.", +++ "com.sun.corba.se.impl.", +++ "com.sun.xml.internal.", +++ "com.sun.imageio.", +++ "com.sun.istack.internal.", +++ "com.sun.jmx.", +++ "com.sun.proxy.", +++ "com.sun.org.apache.bcel.internal.", +++ "com.sun.org.apache.regexp.internal.", +++ "com.sun.org.apache.xerces.internal.", +++ "com.sun.org.apache.xpath.internal.", +++ "com.sun.org.apache.xalan.internal.extensions.", +++ "com.sun.org.apache.xalan.internal.lib.", +++ "com.sun.org.apache.xalan.internal.res.", +++ "com.sun.org.apache.xalan.internal.templates.", +++ "com.sun.org.apache.xalan.internal.utils.", +++ "com.sun.org.apache.xalan.internal.xslt.", +++ "com.sun.org.apache.xalan.internal.xsltc.cmdline.", +++ "com.sun.org.apache.xalan.internal.xsltc.compiler.", +++ "com.sun.org.apache.xalan.internal.xsltc.trax.", +++ "com.sun.org.apache.xalan.internal.xsltc.util.", +++ "com.sun.org.apache.xml.internal.res.", +++ "com.sun.org.apache.xml.internal.security.", +++ "com.sun.org.apache.xml.internal.serializer.utils.", +++ "com.sun.org.apache.xml.internal.utils.", +++ "com.sun.org.glassfish.", +++ "oracle.jrockit.jfr.", +++ "org.jcp.xml.dsig.internal.", +++ }; +++ ++ public static void main(String[] args) throws Exception { +++ List pkgs = new ArrayList<>(Arrays.asList(packages)); +++ String osName = System.getProperty("os.name"); +++ if (osName.contains("OS X")) { +++ pkgs.add("apple."); // add apple package for OS X +++ } else if (osName.startsWith("Windows")) { +++ pkgs.add("com.sun.java.accessibility."); +++ } ++ ++- String[] pkgs = new String[] { ++- "com.sun.corba.se.impl.", ++- "com.sun.org.apache.xerces.internal.utils.", ++- "com.sun.org.apache.xalan.internal.utils." }; ++- SecurityManager sm = new SecurityManager(); ++- System.setSecurityManager(sm); ++- for (String pkg : pkgs) { ++- System.out.println("Checking package access for " + pkg); +++ List jspkgs = +++ getPackages(Security.getProperty("package.access")); +++ +++ // Sort to ensure lists are comparable +++ Collections.sort(pkgs); +++ Collections.sort(jspkgs); +++ +++ if (!pkgs.equals(jspkgs)) { +++ for (String p : pkgs) +++ if (!jspkgs.contains(p)) +++ System.out.println("In golden set, but not in j.s file: " + p); +++ for (String p : jspkgs) +++ if (!pkgs.contains(p)) +++ System.out.println("In j.s file, but not in golden set: " + p); +++ +++ +++ throw new RuntimeException("restricted packages are not " + +++ "consistent with java.security file"); +++ } +++ System.setSecurityManager(new SecurityManager()); +++ SecurityManager sm = System.getSecurityManager(); +++ for (String pkg : packages) { +++ String subpkg = pkg + "foo"; ++ try { ++ sm.checkPackageAccess(pkg); ++- throw new Exception("Expected PackageAccess SecurityException not thrown"); +++ throw new RuntimeException("Able to access " + pkg + +++ " package"); +++ } catch (SecurityException se) { } +++ try { +++ sm.checkPackageAccess(subpkg); +++ throw new RuntimeException("Able to access " + subpkg + +++ " package"); ++ } catch (SecurityException se) { } ++ try { ++ sm.checkPackageDefinition(pkg); ++- throw new Exception("Expected PackageDefinition SecurityException not thrown"); +++ throw new RuntimeException("Able to define class in " + pkg + +++ " package"); +++ } catch (SecurityException se) { } +++ try { +++ sm.checkPackageDefinition(subpkg); +++ throw new RuntimeException("Able to define class in " + subpkg + +++ " package"); ++ } catch (SecurityException se) { } ++ } +++ System.out.println("Test passed"); +++ } +++ +++ private static List getPackages(String p) { +++ List packages = new ArrayList<>(); +++ if (p != null && !p.equals("")) { +++ StringTokenizer tok = new StringTokenizer(p, ","); +++ while (tok.hasMoreElements()) { +++ String s = tok.nextToken().trim(); +++ packages.add(s); +++ } +++ } +++ return packages; ++ } ++ } +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8020293-jvm_crash.patch openjdk-6-6b27-1.12.6/patches/openjdk/8020293-jvm_crash.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8020293-jvm_crash.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8020293-jvm_crash.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,40 @@ ++# HG changeset patch ++# User jchen ++# Date 1374527199 25200 ++# Mon Jul 22 14:06:39 2013 -0700 ++# Node ID 2adb9f71f6c0723acf40877f059d276557b71034 ++# Parent 150e0c3e95ce6869f8e7b42c6d8683817433e124 ++8020293: JVM crash ++Reviewed-by: prr, jgodinez ++ ++diff -r 150e0c3e95ce -r 2adb9f71f6c0 src/share/classes/sun/font/GlyphLayout.java ++--- openjdk/jdk/src/share/classes/sun/font/GlyphLayout.java Mon Oct 28 20:56:09 2013 +0000 +++++ openjdk/jdk/src/share/classes/sun/font/GlyphLayout.java Mon Jul 22 14:06:39 2013 -0700 ++@@ -468,9 +468,10 @@ ++ _gvdata.grow(); ++ } ++ } ++- if (_gvdata._count < 0) { ++- break; ++- } +++ } +++ // Break out of the outer for loop if layout fails. +++ if (_gvdata._count < 0) { +++ break; ++ } ++ } ++ ++diff -r 150e0c3e95ce -r 2adb9f71f6c0 src/share/native/sun/font/layout/SunLayoutEngine.cpp ++--- openjdk/jdk/src/share/native/sun/font/layout/SunLayoutEngine.cpp Mon Oct 28 20:56:09 2013 +0000 +++++ openjdk/jdk/src/share/native/sun/font/layout/SunLayoutEngine.cpp Mon Jul 22 14:06:39 2013 -0700 ++@@ -104,6 +104,10 @@ ++ ++ int putGV(JNIEnv* env, jint gmask, jint baseIndex, jobject gvdata, const LayoutEngine* engine, int glyphCount) { ++ int count = env->GetIntField(gvdata, gvdCountFID); +++ if (count < 0) { +++ JNU_ThrowInternalError(env, "count negative"); +++ return 0; +++ } ++ ++ jarray glyphArray = (jarray)env->GetObjectField(gvdata, gvdGlyphsFID); ++ if (IS_NULL(glyphArray)) { +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8020943-memory_leak.patch openjdk-6-6b27-1.12.6/patches/openjdk/8020943-memory_leak.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8020943-memory_leak.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8020943-memory_leak.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,32 @@ ++# HG changeset patch ++# User kevinw ++# Date 1375442806 -3600 ++# Fri Aug 02 12:26:46 2013 +0100 ++# Node ID 2660219948088d89dd3fc285e093dab2520349e5 ++# Parent 4b3487aa553cca3fb7ecb74d284b9524d0bf5bf8 ++8020943: Memory leak when GCNotifier uses create_from_platform_dependent_str() ++Reviewed-by: mgerdin, fparain, dcubed ++ ++diff -r 4b3487aa553c -r 266021994808 src/share/vm/services/gcNotifier.cpp ++--- openjdk/hotspot/src/share/vm/services/gcNotifier.cpp Thu Oct 17 19:28:00 2013 +0100 +++++ openjdk/hotspot/src/share/vm/services/gcNotifier.cpp Fri Aug 02 12:26:46 2013 +0100 ++@@ -1,5 +1,5 @@ ++ /* ++- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. +++ * 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 ++@@ -211,9 +211,9 @@ ++ NotificationMark nm(request); ++ Handle objGcInfo = createGcInfo(request->gcManager, request->gcStatInfo, THREAD); ++ ++- Handle objName = java_lang_String::create_from_platform_dependent_str(request->gcManager->name(), CHECK); ++- Handle objAction = java_lang_String::create_from_platform_dependent_str(request->gcAction, CHECK); ++- Handle objCause = java_lang_String::create_from_platform_dependent_str(request->gcCause, CHECK); +++ Handle objName = java_lang_String::create_from_str(request->gcManager->name(), CHECK); +++ Handle objAction = java_lang_String::create_from_str(request->gcAction, CHECK); +++ Handle objCause = java_lang_String::create_from_str(request->gcCause, CHECK); ++ ++ klassOop k = Management::sun_management_GarbageCollectorImpl_klass(CHECK); ++ instanceKlassHandle gc_mbean_klass(THREAD, k); +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8021290-signature_validation.patch openjdk-6-6b27-1.12.6/patches/openjdk/8021290-signature_validation.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8021290-signature_validation.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8021290-signature_validation.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,55 @@ ++# HG changeset patch ++# User mullan ++# Date 1375219222 14400 ++# Tue Jul 30 17:20:22 2013 -0400 ++# Node ID 3e758b40337ef9da5ad030d0ac60ab4407357277 ++# Parent 5e3c766d18092d498d9019827c1058a32f1c4e2a ++8021290: Better signature validation ++Reviewed-by: xuelei, ahgross ++ ++diff -r 5e3c766d1809 -r 3e758b40337e src/share/classes/com/sun/org/apache/xml/internal/security/utils/UnsyncByteArrayOutputStream.java ++--- openjdk/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/UnsyncByteArrayOutputStream.java Fri Oct 15 10:55:59 2010 -0400 +++++ openjdk/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/UnsyncByteArrayOutputStream.java Tue Jul 30 17:20:22 2013 -0400 ++@@ -44,6 +44,9 @@ ++ } ++ ++ public void write(byte[] arg0) { +++ if ((Integer.MAX_VALUE - pos) < arg0.length) { +++ throw new OutOfMemoryError(); +++ } ++ int newPos = pos + arg0.length; ++ if (newPos > size) { ++ expandSize(newPos); ++@@ -53,6 +56,9 @@ ++ } ++ ++ public void write(byte[] arg0, int arg1, int arg2) { +++ if ((Integer.MAX_VALUE - pos) < arg2) { +++ throw new OutOfMemoryError(); +++ } ++ int newPos = pos + arg2; ++ if (newPos > size) { ++ expandSize(newPos); ++@@ -62,6 +68,9 @@ ++ } ++ ++ public void write(int arg0) { +++ if ((Integer.MAX_VALUE - pos) == 0) { +++ throw new OutOfMemoryError(); +++ } ++ int newPos = pos + 1; ++ if (newPos > size) { ++ expandSize(newPos); ++@@ -82,7 +91,11 @@ ++ private void expandSize(int newPos) { ++ int newSize = size; ++ while (newPos > newSize) { ++- newSize = newSize<<2; +++ newSize = newSize << 1; +++ // Deal with overflow +++ if (newSize < 0) { +++ newSize = Integer.MAX_VALUE; +++ } ++ } ++ byte newBuf[] = new byte[newSize]; ++ System.arraycopy(buf, 0, newBuf, 0, pos); +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8021355-splashscreen_regression.patch openjdk-6-6b27-1.12.6/patches/openjdk/8021355-splashscreen_regression.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8021355-splashscreen_regression.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8021355-splashscreen_regression.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,53 @@ ++# HG changeset patch ++# User ksrini ++# Date 1383014349 0 ++# Tue Oct 29 02:39:09 2013 +0000 ++# Node ID a5d00a180798f25254bf6f15b7dc31a0d5df60c2 ++# Parent 5896fe42b0a429fb5be7abee630b98fa2ec00df3 ++8021355: REGRESSION: Five closed/java/awt/SplashScreen tests fail since 7u45 b01 on Linux, Solaris ++Reviewed-by: dholmes, anthony, ahgross, erikj, omajid ++ ++diff -r 5896fe42b0a4 -r a5d00a180798 src/solaris/bin/java_md.c ++--- openjdk/jdk/src/solaris/bin/java_md.c Wed Aug 07 16:51:59 2013 +0400 +++++ openjdk/jdk/src/solaris/bin/java_md.c Tue Oct 29 02:39:09 2013 +0000 ++@@ -46,6 +46,10 @@ ++ #define JVM_DLL "libjvm.so" ++ #define JAVA_DLL "libjava.so" ++ +++#define JRE_ERROR1 "Error: Could not find Java SE Runtime Environment." +++#define JRE_ERROR11 "Error: Path length exceeds maximum length (PATH_MAX)" +++#define JRE_ERROR13 "Error: String processing operation failed" +++ ++ /* ++ * If a processor / os combination has the ability to run binaries of ++ * two data models and cohabitation of jre/jdk bits with both data ++@@ -1700,7 +1704,28 @@ ++ ++ void* SplashProcAddress(const char* name) { ++ if (!hSplashLib) { ++- hSplashLib = dlopen(SPLASHSCREEN_SO, RTLD_LAZY | RTLD_GLOBAL); +++ int ret; +++ char jrePath[MAXPATHLEN]; +++ char splashPath[MAXPATHLEN]; +++ +++ if (!GetJREPath(jrePath, sizeof(jrePath), GetArch(), JNI_FALSE)) { +++ ReportErrorMessage(JRE_ERROR1, JNI_TRUE); +++ return NULL; +++ } +++ ret = snprintf(splashPath, sizeof(splashPath), "%s/lib/%s/%s", +++ jrePath, GetArch(), SPLASHSCREEN_SO); +++ +++ if (ret >= (int) sizeof(splashPath)) { +++ ReportErrorMessage(JRE_ERROR11, JNI_TRUE); +++ return NULL; +++ } +++ if (ret < 0) { +++ ReportErrorMessage(JRE_ERROR13, JNI_TRUE); +++ return NULL; +++ } +++ hSplashLib = dlopen(splashPath, RTLD_LAZY | RTLD_GLOBAL); +++ if (_launcher_debug) +++ printf("Info: loaded %s\n", splashPath); ++ } ++ if (hSplashLib) { ++ void* sym = dlsym(hSplashLib, name); +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8021366-jaxp_test_fix-01.patch openjdk-6-6b27-1.12.6/patches/openjdk/8021366-jaxp_test_fix-01.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8021366-jaxp_test_fix-01.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8021366-jaxp_test_fix-01.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,21 @@ ++# HG changeset patch ++# User joehw ++# Date 1375178534 25200 ++# Tue Jul 30 03:02:14 2013 -0700 ++# Node ID 674ada27a93f4ecd359617d5a27cb2dfe52c44b4 ++# Parent 0927621944ccb163d7dcdea7b94b10dfab58f5f1 ++8021366: java_util/Properties/PropertiesWithOtherEncodings fails during 7u45 nightly testing ++Reviewed-by: lancea, alanb, dfuchs, mullan ++ ++diff -r 0927621944cc -r 674ada27a93f drop_included/jaxp_src/src/com/sun/xml/internal/stream/Entity.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/xml/internal/stream/Entity.java Tue Oct 29 08:01:29 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/xml/internal/stream/Entity.java Tue Jul 30 03:02:14 2013 -0700 ++@@ -248,7 +248,7 @@ ++ public int fBufferSize = DEFAULT_BUFFER_SIZE; ++ ++ /** Default buffer size before we've finished with the XMLDecl: */ ++- public static final int DEFAULT_XMLDECL_BUFFER_SIZE = 64; +++ public static final int DEFAULT_XMLDECL_BUFFER_SIZE = 28; ++ ++ /** Default internal entity buffer size (1024). */ ++ public static final int DEFAULT_INTERNAL_BUFFER_SIZE = 1024; +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8021577-bean_serialization_fix.patch openjdk-6-6b27-1.12.6/patches/openjdk/8021577-bean_serialization_fix.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8021577-bean_serialization_fix.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8021577-bean_serialization_fix.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,25 @@ ++# HG changeset patch ++# User jbachorik ++# Date 1375098221 25200 ++# Mon Jul 29 04:43:41 2013 -0700 ++# Node ID 21358b9e406319f4d9ddfd663572dd71a093ce08 ++# Parent 42cdf6988c2b81b322bf89778ddeb47265cd3bba ++8021577: JCK test api/javax_management/jmx_serial/modelmbean/ModelMBeanNotificationInfo/serial/index.html#Input has failed since jdk 7u45 b01 ++Reviewed-by: alanb, dfuchs, ahgross ++ ++diff -r 42cdf6988c2b -r 21358b9e4063 src/share/classes/javax/management/MBeanNotificationInfo.java ++--- openjdk/jdk/src/share/classes/javax/management/MBeanNotificationInfo.java Fri Jul 19 16:29:26 2013 +0200 +++++ openjdk/jdk/src/share/classes/javax/management/MBeanNotificationInfo.java Mon Jul 29 04:43:41 2013 -0700 ++@@ -210,11 +210,6 @@ ++ ObjectInputStream.GetField gf = ois.readFields(); ++ String[] t = (String[])gf.get("types", null); ++ ++- if (t == null) { ++- throw new InvalidObjectException("Trying to deserialize an invalid " + ++- "instance of " + MBeanNotificationInfo.class + ++- "[types=null]"); ++- } ++- types = t.length == 0 ? t : t.clone(); +++ types = (t != null && t.length != 0) ? t.clone() : NO_TYPES; ++ } ++ } +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8021933-jaxp_test_fix-02.patch openjdk-6-6b27-1.12.6/patches/openjdk/8021933-jaxp_test_fix-02.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8021933-jaxp_test_fix-02.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8021933-jaxp_test_fix-02.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,33 @@ ++# HG changeset patch ++# User joehw ++# Date 1375252858 25200 ++# Tue Jul 30 23:40:58 2013 -0700 ++# Node ID dce0c261a1837e664e4d8739b97e8758a1fa0de2 ++# Parent 674ada27a93f4ecd359617d5a27cb2dfe52c44b4 ++8021933: Add extra check for fix # JDK-8014530 ++Reviewed-by: alanb, lancea ++ ++diff -r 674ada27a93f -r dce0c261a183 drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSAttributeChecker.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSAttributeChecker.java Tue Jul 30 03:02:14 2013 -0700 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSAttributeChecker.java Tue Jul 30 23:40:58 2013 -0700 ++@@ -1237,7 +1237,7 @@ ++ //Revisit :: IMO this is not right place to check ++ // maxOccurNodeLimit. ++ int maxOccurNodeLimit = fSchemaHandler.fSecureProcessing.getLimit(XMLSecurityManager.Limit.MAX_OCCUR_NODE_LIMIT); ++- if (max > maxOccurNodeLimit) { +++ if (max > maxOccurNodeLimit && !fSchemaHandler.fSecureProcessing.isNoLimit(maxOccurNodeLimit)) { ++ reportSchemaFatalError("maxOccurLimit", new Object[] {new Integer(maxOccurNodeLimit)}, element); ++ ++ // reset max values in case processing continues on error ++diff -r 674ada27a93f -r dce0c261a183 drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaFactory.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaFactory.java Tue Jul 30 03:02:14 2013 -0700 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaFactory.java Tue Jul 30 23:40:58 2013 -0700 ++@@ -257,7 +257,7 @@ ++ "FeatureNameNull", null)); ++ } ++ if (name.equals(XMLConstants.FEATURE_SECURE_PROCESSING)) { ++- return (fSecurityManager != null); +++ return (fSecurityManager !=null && fSecurityManager.isSecureProcessing()); ++ } ++ try { ++ return fXMLSchemaLoader.getFeature(name); +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8021969-jnlp_load_failure.patch openjdk-6-6b27-1.12.6/patches/openjdk/8021969-jnlp_load_failure.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8021969-jnlp_load_failure.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8021969-jnlp_load_failure.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,25 @@ ++# HG changeset patch ++# User malenkov ++# Date 1375879919 -14400 ++# Wed Aug 07 16:51:59 2013 +0400 ++# Node ID 5896fe42b0a429fb5be7abee630b98fa2ec00df3 ++# Parent 21358b9e406319f4d9ddfd663572dd71a093ce08 ++8021969: The index_AccessAllowed jnlp can not load successfully with exception thrown in the log. ++Reviewed-by: art, skoivu ++ ++diff -r 21358b9e4063 -r 5896fe42b0a4 src/share/classes/java/awt/datatransfer/DataFlavor.java ++--- openjdk/jdk/src/share/classes/java/awt/datatransfer/DataFlavor.java Mon Jul 29 04:43:41 2013 -0700 +++++ openjdk/jdk/src/share/classes/java/awt/datatransfer/DataFlavor.java Wed Aug 07 16:51:59 2013 +0400 ++@@ -145,11 +145,7 @@ ++ } catch (SecurityException exception) { ++ // ignore secured class loaders ++ } ++- if (fallback != null) { ++- return Class.forName(className, true, fallback); ++- } else { ++- throw new ClassNotFoundException(className); ++- } +++ return Class.forName(className, true, fallback); ++ } ++ ++ /* +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8022661-writeobject_flush.patch openjdk-6-6b27-1.12.6/patches/openjdk/8022661-writeobject_flush.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8022661-writeobject_flush.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8022661-writeobject_flush.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,20 @@ ++# HG changeset patch ++# User chegar ++# Date 1376052613 -3600 ++# Fri Aug 09 13:50:13 2013 +0100 ++# Node ID 6c0b775b1ff2a0a0ba0fe797cfe18c511f9ee3c1 ++# Parent a5d00a180798f25254bf6f15b7dc31a0d5df60c2 ++8022661: InetAddress.writeObject() performs flush() on object output stream ++Reviewed-by: michaelm, alanb ++ ++diff -r a5d00a180798 -r 6c0b775b1ff2 src/share/classes/java/net/InetAddress.java ++--- openjdk/jdk/src/share/classes/java/net/InetAddress.java Tue Oct 29 02:39:09 2013 +0000 +++++ openjdk/jdk/src/share/classes/java/net/InetAddress.java Fri Aug 09 13:50:13 2013 +0100 ++@@ -1586,7 +1586,6 @@ ++ pf.put("address", holder().address); ++ pf.put("family", holder().family); ++ s.writeFields(); ++- s.flush(); ++ } ++ } ++ +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8022682-supporting_xom.patch openjdk-6-6b27-1.12.6/patches/openjdk/8022682-supporting_xom.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8022682-supporting_xom.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8022682-supporting_xom.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,250 @@ ++# HG changeset patch ++# User joehw ++# Date 1383034215 0 ++# Tue Oct 29 08:10:15 2013 +0000 ++# Node ID 20ffb814205c67b5ded678ee6c69b2aa0d6cebb1 ++# Parent dce0c261a1837e664e4d8739b97e8758a1fa0de2 ++8022682: Supporting XOM ++Reviewed-by: alanb, chegar, lancea ++ ++diff -r dce0c261a183 -r 20ffb814205c drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/PropertyManager.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/PropertyManager.java Tue Jul 30 23:40:58 2013 -0700 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/PropertyManager.java Tue Oct 29 08:10:15 2013 +0000 ++@@ -168,6 +168,17 @@ ++ //add internal stax property ++ supportedProps.put( Constants.XERCES_PROPERTY_PREFIX + Constants.STAX_ENTITY_RESOLVER_PROPERTY , new StaxEntityResolverWrapper((XMLResolver)value)) ; ++ } +++ +++ /** +++ * It's possible for users to set a security manager through the interface. +++ * If it's the old SecurityManager, convert it to the new XMLSecurityManager +++ */ +++ if (property.equals(Constants.SECURITY_MANAGER)) { +++ fSecurityManager = XMLSecurityManager.convert(value, fSecurityManager); +++ supportedProps.put(Constants.SECURITY_MANAGER, fSecurityManager); +++ return; +++ } +++ ++ supportedProps.put(property, value ) ; ++ if(equivalentProperty != null){ ++ supportedProps.put(equivalentProperty, value ) ; ++diff -r dce0c261a183 -r 20ffb814205c drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaFactory.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaFactory.java Tue Jul 30 23:40:58 2013 -0700 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaFactory.java Tue Oct 29 08:10:15 2013 +0000 ++@@ -352,7 +352,7 @@ ++ "ProperyNameNull", null)); ++ } ++ if (name.equals(SECURITY_MANAGER)) { ++- fSecurityManager = (XMLSecurityManager) object; +++ fSecurityManager = XMLSecurityManager.convert(object, fSecurityManager); ++ fXMLSchemaLoader.setProperty(SECURITY_MANAGER, fSecurityManager); ++ return; ++ } ++diff -r dce0c261a183 -r 20ffb814205c drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/DOMParser.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/DOMParser.java Tue Jul 30 23:40:58 2013 -0700 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/DOMParser.java Tue Oct 29 08:10:15 2013 +0000 ++@@ -28,6 +28,7 @@ ++ import com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper; ++ import com.sun.org.apache.xerces.internal.util.SAXMessageFormatter; ++ import com.sun.org.apache.xerces.internal.util.SymbolTable; +++import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; ++ import com.sun.org.apache.xerces.internal.xni.XNIException; ++ import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarPool; ++ import com.sun.org.apache.xerces.internal.xni.parser.XMLConfigurationException; ++@@ -528,7 +529,30 @@ ++ */ ++ public void setProperty(String propertyId, Object value) ++ throws SAXNotRecognizedException, SAXNotSupportedException { +++ /** +++ * It's possible for users to set a security manager through the interface. +++ * If it's the old SecurityManager, convert it to the new XMLSecurityManager +++ */ +++ if (propertyId.equals(Constants.SECURITY_MANAGER)) { +++ securityManager = XMLSecurityManager.convert(value, securityManager); +++ setProperty0(Constants.SECURITY_MANAGER, securityManager); +++ return; +++ } ++ +++ if (securityManager == null) { +++ securityManager = new XMLSecurityManager(true); +++ setProperty0(Constants.SECURITY_MANAGER, securityManager); +++ } +++ +++ //check if the property is managed by security manager +++ if (!securityManager.setLimit(propertyId, XMLSecurityManager.State.APIPROPERTY, value)) { +++ //fall back to the default configuration to handle the property +++ setProperty0(propertyId, value); +++ } +++ } +++ +++ public void setProperty0(String propertyId, Object value) +++ throws SAXNotRecognizedException, SAXNotSupportedException { ++ try { ++ fConfiguration.setProperty(propertyId, value); ++ } ++diff -r dce0c261a183 -r 20ffb814205c drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/DTDConfiguration.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/DTDConfiguration.java Tue Jul 30 23:40:58 2013 -0700 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/DTDConfiguration.java Tue Oct 29 08:10:15 2013 +0000 ++@@ -181,6 +181,9 @@ ++ protected static final String LOCALE = ++ Constants.XERCES_PROPERTY_PREFIX + Constants.LOCALE_PROPERTY; ++ +++ /** Property identifier: Security manager. */ +++ private static final String SECURITY_MANAGER = Constants.SECURITY_MANAGER; +++ ++ // debugging ++ ++ /** Set to true and recompile to print exception stack trace. */ ++@@ -325,7 +328,8 @@ ++ VALIDATION_MANAGER, ++ JAXP_SCHEMA_SOURCE, ++ JAXP_SCHEMA_LANGUAGE, ++- LOCALE +++ LOCALE, +++ SECURITY_MANAGER ++ }; ++ addRecognizedProperties(recognizedProperties); ++ ++diff -r dce0c261a183 -r 20ffb814205c drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/NonValidatingConfiguration.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/NonValidatingConfiguration.java Tue Jul 30 23:40:58 2013 -0700 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/NonValidatingConfiguration.java Tue Oct 29 08:10:15 2013 +0000 ++@@ -154,6 +154,9 @@ ++ protected static final String LOCALE = ++ Constants.XERCES_PROPERTY_PREFIX + Constants.LOCALE_PROPERTY; ++ +++ /** Property identifier: Security manager. */ +++ private static final String SECURITY_MANAGER = Constants.SECURITY_MANAGER; +++ ++ // debugging ++ ++ /** Set to true and recompile to print exception stack trace. */ ++@@ -307,7 +310,8 @@ ++ XMLGRAMMAR_POOL, ++ DATATYPE_VALIDATOR_FACTORY, ++ VALIDATION_MANAGER, ++- LOCALE +++ LOCALE, +++ SECURITY_MANAGER ++ }; ++ addRecognizedProperties(recognizedProperties); ++ ++diff -r dce0c261a183 -r 20ffb814205c drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/SAXParser.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/SAXParser.java Tue Jul 30 23:40:58 2013 -0700 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/SAXParser.java Tue Oct 29 08:10:15 2013 +0000 ++@@ -74,7 +74,7 @@ ++ XMLGRAMMAR_POOL, ++ }; ++ ++- XMLSecurityManager securityManager; +++ ++ // ++ // Constructors ++ // ++diff -r dce0c261a183 -r 20ffb814205c drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/XML11Configuration.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/XML11Configuration.java Tue Jul 30 23:40:58 2013 -0700 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/XML11Configuration.java Tue Oct 29 08:10:15 2013 +0000 ++@@ -563,8 +563,6 @@ ++ ++ fVersionDetector = new XMLVersionDetector(); ++ ++- fProperties.put(SECURITY_MANAGER, new XMLSecurityManager(true)); ++- ++ // add message formatters ++ if (fErrorReporter.getMessageFormatter(XMLMessageFormatter.XML_DOMAIN) == null) { ++ XMLMessageFormatter xmft = new XMLMessageFormatter(); ++diff -r dce0c261a183 -r 20ffb814205c drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/XMLParser.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/XMLParser.java Tue Jul 30 23:40:58 2013 -0700 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/XMLParser.java Tue Oct 29 08:10:15 2013 +0000 ++@@ -23,6 +23,7 @@ ++ import java.io.IOException; ++ ++ import com.sun.org.apache.xerces.internal.impl.Constants; +++import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; ++ import com.sun.org.apache.xerces.internal.xni.XNIException; ++ import com.sun.org.apache.xerces.internal.xni.parser.XMLInputSource; ++ import com.sun.org.apache.xerces.internal.xni.parser.XMLParserConfiguration; ++@@ -78,6 +79,10 @@ ++ /** The parser configuration. */ ++ protected XMLParserConfiguration fConfiguration; ++ +++ /** The XML Security Manager. */ +++ XMLSecurityManager securityManager; +++ +++ ++ // ++ // Constructors ++ // ++@@ -118,6 +123,11 @@ ++ */ ++ public void parse(XMLInputSource inputSource) ++ throws XNIException, IOException { +++ // null indicates that the parser is called directly, initialize them +++ if (securityManager == null) { +++ securityManager = new XMLSecurityManager(true); +++ fConfiguration.setProperty(Constants.SECURITY_MANAGER, securityManager); +++ } ++ ++ reset(); ++ fConfiguration.parse(inputSource); ++diff -r dce0c261a183 -r 20ffb814205c drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/utils/XMLLimitAnalyzer.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/utils/XMLLimitAnalyzer.java Tue Jul 30 23:40:58 2013 -0700 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/utils/XMLLimitAnalyzer.java Tue Oct 29 08:10:15 2013 +0000 ++@@ -203,6 +203,9 @@ ++ } ++ ++ public boolean isTracking(String name) { +++ if (entityStart == null) { +++ return false; +++ } ++ return entityStart.equals(name); ++ } ++ /** ++diff -r dce0c261a183 -r 20ffb814205c drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/utils/XMLSecurityManager.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/utils/XMLSecurityManager.java Tue Jul 30 23:40:58 2013 -0700 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/utils/XMLSecurityManager.java Tue Oct 29 08:10:15 2013 +0000 ++@@ -26,6 +26,7 @@ ++ package com.sun.org.apache.xerces.internal.utils; ++ ++ import com.sun.org.apache.xerces.internal.impl.Constants; +++import com.sun.org.apache.xerces.internal.util.SecurityManager; ++ ++ /** ++ * This class manages standard and implementation-specific limitations. ++@@ -518,4 +519,37 @@ ++ } ++ return false; ++ } +++ +++ +++ /** +++ * Convert a value set through setProperty to XMLSecurityManager. +++ * If the value is an instance of XMLSecurityManager, use it to override the default; +++ * If the value is an old SecurityManager, convert to the new XMLSecurityManager. +++ * +++ * @param value user specified security manager +++ * @param securityManager an instance of XMLSecurityManager +++ * @return an instance of the new security manager XMLSecurityManager +++ */ +++ static public XMLSecurityManager convert(Object value, XMLSecurityManager securityManager) { +++ if (value == null) { +++ if (securityManager == null) { +++ securityManager = new XMLSecurityManager(true); +++ } +++ return securityManager; +++ } +++ if (XMLSecurityManager.class.isAssignableFrom(value.getClass())) { +++ return (XMLSecurityManager)value; +++ } else { +++ if (securityManager == null) { +++ securityManager = new XMLSecurityManager(true); +++ } +++ if (SecurityManager.class.isAssignableFrom(value.getClass())) { +++ SecurityManager origSM = (SecurityManager)value; +++ securityManager.setLimit(Limit.MAX_OCCUR_NODE_LIMIT, State.APIPROPERTY, origSM.getMaxOccurNodeLimit()); +++ securityManager.setLimit(Limit.ENTITY_EXPANSION_LIMIT, State.APIPROPERTY, origSM.getEntityExpansionLimit()); +++ securityManager.setLimit(Limit.ELEMENT_ATTRIBUTE_LIMIT, State.APIPROPERTY, origSM.getElementAttrLimit()); +++ } +++ return securityManager; +++ } +++ } ++ } +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8022940-enhance_corba_translations.patch openjdk-6-6b27-1.12.6/patches/openjdk/8022940-enhance_corba_translations.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8022940-enhance_corba_translations.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8022940-enhance_corba_translations.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,41 @@ ++# HG changeset patch ++# User msheppar ++# Date 1376928111 -3600 ++# Mon Aug 19 17:01:51 2013 +0100 ++# Node ID b449df31dbfbf08d0f58a887649c2acacd5d834f ++# Parent 2a415f9ee0976719ac79e6e5e2b1f00b29636427 ++8022940: Enhance CORBA translations ++Reviewed-by: coffeys, alanb, skoivu ++ ++diff -r 2a415f9ee097 -r b449df31dbfb src/share/classes/com/sun/corba/se/impl/presentation/rmi/IDLNameTranslatorImpl.java ++--- openjdk/corba/src/share/classes/com/sun/corba/se/impl/presentation/rmi/IDLNameTranslatorImpl.java Thu Jul 18 17:22:25 2013 -0700 +++++ openjdk/corba/src/share/classes/com/sun/corba/se/impl/presentation/rmi/IDLNameTranslatorImpl.java Mon Aug 19 17:01:51 2013 +0100 ++@@ -905,28 +905,4 @@ ++ ++ return contents.toString(); ++ } ++- ++- public static void main(String[] args) { ++- ++- Class remoteInterface = java.rmi.Remote.class; ++- ++- if( args.length > 0 ) { ++- String className = args[0]; ++- try { ++- remoteInterface = Class.forName(className); ++- } catch(Exception e) { ++- e.printStackTrace(); ++- System.exit(-1); ++- } ++- } ++- ++- System.out.println("Building name translation for " + remoteInterface); ++- try { ++- IDLNameTranslator nameTranslator = ++- IDLNameTranslatorImpl.get(remoteInterface); ++- System.out.println(nameTranslator); ++- } catch(IllegalStateException ise) { ++- ise.printStackTrace(); ++- } ++- } ++ } +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8023457-tracing_mutex.patch openjdk-6-6b27-1.12.6/patches/openjdk/8023457-tracing_mutex.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8023457-tracing_mutex.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8023457-tracing_mutex.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,79 @@ ++# HG changeset patch ++# User mgronlun ++# Date 1382034480 -3600 ++# Thu Oct 17 19:28:00 2013 +0100 ++# Node ID 4b3487aa553cca3fb7ecb74d284b9524d0bf5bf8 ++# Parent 3091721c83780cbb9a946f05007651e0bd09490b ++8023457: Event based tracing framework needs a mutex for thread groups ++Reviewed-by: acorn, sla ++ ++diff -r 3091721c8378 -r 4b3487aa553c src/share/vm/runtime/mutexLocker.cpp ++--- openjdk/hotspot/src/share/vm/runtime/mutexLocker.cpp Sat Aug 24 00:14:46 2013 -0700 +++++ openjdk/hotspot/src/share/vm/runtime/mutexLocker.cpp Thu Oct 17 19:28:00 2013 +0100 ++@@ -134,12 +134,16 @@ ++ ++ Mutex* Management_lock = NULL; ++ Monitor* Service_lock = NULL; ++-Mutex* Stacktrace_lock = NULL; +++Monitor* PeriodicTask_lock = NULL; ++ +++#ifdef INCLUDE_TRACE ++ Monitor* JfrQuery_lock = NULL; +++Mutex* JfrStacktrace_lock = NULL; ++ Monitor* JfrMsg_lock = NULL; ++ Mutex* JfrBuffer_lock = NULL; ++ Mutex* JfrStream_lock = NULL; +++Mutex* JfrThreadGroups_lock = NULL; +++#endif ++ ++ #define MAX_NUM_MUTEX 128 ++ static Monitor * _mutex_array[MAX_NUM_MUTEX]; ++@@ -215,7 +219,6 @@ ++ def(Patching_lock , Mutex , special, true ); // used for safepointing and code patching. ++ def(ObjAllocPost_lock , Monitor, special, false); ++ def(Service_lock , Monitor, special, true ); // used for service thread operations ++- def(Stacktrace_lock , Mutex, special, true ); // used for JFR stacktrace database ++ def(JmethodIdCreation_lock , Mutex , leaf, true ); // used for creating jmethodIDs. ++ ++ def(SystemDictionary_lock , Monitor, leaf, true ); // lookups done by VM thread ++@@ -279,12 +282,18 @@ ++ def(Debug2_lock , Mutex , nonleaf+4, true ); ++ def(Debug3_lock , Mutex , nonleaf+4, true ); ++ def(ProfileVM_lock , Monitor, nonleaf+4, false); // used for profiling of the VMThread ++- def(CompileThread_lock , Monitor, nonleaf+5, false ); +++ def(CompileThread_lock , Monitor, nonleaf+5, false); +++ def(PeriodicTask_lock , Monitor, nonleaf+5, true); ++ +++#ifdef INCLUDE_TRACE ++ def(JfrQuery_lock , Monitor, nonleaf, true); // JFR locks, keep these in consecutive order ++ def(JfrMsg_lock , Monitor, nonleaf+2, true); ++ def(JfrBuffer_lock , Mutex, nonleaf+3, true); +++ def(JfrThreadGroups_lock , Mutex, nonleaf+1, true); ++ def(JfrStream_lock , Mutex, nonleaf+4, true); +++ def(JfrStacktrace_lock , Mutex, special, true ); +++#endif +++ ++ } ++ ++ GCMutexLocker::GCMutexLocker(Monitor * mutex) { ++diff -r 3091721c8378 -r 4b3487aa553c src/share/vm/runtime/mutexLocker.hpp ++--- openjdk/hotspot/src/share/vm/runtime/mutexLocker.hpp Sat Aug 24 00:14:46 2013 -0700 +++++ openjdk/hotspot/src/share/vm/runtime/mutexLocker.hpp Thu Oct 17 19:28:00 2013 +0100 ++@@ -136,12 +136,16 @@ ++ ++ extern Mutex* Management_lock; // a lock used to serialize JVM management ++ extern Monitor* Service_lock; // a lock used for service thread operation ++-extern Mutex* Stacktrace_lock; // used to guard access to the stacktrace table +++extern Monitor* PeriodicTask_lock; // protects the periodic task structure ++ +++#ifdef INCLUDE_TRACE +++extern Mutex* JfrStacktrace_lock; // used to guard access to the JFR stacktrace table ++ extern Monitor* JfrQuery_lock; // protects JFR use ++ extern Monitor* JfrMsg_lock; // protects JFR messaging ++ extern Mutex* JfrBuffer_lock; // protects JFR buffer operations ++ extern Mutex* JfrStream_lock; // protects JFR stream access +++extern Mutex* JfrThreadGroups_lock; // protects JFR access to Thread Groups +++#endif ++ ++ // A MutexLocker provides mutual exclusion with respect to a given mutex ++ // for the scope which contains the locker. The lock is an OS lock, not +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8023478-hs_crash.patch openjdk-6-6b27-1.12.6/patches/openjdk/8023478-hs_crash.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8023478-hs_crash.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8023478-hs_crash.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,21 @@ ++# HG changeset patch ++# User kevinw ++# Date 1379364550 25200 ++# Mon Sep 16 13:49:10 2013 -0700 ++# Node ID e8d1979fe077eda9a94528c4b76dd4c5243d5dec ++# Parent 2660219948088d89dd3fc285e093dab2520349e5 ++8023478: Test fails with HS crash in GCNotifier. ++Reviewed-by: sla ++ ++diff -r 266021994808 -r e8d1979fe077 src/share/vm/services/gcNotifier.cpp ++--- openjdk/hotspot/src/share/vm/services/gcNotifier.cpp Fri Aug 02 12:26:46 2013 +0100 +++++ openjdk/hotspot/src/share/vm/services/gcNotifier.cpp Mon Sep 16 13:49:10 2013 -0700 ++@@ -209,7 +209,7 @@ ++ GCNotificationRequest *request = getRequest(); ++ if (request != NULL) { ++ NotificationMark nm(request); ++- Handle objGcInfo = createGcInfo(request->gcManager, request->gcStatInfo, THREAD); +++ Handle objGcInfo = createGcInfo(request->gcManager, request->gcStatInfo, CHECK); ++ ++ Handle objName = java_lang_String::create_from_str(request->gcManager->name(), CHECK); ++ Handle objAction = java_lang_String::create_from_str(request->gcAction, CHECK); +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8023683-enhance_class_file_parsing.patch openjdk-6-6b27-1.12.6/patches/openjdk/8023683-enhance_class_file_parsing.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8023683-enhance_class_file_parsing.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8023683-enhance_class_file_parsing.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,35 @@ ++# HG changeset patch ++# User iklam ++# Date 1377328486 25200 ++# Sat Aug 24 00:14:46 2013 -0700 ++# Node ID 3091721c83780cbb9a946f05007651e0bd09490b ++# Parent bbd051c9089f61c65fe7d95487d47920164c7ee0 ++8023683: Enhance class file parsing ++Summary: Use the value returned by REALLOC_RESOURCE_ARRAY() ++Reviewed-by: coleenp, ahgross ++ ++diff -r bbd051c9089f -r 3091721c8378 src/share/vm/classfile/classFileParser.cpp ++--- openjdk/hotspot/src/share/vm/classfile/classFileParser.cpp Mon Jul 15 10:22:43 2013 +0400 +++++ openjdk/hotspot/src/share/vm/classfile/classFileParser.cpp Sat Aug 24 00:14:46 2013 -0700 ++@@ -1821,8 +1821,8 @@ ++ } ++ if (lvt_cnt == max_lvt_cnt) { ++ max_lvt_cnt <<= 1; ++- REALLOC_RESOURCE_ARRAY(u2, localvariable_table_length, lvt_cnt, max_lvt_cnt); ++- REALLOC_RESOURCE_ARRAY(u2*, localvariable_table_start, lvt_cnt, max_lvt_cnt); +++ localvariable_table_length = REALLOC_RESOURCE_ARRAY(u2, localvariable_table_length, lvt_cnt, max_lvt_cnt); +++ localvariable_table_start = REALLOC_RESOURCE_ARRAY(u2*, localvariable_table_start, lvt_cnt, max_lvt_cnt); ++ } ++ localvariable_table_start[lvt_cnt] = ++ parse_localvariable_table(code_length, ++@@ -1851,8 +1851,8 @@ ++ // Parse local variable type table ++ if (lvtt_cnt == max_lvtt_cnt) { ++ max_lvtt_cnt <<= 1; ++- REALLOC_RESOURCE_ARRAY(u2, localvariable_type_table_length, lvtt_cnt, max_lvtt_cnt); ++- REALLOC_RESOURCE_ARRAY(u2*, localvariable_type_table_start, lvtt_cnt, max_lvtt_cnt); +++ localvariable_type_table_length = REALLOC_RESOURCE_ARRAY(u2, localvariable_type_table_length, lvtt_cnt, max_lvtt_cnt); +++ localvariable_type_table_start = REALLOC_RESOURCE_ARRAY(u2*, localvariable_type_table_start, lvtt_cnt, max_lvtt_cnt); ++ } ++ localvariable_type_table_start[lvtt_cnt] = ++ parse_localvariable_table(code_length, +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8023964-ignore_test.patch openjdk-6-6b27-1.12.6/patches/openjdk/8023964-ignore_test.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8023964-ignore_test.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8023964-ignore_test.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,29 @@ ++# HG changeset patch ++# User coffeys ++# Date 1378485490 25200 ++# Fri Sep 06 09:38:10 2013 -0700 ++# Node ID 44a49c18eba21f97222a2cde09f6536a7f365363 ++# Parent 6c0b775b1ff2a0a0ba0fe797cfe18c511f9ee3c1 ++8023964: java/io/IOException/LastErrorString.java should be @ignore-d ++Reviewed-by: alanb ++ ++diff -r 6c0b775b1ff2 -r 44a49c18eba2 test/java/io/IOException/LastErrorString.java ++--- openjdk/jdk/test/java/io/IOException/LastErrorString.java Fri Aug 09 13:50:13 2013 +0100 +++++ openjdk/jdk/test/java/io/IOException/LastErrorString.java Fri Sep 06 09:38:10 2013 -0700 ++@@ -1,5 +1,5 @@ ++ /* ++- * Copyright (c) 1998, Oracle and/or its affiliates. All rights reserved. +++ * Copyright (c) 1998, 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 ++@@ -22,7 +22,8 @@ ++ */ ++ ++ /* @test ++- @bug 4167937 +++ @bug 4167937 8023964 +++ @ignore Test truncates system files when run as root, see 7042603 ++ @summary Test code paths that use the JVM_LastErrorString procedure ++ */ ++ +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8024914-swapped_usage.patch openjdk-6-6b27-1.12.6/patches/openjdk/8024914-swapped_usage.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8024914-swapped_usage.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8024914-swapped_usage.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,58 @@ ++# HG changeset patch ++# User tschatzl ++# Date 1379412251 -7200 ++# Tue Sep 17 12:04:11 2013 +0200 ++# Node ID d0b5dc55e72cde11331399cbb960458b8f45ea4a ++# Parent 41d2a089e66401c8815af0c6b6efd2af9aeabe99 ++8024914: Swapped usage of idx_t and bm_word_t types in bitMap.inline.hpp ++Summary: Incorrect usage of idx_t where bm_word_t is appropriate. ++Reviewed-by: tschatzl, brutisso ++Contributed-by: Dan Horak ++ ++diff -r 41d2a089e664 -r d0b5dc55e72c src/share/vm/utilities/bitMap.inline.hpp ++--- openjdk/hotspot/src/share/vm/utilities/bitMap.inline.hpp Fri Oct 04 12:22:34 2013 -0400 +++++ openjdk/hotspot/src/share/vm/utilities/bitMap.inline.hpp Tue Sep 17 12:04:11 2013 +0200 ++@@ -52,16 +52,16 @@ ++ ++ inline bool BitMap::par_set_bit(idx_t bit) { ++ verify_index(bit); ++- volatile idx_t* const addr = word_addr(bit); ++- const idx_t mask = bit_mask(bit); ++- idx_t old_val = *addr; +++ volatile bm_word_t* const addr = word_addr(bit); +++ const bm_word_t mask = bit_mask(bit); +++ bm_word_t old_val = *addr; ++ ++ do { ++- const idx_t new_val = old_val | mask; +++ const bm_word_t new_val = old_val | mask; ++ if (new_val == old_val) { ++ return false; // Someone else beat us to it. ++ } ++- const idx_t cur_val = (idx_t) Atomic::cmpxchg_ptr((void*) new_val, +++ const bm_word_t cur_val = (bm_word_t) Atomic::cmpxchg_ptr((void*) new_val, ++ (volatile void*) addr, ++ (void*) old_val); ++ if (cur_val == old_val) { ++@@ -73,16 +73,16 @@ ++ ++ inline bool BitMap::par_clear_bit(idx_t bit) { ++ verify_index(bit); ++- volatile idx_t* const addr = word_addr(bit); ++- const idx_t mask = ~bit_mask(bit); ++- idx_t old_val = *addr; +++ volatile bm_word_t* const addr = word_addr(bit); +++ const bm_word_t mask = ~bit_mask(bit); +++ bm_word_t old_val = *addr; ++ ++ do { ++- const idx_t new_val = old_val & mask; +++ const bm_word_t new_val = old_val & mask; ++ if (new_val == old_val) { ++ return false; // Someone else beat us to it. ++ } ++- const idx_t cur_val = (idx_t) Atomic::cmpxchg_ptr((void*) new_val, +++ const bm_word_t cur_val = (bm_word_t) Atomic::cmpxchg_ptr((void*) new_val, ++ (volatile void*) addr, ++ (void*) old_val); ++ if (cur_val == old_val) { +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/8025128-createtempfile_absolute_prefix.patch openjdk-6-6b27-1.12.6/patches/openjdk/8025128-createtempfile_absolute_prefix.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/8025128-createtempfile_absolute_prefix.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/8025128-createtempfile_absolute_prefix.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,139 @@ ++# HG changeset patch ++# User dxu ++# Date 1383019831 0 ++# Tue Oct 29 04:10:31 2013 +0000 ++# Node ID 008e31b76d415f263617e710f19da6254135817f ++# Parent 8459b68eb028734b2153266176538e1eddbb87be ++8025128: File.createTempFile fails if prefix is absolute path ++Reviewed-by: alanb, darcy ++ ++diff -r 8459b68eb028 -r 008e31b76d41 src/share/classes/java/io/File.java ++--- openjdk/jdk/src/share/classes/java/io/File.java Tue Oct 29 03:49:40 2013 +0000 +++++ openjdk/jdk/src/share/classes/java/io/File.java Tue Oct 29 04:10:31 2013 +0000 ++@@ -1801,11 +1801,19 @@ ++ } else { ++ n = Math.abs(n); ++ } ++- String name = prefix + Long.toString(n) + suffix; ++- File f = new File(dir, name); ++- if (!name.equals(f.getName())) ++- throw new IOException("Unable to create temporary file"); ++- return f; +++ +++ // Use only the file name from the supplied prefix +++ prefix = (new File(prefix)).getName(); +++ +++ String name = prefix + Long.toString(n) + suffix; +++ File f = new File(dir, name); +++ if (!name.equals(f.getName())) { +++ if (System.getSecurityManager() != null) +++ throw new IOException("Unable to create temporary file"); +++ else +++ throw new IOException("Unable to create temporary file, " + f); +++ } +++ return f; ++ } ++ ++ private static boolean checkAndCreate(String filename, SecurityManager sm, ++diff -r 8459b68eb028 -r 008e31b76d41 test/java/io/File/createTempFile/SpecialTempFile.java ++--- openjdk/jdk/test/java/io/File/createTempFile/SpecialTempFile.java Tue Oct 29 03:49:40 2013 +0000 +++++ openjdk/jdk/test/java/io/File/createTempFile/SpecialTempFile.java Tue Oct 29 04:10:31 2013 +0000 ++@@ -23,7 +23,7 @@ ++ ++ /* ++ * @test ++- * @bug 8013827 8011950 +++ * @bug 8013827 8011950 8025128 ++ * @summary Check whether File.createTempFile can handle special parameters ++ * on Windows platforms ++ * @author Dan Xu ++@@ -34,7 +34,9 @@ ++ ++ public class SpecialTempFile { ++ ++- private static void test(String name, String[] prefix, String[] suffix) { +++ private static void test(String name, String[] prefix, String[] suffix, +++ boolean expectedException) throws IOException +++ { ++ if (prefix == null || suffix == null ++ || prefix.length != suffix.length) ++ { ++@@ -42,39 +44,59 @@ ++ } ++ ++ final String exceptionMsg = "Unable to create temporary file"; ++- final String errMsg = "IOException is expected"; ++ ++ for (int i = 0; i < prefix.length; i++) { ++ boolean exceptionThrown = false; ++ File f = null; ++- System.out.println("In test " + name ++- + ", creating temp file with prefix, " ++- + prefix[i] + ", suffix, " + suffix[i]); ++- try { ++- f = File.createTempFile(prefix[i], suffix[i]); ++- } catch (IOException e) { ++- if (exceptionMsg.equals(e.getMessage())) ++- exceptionThrown = true; ++- else ++- System.out.println("Wrong error message:" + e.getMessage()); +++ +++ String[] dirs = { null, "." }; +++ +++ for (String dir : dirs ) { +++ System.out.println("In test " + name + +++ ", creating temp file with prefix, " + +++ prefix[i] + ", suffix, " + suffix[i] + +++ ", in dir, " + dir); +++ +++ try { +++ if (dir == null || dir.isEmpty()) +++ f = File.createTempFile(prefix[i], suffix[i]); +++ else +++ f = File.createTempFile(prefix[i], suffix[i], new File(dir)); +++ } catch (IOException e) { +++ if (expectedException) { +++ if (e.getMessage().startsWith(exceptionMsg)) +++ exceptionThrown = true; +++ else +++ System.out.println("Wrong error message:" + +++ e.getMessage()); +++ } else { +++ throw e; +++ } +++ } +++ +++ if (expectedException && (!exceptionThrown || f != null)) +++ throw new RuntimeException("IOException is expected"); ++ } ++- if (!exceptionThrown || f != null) ++- throw new RuntimeException(errMsg); ++ } ++ } ++ ++ public static void main(String[] args) throws Exception { +++ // Test JDK-8025128 +++ String[] goodPre = { "///..///", "/foo" }; +++ String[] goodSuf = { ".temp", ".tmp" }; +++ test("goodName", goodPre, goodSuf, false); +++ +++ // Test JDK-8011950 +++ String[] slashPre = { "temp", "///..///", "/foo" }; +++ String[] slashSuf = { "///..///..", "///..///..", "///..///.." }; +++ test("SlashedName", slashPre, slashSuf, true); +++ ++ if (!System.getProperty("os.name").startsWith("Windows")) ++ return; ++ ++ // Test JDK-8013827 ++ String[] resvPre = { "LPT1.package.zip", "com7.4.package.zip" }; ++ String[] resvSuf = { ".temp", ".temp" }; ++- test("ReservedName", resvPre, resvSuf); ++- ++- // Test JDK-8011950 ++- String[] slashPre = { "///..///", "temp", "///..///" }; ++- String[] slashSuf = { ".temp", "///..///..", "///..///.." }; ++- test("SlashedName", slashPre, slashSuf); +++ test("ReservedName", resvPre, resvSuf, true); ++ } ++ } +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/oj6-19-fix_8010118_test_cases.patch openjdk-6-6b27-1.12.6/patches/openjdk/oj6-19-fix_8010118_test_cases.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/oj6-19-fix_8010118_test_cases.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/oj6-19-fix_8010118_test_cases.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,499 @@ ++# HG changeset patch ++# User andrew ++# Date 1382719863 -3600 ++# Fri Oct 25 17:51:03 2013 +0100 ++# Node ID d4fca2113b280a7db03b67caae22e0ceafb51b89 ++# Parent 566f427de7079a0ed32c2f625c952dcc45c348e3 ++OPENJDK6-19: Fix test cases from 8010118 to work with OpenJDK 6 ++Reviewed-by: omajid ++ ++diff -r 566f427de707 -r d4fca2113b28 test/sun/reflect/CallerSensitive/CallerSensitiveFinder.java ++--- openjdk/jdk/test/sun/reflect/CallerSensitive/CallerSensitiveFinder.java Tue Jun 03 13:28:16 2008 -0700 +++++ openjdk/jdk/test/sun/reflect/CallerSensitive/CallerSensitiveFinder.java Fri Oct 25 17:51:03 2013 +0100 ++@@ -23,16 +23,12 @@ ++ ++ import com.sun.tools.classfile.*; ++ import static com.sun.tools.classfile.ConstantPool.*; +++ ++ import java.io.File; ++ import java.io.IOException; ++ import java.lang.reflect.InvocationTargetException; ++-import java.nio.file.FileVisitResult; ++-import java.nio.file.Files; ++-import java.nio.file.Path; ++-import java.nio.file.Paths; ++-import java.nio.file.SimpleFileVisitor; ++-import java.nio.file.attribute.BasicFileAttributes; ++ import java.util.ArrayList; +++import java.util.Arrays; ++ import java.util.List; ++ import java.util.Set; ++ import java.util.concurrent.Callable; ++@@ -53,7 +49,7 @@ ++ private static int numThreads = 3; ++ private static boolean verbose = false; ++ public static void main(String[] args) throws Exception { ++- List classes = new ArrayList<>(); +++ List classes = new ArrayList(); ++ String testclasses = System.getProperty("test.classes", "."); ++ int i = 0; ++ while (i < args.length) { ++@@ -61,11 +57,11 @@ ++ if (arg.equals("-v")) { ++ verbose = true; ++ } else { ++- Path p = Paths.get(testclasses, arg); ++- if (!p.toFile().exists()) { +++ File f = new File(testclasses, arg); +++ if (!f.exists()) { ++ throw new IllegalArgumentException(arg + " does not exist"); ++ } ++- classes.add(p); +++ classes.add(f); ++ } ++ } ++ if (classes.isEmpty()) { ++@@ -81,7 +77,7 @@ ++ } ++ } ++ ++- private final List csMethodsMissingAnnotation = new ArrayList<>(); +++ private final List csMethodsMissingAnnotation = new ArrayList(); ++ private final java.lang.reflect.Method mhnCallerSensitiveMethod; ++ public CallerSensitiveFinder(String... methods) throws Exception { ++ super(methods); ++@@ -91,12 +87,114 @@ ++ static java.lang.reflect.Method getIsCallerSensitiveMethod() ++ throws ClassNotFoundException, NoSuchMethodException ++ { ++- Class cls = Class.forName("java.lang.invoke.MethodHandleNatives"); +++ Class cls = CallerSensitiveFinder.class; ++ java.lang.reflect.Method m = cls.getDeclaredMethod("isCallerSensitiveMethod", Class.class, String.class); ++ m.setAccessible(true); ++ return m; ++ } ++ +++ // Needs to match method in 7's java.lang.invoke.MethodHandleNatives +++ private static boolean isCallerSensitiveMethod(Class defc, String method) { +++ if ("doPrivileged".equals(method) || +++ "doPrivilegedWithCombiner".equals(method)) +++ return defc == java.security.AccessController.class; +++ else if ("checkMemberAccess".equals(method)) +++ return defc == java.lang.SecurityManager.class; +++ else if ("getUnsafe".equals(method)) +++ return defc == sun.misc.Unsafe.class; +++ else if ("invoke".equals(method)) +++ return defc == java.lang.reflect.Method.class; +++ else if ("get".equals(method) || +++ "getBoolean".equals(method) || +++ "getByte".equals(method) || +++ "getChar".equals(method) || +++ "getShort".equals(method) || +++ "getInt".equals(method) || +++ "getLong".equals(method) || +++ "getFloat".equals(method) || +++ "getDouble".equals(method) || +++ "set".equals(method) || +++ "setBoolean".equals(method) || +++ "setByte".equals(method) || +++ "setChar".equals(method) || +++ "setShort".equals(method) || +++ "setInt".equals(method) || +++ "setLong".equals(method) || +++ "setFloat".equals(method) || +++ "setDouble".equals(method)) +++ return defc == java.lang.reflect.Field.class; +++ else if ("newInstance".equals(method)) { +++ if (defc == java.lang.reflect.Constructor.class) return true; +++ if (defc == java.lang.Class.class) return true; +++ } else if ("getFields".equals(method)) +++ return defc == java.lang.Class.class || +++ defc == javax.sql.rowset.serial.SerialJavaObject.class; +++ else if ("forName".equals(method) || +++ "getClassLoader".equals(method) || +++ "getClasses".equals(method) || +++ "getMethods".equals(method) || +++ "getConstructors".equals(method) || +++ "getDeclaredClasses".equals(method) || +++ "getDeclaredFields".equals(method) || +++ "getDeclaredMethods".equals(method) || +++ "getDeclaredConstructors".equals(method) || +++ "getField".equals(method) || +++ "getMethod".equals(method) || +++ "getConstructor".equals(method) || +++ "getDeclaredField".equals(method) || +++ "getDeclaredMethod".equals(method) || +++ "getDeclaredConstructor".equals(method) || +++ "getDeclaringClass".equals(method) || +++ "getEnclosingClass".equals(method) || +++ "getEnclosingMethod".equals(method) || +++ "getEnclosingConstructor".equals(method)) +++ return defc == java.lang.Class.class; +++ else if ("getConnection".equals(method) || +++ "getDriver".equals(method) || +++ "getDrivers".equals(method) || +++ "deregisterDriver".equals(method)) +++ return defc == java.sql.DriverManager.class; +++ else if ("newUpdater".equals(method)) { +++ if (defc == java.util.concurrent.atomic.AtomicIntegerFieldUpdater.class) return true; +++ if (defc == java.util.concurrent.atomic.AtomicLongFieldUpdater.class) return true; +++ if (defc == java.util.concurrent.atomic.AtomicReferenceFieldUpdater.class) return true; +++ } else if ("getContextClassLoader".equals(method)) +++ return defc == java.lang.Thread.class; +++ else if ("getPackage".equals(method) || +++ "getPackages".equals(method)) +++ return defc == java.lang.Package.class; +++ else if ("getParent".equals(method) || +++ "getSystemClassLoader".equals(method)) +++ return defc == java.lang.ClassLoader.class; +++ else if ("load".equals(method) || +++ "loadLibrary".equals(method)) { +++ if (defc == java.lang.Runtime.class) return true; +++ if (defc == java.lang.System.class) return true; +++ } else if ("getCallerClass".equals(method)) { +++ if (defc == sun.reflect.Reflection.class) return true; +++ if (defc == java.lang.System.class) return true; +++ } else if ("getCallerClassLoader".equals(method)) +++ return defc == java.lang.ClassLoader.class; +++ else if ("registerAsParallelCapable".equals(method)) +++ return defc == java.lang.ClassLoader.class; +++ else if ("getInvocationHandler".equals(method) || +++ "getProxyClass".equals(method) || +++ "newProxyInstance".equals(method)) +++ return defc == java.lang.reflect.Proxy.class; +++ else if ("getBundle".equals(method) || +++ "clearCache".equals(method)) +++ return defc == java.util.ResourceBundle.class; +++ else if ("getType".equals(method)) +++ return defc == java.io.ObjectStreamField.class; +++ else if ("forClass".equals(method)) +++ return defc == java.io.ObjectStreamClass.class; +++ else if ("getLogger".equals(method)) +++ return defc == java.util.logging.Logger.class; +++ else if ("getAnonymousLogger".equals(method)) +++ return defc == java.util.logging.Logger.class; +++ return false; +++ } +++ ++ boolean inMethodHandlesList(String classname, String method) { ++ Class cls; ++ try { ++@@ -104,19 +202,21 @@ ++ false, ++ ClassLoader.getSystemClassLoader()); ++ return (Boolean) mhnCallerSensitiveMethod.invoke(null, cls, method); ++- } catch (ClassNotFoundException|IllegalAccessException e) { +++ } catch (ClassNotFoundException e) { +++ throw new RuntimeException(e); +++ } catch (IllegalAccessException e) { ++ throw new RuntimeException(e); ++ } catch (InvocationTargetException e) { ++ throw new RuntimeException(e.getCause()); ++ } ++ } ++ ++- public List run(List classes) throws IOException, InterruptedException, +++ public List run(List classes) throws IOException, InterruptedException, ++ ExecutionException, ConstantPoolException ++ { ++ ExecutorService pool = Executors.newFixedThreadPool(numThreads); ++- for (Path path : classes) { ++- ClassFileReader reader = ClassFileReader.newInstance(path.toFile()); +++ for (File path : classes) { +++ ClassFileReader reader = ClassFileReader.newInstance(path); ++ for (ClassFile cf : reader.getClassFiles()) { ++ String classFileName = cf.getName(); ++ // for each ClassFile ++@@ -192,56 +292,46 @@ ++ } ++ ++ static class PlatformClassPath { ++- static List getJREClasses() throws IOException { ++- List result = new ArrayList(); ++- Path home = Paths.get(System.getProperty("java.home")); +++ static List getJREClasses() throws IOException { +++ List result = new ArrayList(); +++ File home = new File(System.getProperty("java.home")); ++ ++- if (home.endsWith("jre")) { +++ if (home.toString().endsWith("jre")) { ++ // jar files in /jre/lib ++ // skip /lib ++- result.addAll(addJarFiles(home.resolve("lib"))); ++- } else if (home.resolve("lib").toFile().exists()) { +++ result.addAll(addJarFiles(new File(home, "lib"))); +++ } else if (new File(home, "lib").exists()) { ++ // either a JRE or a jdk build image ++- File classes = home.resolve("classes").toFile(); +++ File classes = new File(home, "classes"); ++ if (classes.exists() && classes.isDirectory()) { ++ // jdk build outputdir ++- result.add(classes.toPath()); +++ result.add(classes); ++ } ++ // add other JAR files ++- result.addAll(addJarFiles(home.resolve("lib"))); +++ result.addAll(addJarFiles(new File(home, "lib"))); ++ } else { ++ throw new RuntimeException("\"" + home + "\" not a JDK home"); ++ } ++ return result; ++ } ++ ++- static List addJarFiles(final Path root) throws IOException { ++- final List result = new ArrayList(); ++- final Path ext = root.resolve("ext"); ++- Files.walkFileTree(root, new SimpleFileVisitor() { ++- @Override ++- public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) ++- throws IOException { ++- if (dir.equals(root) || dir.equals(ext)) { ++- return FileVisitResult.CONTINUE; ++- } else { ++- // skip other cobundled JAR files ++- return FileVisitResult.SKIP_SUBTREE; ++- } ++- } ++- ++- @Override ++- public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) ++- throws IOException { ++- File f = file.toFile(); +++ static List addJarFiles(final File root) throws IOException { +++ final List result = new ArrayList(); +++ final File ext = new File(root, "ext"); +++ final List files = new ArrayList(); +++ for (String s : root.list()) +++ files.add(new File(root, s)); +++ for (String s : ext.list()) +++ files.add(new File(ext, s)); +++ for (File f : files) { +++ if (f.isFile()) { ++ String fn = f.getName(); ++ // parse alt-rt.jar as well ++ if (fn.endsWith(".jar") && !fn.equals("jfxrt.jar")) { ++- result.add(file); +++ result.add(f); ++ } ++- return FileVisitResult.CONTINUE; ++ } ++- }); +++ } ++ return result; ++ } ++ } ++diff -r 566f427de707 -r d4fca2113b28 test/sun/reflect/CallerSensitive/ClassFileReader.java ++--- openjdk/jdk/test/sun/reflect/CallerSensitive/ClassFileReader.java Tue Jun 03 13:28:16 2008 -0700 +++++ openjdk/jdk/test/sun/reflect/CallerSensitive/ClassFileReader.java Fri Oct 25 17:51:03 2013 +0100 ++@@ -23,12 +23,8 @@ ++ ++ import com.sun.tools.classfile.ClassFile; ++ import com.sun.tools.classfile.ConstantPoolException; +++ ++ import java.io.*; ++-import java.nio.file.FileVisitResult; ++-import java.nio.file.Files; ++-import java.nio.file.Path; ++-import java.nio.file.SimpleFileVisitor; ++-import java.nio.file.attribute.BasicFileAttributes; ++ import java.util.*; ++ import java.util.jar.JarEntry; ++ import java.util.jar.JarFile; ++@@ -47,28 +43,28 @@ ++ } ++ ++ if (path.isDirectory()) { ++- return new DirectoryReader(path.toPath()); +++ return new DirectoryReader(path); ++ } else if (path.getName().endsWith(".jar")) { ++- return new JarFileReader(path.toPath()); +++ return new JarFileReader(path); ++ } else { ++- return new ClassFileReader(path.toPath()); +++ return new ClassFileReader(path); ++ } ++ } ++ ++ /** ++ * Returns a ClassFileReader instance of a given JarFile. ++ */ ++- public static ClassFileReader newInstance(Path path, JarFile jf) throws IOException { +++ public static ClassFileReader newInstance(File path, JarFile jf) throws IOException { ++ return new JarFileReader(path, jf); ++ } ++ ++- protected final Path path; +++ protected final File path; ++ protected final String baseFileName; ++- private ClassFileReader(Path path) { +++ private ClassFileReader(File path) { ++ this.path = path; ++- this.baseFileName = path.getFileName() != null ++- ? path.getFileName().toString() ++- : path.toString(); +++ this.baseFileName = path.getName().equals("") +++ ? path.toString() +++ : path.getName(); ++ } ++ ++ public String getFileName() { ++@@ -104,10 +100,10 @@ ++ }; ++ } ++ ++- protected ClassFile readClassFile(Path p) throws IOException { +++ protected ClassFile readClassFile(File p) throws IOException { ++ InputStream is = null; ++ try { ++- is = Files.newInputStream(p); +++ is = new FileInputStream(p); ++ return ClassFile.read(is); ++ } catch (ConstantPoolException e) { ++ throw new ClassFileError(e); ++@@ -150,7 +146,7 @@ ++ } ++ ++ private static class DirectoryReader extends ClassFileReader { ++- DirectoryReader(Path path) throws IOException { +++ DirectoryReader(File path) throws IOException { ++ super(path); ++ } ++ ++@@ -158,17 +154,17 @@ ++ if (name.indexOf('.') > 0) { ++ int i = name.lastIndexOf('.'); ++ String pathname = name.replace('.', File.separatorChar) + ".class"; ++- Path p = path.resolve(pathname); ++- if (!p.toFile().exists()) { ++- p = path.resolve(pathname.substring(0, i) + "$" + ++- pathname.substring(i+1, pathname.length())); +++ File p = new File(path, pathname); +++ if (!p.exists()) { +++ p = new File(path, pathname.substring(0, i) + "$" + +++ pathname.substring(i+1, pathname.length())); ++ } ++- if (p.toFile().exists()) { +++ if (p.exists()) { ++ return readClassFile(p); ++ } ++ } else { ++- Path p = path.resolve(name + ".class"); ++- if (p.toFile().exists()) { +++ File p = new File(path, name + ".class"); +++ if (p.exists()) { ++ return readClassFile(p); ++ } ++ } ++@@ -184,22 +180,24 @@ ++ }; ++ } ++ ++- private List walkTree(Path dir) throws IOException { ++- final List files = new ArrayList(); ++- Files.walkFileTree(dir, new SimpleFileVisitor() { ++- public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) ++- throws IOException { ++- if (file.toFile().getName().endsWith(".class")) { ++- files.add(file); +++ private List walkTree(File dir) throws IOException { +++ final List files = new ArrayList(); +++ final List dirContents = Arrays.asList(dir.list()); +++ for (String file : dirContents) { +++ File f = new File(dir, file); +++ if (f.isDirectory()) +++ files.addAll(walkTree(f)); +++ else { +++ if (f.getName().endsWith(".class")) { +++ files.add(f); ++ } ++- return FileVisitResult.CONTINUE; ++ } ++- }); +++ } ++ return files; ++ } ++ ++ class DirectoryIterator implements Iterator { ++- private List entries; +++ private List entries; ++ private int index = 0; ++ DirectoryIterator() throws IOException { ++ entries = walkTree(path); ++@@ -214,7 +212,7 @@ ++ if (!hasNext()) { ++ throw new NoSuchElementException(); ++ } ++- Path path = entries.get(index++); +++ File path = entries.get(index++); ++ try { ++ return readClassFile(path); ++ } catch (IOException e) { ++@@ -230,10 +228,10 @@ ++ ++ private static class JarFileReader extends ClassFileReader { ++ final JarFile jarfile; ++- JarFileReader(Path path) throws IOException { ++- this(path, new JarFile(path.toFile())); +++ JarFileReader(File path) throws IOException { +++ this(path, new JarFile(path)); ++ } ++- JarFileReader(Path path, JarFile jf) throws IOException { +++ JarFileReader(File path, JarFile jf) throws IOException { ++ super(path); ++ this.jarfile = jf; ++ } ++diff -r 566f427de707 -r d4fca2113b28 test/sun/reflect/CallerSensitive/MethodFinder.java ++--- openjdk/jdk/test/sun/reflect/CallerSensitive/MethodFinder.java Tue Jun 03 13:28:16 2008 -0700 +++++ openjdk/jdk/test/sun/reflect/CallerSensitive/MethodFinder.java Fri Oct 25 17:51:03 2013 +0100 ++@@ -121,10 +121,6 @@ ++ return false; ++ } ++ ++- public Boolean visitInvokeDynamic(CONSTANT_InvokeDynamic_info info, Void p) { ++- return false; ++- } ++- ++ public Boolean visitLong(CONSTANT_Long_info info, Void p) { ++ return false; ++ } ++@@ -133,14 +129,6 @@ ++ return false; ++ } ++ ++- public Boolean visitMethodHandle(CONSTANT_MethodHandle_info info, Void p) { ++- return false; ++- } ++- ++- public Boolean visitMethodType(CONSTANT_MethodType_info info, Void p) { ++- return false; ++- } ++- ++ public Boolean visitString(CONSTANT_String_info info, Void p) { ++ return false; ++ } ++@@ -198,4 +186,3 @@ ++ } ++ }; ++ } ++- ++diff -r 566f427de707 -r d4fca2113b28 test/sun/reflect/CallerSensitive/MissingCallerSensitive.java ++--- openjdk/jdk/test/sun/reflect/CallerSensitive/MissingCallerSensitive.java Tue Jun 03 13:28:16 2008 -0700 +++++ openjdk/jdk/test/sun/reflect/CallerSensitive/MissingCallerSensitive.java Fri Oct 25 17:51:03 2013 +0100 ++@@ -30,14 +30,13 @@ ++ * @run main/othervm MissingCallerSensitive ++ */ ++ ++-import java.nio.file.Path; ++-import java.nio.file.Paths; +++import java.io.File; ++ import java.util.*; ++ public class MissingCallerSensitive { ++ public static void main(String[] args) throws Exception { ++ String testclasses = System.getProperty("test.classes", "."); ++- List classes = new ArrayList<>(); ++- classes.add(Paths.get(testclasses, "MissingCallerSensitive.class")); +++ List classes = new ArrayList(); +++ classes.add(new File(testclasses, "MissingCallerSensitive.class")); ++ ++ final String method = "sun/reflect/Reflection.getCallerClass"; ++ CallerSensitiveFinder csfinder = new CallerSensitiveFinder(method); +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/oj6-20-merge.patch openjdk-6-6b27-1.12.6/patches/openjdk/oj6-20-merge.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/oj6-20-merge.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/oj6-20-merge.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,599 @@ ++# HG changeset patch ++# User andrew ++# Date 1383034761 0 ++# Tue Oct 29 08:19:21 2013 +0000 ++# Node ID 05c35de6d7047c6d6d6e8edc402b7fab861d0a21 ++# Parent efb24af909a020f3a3b3d446f6db15fc8b1c309a ++OPENJDK6-20: Resolve merge issues with JAXP security fixes ++Reviewed-by: omajid ++ ++diff -r efb24af909a0 -r 05c35de6d704 drop_included/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/XSLTC.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/XSLTC.java Tue Oct 29 08:11:44 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/XSLTC.java Tue Oct 29 08:19:21 2013 +0000 ++@@ -157,6 +157,25 @@ ++ } ++ ++ /** +++ * Return allowed protocols for accessing external stylesheet. +++ */ +++ public Object getProperty(String name) { +++ if (name.equals(XalanConstants.SECURITY_MANAGER)) { +++ return _xmlSecurityManager; +++ } +++ return null; +++ } +++ +++ /** +++ * Set allowed protocols for accessing external stylesheet. +++ */ +++ public void setProperty(String name, Object value) { +++ if (name.equals(XalanConstants.SECURITY_MANAGER)) { +++ _xmlSecurityManager = (XMLSecurityManager)value; +++ } +++ } +++ +++ /** ++ * Only for user by the internal TrAX implementation. ++ */ ++ public Parser getParser() { ++@@ -901,23 +920,4 @@ ++ return newDataOffset; ++ } ++ ++- /** ++- * Return allowed protocols for accessing external stylesheet. ++- */ ++- public Object getProperty(String name) { ++- if (name.equals(XalanConstants.SECURITY_MANAGER)) { ++- return _xmlSecurityManager; ++- } ++- return null; ++- } ++- ++- /** ++- * Set allowed protocols for accessing external stylesheet. ++- */ ++- public void setProperty(String name, Object value) { ++- if (name.equals(XalanConstants.SECURITY_MANAGER)) { ++- _xmlSecurityManager = (XMLSecurityManager)value; ++- } ++- } ++- ++ } ++diff -r efb24af909a0 -r 05c35de6d704 drop_included/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerFactoryImpl.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerFactoryImpl.java Tue Oct 29 08:11:44 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerFactoryImpl.java Tue Oct 29 08:19:21 2013 +0000 ++@@ -283,6 +283,14 @@ ++ } else if (name.equals(XalanConstants.SECURITY_MANAGER)) { ++ return _xmlSecurityManager; ++ } +++ +++ /** Check to see if the property is managed by the security manager **/ +++ String propertyValue = (_xmlSecurityManager != null) ? +++ _xmlSecurityManager.getLimitAsString(name) : null; +++ if (propertyValue != null) { +++ return propertyValue; +++ } +++ ++ // Throw an exception for all other attributes ++ ErrorMsg err = new ErrorMsg(ErrorMsg.JAXP_INVALID_ATTR_ERR, name); ++ throw new IllegalArgumentException(err.toString()); ++@@ -383,6 +391,11 @@ ++ } ++ } ++ +++ if (_xmlSecurityManager != null && +++ _xmlSecurityManager.setLimit(name, XMLSecurityManager.State.APIPROPERTY, value)) { +++ return; +++ } +++ ++ // Throw an exception for all other attributes ++ final ErrorMsg err ++ = new ErrorMsg(ErrorMsg.JAXP_INVALID_ATTR_ERR, name); ++@@ -856,7 +869,13 @@ ++ } else { ++ err = new ErrorMsg(ErrorMsg.JAXP_COMPILE_ERR); ++ } ++- TransformerConfigurationException exc = new TransformerConfigurationException(err.toString(), err.getCause()); +++ Throwable cause = err.getCause(); +++ TransformerConfigurationException exc; +++ if (cause != null) { +++ exc = new TransformerConfigurationException(cause.getMessage(), cause); +++ } else { +++ exc = new TransformerConfigurationException(err.toString()); +++ } ++ ++ // Pass compiler errors to the error listener ++ if (_errorListener != null) { ++diff -r efb24af909a0 -r 05c35de6d704 drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/PropertyManager.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/PropertyManager.java Tue Oct 29 08:11:44 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/PropertyManager.java Tue Oct 29 08:19:21 2013 +0000 ++@@ -179,6 +179,13 @@ ++ return; ++ } ++ +++ //check if the property is managed by security manager +++ if (fSecurityManager == null || +++ !fSecurityManager.setLimit(property, XMLSecurityManager.State.APIPROPERTY, value)) { +++ //fall back to the existing property manager +++ supportedProps.put(property, value); +++ } +++ ++ supportedProps.put(property, value ) ; ++ if(equivalentProperty != null){ ++ supportedProps.put(equivalentProperty, value ) ; ++diff -r efb24af909a0 -r 05c35de6d704 drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/DocumentBuilderFactoryImpl.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/DocumentBuilderFactoryImpl.java Tue Oct 29 08:11:44 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/DocumentBuilderFactoryImpl.java Tue Oct 29 08:19:21 2013 +0000 ++@@ -191,6 +191,9 @@ ++ ++ public void setFeature(String name, boolean value) ++ throws ParserConfigurationException { +++ if (features == null) { +++ features = new Hashtable(); +++ } ++ // If this is the secure processing feature, save it then return. ++ if (name.equals(XMLConstants.FEATURE_SECURE_PROCESSING)) { ++ if (System.getSecurityManager() != null && (!value)) { ++@@ -199,11 +202,10 @@ ++ "jaxp-secureprocessing-feature", null)); ++ } ++ fSecureProcess = value; +++ features.put(name, value ? Boolean.TRUE : Boolean.FALSE); ++ return; ++ } ++- if (features == null) { ++- features = new Hashtable(); ++- } +++ ++ features.put(name, value ? Boolean.TRUE : Boolean.FALSE); ++ // Test the feature by possibly throwing SAX exceptions ++ try { ++diff -r efb24af909a0 -r 05c35de6d704 drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/DocumentBuilderImpl.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/DocumentBuilderImpl.java Tue Oct 29 08:11:44 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/DocumentBuilderImpl.java Tue Oct 29 08:19:21 2013 +0000 ++@@ -253,12 +253,16 @@ ++ } ++ } ++ } else { ++- // Let Xerces code handle the property ++- domParser.setProperty(name, val); ++- } ++- } +++ //check if the property is managed by security manager +++ if (fSecurityManager == null || +++ !fSecurityManager.setLimit(name, XMLSecurityManager.State.APIPROPERTY, val)) { +++ //fall back to the existing property manager +++ domParser.setProperty(name, val); +++ } ++ } +++ } ++ } +++ } ++ ++ /** ++ * Non-preferred: use the getDOMImplementation() method instead of this ++diff -r efb24af909a0 -r 05c35de6d704 drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/SAXParserFactoryImpl.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/SAXParserFactoryImpl.java Tue Oct 29 08:11:44 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/SAXParserFactoryImpl.java Tue Oct 29 08:19:21 2013 +0000 ++@@ -124,6 +124,7 @@ ++ "jaxp-secureprocessing-feature", null)); ++ } ++ fSecureProcess = value; +++ putInFeatures(name, value); ++ return; ++ } ++ ++diff -r efb24af909a0 -r 05c35de6d704 drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/SAXParserImpl.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/SAXParserImpl.java Tue Oct 29 08:11:44 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/SAXParserImpl.java Tue Oct 29 08:19:21 2013 +0000 ++@@ -344,8 +344,10 @@ ++ fSecurityManager = new XMLSecurityManager(true); ++ try { ++ super.setProperty(SECURITY_MANAGER, fSecurityManager); ++- } catch (Exception ex) { ++- //shall not happen +++ } catch (SAXException e) { +++ throw new UnsupportedOperationException( +++ SAXMessageFormatter.formatMessage(fConfiguration.getLocale(), +++ "property-not-recognized", new Object [] {SECURITY_MANAGER}), e); ++ } ++ } ++ } ++@@ -475,14 +477,21 @@ ++ return; ++ } ++ } ++- if (!fInitProperties.containsKey(name)) { ++- fInitProperties.put(name, super.getProperty(name)); ++- } ++ /** Forward property to the schema validator if there is one. **/ ++ if (fSAXParser != null && fSAXParser.fSchemaValidator != null) { ++ setSchemaValidatorProperty(name, value); ++ } ++- super.setProperty(name, value); +++ +++ //check if the property is managed by security manager +++ if (fSecurityManager == null || +++ !fSecurityManager.setLimit(name, XMLSecurityManager.State.APIPROPERTY, value)) { +++ //fall back to the existing property manager +++ if (!fInitProperties.containsKey(name)) { +++ fInitProperties.put(name, super.getProperty(name)); +++ } +++ super.setProperty(name, value); +++ } +++ ++ } ++ ++ public synchronized Object getProperty(String name) ++@@ -495,6 +504,14 @@ ++ // JAXP 1.2 support ++ return fSAXParser.schemaLanguage; ++ } +++ +++ /** Check to see if the property is managed by the security manager **/ +++ String propertyValue = (fSecurityManager != null) ? +++ fSecurityManager.getLimitAsString(name) : null; +++ if (propertyValue != null) { +++ return propertyValue; +++ } +++ ++ return super.getProperty(name); ++ } ++ ++diff -r efb24af909a0 -r 05c35de6d704 drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/AbstractXMLSchema.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/AbstractXMLSchema.java Tue Oct 29 08:11:44 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/AbstractXMLSchema.java Tue Oct 29 08:19:21 2013 +0000 ++@@ -85,8 +85,7 @@ ++ /* ++ * Other methods ++ */ ++- ++- final void setFeature(String featureId, boolean state) { +++ public final void setFeature(String featureId, boolean state) { ++ fFeatures.put(featureId, state ? Boolean.TRUE : Boolean.FALSE); ++ } ++ ++diff -r efb24af909a0 -r 05c35de6d704 drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaFactory.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaFactory.java Tue Oct 29 08:11:44 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaFactory.java Tue Oct 29 08:19:21 2013 +0000 ++@@ -239,6 +239,7 @@ ++ else { ++ schema = new EmptyXMLSchema(); ++ } +++ propagateProperties(schema); ++ propagateFeatures(schema); ++ return schema; ++ } ++@@ -247,6 +248,7 @@ ++ // Use a Schema that uses the system id as the equality source. ++ AbstractXMLSchema schema = new WeakReferenceXMLSchema(); ++ propagateFeatures(schema); +++ propagateProperties(schema); ++ return schema; ++ } ++ ++@@ -322,7 +324,6 @@ ++ "jaxp-secureprocessing-feature", null)); ++ } ++ ++- fSecurityManager = value ? new XMLSecurityManager() : null; ++ fSecurityManager.setSecureProcessing(value); ++ fXMLSchemaLoader.setProperty(SECURITY_MANAGER, fSecurityManager); ++ return; ++@@ -362,7 +363,12 @@ ++ "property-not-supported", new Object [] {name})); ++ } ++ try { ++- fXMLSchemaLoader.setProperty(name, object); +++ //check if the property is managed by security manager +++ if (fSecurityManager == null || +++ !fSecurityManager.setLimit(name, XMLSecurityManager.State.APIPROPERTY, object)) { +++ //fall back to the existing property manager +++ fXMLSchemaLoader.setProperty(name, object); +++ } ++ } ++ catch (XMLConfigurationException e) { ++ String identifier = e.getIdentifier(); ++@@ -388,6 +394,15 @@ ++ } ++ } ++ +++ private void propagateProperties(AbstractXMLSchema schema) { +++ String[] properties = fXMLSchemaLoader.getRecognizedProperties(); +++ for (int i = 0; i < properties.length; ++i) { +++ Object state = fXMLSchemaLoader.getProperty(properties[i]); +++ schema.setProperty(properties[i], state); +++ } +++ } +++ +++ ++ /** ++ * Extension of XMLGrammarPoolImpl which exposes the number of ++ * grammars stored in the grammar pool. ++diff -r efb24af909a0 -r 05c35de6d704 drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaValidatorComponentManager.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaValidatorComponentManager.java Tue Oct 29 08:11:44 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaValidatorComponentManager.java Tue Oct 29 08:19:21 2013 +0000 ++@@ -368,11 +368,15 @@ ++ return; ++ } ++ ++- //fall back to the existing property manager ++- if (!fInitProperties.containsKey(propertyId)) { ++- fInitProperties.put(propertyId, super.getProperty(propertyId)); +++ //check if the property is managed by security manager +++ if (fInitSecurityManager == null || +++ !fInitSecurityManager.setLimit(propertyId, XMLSecurityManager.State.APIPROPERTY, value)) { +++ //fall back to the existing property manager +++ if (!fInitProperties.containsKey(propertyId)) { +++ fInitProperties.put(propertyId, super.getProperty(propertyId)); +++ } +++ super.setProperty(propertyId, value); ++ } ++- super.setProperty(propertyId, value); ++ } ++ ++ /** ++diff -r efb24af909a0 -r 05c35de6d704 drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/SAXParser.java ++--- openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/SAXParser.java Tue Oct 29 08:11:44 2013 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/SAXParser.java Tue Oct 29 08:19:21 2013 +0000 ++@@ -25,6 +25,8 @@ ++ import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; ++ import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarPool; ++ import com.sun.org.apache.xerces.internal.xni.parser.XMLParserConfiguration; +++import org.xml.sax.SAXNotRecognizedException; +++import org.xml.sax.SAXNotSupportedException; ++ ++ /** ++ * This is the main Xerces SAX parser class. It uses the abstract SAX ++@@ -125,4 +127,31 @@ ++ ++ } // (SymbolTable,XMLGrammarPool) ++ +++ /** +++ * Sets the particular property in the underlying implementation of +++ * org.xml.sax.XMLReader. +++ */ +++ public void setProperty(String name, Object value) +++ throws SAXNotRecognizedException, SAXNotSupportedException { +++ /** +++ * It's possible for users to set a security manager through the interface. +++ * If it's the old SecurityManager, convert it to the new XMLSecurityManager +++ */ +++ if (name.equals(Constants.SECURITY_MANAGER)) { +++ securityManager = XMLSecurityManager.convert(value, securityManager); +++ super.setProperty(Constants.SECURITY_MANAGER, securityManager); +++ return; +++ } +++ +++ if (securityManager == null) { +++ securityManager = new XMLSecurityManager(true); +++ super.setProperty(Constants.SECURITY_MANAGER, securityManager); +++ } +++ +++ //check if the property is managed by security manager +++ if (!securityManager.setLimit(name, XMLSecurityManager.State.APIPROPERTY, value)) { +++ //fall back to the default configuration to handle the property +++ super.setProperty(name, value); +++ } +++ } ++ } // class SAXParser ++diff -r efb24af909a0 -r 05c35de6d704 drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/util/SecurityManager.java ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/util/SecurityManager.java Tue Oct 29 08:19:21 2013 +0000 ++@@ -0,0 +1,215 @@ +++/* +++ * reserved comment block +++ * DO NOT REMOVE OR ALTER! +++ */ +++/* +++ * The Apache Software License, Version 1.1 +++ * +++ * +++ * Copyright (c) 2003 The Apache Software Foundation. +++ * All rights reserved. +++ * +++ * Redistribution and use in source and binary forms, with or without +++ * modification, are permitted provided that the following conditions +++ * are met: +++ * +++ * 1. Redistributions of source code must retain the above copyright +++ * notice, this list of conditions and the following disclaimer. +++ * +++ * 2. Redistributions in binary form must reproduce the above copyright +++ * notice, this list of conditions and the following disclaimer in +++ * the documentation and/or other materials provided with the +++ * distribution. +++ * +++ * 3. The end-user documentation included with the redistribution, +++ * if any, must include the following acknowledgment: +++ * "This product includes software developed by the +++ * Apache Software Foundation (http://www.apache.org/)." +++ * Alternately, this acknowledgment may appear in the software itself, +++ * if and wherever such third-party acknowledgments normally appear. +++ * +++ * 4. The names "Xerces" and "Apache Software Foundation" must +++ * not be used to endorse or promote products derived from this +++ * software without prior written permission. For written +++ * permission, please contact apache@apache.org. +++ * +++ * 5. Products derived from this software may not be called "Apache", +++ * nor may "Apache" appear in their name, without prior written +++ * permission of the Apache Software Foundation. +++ * +++ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED +++ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +++ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +++ * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR +++ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +++ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +++ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +++ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +++ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +++ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +++ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +++ * SUCH DAMAGE. +++ * ==================================================================== +++ * +++ * This software consists of voluntary contributions made by many +++ * individuals on behalf of the Apache Software Foundation and was +++ * originally based on software copyright (c) 1999, International +++ * Business Machines, Inc., http://www.apache.org. For more +++ * information on the Apache Software Foundation, please see +++ * . +++ */ +++ +++package com.sun.org.apache.xerces.internal.util; +++import com.sun.org.apache.xerces.internal.impl.Constants; +++/** +++ * This class is a container for parser settings that relate to +++ * security, or more specifically, it is intended to be used to prevent denial-of-service +++ * attacks from being launched against a system running Xerces. +++ * Any component that is aware of a denial-of-service attack that can arise +++ * from its processing of a certain kind of document may query its Component Manager +++ * for the property (http://apache.org/xml/properties/security-manager) +++ * whose value will be an instance of this class. +++ * If no value has been set for the property, the component should proceed in the "usual" (spec-compliant) +++ * manner. If a value has been set, then it must be the case that the component in +++ * question needs to know what method of this class to query. This class +++ * will provide defaults for all known security issues, but will also provide +++ * setters so that those values can be tailored by applications that care. +++ * +++ * @author Neil Graham, IBM +++ * +++ */ +++public final class SecurityManager { +++ +++ // +++ // Constants +++ // +++ +++ // default value for entity expansion limit +++ private final static int DEFAULT_ENTITY_EXPANSION_LIMIT = 64000; +++ +++ /** Default value of number of nodes created. **/ +++ private final static int DEFAULT_MAX_OCCUR_NODE_LIMIT = 5000; +++ +++ // +++ // Data +++ // +++ +++ private final static int DEFAULT_ELEMENT_ATTRIBUTE_LIMIT = 10000; +++ +++ /** Entity expansion limit. **/ +++ private int entityExpansionLimit; +++ +++ /** W3C XML Schema maxOccurs limit. **/ +++ private int maxOccurLimit; +++ +++ private int fElementAttributeLimit; +++ // default constructor. Establishes default values for +++ // all known security holes. +++ /** +++ * Default constructor. Establishes default values +++ * for known security vulnerabilities. +++ */ +++ public SecurityManager() { +++ entityExpansionLimit = DEFAULT_ENTITY_EXPANSION_LIMIT; +++ maxOccurLimit = DEFAULT_MAX_OCCUR_NODE_LIMIT ; +++ fElementAttributeLimit = DEFAULT_ELEMENT_ATTRIBUTE_LIMIT; +++ //We are reading system properties only once , +++ //at the time of creation of this object , +++ readSystemProperties(); +++ } +++ +++ /** +++ *

Sets the number of entity expansions that the +++ * parser should permit in a document.

+++ * +++ * @param limit the number of entity expansions +++ * permitted in a document +++ */ +++ public void setEntityExpansionLimit(int limit) { +++ entityExpansionLimit = limit; +++ } +++ +++ /** +++ *

Returns the number of entity expansions +++ * that the parser permits in a document.

+++ * +++ * @return the number of entity expansions +++ * permitted in a document +++ */ +++ public int getEntityExpansionLimit() { +++ return entityExpansionLimit; +++ } +++ +++ /** +++ *

Sets the limit of the number of content model nodes +++ * that may be created when building a grammar for a W3C +++ * XML Schema that contains maxOccurs attributes with values +++ * other than "unbounded".

+++ * +++ * @param limit the maximum value for maxOccurs other +++ * than "unbounded" +++ */ +++ public void setMaxOccurNodeLimit(int limit){ +++ maxOccurLimit = limit; +++ } +++ +++ /** +++ *

Returns the limit of the number of content model nodes +++ * that may be created when building a grammar for a W3C +++ * XML Schema that contains maxOccurs attributes with values +++ * other than "unbounded".

+++ * +++ * @return the maximum value for maxOccurs other +++ * than "unbounded" +++ */ +++ public int getMaxOccurNodeLimit(){ +++ return maxOccurLimit; +++ } +++ +++ public int getElementAttrLimit(){ +++ return fElementAttributeLimit; +++ } +++ +++ public void setElementAttrLimit(int limit){ +++ fElementAttributeLimit = limit; +++ } +++ +++ private void readSystemProperties(){ +++ +++ try { +++ String value = System.getProperty(Constants.ENTITY_EXPANSION_LIMIT); +++ if(value != null && !value.equals("")){ +++ entityExpansionLimit = Integer.parseInt(value); +++ if (entityExpansionLimit < 0) +++ entityExpansionLimit = DEFAULT_ENTITY_EXPANSION_LIMIT; +++ } +++ else +++ entityExpansionLimit = DEFAULT_ENTITY_EXPANSION_LIMIT; +++ }catch(Exception ex){} +++ +++ try { +++ String value = System.getProperty(Constants.MAX_OCCUR_LIMIT); +++ if(value != null && !value.equals("")){ +++ maxOccurLimit = Integer.parseInt(value); +++ if (maxOccurLimit < 0) +++ maxOccurLimit = DEFAULT_MAX_OCCUR_NODE_LIMIT; +++ } +++ else +++ maxOccurLimit = DEFAULT_MAX_OCCUR_NODE_LIMIT; +++ }catch(Exception ex){} +++ +++ try { +++ String value = System.getProperty(Constants.ELEMENT_ATTRIBUTE_LIMIT); +++ if(value != null && !value.equals("")){ +++ fElementAttributeLimit = Integer.parseInt(value); +++ if ( fElementAttributeLimit < 0) +++ fElementAttributeLimit = DEFAULT_ELEMENT_ATTRIBUTE_LIMIT; +++ } +++ else +++ fElementAttributeLimit = DEFAULT_ELEMENT_ATTRIBUTE_LIMIT; +++ +++ }catch(Exception ex){} +++ +++ } +++ +++} // class SecurityManager +diff -Naurp -x ubuntu-security-0001-e98b0ef70b26.patch openjdk-6-6b27-1.12.6.orig/patches/openjdk/oj6-21-overrides.patch openjdk-6-6b27-1.12.6/patches/openjdk/oj6-21-overrides.patch +--- openjdk-6-6b27-1.12.6.orig/patches/openjdk/oj6-21-overrides.patch 1969-12-31 18:00:00.000000000 -0600 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/oj6-21-overrides.patch 2013-11-14 16:20:46.000000000 -0600 +@@ -0,0 +1,20 @@ ++# HG changeset patch ++# User andrew ++# Date 1383055466 0 ++# Tue Oct 29 14:04:26 2013 +0000 ++# Node ID 4a15d8b1c94aa5e5a9c61bbd0feb7a6727343927 ++# Parent f587451cfca426297a5d9be67c7bfc36f1ad8e10 ++OPENJDK6-21: Remove @Override annotation added on interface by 2013/10/15 security fixes ++Reviewed-by: omajid ++ ++diff -r f587451cfca4 -r 4a15d8b1c94a src/share/classes/com/sun/corba/se/impl/presentation/rmi/InvocationHandlerFactoryImpl.java ++--- openjdk/corba/src/share/classes/com/sun/corba/se/impl/presentation/rmi/InvocationHandlerFactoryImpl.java Tue Oct 15 15:55:15 2013 +0100 +++++ openjdk/corba/src/share/classes/com/sun/corba/se/impl/presentation/rmi/InvocationHandlerFactoryImpl.java Tue Oct 29 14:04:26 2013 +0000 ++@@ -130,7 +130,6 @@ ++ new CustomCompositeInvocationHandlerImpl( stub ) ; ++ ++ AccessController.doPrivileged(new PrivilegedAction() { ++- @Override ++ public Void run() { ++ handler.addInvocationHandler( DynamicStub.class, ++ dynamicStubHandler ) ; --- openjdk-6-6b27-1.12.6.orig/debian/patches/gcc-opt-O2.diff +++ openjdk-6-6b27-1.12.6/debian/patches/gcc-opt-O2.diff @@ -0,0 +1,37 @@ +--- openjdk/hotspot/make/linux/makefiles/gcc.make~ 2007-11-29 12:38:22.578339247 +0100 ++++ openjdk/hotspot/make/linux/makefiles/gcc.make 2007-11-29 12:42:28.742052571 +0100 +@@ -103,7 +103,7 @@ + CFLAGS_WARN/BYFILE = $(CFLAGS_WARN/$@)$(CFLAGS_WARN/DEFAULT$(CFLAGS_WARN/$@)) + + # The flags to use for an Optimized g++ build +-OPT_CFLAGS += -O3 ++OPT_CFLAGS += -O2 + + # Hotspot uses very unstrict aliasing turn this optimization off + OPT_CFLAGS += -fno-strict-aliasing +--- openjdk/corba/make/common/Defs-linux.gmk~ 2007-11-29 12:38:22.578339247 +0100 ++++ openjdk/corba/make/common/Defs-linux.gmk 2007-11-29 12:42:52.452410236 +0100 +@@ -76,8 +76,8 @@ + # + # Default optimization + # +-CC_HIGHEST_OPT = -O3 +-CC_HIGHER_OPT = -O3 ++CC_HIGHEST_OPT = -O2 ++CC_HIGHER_OPT = -O2 + CC_LOWER_OPT = -O2 + CC_NO_OPT = + +--- openjdk/jdk/make/common/Defs-linux.gmk~ 2007-11-29 12:38:22.578339247 +0100 ++++ openjdk/jdk/make/common/Defs-linux.gmk 2007-11-29 12:43:13.992735167 +0100 +@@ -86,8 +86,8 @@ + # + # Default optimization + # +-CC_HIGHEST_OPT = -O3 +-CC_HIGHER_OPT = -O3 ++CC_HIGHEST_OPT = -O2 ++CC_HIGHER_OPT = -O2 + CC_LOWER_OPT = -O2 + CC_NO_OPT = + --- openjdk-6-6b27-1.12.6.orig/debian/patches/default-libpath-original.diff +++ openjdk-6-6b27-1.12.6/debian/patches/default-libpath-original.diff @@ -0,0 +1,15 @@ +--- openjdk/hotspot/src/os/linux/vm/os_linux.cpp~ 2009-10-22 07:08:23.000000000 +0200 ++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp 2009-10-22 07:13:14.000000000 +0200 +@@ -281,11 +281,7 @@ + * ... + * 7: The default directories, normally /lib and /usr/lib. + */ +-#if defined(AMD64) || defined(_LP64) && (defined(SPARC) || defined(PPC) || defined(S390)) +-#define DEFAULT_LIBPATH "/usr/lib64:/lib64:/lib:/usr/lib" +-#else +-#define DEFAULT_LIBPATH "/lib:/usr/lib" +-#endif ++#define DEFAULT_LIBPATH "/usr/lib/jni:/lib:/usr/lib" + + #define EXTENSIONS_DIR "/lib/ext" + #define ENDORSED_DIR "/lib/endorsed" --- openjdk-6-6b27-1.12.6.orig/debian/patches/fontconfig-japanese.diff +++ openjdk-6-6b27-1.12.6/debian/patches/fontconfig-japanese.diff @@ -0,0 +1,219 @@ +# used for Debian wheezy and Ubuntu 12.04 LTS or newer + +--- openjdk/jdk/src/solaris/classes/sun/awt/fontconfigs/linux.fontconfig.Ubuntu.properties.orig 2013-02-07 17:01:24.723477262 +0100 ++++ openjdk/jdk/src/solaris/classes/sun/awt/fontconfigs/linux.fontconfig.Ubuntu.properties 2013-02-07 17:03:39.043477916 +0100 +@@ -57,142 +57,142 @@ + + serif.plain.latin-1=DejaVu Serif + #serif.plain.latin-1.motif=LuxiSerif-Regular +-serif.plain.japanese-kochi=Kochi Mincho + serif.plain.japanese-sazanami=Sazanami Mincho + serif.plain.japanese-vlgothic=Sazanami Mincho ++serif.plain.japanese-ipafont=IPAMincho + serif.plain.korean-nanum=NanumMyeongjo + + serif.bold.latin-1=DejaVu Serif Bold + #serif.bold.latin-1.motif=LuxiSerif-Bold +-serif.bold.japanese-kochi=Kochi Mincho + serif.bold.japanese-sazanami=Sazanami Mincho + serif.bold.japanese-vlgothic=Sazanami Mincho ++serif.bold.japanese-ipafont=IPAMincho + serif.bold.korean-nanum=NanumMyeongjo Bold + + serif.italic.latin-1=DejaVu Serif Oblique + #serif.italic.latin-1.motif=LuxiSerif-Oblique +-serif.italic.japanese-kochi=Kochi Mincho + serif.italic.japanese-sazanami=Sazanami Mincho + serif.italic.japanese-vlgothic=Sazanami Mincho ++serif.italic.japanese-ipafont=IPAMincho + serif.italic.korean-nanum=NanumMyeongjo + + serif.bolditalic.latin-1=DejaVu Serif Bold Oblique + #serif.bolditalic.latin-1.motif=LuxiSerif-BoldOblique +-serif.bolditalic.japanese-kochi=Kochi Mincho + serif.bolditalic.japanese-sazanami=Sazanami Mincho + serif.bolditalic.japanese-vlgothic=Sazanami Mincho ++serif.bolditalic.japanese-ipafont=IPAMincho + serif.bolditalic.korean-nanum=NanumMyeongjo Bold + + sansserif.plain.latin-1=DejaVu Sans + #sansserif.plain.latin-1.motif=LuxiSans-Regular +-sansserif.plain.japanese-kochi=Kochi Gothic + sansserif.plain.japanese-sazanami=Sazanami Gothic + sansserif.plain.japanese-vlgothic=VL PGothic ++sansserif.plain.japanese-ipafont=IPAPGothic + sansserif.plain.korean-nanum=NanumGothic + + sansserif.bold.latin-1=DejaVu Sans Bold + #sansserif.bold.latin-1.motif=LuxiSans-Bold +-sansserif.bold.japanese-kochi=Kochi Gothic + sansserif.bold.japanese-sazanami=Sazanami Gothic + sansserif.bold.japanese-vlgothic=VL PGothic ++sansserif.bold.japanese-ipafont=IPAPGothic + sansserif.bold.korean-nanum=NanumGothic Bold + + sansserif.italic.latin-1=DejaVu Sans Oblique + #sansserif.italic.latin-1.motif=LuxiSans-Oblique +-sansserif.italic.japanese-kochi=Kochi Gothic + sansserif.italic.japanese-sazanami=Sazanami Gothic + sansserif.italic.japanese-vlgothic=VL PGothic ++sansserif.italic.japanese-ipafont=IPAPGothic + sansserif.italic.korean-nanum=NanumGothic + + sansserif.bolditalic.latin-1=DejaVu Sans Bold Oblique + #sansserif.bolditalic.latin-1.motif=LuxiSans-BoldOblique +-sansserif.bolditalic.japanese-kochi=Kochi Gothic + sansserif.bolditalic.japanese-sazanami=Sazanami Gothic + sansserif.bolditalic.japanese-vlgothic=VL PGothic ++sansserif.bolditalic.japanese-ipafont=IPAPGothic + sansserif.bolditalic.korean-nanum=NanumGothic Bold + + monospaced.plain.latin-1=DejaVu Sans Mono + #monospaced.plain.latin-1.motif=LuxiMono-Regular +-monospaced.plain.japanese-kochi=Kochi Gothic + monospaced.plain.japanese-sazanami=Sazanami Gothic + monospaced.plain.japanese-vlgothic=VL Gothic ++monospaced.plain.japanese-ipafont=IPAGothic + monospaced.plain.korean-nanum=NanumGothicCoding + + monospaced.bold.latin-1=DejaVu Sans Mono Bold + #monospaced.bold.latin-1.motif=LuxiMono-Bold +-monospaced.bold.japanese-kochi=Kochi Gothic + monospaced.bold.japanese-sazanami=Sazanami Gothic + monospaced.bold.japanese-vlgothic=VL Gothic ++monospaced.bold.japanese-ipafont=IPAGothic + monospaced.bold.korean-nanum=NanumGothicCoding Bold + + monospaced.italic.latin-1=DejaVu Sans Mono Oblique + #monospaced.italic.latin-1.motif=LuxiMono-Oblique +-monospaced.italic.japanese-kochi=Kochi Gothic + monospaced.italic.japanese-sazanami=Sazanami Gothic + monospaced.italic.japanese-vlgothic=VL Gothic ++monospaced.italic.japanese-ipafont=IPAGothic + monospaced.italic.korean-nanum=NanumGothicCoding + + monospaced.bolditalic.latin-1=DejaVu Sans Mono Bold Oblique + #monospaced.bolditalic.latin-1.motif=LuxiMono-BoldOblique +-monospaced.bolditalic.japanese-kochi=Kochi Gothic + monospaced.bolditalic.japanese-sazanami=Sazanami Gothic + monospaced.bolditalic.japanese-vlgothic=VL Gothic ++monospaced.bolditalic.japanese-ipafont=IPAGothic + monospaced.bolditalic.korean-nanum=NanumGothicCoding Bold + + dialog.plain.latin-1=DejaVu Sans + #dialog.plain.latin-1.motif=LuxiSans-Regular +-dialog.plain.japanese-kochi=Kochi Gothic + dialog.plain.japanese-sazanami=Sazanami Gothic + dialog.plain.japanese-vlgothic=VL PGothic ++dialog.plain.japanese-ipafont=IPAPGothic + dialog.plain.korean-nanum=NanumGothic + + dialog.bold.latin-1=DejaVu Sans Bold + #dialog.bold.latin-1.motif=LuxiSans-Bold +-dialog.bold.japanese-kochi=Kochi Gothic + dialog.bold.japanese-sazanami=Sazanami Gothic + dialog.bold.japanese-vlgothic=VL PGothic ++dialog.bold.japanese-ipafont=IPAPGothic + dialog.bold.korean-nanum=NanumGothic Bold + + dialog.italic.latin-1=DejaVu Sans Oblique + #dialog.italic.latin-1.motif=LuxiSans-Oblique +-dialog.italic.japanese-kochi=Kochi Gothic + dialog.italic.japanese-sazanami=Sazanami Gothic + dialog.italic.japanese-vlgothic=VL PGothic ++dialog.italic.japanese-ipafont=IPAPGothic + dialog.italic.korean-nanum=NanumGothic + + dialog.bolditalic.latin-1=DejaVu Sans Bold Oblique + #dialog.bolditalic.latin-1.motif=LuxiSans-BoldOblique +-dialog.bolditalic.japanese-kochi=Kochi Gothic + dialog.bolditalic.japanese-sazanami=Sazanami Gothic + dialog.bolditalic.japanese-vlgothic=VL PGothic ++dialog.bolditalic.japanese-ipafont=IPAPGothic + dialog.bolditalic.korean-nanum=NanumGothic Bold + + dialoginput.plain.latin-1=DejaVu Sans Mono + #dialoginput.plain.latin-1.motif=LuxiMono-Regular +-dialoginput.plain.japanese-kochi=Kochi Gothic + dialoginput.plain.japanese-sazanami=Sazanami Gothic + dialoginput.plain.japanese-vlgothic=VL Gothic ++dialoginput.plain.japanese-ipafont=IPAGothic + dialoginput.plain.korean-nanum=NanumGothic + + dialoginput.bold.latin-1=DejaVu Sans Mono Bold + #dialoginput.bold.latin-1.motif=LuxiMono-Bold +-dialoginput.bold.japanese-kochi=Kochi Gothic + dialoginput.bold.japanese-sazanami=Sazanami Gothic + dialoginput.bold.japanese-vlgothic=VL Gothic ++dialoginput.bold.japanese-ipafont=IPAGothic + dialoginput.bold.korean-nanum=NanumGothic Bold + + dialoginput.italic.latin-1=DejaVu Sans Mono Oblique + #dialoginput.italic.latin-1.motif=LuxiMono-Oblique +-dialoginput.italic.japanese-kochi=Kochi Gothic + dialoginput.italic.japanese-sazanami=Sazanami Gothic + dialoginput.italic.japanese-vlgothic=VL Gothic ++dialoginput.italic.japanese-ipafont=IPAGothic + dialoginput.italic.korean-nanum=NanumGothic + + dialoginput.bolditalic.latin-1=DejaVu Sans Mono Bold Oblique + #dialoginput.bolditalic.latin-1.motif=LuxiMono-BoldOblique +-dialoginput.bolditalic.japanese-kochi=Kochi Gothic + dialoginput.bolditalic.japanese-sazanami=Sazanami Gothic + dialoginput.bolditalic.japanese-vlgothic=VL Gothic ++dialoginput.bolditalic.japanese-ipafont=IPAGothic + dialoginput.bolditalic.korean-nanum=NanumGothic Bold + + # Search Sequences +@@ -201,18 +201,20 @@ + sequence.allfonts.GB18030=latin-1,wqy-microhei,umingcn,shanheisun,wqy-zenhei + sequence.allfonts.GB2312=latin-1,wqy-microhei,umingcn,shanheisun,wqy-zenhei + sequence.allfonts.GBK=latin-1,wqy-microhei,umingcn,shanheisun,wqy-zenhei +-sequence.allfonts.x-euc-jp-linux=latin-1,japanese-vlgothic,japanese-sazanami,japanese-kochi ++sequence.allfonts.x-euc-jp-linux=latin-1,japanese-ipafont,japanese-vlgothic,japanese-sazanami + sequence.allfonts.EUC-KR=latin-1,korean-nanum + sequence.allfonts.Big5=latin-1,umingtw,shanheisun,wqy-microhei,wqy-zenhei + sequence.allfonts.Big5-HKSCS=latin-1,uminghk,shanheisun,wqy-microhei,wqy-zenhei +-#sequence.fallback=uminghk,shanheisun,wqy-zenhei,japanese-vlgothic,japanese-kochi,japanese-sazanami,korean-un,bengali,gujarati,hindi,oriya,punjabi,malayalam,tamil,telugu,sinhala +-sequence.fallback=wqy-microhei,uminghk,shanheisun,wqy-zenhei,japanese-vlgothic,japanese-sazanami,japanese-kochi,korean-nanum,bengali,gujarati,hindi,oriya,punjabi,tamil,telugu ++#sequence.fallback=uminghk,shanheisun,wqy-zenhei,japanese-ipafont,japanese-vlgothic,japanese-sazanami,korean-un,bengali,gujarati,hindi,oriya,punjabi,malayalam,tamil,telugu,sinhala ++sequence.fallback=wqy-microhei,uminghk,shanheisun,wqy-zenhei,japanese-ipafont,japanese-vlgothic,japanese-sazanami,korean-nanum,bengali,gujarati,hindi,oriya,punjabi,tamil,telugu ++ ++sequence.fallback=wqy-microhei,uminghk,shanheisun,wqy-zenhei,japanese-ipafont,japanese-vlgothic,japanese-sazanami,bengali,gujarati,hindi,oriya,punjabi,tamil,telugu + + # Exclusion Ranges + +-exclusion.japanese-kochi=0390-03d6,2200-22ef,2701-27be + exclusion.japanese-sazanami=0390-03d6,2200-22ef,2701-27be + exclusion.japanese-vlgothic=0390-03d6,2200-22ef,2701-27be ++exclusion.japanese-ipafont=0390-03d6,2200-22ef,2701-27be + + # Font File Names + +@@ -244,12 +246,16 @@ + filename.NanumGothic_Bold=/usr/share/fonts/truetype/nanum/NanumGothicBold.ttf + filename.NanumGothicCoding=/usr/share/fonts/truetype/nanum-coding/NanumGothic_Coding.ttf + filename.NanumGothicCoding_Bold=/usr/share/fonts/truetype/nanum-coding/NanumGothic_Coding_Bold.ttf +-filename.Kochi_Gothic=/usr/share/fonts/truetype/kochi/kochi-gothic.ttf ++ ++#Japanese fonts + filename.Sazanami_Gothic=/usr/share/fonts/truetype/sazanami/sazanami-gothic.ttf +-filename.Kochi_Mincho=/usr/share/fonts/truetype/kochi/kochi-mincho.ttf + filename.Sazanami_Mincho=/usr/share/fonts/truetype/sazanami/sazanami-mincho.ttf + filename.VL_Gothic=/usr/share/fonts/truetype/vlgothic/VL-Gothic-Regular.ttf + filename.VL_PGothic=/usr/share/fonts/truetype/vlgothic/VL-PGothic-Regular.ttf ++filename.IPAGothic=/usr/share/fonts/opentype/ipafont-gothic/ipag.ttf ++filename.IPAPGothic=/usr/share/fonts/opentype/ipafont-gothic/ipagp.ttf ++filename.IPAMincho=/usr/share/fonts/opentype/ipafont-mincho/ipam.ttf ++filename.IPAPMincho=/usr/share/fonts/opentype/ipafont-mincho/ipamp.ttf + + filename.Lohit_Bengali=/usr/share/fonts/truetype/ttf-bengali-fonts/lohit_bn.ttf + filename.Lohit_Gujarati=/usr/share/fonts/truetype/ttf-indic-fonts-core/lohit_gu.ttf +@@ -283,7 +289,6 @@ + awtfontpath.shanheisun=/usr/share/fonts/truetype/arphic + awtfontpath.wqy-microhei=/usr/share/fonts/truetype/wqy + awtfontpath.wqy-zenhei=/usr/share/fonts/truetype/wqy +-awtfontpath.japanese-kochi=/usr/share/fonts/truetype/kochi + awtfontpath.japanese-sazanami=/usr/share/fonts/truetype/sazanami + awtfontpath.japanese-vlgothic=/usr/share/fonts/truetype/vlgothic + awtfontpath.korean-nanum=/usr/share/fonts/truetype/nanum --- openjdk-6-6b27-1.12.6.orig/debian/patches/deb-multiarch-original.diff +++ openjdk-6-6b27-1.12.6/debian/patches/deb-multiarch-original.diff @@ -0,0 +1,28 @@ +--- openjdk/hotspot/make/linux/makefiles/vm.make~ 2011-03-24 14:21:07.213057001 +0100 ++++ openjdk/hotspot/make/linux/makefiles/vm.make 2011-03-24 14:32:03.443056676 +0100 +@@ -99,6 +99,11 @@ + CPPFLAGS += -DDISTRIBUTION_ID="\"$(DISTRIBUTION_ID)\"" + endif + ++DEB_MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH 2>/dev/null || true) ++ifneq (,$(DEB_MULTIARCH)) ++CPPFLAGS += -DDEB_MULTIARCH="\"$(DEB_MULTIARCH)\"" ++endif ++ + # CFLAGS_WARN holds compiler options to suppress/enable warnings. + CFLAGS += $(CFLAGS_WARN/BYFILE) + +--- openjdk/hotspot/src/os/linux/vm/os_linux.cpp~ 2011-03-24 14:21:07.503057001 +0100 ++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp 2011-03-24 14:38:06.443059044 +0100 +@@ -352,7 +352,11 @@ + * ... + * 7: The default directories, normally /lib and /usr/lib. + */ ++#ifdef DEB_MULTIARCH ++#define DEFAULT_LIBPATH "/usr/lib/" DEB_MULTIARCH "/jni" ":/lib/" DEB_MULTIARCH ":/usr/lib/" DEB_MULTIARCH ":/usr/lib/jni:/lib:/usr/lib" ++#else + #define DEFAULT_LIBPATH "/usr/lib/jni:/lib:/usr/lib" ++#endif + + #define EXTENSIONS_DIR "/lib/ext" + #define ENDORSED_DIR "/lib/endorsed" --- openjdk-6-6b27-1.12.6.orig/debian/patches/ant-diagnostics.diff +++ openjdk-6-6b27-1.12.6/debian/patches/ant-diagnostics.diff @@ -0,0 +1,11 @@ +--- openjdk/langtools/make/Makefile~ 2010-02-17 04:15:20.000000000 +0100 ++++ openjdk/langtools/make/Makefile 2010-02-20 15:32:49.492335405 +0100 +@@ -174,7 +174,7 @@ + # Create a make target for each + $(ANT_TARGETS): + @ mkdir -p $(OUTPUTDIR)/build $(ANT_TMPDIR) +- $(ANT_JAVA_HOME) $(ANT_OPTS) $(ANT) -diagnostics > $(OUTPUTDIR)/build/ant-diagnostics.log ++ -$(ANT_JAVA_HOME) $(ANT_OPTS) $(ANT) -diagnostics > $(OUTPUTDIR)/build/ant-diagnostics.log + $(ANT_JAVA_HOME) $(ANT_OPTS) $(ANT) $(ANT_OPTIONS) $@ + + #------------------------------------------------------------------- --- openjdk-6-6b27-1.12.6.orig/debian/patches/icedtea-override-redirect-compiz.patch +++ openjdk-6-6b27-1.12.6/debian/patches/icedtea-override-redirect-compiz.patch @@ -0,0 +1,10 @@ +--- openjdk/jdk/src/solaris/classes/sun/awt/X11/XWindowPeer.java.orig 2010-07-16 18:36:48.803297123 +0200 ++++ openjdk/jdk/src/solaris/classes/sun/awt/X11/XWindowPeer.java 2010-07-16 18:38:23.573295430 +0200 +@@ -1126,6 +1126,7 @@ + boolean isOverrideRedirect() { + return (XWM.getWMID() == XWM.OPENLOOK_WM ? true : false) || + (XWM.getWMID() == XWM.METACITY_WM ? true : false) || ++ (XWM.getWMID() == XWM.COMPIZ_WM ? true : false) || + target.getName().equals("###overrideRedirect###") || + ((XToolkit)Toolkit.getDefaultToolkit()).isOverrideRedirect((Window)target) || + XTrayIconPeer.isTrayIconStuffWindow((Window)target); --- openjdk-6-6b27-1.12.6.orig/debian/patches/llvm-3.0-buildfix.patch +++ openjdk-6-6b27-1.12.6/debian/patches/llvm-3.0-buildfix.patch @@ -0,0 +1,10 @@ +--- openjdk/hotspot/src/os/linux/vm/os_linux.cpp.orig ++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp +@@ -22,6 +22,7 @@ + * + */ + ++# undef __STDC_FORMAT_MACROS + # define __STDC_FORMAT_MACROS + + // no precompiled headers --- openjdk-6-6b27-1.12.6.orig/debian/patches/jdk-freetypeScaler-crash.diff +++ openjdk-6-6b27-1.12.6/debian/patches/jdk-freetypeScaler-crash.diff @@ -0,0 +1,142 @@ +Description: + + Fixing the bad JNI code in the font manager code. Two issues: + + o The JNIEnv is unique to the thread. It cannot be saved by one thread and + reused by another. Use GetEnv instead. + + o The 'font2D' jobject needs to be converted into a global reference because + its lifetime exceeds the lifetime of a native method call. + +Evaluation: + +Appropriately register/free everything with the garbage collector. + +Fix: + +# HG changeset patch +# User martin +# Date 1224202830 25200 +# Node ID 3c9d6001d8a90698a3540a2a483717f26a98db78 +# Parent 68730f05449cd4f39ce1cb82adc6c4e57f87554f +Crash in freetypeScaler.c due to insufficient GC protection +Summary: NewGlobalRef/DeleteGlobalRef as needed. +Reviewed-by: +Contributed-by: yamauchi@google.com + +diff --git a/make/sun/font/mapfile-vers.openjdk b/jdk/make/sun/font/mapfile-vers.openjdk +--- openjdk/jdk/make/sun/font/mapfile-vers.openjdk ++++ openjdk/jdk/make/sun/font/mapfile-vers.openjdk +@@ -29,6 +29,7 @@ + + SUNWprivate_1.1 { + global: ++ JNI_OnLoad; + getSunFontIDs; + newLayoutTableCache; + freeLayoutTableCache; +diff --git a/src/share/native/sun/font/freetypeScaler.c b/src/share/native/sun/font/freetypeScaler.c +--- openjdk/jdk/src/share/native/sun/font/freetypeScaler.c ++++ openjdk/jdk/src/share/native/sun/font/freetypeScaler.c +@@ -48,16 +48,6 @@ + #define ROUND(x) ((int) (x+0.5)) + + typedef struct { +- /* Important note: +- JNI forbids sharing same env between different threads. +- We are safe, because pointer is overwritten every time we get into +- JNI call (see setupFTContext). +- +- Pointer is used by font data reading callbacks +- such as ReadTTFontFileFunc. +- +- NB: We may consider switching to JNI_GetEnv. */ +- JNIEnv* env; + FT_Library library; + FT_Face face; + jobject font2D; +@@ -90,6 +80,13 @@ + void z_error(char *s) {} + #endif + ++static JavaVM* jvm = NULL; ++ ++JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *reserved) { ++ jvm = vm; ++ return JNI_VERSION_1_2; ++} ++ + /**************** Error handling utilities *****************/ + + static jmethodID invalidateScalerMID; +@@ -107,6 +104,10 @@ + + FT_Done_Face(scalerInfo->face); + FT_Done_FreeType(scalerInfo->library); ++ ++ if (scalerInfo->font2D != NULL) { ++ (*env)->DeleteGlobalRef(env, scalerInfo->font2D); ++ } + + if (scalerInfo->directBuffer != NULL) { + (*env)->DeleteGlobalRef(env, scalerInfo->directBuffer); +@@ -131,10 +132,9 @@ + + #define FILEDATACACHESIZE 1024 + +-/* NB: is it ever called? */ + static void CloseTTFontFileFunc(FT_Stream stream) { ++ JNIEnv* env = (JNIEnv*) JNU_GetEnv(jvm, JNI_VERSION_1_2); + FTScalerInfo *scalerInfo = (FTScalerInfo *) stream->pathname.pointer; +- JNIEnv* env = scalerInfo->env; + jclass tmpClass = (*env)->FindClass(env, "sun/font/TrueTypeFont"); + jfieldID platNameField = + (*env)->GetFieldID(env, tmpClass, "platName", "Ljava/lang/String;"); +@@ -150,8 +150,8 @@ + unsigned char* destBuffer, + unsigned long numBytes) + { ++ JNIEnv* env = (JNIEnv*) JNU_GetEnv(jvm, JNI_VERSION_1_2); + FTScalerInfo *scalerInfo = (FTScalerInfo *) stream->pathname.pointer; +- JNIEnv* env = scalerInfo->env; + jobject bBuffer; + int bread = 0; + +@@ -245,8 +245,7 @@ + if (scalerInfo == NULL) + return 0; + +- scalerInfo->env = env; +- scalerInfo->font2D = font2D; ++ scalerInfo->font2D = (*env)->NewGlobalRef(env, font2D); + scalerInfo->fontDataOffset = 0; + scalerInfo->fontDataLength = 0; + scalerInfo->fileSize = filesize; +@@ -263,6 +262,7 @@ + */ + error = FT_Init_FreeType(&scalerInfo->library); + if (error) { ++ (*env)->DeleteGlobalRef(env, scalerInfo->font2D); + free(scalerInfo); + return 0; + } +@@ -331,6 +331,7 @@ + } + if (scalerInfo->fontData != NULL) + free(scalerInfo->fontData); ++ (*env)->DeleteGlobalRef(env, scalerInfo->font2D); + free(scalerInfo); + return 0; + } +@@ -391,8 +392,10 @@ + FTScalerContext *context) { + int errCode = 0; + +- scalerInfo->env = env; +- scalerInfo->font2D = font2D; ++ if (scalerInfo->font2D != NULL) { ++ (*env)->DeleteGlobalRef(env, scalerInfo->font2D); ++ } ++ scalerInfo->font2D = (*env)->NewGlobalRef(env, font2D); + + FT_Set_Transform(scalerInfo->face, &context->transform, NULL); --- openjdk-6-6b27-1.12.6.orig/debian/patches/icedtea-pretend-memory.diff +++ openjdk-6-6b27-1.12.6/debian/patches/icedtea-pretend-memory.diff @@ -0,0 +1,22 @@ +--- openjdk/jdk/make/common/shared/Platform.gmk.orig 2008-10-19 11:42:03.000000000 +0200 ++++ openjdk/jdk/make/common/shared/Platform.gmk 2008-10-19 11:43:25.000000000 +0200 +@@ -315,7 +315,7 @@ + REQUIRED_ALSA_VERSION = ^((0[.]9[.][1-9])|(1[.]0[.][0-9]))[0-9]* + endif + # How much RAM does this machine have: +- MB_OF_MEMORY := $(shell free -m | fgrep Mem: | sed -e 's@\ \ *@ @g' | cut -d' ' -f2) ++ MB_OF_MEMORY := $(shell m=`free -m | fgrep Mem: | sed -e 's@\ \ *@ @g' | cut -d' ' -f2`; if [ "$$m" -lt 384 ]; then echo 384; else echo $$m; fi) + endif + + # Windows with and without CYGWIN will be slightly different +--- openjdk/corba/make/common/shared/Platform.gmk.orig 2008-10-19 11:42:03.000000000 +0200 ++++ openjdk/corba/make/common/shared/Platform.gmk 2008-10-19 11:43:25.000000000 +0200 +@@ -301,7 +301,7 @@ + endif + endif + # How much RAM does this machine have: +- MB_OF_MEMORY := $(shell free -m | fgrep Mem: | sed -e 's@\ \ *@ @g' | cut -d' ' -f2) ++ MB_OF_MEMORY := $(shell m=`free -m | fgrep Mem: | sed -e 's@\ \ *@ @g' | cut -d' ' -f2`; if [ "$$m" -lt 384 ]; then echo 384; else echo $$m; fi) + endif + + # Windows with and without CYGWIN will be slightly different --- openjdk-6-6b27-1.12.6.orig/debian/patches/ld-symbolic-functions.diff +++ openjdk-6-6b27-1.12.6/debian/patches/ld-symbolic-functions.diff @@ -0,0 +1,43 @@ +--- openjdk/corba/make/common/Defs-linux.gmk.orig 2008-07-26 23:40:27.434474148 +0200 ++++ openjdk/corba/make/common/Defs-linux.gmk 2008-07-26 23:42:08.776002862 +0200 +@@ -205,7 +205,7 @@ + + EXTRA_LIBS += -lc + +-LDFLAGS_DEFS_OPTION = -Xlinker -z -Xlinker defs ++LDFLAGS_DEFS_OPTION = -Xlinker -z -Xlinker defs -Wl,-Bsymbolic-functions + LDFLAGS_COMMON += $(LDFLAGS_DEFS_OPTION) + + # +--- openjdk/hotspot/agent/src/os/linux/Makefile.orig 2008-07-26 23:40:27.434474148 +0200 ++++ openjdk/hotspot/agent/src/os/linux/Makefile 2008-07-26 23:42:08.776002862 +0200 +@@ -62,7 +62,7 @@ + + $(LIBSA): $(OBJS) mapfile + if [ ! -d $(ARCH) ] ; then mkdir $(ARCH) ; fi +- $(GCC) -shared $(LFLAGS_LIBSA) -o $(LIBSA) $(OBJS) $(LIBS) ++ $(GCC) -shared -Wl,-Bsymbolic-functions $(LFLAGS_LIBSA) -o $(LIBSA) $(OBJS) $(LIBS) + + test.o: test.c + $(GCC) -c -o test.o -g -D_GNU_SOURCE -D_$(ARCH)_ $(if $(filter $(ARCH),alpha),,-D$(ARCH)) $(INCLUDES) test.c +--- openjdk/hotspot/make/linux/makefiles/gcc.make.orig 2008-07-26 23:40:27.464474601 +0200 ++++ openjdk/hotspot/make/linux/makefiles/gcc.make 2008-07-26 23:42:08.776002862 +0200 +@@ -142,6 +142,7 @@ + + # Enable linker optimization + LFLAGS += -Xlinker -O1 ++LFLAGS += -Wl,-Bsymbolic-functions + + # Use $(MAPFLAG:FILENAME=real_file_name) to specify a map file. + MAPFLAG = -Xlinker --version-script=FILENAME +--- openjdk/jdk/make/common/Defs-linux.gmk.orig 2008-07-26 23:40:27.444474299 +0200 ++++ openjdk/jdk/make/common/Defs-linux.gmk 2008-07-26 23:42:08.776002862 +0200 +@@ -215,7 +215,7 @@ + + EXTRA_LIBS += -lc + +-LDFLAGS_DEFS_OPTION = -Xlinker -z -Xlinker defs ++LDFLAGS_DEFS_OPTION = -Xlinker -z -Xlinker defs -Wl,-Bsymbolic-functions + LDFLAGS_COMMON += $(LDFLAGS_DEFS_OPTION) + + # --- openjdk-6-6b27-1.12.6.orig/debian/patches/stack-direction.diff +++ openjdk-6-6b27-1.12.6/debian/patches/stack-direction.diff @@ -0,0 +1,217 @@ +# unused patch + +--- openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp.old 2010-01-06 16:30:02.000000000 +0100 ++++ openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp 2010-01-06 23:14:47.000000000 +0100 +@@ -144,8 +144,13 @@ + address addr = (address) info->si_addr; + + // check if fault address is within thread stack ++#ifdef __hppa__ ++ if (addr > thread->stack_base() && ++ addr <= thread->stack_base() + thread->stack_size()) { ++#else + if (addr < thread->stack_base() && + addr >= thread->stack_base() - thread->stack_size()) { ++#endif + // stack overflow + if (thread->in_stack_yellow_zone(addr)) { + thread->disable_stack_yellow_zone(); +@@ -294,7 +299,11 @@ + if (res != 0) { + fatal1("pthread_attr_getstack failed with errno = %d", res); + } ++#ifdef __hppa__ ++ address stack_top = stack_bottom - stack_bytes; ++#else + address stack_top = stack_bottom + stack_bytes; ++#endif + + // The block of memory returned by pthread_attr_getstack() includes + // guard pages where present. We need to trim these off. +@@ -321,7 +330,11 @@ + stack_bottom += (total_pages - guard_pages) / 2 * page_bytes; + #endif // IA64 + ++#ifdef __hppa__ ++ stack_bottom -= guard_bytes; ++#else + stack_bottom += guard_bytes; ++#endif + + pthread_attr_destroy(&attr); + +@@ -329,19 +342,36 @@ + // by pthread_attr_getstack is the maximum size it could possibly + // be given what currently mapped. This can be huge, so we cap it. + if (os::Linux::is_initial_thread()) { ++#ifdef __hppa__ ++ stack_bytes = stack_bottom - stack_top; ++#else + stack_bytes = stack_top - stack_bottom; ++#endif + + if (stack_bytes > JavaThread::stack_size_at_create()) + stack_bytes = JavaThread::stack_size_at_create(); + ++#ifdef __hppa__ ++ stack_bottom = stack_top + stack_bytes; ++#else + stack_bottom = stack_top - stack_bytes; ++#endif + } + ++#ifdef __hppa__ ++ assert(os::current_stack_pointer() <= stack_bottom, "should do"); ++ assert(os::current_stack_pointer() > stack_top, "should do"); ++#else + assert(os::current_stack_pointer() >= stack_bottom, "should do"); + assert(os::current_stack_pointer() < stack_top, "should do"); ++#endif + + *bottom = stack_bottom; ++#ifdef __hppa__ ++ *size = stack_bottom - stack_top; ++#else + *size = stack_top - stack_bottom; ++#endif + } + + address os::current_stack_base() { +--- openjdk/hotspot/src/share/vm/runtime/thread.cpp.old 2009-10-02 23:16:39.000000000 +0200 ++++ openjdk/hotspot/src/share/vm/runtime/thread.cpp 2010-01-06 23:31:24.000000000 +0100 +@@ -713,8 +713,13 @@ + else if (is_ConcurrentGC_thread()) st->print("ConcurrentGCThread"); + else st->print("Thread"); + ++#ifdef __hppa__ + st->print(" [stack: " PTR_FORMAT "," PTR_FORMAT "]", + _stack_base - _stack_size, _stack_base); ++#else ++ st->print(" [stack: " PTR_FORMAT "," PTR_FORMAT "]", ++ _stack_base + _stack_size, _stack_base); ++#endif + + if (osthread()) { + st->print(" [id=%d]", osthread()->thread_id()); +@@ -792,7 +797,11 @@ + bool Thread::is_in_stack(address adr) const { + assert(Thread::current() == this, "is_in_stack can only be called from current thread"); + address end = os::current_stack_pointer(); ++#ifdef __hppa__ ++ if (stack_base() <= adr && adr <= end) return true; ++#else + if (stack_base() >= adr && adr >= end) return true; ++#endif + + return false; + } +@@ -804,7 +813,11 @@ + // should be revisited, and they should be removed if possible. + + bool Thread::is_lock_owned(address adr) const { ++#ifdef __hppa__ ++ return (_stack_base <= adr && adr <= (_stack_base + _stack_size)); ++#else + return (_stack_base >= adr && adr >= (_stack_base - _stack_size)); ++#endif + } + + bool Thread::set_as_starting_thread() { +@@ -2108,7 +2121,11 @@ + + void JavaThread::create_stack_guard_pages() { + if (! os::uses_stack_guard_pages() || _stack_guard_state != stack_guard_unused) return; ++#ifdef __hppa__ ++ address low_addr = stack_base(); ++#else + address low_addr = stack_base() - stack_size(); ++#endif + size_t len = (StackYellowPages + StackRedPages) * os::vm_page_size(); + + int allocate = os::allocate_stack_guard_pages(); +@@ -2131,7 +2148,11 @@ + + void JavaThread::remove_stack_guard_pages() { + if (_stack_guard_state == stack_guard_unused) return; ++#ifdef __hppa__ ++ address low_addr = stack_base(); ++#else + address low_addr = stack_base() - stack_size(); ++#endif + size_t len = (StackYellowPages + StackRedPages) * os::vm_page_size(); + + if (os::allocate_stack_guard_pages()) { +@@ -2156,10 +2177,17 @@ + + // The base notation is from the stacks point of view, growing downward. + // We need to adjust it to work correctly with guard_memory() ++#ifdef __hppa__ ++ address base = stack_yellow_zone_base() + stack_yellow_zone_size(); ++ ++ guarantee(base > stack_base(),"Error calculating stack yellow zone"); ++ guarantee(base > os::current_stack_pointer(),"Error calculating stack yellow zone"); ++#else + address base = stack_yellow_zone_base() - stack_yellow_zone_size(); + + guarantee(base < stack_base(),"Error calculating stack yellow zone"); + guarantee(base < os::current_stack_pointer(),"Error calculating stack yellow zone"); ++#endif + + if (os::guard_memory((char *) base, stack_yellow_zone_size())) { + _stack_guard_state = stack_guard_enabled; +@@ -2178,7 +2206,11 @@ + + // The base notation is from the stacks point of view, growing downward. + // We need to adjust it to work correctly with guard_memory() ++#ifdef __hppa__ ++ address base = stack_yellow_zone_base() + stack_yellow_zone_size(); ++#else + address base = stack_yellow_zone_base() - stack_yellow_zone_size(); ++#endif + + if (os::unguard_memory((char *)base, stack_yellow_zone_size())) { + _stack_guard_state = stack_guard_yellow_disabled; +@@ -2192,10 +2224,17 @@ + // The base notation is from the stacks point of view, growing downward. + // We need to adjust it to work correctly with guard_memory() + assert(_stack_guard_state != stack_guard_unused, "must be using guard pages."); ++#ifdef __hppa__ ++ address base = stack_red_zone_base() + stack_red_zone_size(); ++ ++ guarantee(base > stack_base(),"Error calculating stack red zone"); ++ guarantee(base > os::current_stack_pointer(),"Error calculating stack red zone"); ++#else + address base = stack_red_zone_base() - stack_red_zone_size(); + + guarantee(base < stack_base(),"Error calculating stack red zone"); + guarantee(base < os::current_stack_pointer(),"Error calculating stack red zone"); ++#endif + + if(!os::guard_memory((char *) base, stack_red_zone_size())) { + warning("Attempt to guard stack red zone failed."); +@@ -2206,7 +2245,11 @@ + // The base notation is from the stacks point of view, growing downward. + // We need to adjust it to work correctly with guard_memory() + assert(_stack_guard_state != stack_guard_unused, "must be using guard pages."); ++#ifdef __hppa__ ++ address base = stack_red_zone_base() + stack_red_zone_size(); ++#else + address base = stack_red_zone_base() - stack_red_zone_size(); ++#endif + if (!os::unguard_memory((char *)base, stack_red_zone_size())) { + warning("Attempt to unguard stack red zone failed."); + } +@@ -2451,8 +2494,13 @@ + if (osthread()) { + st->print(", id=%d", osthread()->thread_id()); + } ++#ifdef __hppa__ ++ st->print(", stack(" PTR_FORMAT "," PTR_FORMAT ")", ++ _stack_base + _stack_size, _stack_base); ++#else + st->print(", stack(" PTR_FORMAT "," PTR_FORMAT ")", + _stack_base - _stack_size, _stack_base); ++#endif + st->print("]"); + return; + } --- openjdk-6-6b27-1.12.6.orig/debian/patches/hotspot-no-werror.diff +++ openjdk-6-6b27-1.12.6/debian/patches/hotspot-no-werror.diff @@ -0,0 +1,11 @@ +--- openjdk/hotspot/make/linux/makefiles/gcc.make.orig 2010-11-29 15:43:34.397188809 +0000 ++++ openjdk/hotspot/make/linux/makefiles/gcc.make 2010-11-29 17:44:05.507185775 +0000 +@@ -114,7 +114,7 @@ + endif + + # Compiler warnings are treated as errors +-WARNINGS_ARE_ERRORS = -Werror ++WARNINGS_ARE_ERRORS = + + # Except for a few acceptable ones + # Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit --- openjdk-6-6b27-1.12.6.orig/debian/patches/alpha-float-const.diff +++ openjdk-6-6b27-1.12.6/debian/patches/alpha-float-const.diff @@ -0,0 +1,11 @@ +--- openjdk-ecj/jdk/src/share/classes/java/lang/Float.java~ 2010-03-08 14:53:10.224835876 +0100 ++++ openjdk-ecj/jdk/src/share/classes/java/lang/Float.java 2010-03-08 15:05:28.803585964 +0100 +@@ -86,7 +86,7 @@ + * + * @since 1.6 + */ +- public static final float MIN_NORMAL = 1.17549435E-38f; ++ public static final float MIN_NORMAL = Float.intBitsToFloat(0x00800000); + + /** + * A constant holding the smallest positive nonzero value of type --- openjdk-6-6b27-1.12.6.orig/debian/patches/no-compiler-path.diff +++ openjdk-6-6b27-1.12.6/debian/patches/no-compiler-path.diff @@ -0,0 +1,48 @@ +--- openjdk/corba/make/common/shared/Compiler-gcc.gmk~ 2011-02-18 16:21:56.628229000 +0100 ++++ openjdk/corba/make/common/shared/Compiler-gcc.gmk 2011-02-18 16:31:08.128229948 +0100 +@@ -58,17 +58,17 @@ + ifeq ($(PLATFORM), linux) + + # Settings specific to Linux +- CC = $(COMPILER_PATH)gcc$(GCC_SUFFIX) +- CPP = $(COMPILER_PATH)gcc$(GCC_SUFFIX) -E ++ CC = gcc$(GCC_SUFFIX) ++ CPP = gcc$(GCC_SUFFIX) -E + # statically link libstdc++ before C++ ABI is stablized on Linux + STATIC_CXX = false + ifeq ($(STATIC_CXX),true) + # g++ always dynamically links libstdc++, even we use "-Wl,-Bstatic -lstdc++" + # We need to use gcc to statically link the C++ runtime. gcc and g++ use + # the same subprocess to compile C++ files, so it is OK to build using gcc. +- CXX = $(COMPILER_PATH)gcc$(GCC_SUFFIX) ++ CXX = gcc$(GCC_SUFFIX) + else +- CXX = $(COMPILER_PATH)g++$(GCC_SUFFIX) ++ CXX = g++$(GCC_SUFFIX) + endif + ifeq ($(ZERO_BUILD), true) + # zero +--- openjdk/jdk/make/common/shared/Compiler-gcc.gmk~ 2011-02-18 16:21:56.628229000 +0100 ++++ openjdk/jdk/make/common/shared/Compiler-gcc.gmk 2011-02-18 16:31:55.168228990 +0100 +@@ -58,17 +58,17 @@ + ifeq ($(PLATFORM), linux) + + # Settings specific to Linux +- CC = $(COMPILER_PATH)gcc$(GCC_SUFFIX) +- CPP = $(COMPILER_PATH)gcc$(GCC_SUFFIX) -E ++ CC = gcc$(GCC_SUFFIX) ++ CPP = gcc$(GCC_SUFFIX) -E + # statically link libstdc++ before C++ ABI is stablized on Linux + STATIC_CXX = false + ifeq ($(STATIC_CXX),true) + # g++ always dynamically links libstdc++, even we use "-Wl,-Bstatic -lstdc++" + # We need to use gcc to statically link the C++ runtime. gcc and g++ use + # the same subprocess to compile C++ files, so it is OK to build using gcc. +- CXX = $(COMPILER_PATH)gcc$(GCC_SUFFIX) ++ CXX = gcc$(GCC_SUFFIX) + else +- CXX = $(COMPILER_PATH)g++$(GCC_SUFFIX) ++ CXX = g++$(GCC_SUFFIX) + endif + ifeq ($(ARCH), alpha) + # alpha --- openjdk-6-6b27-1.12.6.orig/debian/patches/hotspot-sparc.diff +++ openjdk-6-6b27-1.12.6/debian/patches/hotspot-sparc.diff @@ -0,0 +1,47 @@ +--- openjdk/hotspot/src/os_cpu/linux_sparc/vm/os_linux_sparc.cpp.orig 2011-06-27 23:25:25.000000000 +0000 ++++ openjdk/hotspot/src/os_cpu/linux_sparc/vm/os_linux_sparc.cpp 2011-07-10 14:49:44.527642486 +0000 +@@ -310,28 +310,29 @@ + + ucontext_t *uc = (ucontext_t*)context; + intptr_t *sp = (intptr_t *)os::Linux::ucontext_get_sp(uc); ++ sigcontext* sc = (sigcontext*)context; + + st->print_cr("Register to memory mapping:"); + st->cr(); + + // this is only for the "general purpose" registers +- st->print("G1="); print_location(st, SIG_REGS(sc).u_regs[CON__G1]); +- st->print("G2="); print_location(st, SIG_REGS(sc).u_regs[CON__G2]); +- st->print("G3="); print_location(st, SIG_REGS(sc).u_regs[CON__G3]); +- st->print("G4="); print_location(st, SIG_REGS(sc).u_regs[CON__G4]); +- st->print("G5="); print_location(st, SIG_REGS(sc).u_regs[CON__G5]); +- st->print("G6="); print_location(st, SIG_REGS(sc).u_regs[CON__G6]); +- st->print("G7="); print_location(st, SIG_REGS(sc).u_regs[CON__G7]); ++ st->print("G1="); print_location(st, SIG_REGS(sc).u_regs[CON_G1]); ++ st->print("G2="); print_location(st, SIG_REGS(sc).u_regs[CON_G2]); ++ st->print("G3="); print_location(st, SIG_REGS(sc).u_regs[CON_G3]); ++ st->print("G4="); print_location(st, SIG_REGS(sc).u_regs[CON_G4]); ++ st->print("G5="); print_location(st, SIG_REGS(sc).u_regs[CON_G5]); ++ st->print("G6="); print_location(st, SIG_REGS(sc).u_regs[CON_G6]); ++ st->print("G7="); print_location(st, SIG_REGS(sc).u_regs[CON_G7]); + st->cr(); + +- st->print("O0="); print_location(st, SIG_REGS(sc).u_regs[CON__O0]); +- st->print("O1="); print_location(st, SIG_REGS(sc).u_regs[CON__O1]); +- st->print("O2="); print_location(st, SIG_REGS(sc).u_regs[CON__O2]); +- st->print("O3="); print_location(st, SIG_REGS(sc).u_regs[CON__O3]); +- st->print("O4="); print_location(st, SIG_REGS(sc).u_regs[CON__O4]); +- st->print("O5="); print_location(st, SIG_REGS(sc).u_regs[CON__O5]); +- st->print("O6="); print_location(st, SIG_REGS(sc).u_regs[CON__O6]); +- st->print("O7="); print_location(st, SIG_REGS(sc).u_regs[CON__O7]); ++ st->print("O0="); print_location(st, SIG_REGS(sc).u_regs[CON_O0]); ++ st->print("O1="); print_location(st, SIG_REGS(sc).u_regs[CON_O1]); ++ st->print("O2="); print_location(st, SIG_REGS(sc).u_regs[CON_O2]); ++ st->print("O3="); print_location(st, SIG_REGS(sc).u_regs[CON_O3]); ++ st->print("O4="); print_location(st, SIG_REGS(sc).u_regs[CON_O4]); ++ st->print("O5="); print_location(st, SIG_REGS(sc).u_regs[CON_O5]); ++ st->print("O6="); print_location(st, SIG_REGS(sc).u_regs[CON_O6]); ++ st->print("O7="); print_location(st, SIG_REGS(sc).u_regs[CON_O7]); + st->cr(); + + st->print("L0="); print_location(st, sp[L0->sp_offset_in_saved_window()]); --- openjdk-6-6b27-1.12.6.orig/debian/patches/icc_loading_with_symlink.diff +++ openjdk-6-6b27-1.12.6/debian/patches/icc_loading_with_symlink.diff @@ -0,0 +1,37 @@ +Description: Allow loading of ICC profiles when jre/lib/cmm is a + symlink by disabling call to isChildOf(f, dir) in getStandardProfileFile + and getProfileFile methods. + . + isChildOf method try to ensures f.getCanonicalPath start with + dir.getCanonicalPath but, on openjdk-6, dir.getCanonicalPath + will resolve to realpath and so won't match. + . + It should fix "Cannot open file sRGB.pf" errors. +Author: Damien Raude-Morvan +Last-Update: 2011-09-23 +Bug-Debian: http://bugs.debian.org/641530 +Forwarded: not-yet + +Index: openjdk/jdk/src/share/classes/java/awt/color/ICC_Profile.java +=================================================================== +--- openjdk/jdk/src/share/classes/java/awt/color/ICC_Profile.java.orig ++++ openjdk/jdk/src/share/classes/java/awt/color/ICC_Profile.java +@@ -1809,9 +1809,6 @@ + dir = st.nextToken(); + fullPath = dir + File.separatorChar + fileName; + f = new File(fullPath); +- if (!isChildOf(f, dir)) { +- f = null; +- } + } + } + if ((f == null) || (!f.isFile())) { +@@ -1835,7 +1832,7 @@ + File.separatorChar + "lib" + File.separatorChar + "cmm"; + String fullPath = dir + File.separatorChar + fileName; + File f = new File(fullPath); +- return (f.isFile() && isChildOf(f, dir)) ? f : null; ++ return (f.isFile()) ? f : null; + } + + /** --- openjdk-6-6b27-1.12.6.orig/debian/patches/jdk-pulseaudio-default.diff +++ openjdk-6-6b27-1.12.6/debian/patches/jdk-pulseaudio-default.diff @@ -0,0 +1,25 @@ +--- openjdk/jdk/src/share/lib/sound.properties~ 2009-09-26 16:30:26.000000000 +0200 ++++ openjdk/jdk/src/share/lib/sound.properties 2009-09-26 16:36:26.000000000 +0200 +@@ -38,12 +38,14 @@ + # javax.sound.midi.Receiver=com.sun.media.sound.MidiProvider#SunMIDI1 + # + +-# javax.sound.sampled.Clip=org.classpath.icedtea.pulseaudio.PulseAudioMixerProvider +-# javax.sound.sampled.Port=org.classpath.icedtea.pulseaudio.PulseAudioMixerProvider +-# javax.sound.sampled.SourceDataLine=org.classpath.icedtea.pulseaudio.PulseAudioMixerProvider +-# javax.sound.sampled.TargetDataLine=org.classpath.icedtea.pulseaudio.PulseAudioMixerProvider ++# OpenJDK on Ubuntu is configured to use PulseAudio by default ++javax.sound.sampled.Clip=org.classpath.icedtea.pulseaudio.PulseAudioMixerProvider ++javax.sound.sampled.Port=org.classpath.icedtea.pulseaudio.PulseAudioMixerProvider ++javax.sound.sampled.SourceDataLine=org.classpath.icedtea.pulseaudio.PulseAudioMixerProvider ++javax.sound.sampled.TargetDataLine=org.classpath.icedtea.pulseaudio.PulseAudioMixerProvider + +-javax.sound.sampled.Clip=com.sun.media.sound.DirectAudioDeviceProvider +-javax.sound.sampled.Port=com.sun.media.sound.PortMixerProvider +-javax.sound.sampled.SourceDataLine=com.sun.media.sound.DirectAudioDeviceProvider +-javax.sound.sampled.TargetDataLine=com.sun.media.sound.DirectAudioDeviceProvider ++# PulseAudio not running? Please give feedback on LP: #407299. ++#javax.sound.sampled.Clip=com.sun.media.sound.DirectAudioDeviceProvider ++#javax.sound.sampled.Port=com.sun.media.sound.PortMixerProvider ++#javax.sound.sampled.SourceDataLine=com.sun.media.sound.DirectAudioDeviceProvider ++#javax.sound.sampled.TargetDataLine=com.sun.media.sound.DirectAudioDeviceProvider --- openjdk-6-6b27-1.12.6.orig/debian/patches/fontconfig-wqy-microhei.patch +++ openjdk-6-6b27-1.12.6/debian/patches/fontconfig-wqy-microhei.patch @@ -0,0 +1,53 @@ +--- openjdk/jdk/src/solaris/classes/sun/awt/fontconfigs/linux.fontconfig.Ubuntu.properties.orig ++++ openjdk/jdk/src/solaris/classes/sun/awt/fontconfigs/linux.fontconfig.Ubuntu.properties +@@ -37,6 +37,7 @@ + #allfonts.uminghk.motif=AR PL UMing HK + allfonts.umingtw=AR PL UMing TW + #allfonts.umingtw.motif=AR PL UMing TW ++allfonts.wqy-microhei=WenQuanYi Micro Hei + allfonts.wqy-zenhei=WenQuanYi Zen Hei + #allfonts.wqy-zenhei.motif=WenQuanYi Zen Hei + allfonts.shanheisun=AR PL ShanHeiSun Uni +@@ -257,15 +258,15 @@ + # Search Sequences + + sequence.allfonts=latin-1 +-sequence.allfonts.GB18030=latin-1,umingcn,shanheisun,wqy-zenhei +-sequence.allfonts.GB2312=latin-1,umingcn,shanheisun,wqy-zenhei +-sequence.allfonts.GBK=latin-1,umingcn,shanheisun,wqy-zenhei ++sequence.allfonts.GB18030=latin-1,wqy-microhei,umingcn,shanheisun,wqy-zenhei ++sequence.allfonts.GB2312=latin-1,wqy-microhei,umingcn,shanheisun,wqy-zenhei ++sequence.allfonts.GBK=latin-1,wqy-microhei,umingcn,shanheisun,wqy-zenhei + sequence.allfonts.x-euc-jp-linux=latin-1,japanese-vlgothic,japanese-sazanami,japanese-kochi + sequence.allfonts.EUC-KR=latin-1,korean-un,korean-baekmuk +-sequence.allfonts.Big5=latin-1,umingtw,shanheisun,wqy-zenhei +-sequence.allfonts.Big5-HKSCS=latin-1,uminghk,shanheisun,wqy-zenhei ++sequence.allfonts.Big5=latin-1,umingtw,shanheisun,wqy-microhei,wqy-zenhei ++sequence.allfonts.Big5-HKSCS=latin-1,uminghk,shanheisun,wqy-microhei,wqy-zenhei + #sequence.fallback=uminghk,shanheisun,wqy-zenhei,japanese-vlgothic,japanese-kochi,japanese-sazanami,korean-un,korean-baekmuk,bengali,gujarati,hindi,oriya,punjabi,malayalam,tamil,telugu,sinhala +-sequence.fallback=uminghk,shanheisun,wqy-zenhei,japanese-vlgothic,japanese-sazanami,japanese-kochi,korean-un,korean-baekmuk,bengali,gujarati,hindi,oriya,punjabi,tamil,telugu ++sequence.fallback=wqy-microhei,uminghk,shanheisun,wqy-zenhei,japanese-vlgothic,japanese-sazanami,japanese-kochi,korean-un,korean-baekmuk,bengali,gujarati,hindi,oriya,punjabi,tamil,telugu + + # Exclusion Ranges + +@@ -293,9 +294,10 @@ + filename.AR_PL_UMing_CN=/usr/share/fonts/truetype/arphic/uming.ttc + filename.AR_PL_UMing_HK=/usr/share/fonts/truetype/arphic/uming.ttc + filename.AR_PL_UMing_TW=/usr/share/fonts/truetype/arphic/uming.ttc +-filename.AR_PL_ShanHeiSun_Uni=/usr/share/fonts/truetype/arphic/uming.ttf ++filename.AR_PL_ShanHeiSun_Uni=/usr/share/fonts/truetype/arphic/uming.ttc + +-filename.WenQuanYi_Zen_Hei=/usr/share/fonts/truetype/wqy/wqy-zenhei.ttf ++filename.WenQuanYi_Micro_Hei=/usr/share/fonts/truetype/wqy/wqy-microhei.ttc ++filename.WenQuanYi_Zen_Hei=/usr/share/fonts/truetype/wqy/wqy-zenhei.ttc + filename.Baekmuk_Batang=/usr/share/fonts/truetype/baekmuk/batang.ttf + filename.UnBatang=/usr/share/fonts/truetype/unfonts/UnBatang.ttf + filename.UnBatang_Bold=/usr/share/fonts/truetype/unfonts/UnBatangBold.ttf +@@ -339,6 +341,7 @@ + awtfontpath.uminghk=/usr/share/fonts/truetype/arphic + awtfontpath.umingtw=/usr/share/fonts/truetype/arphic + awtfontpath.shanheisun=/usr/share/fonts/truetype/arphic ++awtfontpath.wqy-microhei=/usr/share/fonts/truetype/wqy + awtfontpath.wqy-zenhei=/usr/share/fonts/truetype/wqy + awtfontpath.japanese-kochi=/usr/share/fonts/truetype/kochi + awtfontpath.japanese-sazanami=/usr/share/fonts/truetype/sazanami --- openjdk-6-6b27-1.12.6.orig/debian/patches/hotspot-sparc-fix.diff +++ openjdk-6-6b27-1.12.6/debian/patches/hotspot-sparc-fix.diff @@ -0,0 +1,19 @@ +--- openjdk/hotspot/src/os_cpu/linux_sparc/vm/vm_version_linux_sparc.cpp.orig 2009-10-14 17:13:15.000000000 +0000 ++++ openjdk/hotspot/src/os_cpu/linux_sparc/vm/vm_version_linux_sparc.cpp 2009-11-02 13:15:17.000000000 +0000 +@@ -27,6 +27,7 @@ + + static bool detect_niagara() { + char cpu[128]; ++ char *buf = cpu; + bool rv = false; + + FILE* fp = fopen("/proc/cpuinfo", "r"); +@@ -35,7 +36,7 @@ + } + + while (!feof(fp)) { +- if (fscanf(fp, "cpu\t\t: %100[^\n]", &cpu) == 1) { ++ if (fscanf(fp, "cpu\t\t: %100[^\n]", buf) == 1) { + if (strstr(cpu, "Niagara") != NULL) { + rv = true; + } --- openjdk-6-6b27-1.12.6.orig/debian/patches/cacao-armv4.diff +++ openjdk-6-6b27-1.12.6/debian/patches/cacao-armv4.diff @@ -0,0 +1,100 @@ +Revert the following cacao change, when building for armel/armv4: + +# HG changeset patch +# User Stefan Ring +# Date 1344071656 -7200 +# Node ID 73ffc3dc8c16664613f878a131ded372b2099191 +# Parent e153dd602364e16b3f2b275d91cc683c4e3df2bb +arm: Thumb interworking should work on armv5 +* src/vm/jit/arm/asmpart.S: Use Thumb interworking-aware instructions for transfer to C code. +* src/vm/jit/arm/codegen.c: Likewise, for ICMD_BUILTIN. +* src/vm/jit/arm/codegen.h: Define macros for BL and BLX instructions. + +--- cacao/cacao/src/vm/jit/arm/asmpart.S.orig 2013-01-10 17:45:14.000000000 +0100 ++++ cacao/cacao/src/vm/jit/arm/asmpart.S 2013-02-08 17:24:23.744533547 +0100 +@@ -1,6 +1,6 @@ + /* src/vm/jit/arm/asmpart.S - Java-C interface functions for ARM + +- Copyright (C) 1996-2012 ++ Copyright (C) 1996-2005, 2006, 2007, 2008 + CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO + + This file is part of CACAO. +@@ -239,7 +239,7 @@ + stmfd sp!, {lr} /* save return address */ + add a0, sp, #(1*4) /* pass java sp */ + mov a1, lr /* pass exception address */ +- blx exceptions_asm_new_abstractmethoderror ++ bl exceptions_asm_new_abstractmethoderror + ldmfd sp!, {lr} /* restore return address */ + + mov xptr, res1 /* get exception pointer */ +@@ -281,7 +281,7 @@ + swi __ARM_NR_cacheflush + #endif + +- bx lr ++ mov pc, lr + + + /* disable exec-stacks ********************************************************/ +--- cacao/cacao/src/vm/jit/arm/codegen.h.orig 2013-01-10 17:45:14.000000000 +0100 ++++ cacao/cacao/src/vm/jit/arm/codegen.h 2013-02-08 17:24:23.744533547 +0100 +@@ -1,6 +1,6 @@ + /* src/vm/jit/arm/codegen.h - code generation macros and definitions for ARM + +- Copyright (C) 1996-2012 ++ Copyright (C) 1996-2005, 2006, 2007, 2008, 2010 + CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO + + This file is part of CACAO. +@@ -215,19 +215,6 @@ + } while (0) + + +-/* branch and branch with link X (instruction set exchange) +- cond ... conditional execution +- L ...... branch with link (L=1) +- reg .... register +-*/ +- +-#define M_BRAX(cond,L,reg) \ +- do { \ +- *((u4 *) cd->mcodeptr) = (((cond) << 28) | (0x12 << 20) | (0xfff << 8) | (L << 5) | (1 << 4) | ((reg) & 0xf)); \ +- cd->mcodeptr += 4; \ +- } while (0) +- +- + /* branch and branch with link: M_BRA + cond ... conditional execution + L ...... branch with link (L=1) +@@ -490,9 +477,6 @@ + #define M_BLO(off) M_BRA(COND_CC,0,off) + #define M_BLS(off) M_BRA(COND_LS,0,off) + +-#define M_BX(a) M_BRAX(COND_AL,0,a) +-#define M_BLX(a) M_BRAX(COND_AL,1,a) +- + + /******************************************************************************/ + /* macros for load and store instructions *************************************/ +--- cacao/cacao/src/vm/jit/arm/codegen.c.orig 2013-01-10 17:45:14.000000000 +0100 ++++ cacao/cacao/src/vm/jit/arm/codegen.c 2013-02-08 17:24:23.748533547 +0100 +@@ -1,6 +1,6 @@ + /* src/vm/jit/arm/codegen.c - machine code generator for Arm + +- Copyright (C) 1996-2012 ++ Copyright (C) 1996-2011 + CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO + + This file is part of CACAO. +@@ -1733,7 +1733,8 @@ + + /* generate the actual call */ + +- M_BLX(REG_PV); ++ M_MOV(REG_LR, REG_PC); ++ M_MOV(REG_PC, REG_PV); + + break; + --- openjdk-6-6b27-1.12.6.orig/debian/patches/hotspot-7020521.patch +++ openjdk-6-6b27-1.12.6/debian/patches/hotspot-7020521.patch @@ -0,0 +1,1076 @@ +# HG changeset patch +# User iveresov +# Date 1298417102 28800 +# Node ID d89a22843c62ed532495df75c39d883c0370f80d +# Parent 6bbaedb03534bb3f2b014f869103fbedacd96cb1 +7020521: arraycopy stubs place prebarriers incorrectly +Summary: Rearranged the pre-barrier placement in arraycopy stubs so that they are properly called in case of chained calls. Also refactored the code a little bit so that it looks uniform across the platforms and is more readable. +Reviewed-by: never, kvn + +--- openjdk.orig/hotspot/src/cpu/sparc/vm/stubGenerator_sparc.cpp Wed Feb 09 15:02:23 2011 -0800 ++++ openjdk/hotspot/src/cpu/sparc/vm/stubGenerator_sparc.cpp Tue Feb 22 15:25:02 2011 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2011, 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 +@@ -968,19 +968,6 @@ class StubGenerator: public StubCodeGene + return start; + } + +- static address disjoint_byte_copy_entry; +- static address disjoint_short_copy_entry; +- static address disjoint_int_copy_entry; +- static address disjoint_long_copy_entry; +- static address disjoint_oop_copy_entry; +- +- static address byte_copy_entry; +- static address short_copy_entry; +- static address int_copy_entry; +- static address long_copy_entry; +- static address oop_copy_entry; +- +- static address checkcast_copy_entry; + + // + // Verify that a register contains clean 32-bits positive value +@@ -1283,7 +1270,7 @@ class StubGenerator: public StubCodeGene + // to: O1 + // count: O2 treated as signed + // +- address generate_disjoint_byte_copy(bool aligned, const char * name) { ++ address generate_disjoint_byte_copy(bool aligned, address *entry, const char *name) { + __ align(CodeEntryAlignment); + StubCodeMark mark(this, "StubRoutines", name); + address start = __ pc(); +@@ -1299,9 +1286,11 @@ class StubGenerator: public StubCodeGene + + assert_clean_int(count, O3); // Make sure 'count' is clean int. + +- if (!aligned) disjoint_byte_copy_entry = __ pc(); +- // caller can pass a 64-bit byte count here (from Unsafe.copyMemory) +- if (!aligned) BLOCK_COMMENT("Entry:"); ++ if (entry != NULL) { ++ *entry = __ pc(); ++ // caller can pass a 64-bit byte count here (from Unsafe.copyMemory) ++ BLOCK_COMMENT("Entry:"); ++ } + + // for short arrays, just do single element copy + __ cmp(count, 23); // 16 + 7 +@@ -1391,15 +1380,13 @@ class StubGenerator: public StubCodeGene + // to: O1 + // count: O2 treated as signed + // +- address generate_conjoint_byte_copy(bool aligned, const char * name) { ++ address generate_conjoint_byte_copy(bool aligned, address nooverlap_target, ++ address *entry, const char *name) { + // Do reverse copy. + + __ align(CodeEntryAlignment); + StubCodeMark mark(this, "StubRoutines", name); + address start = __ pc(); +- address nooverlap_target = aligned ? +- StubRoutines::arrayof_jbyte_disjoint_arraycopy() : +- disjoint_byte_copy_entry; + + Label L_skip_alignment, L_align, L_aligned_copy; + Label L_copy_byte, L_copy_byte_loop, L_exit; +@@ -1412,9 +1399,11 @@ class StubGenerator: public StubCodeGene + + assert_clean_int(count, O3); // Make sure 'count' is clean int. + +- if (!aligned) byte_copy_entry = __ pc(); +- // caller can pass a 64-bit byte count here (from Unsafe.copyMemory) +- if (!aligned) BLOCK_COMMENT("Entry:"); ++ if (entry != NULL) { ++ *entry = __ pc(); ++ // caller can pass a 64-bit byte count here (from Unsafe.copyMemory) ++ BLOCK_COMMENT("Entry:"); ++ } + + array_overlap_test(nooverlap_target, 0); + +@@ -1504,7 +1493,7 @@ class StubGenerator: public StubCodeGene + // to: O1 + // count: O2 treated as signed + // +- address generate_disjoint_short_copy(bool aligned, const char * name) { ++ address generate_disjoint_short_copy(bool aligned, address *entry, const char * name) { + __ align(CodeEntryAlignment); + StubCodeMark mark(this, "StubRoutines", name); + address start = __ pc(); +@@ -1520,9 +1509,11 @@ class StubGenerator: public StubCodeGene + + assert_clean_int(count, O3); // Make sure 'count' is clean int. + +- if (!aligned) disjoint_short_copy_entry = __ pc(); +- // caller can pass a 64-bit byte count here (from Unsafe.copyMemory) +- if (!aligned) BLOCK_COMMENT("Entry:"); ++ if (entry != NULL) { ++ *entry = __ pc(); ++ // caller can pass a 64-bit byte count here (from Unsafe.copyMemory) ++ BLOCK_COMMENT("Entry:"); ++ } + + // for short arrays, just do single element copy + __ cmp(count, 11); // 8 + 3 (22 bytes) +@@ -1842,15 +1833,13 @@ class StubGenerator: public StubCodeGene + // to: O1 + // count: O2 treated as signed + // +- address generate_conjoint_short_copy(bool aligned, const char * name) { ++ address generate_conjoint_short_copy(bool aligned, address nooverlap_target, ++ address *entry, const char *name) { + // Do reverse copy. + + __ align(CodeEntryAlignment); + StubCodeMark mark(this, "StubRoutines", name); + address start = __ pc(); +- address nooverlap_target = aligned ? +- StubRoutines::arrayof_jshort_disjoint_arraycopy() : +- disjoint_short_copy_entry; + + Label L_skip_alignment, L_skip_alignment2, L_aligned_copy; + Label L_copy_2_bytes, L_copy_2_bytes_loop, L_exit; +@@ -1865,9 +1854,11 @@ class StubGenerator: public StubCodeGene + + assert_clean_int(count, O3); // Make sure 'count' is clean int. + +- if (!aligned) short_copy_entry = __ pc(); +- // caller can pass a 64-bit byte count here (from Unsafe.copyMemory) +- if (!aligned) BLOCK_COMMENT("Entry:"); ++ if (entry != NULL) { ++ *entry = __ pc(); ++ // caller can pass a 64-bit byte count here (from Unsafe.copyMemory) ++ BLOCK_COMMENT("Entry:"); ++ } + + array_overlap_test(nooverlap_target, 1); + +@@ -2072,7 +2063,7 @@ class StubGenerator: public StubCodeGene + // to: O1 + // count: O2 treated as signed + // +- address generate_disjoint_int_copy(bool aligned, const char * name) { ++ address generate_disjoint_int_copy(bool aligned, address *entry, const char *name) { + __ align(CodeEntryAlignment); + StubCodeMark mark(this, "StubRoutines", name); + address start = __ pc(); +@@ -2080,9 +2071,11 @@ class StubGenerator: public StubCodeGene + const Register count = O2; + assert_clean_int(count, O3); // Make sure 'count' is clean int. + +- if (!aligned) disjoint_int_copy_entry = __ pc(); +- // caller can pass a 64-bit byte count here (from Unsafe.copyMemory) +- if (!aligned) BLOCK_COMMENT("Entry:"); ++ if (entry != NULL) { ++ *entry = __ pc(); ++ // caller can pass a 64-bit byte count here (from Unsafe.copyMemory) ++ BLOCK_COMMENT("Entry:"); ++ } + + generate_disjoint_int_copy_core(aligned); + +@@ -2204,20 +2197,19 @@ class StubGenerator: public StubCodeGene + // to: O1 + // count: O2 treated as signed + // +- address generate_conjoint_int_copy(bool aligned, const char * name) { ++ address generate_conjoint_int_copy(bool aligned, address nooverlap_target, ++ address *entry, const char *name) { + __ align(CodeEntryAlignment); + StubCodeMark mark(this, "StubRoutines", name); + address start = __ pc(); + +- address nooverlap_target = aligned ? +- StubRoutines::arrayof_jint_disjoint_arraycopy() : +- disjoint_int_copy_entry; +- + assert_clean_int(O2, O3); // Make sure 'count' is clean int. + +- if (!aligned) int_copy_entry = __ pc(); +- // caller can pass a 64-bit byte count here (from Unsafe.copyMemory) +- if (!aligned) BLOCK_COMMENT("Entry:"); ++ if (entry != NULL) { ++ *entry = __ pc(); ++ // caller can pass a 64-bit byte count here (from Unsafe.copyMemory) ++ BLOCK_COMMENT("Entry:"); ++ } + + array_overlap_test(nooverlap_target, 2); + +@@ -2336,16 +2328,18 @@ class StubGenerator: public StubCodeGene + // to: O1 + // count: O2 treated as signed + // +- address generate_disjoint_long_copy(bool aligned, const char * name) { ++ address generate_disjoint_long_copy(bool aligned, address *entry, const char *name) { + __ align(CodeEntryAlignment); + StubCodeMark mark(this, "StubRoutines", name); + address start = __ pc(); + + assert_clean_int(O2, O3); // Make sure 'count' is clean int. + +- if (!aligned) disjoint_long_copy_entry = __ pc(); +- // caller can pass a 64-bit byte count here (from Unsafe.copyMemory) +- if (!aligned) BLOCK_COMMENT("Entry:"); ++ if (entry != NULL) { ++ *entry = __ pc(); ++ // caller can pass a 64-bit byte count here (from Unsafe.copyMemory) ++ BLOCK_COMMENT("Entry:"); ++ } + + generate_disjoint_long_copy_core(aligned); + +@@ -2406,19 +2400,21 @@ class StubGenerator: public StubCodeGene + // to: O1 + // count: O2 treated as signed + // +- address generate_conjoint_long_copy(bool aligned, const char * name) { ++ address generate_conjoint_long_copy(bool aligned, address nooverlap_target, ++ address *entry, const char *name) { + __ align(CodeEntryAlignment); + StubCodeMark mark(this, "StubRoutines", name); + address start = __ pc(); + + assert(!aligned, "usage"); +- address nooverlap_target = disjoint_long_copy_entry; + + assert_clean_int(O2, O3); // Make sure 'count' is clean int. + +- if (!aligned) long_copy_entry = __ pc(); +- // caller can pass a 64-bit byte count here (from Unsafe.copyMemory) +- if (!aligned) BLOCK_COMMENT("Entry:"); ++ if (entry != NULL) { ++ *entry = __ pc(); ++ // caller can pass a 64-bit byte count here (from Unsafe.copyMemory) ++ BLOCK_COMMENT("Entry:"); ++ } + + array_overlap_test(nooverlap_target, 3); + +@@ -2439,7 +2435,7 @@ class StubGenerator: public StubCodeGene + // to: O1 + // count: O2 treated as signed + // +- address generate_disjoint_oop_copy(bool aligned, const char * name) { ++ address generate_disjoint_oop_copy(bool aligned, address *entry, const char *name) { + + const Register from = O0; // source array address + const Register to = O1; // destination array address +@@ -2451,9 +2447,11 @@ class StubGenerator: public StubCodeGene + + assert_clean_int(count, O3); // Make sure 'count' is clean int. + +- if (!aligned) disjoint_oop_copy_entry = __ pc(); +- // caller can pass a 64-bit byte count here +- if (!aligned) BLOCK_COMMENT("Entry:"); ++ if (entry != NULL) { ++ *entry = __ pc(); ++ // caller can pass a 64-bit byte count here ++ BLOCK_COMMENT("Entry:"); ++ } + + // save arguments for barrier generation + __ mov(to, G1); +@@ -2487,7 +2485,8 @@ class StubGenerator: public StubCodeGene + // to: O1 + // count: O2 treated as signed + // +- address generate_conjoint_oop_copy(bool aligned, const char * name) { ++ address generate_conjoint_oop_copy(bool aligned, address nooverlap_target, ++ address *entry, const char *name) { + + const Register from = O0; // source array address + const Register to = O1; // destination array address +@@ -2499,21 +2498,18 @@ class StubGenerator: public StubCodeGene + + assert_clean_int(count, O3); // Make sure 'count' is clean int. + +- if (!aligned) oop_copy_entry = __ pc(); +- // caller can pass a 64-bit byte count here +- if (!aligned) BLOCK_COMMENT("Entry:"); ++ if (entry != NULL) { ++ *entry = __ pc(); ++ // caller can pass a 64-bit byte count here ++ BLOCK_COMMENT("Entry:"); ++ } ++ ++ array_overlap_test(nooverlap_target, LogBytesPerHeapOop); + + // save arguments for barrier generation + __ mov(to, G1); + __ mov(count, G5); +- + gen_write_ref_array_pre_barrier(G1, G5); +- +- address nooverlap_target = aligned ? +- StubRoutines::arrayof_oop_disjoint_arraycopy() : +- disjoint_oop_copy_entry; +- +- array_overlap_test(nooverlap_target, LogBytesPerHeapOop); + + #ifdef _LP64 + if (UseCompressedOops) { +@@ -2582,7 +2578,7 @@ class StubGenerator: public StubCodeGene + // ckval: O4 (super_klass) + // ret: O0 zero for success; (-1^K) where K is partial transfer count + // +- address generate_checkcast_copy(const char* name) { ++ address generate_checkcast_copy(const char *name, address *entry) { + + const Register O0_from = O0; // source array address + const Register O1_to = O1; // destination array address +@@ -2599,8 +2595,6 @@ class StubGenerator: public StubCodeGene + __ align(CodeEntryAlignment); + StubCodeMark mark(this, "StubRoutines", name); + address start = __ pc(); +- +- gen_write_ref_array_pre_barrier(O1, O2); + + #ifdef ASSERT + // We sometimes save a frame (see generate_type_check below). +@@ -2625,9 +2619,13 @@ class StubGenerator: public StubCodeGene + } + #endif //ASSERT + +- checkcast_copy_entry = __ pc(); +- // caller can pass a 64-bit byte count here (from generic stub) +- BLOCK_COMMENT("Entry:"); ++ if (entry != NULL) { ++ *entry = __ pc(); ++ // caller can pass a 64-bit byte count here (from generic stub) ++ BLOCK_COMMENT("Entry:"); ++ } ++ ++ gen_write_ref_array_pre_barrier(O1_to, O2_count); + + Label load_element, store_element, do_card_marks, fail, done; + __ addcc(O2_count, 0, G1_remain); // initialize loop index, and test it +@@ -2700,7 +2698,11 @@ class StubGenerator: public StubCodeGene + // Examines the alignment of the operands and dispatches + // to a long, int, short, or byte copy loop. + // +- address generate_unsafe_copy(const char* name) { ++ address generate_unsafe_copy(const char* name, ++ address byte_copy_entry, ++ address short_copy_entry, ++ address int_copy_entry, ++ address long_copy_entry) { + + const Register O0_from = O0; // source array address + const Register O1_to = O1; // destination array address +@@ -2796,8 +2798,13 @@ class StubGenerator: public StubCodeGene + // O0 == 0 - success + // O0 == -1 - need to call System.arraycopy + // +- address generate_generic_copy(const char *name) { +- ++ address generate_generic_copy(const char *name, ++ address entry_jbyte_arraycopy, ++ address entry_jshort_arraycopy, ++ address entry_jint_arraycopy, ++ address entry_oop_arraycopy, ++ address entry_jlong_arraycopy, ++ address entry_checkcast_arraycopy) { + Label L_failed, L_objArray; + + // Input registers +@@ -2970,15 +2977,15 @@ class StubGenerator: public StubCodeGene + + BLOCK_COMMENT("choose copy loop based on element size"); + __ cmp(G3_elsize, 0); +- __ br(Assembler::equal,true,Assembler::pt,StubRoutines::_jbyte_arraycopy); ++ __ br(Assembler::equal, true, Assembler::pt, entry_jbyte_arraycopy); + __ delayed()->signx(length, count); // length + + __ cmp(G3_elsize, LogBytesPerShort); +- __ br(Assembler::equal,true,Assembler::pt,StubRoutines::_jshort_arraycopy); ++ __ br(Assembler::equal, true, Assembler::pt, entry_jshort_arraycopy); + __ delayed()->signx(length, count); // length + + __ cmp(G3_elsize, LogBytesPerInt); +- __ br(Assembler::equal,true,Assembler::pt,StubRoutines::_jint_arraycopy); ++ __ br(Assembler::equal, true, Assembler::pt, entry_jint_arraycopy); + __ delayed()->signx(length, count); // length + #ifdef ASSERT + { Label L; +@@ -2989,7 +2996,7 @@ class StubGenerator: public StubCodeGene + __ bind(L); + } + #endif +- __ br(Assembler::always,false,Assembler::pt,StubRoutines::_jlong_arraycopy); ++ __ br(Assembler::always, false, Assembler::pt, entry_jlong_arraycopy); + __ delayed()->signx(length, count); // length + + // objArrayKlass +@@ -3013,7 +3020,7 @@ class StubGenerator: public StubCodeGene + __ add(src, src_pos, from); // src_addr + __ add(dst, dst_pos, to); // dst_addr + __ BIND(L_plain_copy); +- __ br(Assembler::always, false, Assembler::pt,StubRoutines::_oop_arraycopy); ++ __ br(Assembler::always, false, Assembler::pt, entry_oop_arraycopy); + __ delayed()->signx(length, count); // length + + __ BIND(L_checkcast_copy); +@@ -3057,7 +3064,7 @@ class StubGenerator: public StubCodeGene + __ ld_ptr(G4_dst_klass, ek_offset, O4); // dest elem klass + // lduw(O4, sco_offset, O3); // sco of elem klass + +- __ br(Assembler::always, false, Assembler::pt, checkcast_copy_entry); ++ __ br(Assembler::always, false, Assembler::pt, entry_checkcast_arraycopy); + __ delayed()->lduw(O4, sco_offset, O3); + } + +@@ -3068,39 +3075,76 @@ class StubGenerator: public StubCodeGene + } + + void generate_arraycopy_stubs() { +- +- // Note: the disjoint stubs must be generated first, some of +- // the conjoint stubs use them. +- StubRoutines::_jbyte_disjoint_arraycopy = generate_disjoint_byte_copy(false, "jbyte_disjoint_arraycopy"); +- StubRoutines::_jshort_disjoint_arraycopy = generate_disjoint_short_copy(false, "jshort_disjoint_arraycopy"); +- StubRoutines::_jint_disjoint_arraycopy = generate_disjoint_int_copy(false, "jint_disjoint_arraycopy"); +- StubRoutines::_jlong_disjoint_arraycopy = generate_disjoint_long_copy(false, "jlong_disjoint_arraycopy"); +- StubRoutines::_oop_disjoint_arraycopy = generate_disjoint_oop_copy(false, "oop_disjoint_arraycopy"); +- StubRoutines::_arrayof_jbyte_disjoint_arraycopy = generate_disjoint_byte_copy(true, "arrayof_jbyte_disjoint_arraycopy"); +- StubRoutines::_arrayof_jshort_disjoint_arraycopy = generate_disjoint_short_copy(true, "arrayof_jshort_disjoint_arraycopy"); +- StubRoutines::_arrayof_jint_disjoint_arraycopy = generate_disjoint_int_copy(true, "arrayof_jint_disjoint_arraycopy"); +- StubRoutines::_arrayof_jlong_disjoint_arraycopy = generate_disjoint_long_copy(true, "arrayof_jlong_disjoint_arraycopy"); +- StubRoutines::_arrayof_oop_disjoint_arraycopy = generate_disjoint_oop_copy(true, "arrayof_oop_disjoint_arraycopy"); +- +- StubRoutines::_jbyte_arraycopy = generate_conjoint_byte_copy(false, "jbyte_arraycopy"); +- StubRoutines::_jshort_arraycopy = generate_conjoint_short_copy(false, "jshort_arraycopy"); +- StubRoutines::_jint_arraycopy = generate_conjoint_int_copy(false, "jint_arraycopy"); +- StubRoutines::_jlong_arraycopy = generate_conjoint_long_copy(false, "jlong_arraycopy"); +- StubRoutines::_oop_arraycopy = generate_conjoint_oop_copy(false, "oop_arraycopy"); +- StubRoutines::_arrayof_jbyte_arraycopy = generate_conjoint_byte_copy(true, "arrayof_jbyte_arraycopy"); +- StubRoutines::_arrayof_jshort_arraycopy = generate_conjoint_short_copy(true, "arrayof_jshort_arraycopy"); ++ address entry; ++ address entry_jbyte_arraycopy; ++ address entry_jshort_arraycopy; ++ address entry_jint_arraycopy; ++ address entry_oop_arraycopy; ++ address entry_jlong_arraycopy; ++ address entry_checkcast_arraycopy; ++ ++ StubRoutines::_jbyte_disjoint_arraycopy = generate_disjoint_byte_copy(false, &entry, ++ "jbyte_disjoint_arraycopy"); ++ StubRoutines::_jbyte_arraycopy = generate_conjoint_byte_copy(false, entry, &entry_jbyte_arraycopy, ++ "jbyte_arraycopy"); ++ StubRoutines::_jshort_disjoint_arraycopy = generate_disjoint_short_copy(false, &entry, ++ "jshort_disjoint_arraycopy"); ++ StubRoutines::_jshort_arraycopy = generate_conjoint_short_copy(false, entry, &entry_jshort_arraycopy, ++ "jshort_arraycopy"); ++ StubRoutines::_jint_disjoint_arraycopy = generate_disjoint_int_copy(false, &entry, ++ "jint_disjoint_arraycopy"); ++ StubRoutines::_jint_arraycopy = generate_conjoint_int_copy(false, entry, &entry_jint_arraycopy, ++ "jint_arraycopy"); ++ StubRoutines::_jlong_disjoint_arraycopy = generate_disjoint_long_copy(false, &entry, ++ "jlong_disjoint_arraycopy"); ++ StubRoutines::_jlong_arraycopy = generate_conjoint_long_copy(false, entry, &entry_jlong_arraycopy, ++ "jlong_arraycopy"); ++ StubRoutines::_oop_disjoint_arraycopy = generate_disjoint_oop_copy(false, &entry, ++ "oop_disjoint_arraycopy"); ++ StubRoutines::_oop_arraycopy = generate_conjoint_oop_copy(false, entry, &entry_oop_arraycopy, ++ "oop_arraycopy"); ++ ++ ++ StubRoutines::_arrayof_jbyte_disjoint_arraycopy = generate_disjoint_byte_copy(true, &entry, ++ "arrayof_jbyte_disjoint_arraycopy"); ++ StubRoutines::_arrayof_jbyte_arraycopy = generate_conjoint_byte_copy(true, entry, NULL, ++ "arrayof_jbyte_arraycopy"); ++ ++ StubRoutines::_arrayof_jshort_disjoint_arraycopy = generate_disjoint_short_copy(true, &entry, ++ "arrayof_jshort_disjoint_arraycopy"); ++ StubRoutines::_arrayof_jshort_arraycopy = generate_conjoint_short_copy(true, entry, NULL, ++ "arrayof_jshort_arraycopy"); ++ ++ StubRoutines::_arrayof_jint_disjoint_arraycopy = generate_disjoint_int_copy(true, &entry, ++ "arrayof_jint_disjoint_arraycopy"); + #ifdef _LP64 + // since sizeof(jint) < sizeof(HeapWord), there's a different flavor: +- StubRoutines::_arrayof_jint_arraycopy = generate_conjoint_int_copy(true, "arrayof_jint_arraycopy"); ++ StubRoutines::_arrayof_jint_arraycopy = generate_conjoint_int_copy(true, entry, NULL, "arrayof_jint_arraycopy"); + #else + StubRoutines::_arrayof_jint_arraycopy = StubRoutines::_jint_arraycopy; + #endif ++ ++ StubRoutines::_arrayof_jlong_disjoint_arraycopy = generate_disjoint_long_copy(true, NULL, ++ "arrayof_jlong_disjoint_arraycopy"); ++ StubRoutines::_arrayof_oop_disjoint_arraycopy = generate_disjoint_oop_copy(true, NULL, ++ "arrayof_oop_disjoint_arraycopy"); ++ + StubRoutines::_arrayof_jlong_arraycopy = StubRoutines::_jlong_arraycopy; + StubRoutines::_arrayof_oop_arraycopy = StubRoutines::_oop_arraycopy; + +- StubRoutines::_checkcast_arraycopy = generate_checkcast_copy("checkcast_arraycopy"); +- StubRoutines::_unsafe_arraycopy = generate_unsafe_copy("unsafe_arraycopy"); +- StubRoutines::_generic_arraycopy = generate_generic_copy("generic_arraycopy"); ++ StubRoutines::_checkcast_arraycopy = generate_checkcast_copy("checkcast_arraycopy", &entry_checkcast_arraycopy); ++ StubRoutines::_unsafe_arraycopy = generate_unsafe_copy("unsafe_arraycopy", ++ entry_jbyte_arraycopy, ++ entry_jshort_arraycopy, ++ entry_jint_arraycopy, ++ entry_jlong_arraycopy); ++ StubRoutines::_generic_arraycopy = generate_generic_copy("generic_arraycopy", ++ entry_jbyte_arraycopy, ++ entry_jshort_arraycopy, ++ entry_jint_arraycopy, ++ entry_oop_arraycopy, ++ entry_jlong_arraycopy, ++ entry_checkcast_arraycopy); + + StubRoutines::_jbyte_fill = generate_fill(T_BYTE, false, "jbyte_fill"); + StubRoutines::_jshort_fill = generate_fill(T_SHORT, false, "jshort_fill"); +@@ -3224,21 +3268,6 @@ class StubGenerator: public StubCodeGene + + }; // end class declaration + +- +-address StubGenerator::disjoint_byte_copy_entry = NULL; +-address StubGenerator::disjoint_short_copy_entry = NULL; +-address StubGenerator::disjoint_int_copy_entry = NULL; +-address StubGenerator::disjoint_long_copy_entry = NULL; +-address StubGenerator::disjoint_oop_copy_entry = NULL; +- +-address StubGenerator::byte_copy_entry = NULL; +-address StubGenerator::short_copy_entry = NULL; +-address StubGenerator::int_copy_entry = NULL; +-address StubGenerator::long_copy_entry = NULL; +-address StubGenerator::oop_copy_entry = NULL; +- +-address StubGenerator::checkcast_copy_entry = NULL; +- + void StubGenerator_generate(CodeBuffer* code, bool all) { + StubGenerator g(code, all); + } +--- openjdk.orig/hotspot/src/cpu/x86/vm/stubGenerator_x86_32.cpp Wed Feb 09 15:02:23 2011 -0800 ++++ openjdk/hotspot/src/cpu/x86/vm/stubGenerator_x86_32.cpp Tue Feb 22 15:25:02 2011 -0800 +@@ -945,15 +945,18 @@ class StubGenerator: public StubCodeGene + __ movptr(from , Address(rsp, 12+ 4)); + __ movptr(to , Address(rsp, 12+ 8)); + __ movl(count, Address(rsp, 12+ 12)); ++ ++ if (entry != NULL) { ++ *entry = __ pc(); // Entry point from conjoint arraycopy stub. ++ BLOCK_COMMENT("Entry:"); ++ } ++ + if (t == T_OBJECT) { + __ testl(count, count); + __ jcc(Assembler::zero, L_0_count); + gen_write_ref_array_pre_barrier(to, count); + __ mov(saved_to, to); // save 'to' + } +- +- *entry = __ pc(); // Entry point from conjoint arraycopy stub. +- BLOCK_COMMENT("Entry:"); + + __ subptr(to, from); // to --> to_from + __ cmpl(count, 2< rdi, to => rsi, count => rdx + // r9 and r10 may be used to save non-volatile registers +@@ -1479,7 +1467,8 @@ class StubGenerator: public StubCodeGene + // dwords or qwords that span cache line boundaries will still be loaded + // and stored atomically. + // +- address generate_conjoint_byte_copy(bool aligned, const char *name) { ++ address generate_conjoint_byte_copy(bool aligned, address nooverlap_target, ++ address* entry, const char *name) { + __ align(CodeEntryAlignment); + StubCodeMark mark(this, "StubRoutines", name); + address start = __ pc(); +@@ -1494,11 +1483,13 @@ class StubGenerator: public StubCodeGene + __ enter(); // required for proper stackwalking of RuntimeStub frame + assert_clean_int(c_rarg2, rax); // Make sure 'count' is clean int. + +- byte_copy_entry = __ pc(); +- BLOCK_COMMENT("Entry:"); +- // caller can pass a 64-bit byte count here (from Unsafe.copyMemory) +- +- array_overlap_test(disjoint_byte_copy_entry, Address::times_1); ++ if (entry != NULL) { ++ *entry = __ pc(); ++ // caller can pass a 64-bit byte count here (from Unsafe.copyMemory) ++ BLOCK_COMMENT("Entry:"); ++ } ++ ++ array_overlap_test(nooverlap_target, Address::times_1); + setup_arg_regs(); // from => rdi, to => rsi, count => rdx + // r9 and r10 may be used to save non-volatile registers + +@@ -1574,7 +1565,7 @@ class StubGenerator: public StubCodeGene + // disjoint_short_copy_entry is set to the no-overlap entry point + // used by generate_conjoint_short_copy(). + // +- address generate_disjoint_short_copy(bool aligned, const char *name) { ++ address generate_disjoint_short_copy(bool aligned, address *entry, const char *name) { + __ align(CodeEntryAlignment); + StubCodeMark mark(this, "StubRoutines", name); + address start = __ pc(); +@@ -1593,9 +1584,11 @@ class StubGenerator: public StubCodeGene + __ enter(); // required for proper stackwalking of RuntimeStub frame + assert_clean_int(c_rarg2, rax); // Make sure 'count' is clean int. + +- disjoint_short_copy_entry = __ pc(); +- BLOCK_COMMENT("Entry:"); +- // caller can pass a 64-bit byte count here (from Unsafe.copyMemory) ++ if (entry != NULL) { ++ *entry = __ pc(); ++ // caller can pass a 64-bit byte count here (from Unsafe.copyMemory) ++ BLOCK_COMMENT("Entry:"); ++ } + + setup_arg_regs(); // from => rdi, to => rsi, count => rdx + // r9 and r10 may be used to save non-volatile registers +@@ -1686,7 +1679,8 @@ class StubGenerator: public StubCodeGene + // or qwords that span cache line boundaries will still be loaded + // and stored atomically. + // +- address generate_conjoint_short_copy(bool aligned, const char *name) { ++ address generate_conjoint_short_copy(bool aligned, address nooverlap_target, ++ address *entry, const char *name) { + __ align(CodeEntryAlignment); + StubCodeMark mark(this, "StubRoutines", name); + address start = __ pc(); +@@ -1701,11 +1695,13 @@ class StubGenerator: public StubCodeGene + __ enter(); // required for proper stackwalking of RuntimeStub frame + assert_clean_int(c_rarg2, rax); // Make sure 'count' is clean int. + +- short_copy_entry = __ pc(); +- BLOCK_COMMENT("Entry:"); +- // caller can pass a 64-bit byte count here (from Unsafe.copyMemory) +- +- array_overlap_test(disjoint_short_copy_entry, Address::times_2); ++ if (entry != NULL) { ++ *entry = __ pc(); ++ // caller can pass a 64-bit byte count here (from Unsafe.copyMemory) ++ BLOCK_COMMENT("Entry:"); ++ } ++ ++ array_overlap_test(nooverlap_target, Address::times_2); + setup_arg_regs(); // from => rdi, to => rsi, count => rdx + // r9 and r10 may be used to save non-volatile registers + +@@ -1773,7 +1769,7 @@ class StubGenerator: public StubCodeGene + // disjoint_int_copy_entry is set to the no-overlap entry point + // used by generate_conjoint_int_oop_copy(). + // +- address generate_disjoint_int_oop_copy(bool aligned, bool is_oop, const char *name) { ++ address generate_disjoint_int_oop_copy(bool aligned, bool is_oop, address* entry, const char *name) { + __ align(CodeEntryAlignment); + StubCodeMark mark(this, "StubRoutines", name); + address start = __ pc(); +@@ -1793,21 +1789,17 @@ class StubGenerator: public StubCodeGene + __ enter(); // required for proper stackwalking of RuntimeStub frame + assert_clean_int(c_rarg2, rax); // Make sure 'count' is clean int. + +- (is_oop ? disjoint_oop_copy_entry : disjoint_int_copy_entry) = __ pc(); +- +- if (is_oop) { +- // no registers are destroyed by this call +- gen_write_ref_array_pre_barrier(/* dest */ c_rarg1, /* count */ c_rarg2); +- } +- +- BLOCK_COMMENT("Entry:"); +- // caller can pass a 64-bit byte count here (from Unsafe.copyMemory) ++ if (entry != NULL) { ++ *entry = __ pc(); ++ // caller can pass a 64-bit byte count here (from Unsafe.copyMemory) ++ BLOCK_COMMENT("Entry:"); ++ } + + setup_arg_regs(); // from => rdi, to => rsi, count => rdx + // r9 and r10 may be used to save non-volatile registers +- + if (is_oop) { + __ movq(saved_to, to); ++ gen_write_ref_array_pre_barrier(to, count); + } + + // 'from', 'to' and 'count' are now valid +@@ -1867,7 +1859,8 @@ class StubGenerator: public StubCodeGene + // the hardware handle it. The two dwords within qwords that span + // cache line boundaries will still be loaded and stored atomicly. + // +- address generate_conjoint_int_oop_copy(bool aligned, bool is_oop, const char *name) { ++ address generate_conjoint_int_oop_copy(bool aligned, bool is_oop, address nooverlap_target, ++ address *entry, const char *name) { + __ align(CodeEntryAlignment); + StubCodeMark mark(this, "StubRoutines", name); + address start = __ pc(); +@@ -1882,19 +1875,20 @@ class StubGenerator: public StubCodeGene + __ enter(); // required for proper stackwalking of RuntimeStub frame + assert_clean_int(c_rarg2, rax); // Make sure 'count' is clean int. + ++ if (entry != NULL) { ++ *entry = __ pc(); ++ // caller can pass a 64-bit byte count here (from Unsafe.copyMemory) ++ BLOCK_COMMENT("Entry:"); ++ } ++ ++ array_overlap_test(nooverlap_target, Address::times_4); ++ setup_arg_regs(); // from => rdi, to => rsi, count => rdx ++ // r9 and r10 may be used to save non-volatile registers ++ + if (is_oop) { + // no registers are destroyed by this call +- gen_write_ref_array_pre_barrier(/* dest */ c_rarg1, /* count */ c_rarg2); +- } +- +- (is_oop ? oop_copy_entry : int_copy_entry) = __ pc(); +- BLOCK_COMMENT("Entry:"); +- // caller can pass a 64-bit byte count here (from Unsafe.copyMemory) +- +- array_overlap_test(is_oop ? disjoint_oop_copy_entry : disjoint_int_copy_entry, +- Address::times_4); +- setup_arg_regs(); // from => rdi, to => rsi, count => rdx +- // r9 and r10 may be used to save non-volatile registers ++ gen_write_ref_array_pre_barrier(to, count); ++ } + + assert_clean_int(count, rax); // Make sure 'count' is clean int. + // 'from', 'to' and 'count' are now valid +@@ -1959,7 +1953,7 @@ class StubGenerator: public StubCodeGene + // disjoint_oop_copy_entry or disjoint_long_copy_entry is set to the + // no-overlap entry point used by generate_conjoint_long_oop_copy(). + // +- address generate_disjoint_long_oop_copy(bool aligned, bool is_oop, const char *name) { ++ address generate_disjoint_long_oop_copy(bool aligned, bool is_oop, address *entry, const char *name) { + __ align(CodeEntryAlignment); + StubCodeMark mark(this, "StubRoutines", name); + address start = __ pc(); +@@ -1978,20 +1972,19 @@ class StubGenerator: public StubCodeGene + // Save no-overlap entry point for generate_conjoint_long_oop_copy() + assert_clean_int(c_rarg2, rax); // Make sure 'count' is clean int. + +- if (is_oop) { +- disjoint_oop_copy_entry = __ pc(); +- // no registers are destroyed by this call +- gen_write_ref_array_pre_barrier(/* dest */ c_rarg1, /* count */ c_rarg2); +- } else { +- disjoint_long_copy_entry = __ pc(); +- } +- BLOCK_COMMENT("Entry:"); +- // caller can pass a 64-bit byte count here (from Unsafe.copyMemory) ++ if (entry != NULL) { ++ *entry = __ pc(); ++ // caller can pass a 64-bit byte count here (from Unsafe.copyMemory) ++ BLOCK_COMMENT("Entry:"); ++ } + + setup_arg_regs(); // from => rdi, to => rsi, count => rdx + // r9 and r10 may be used to save non-volatile registers +- + // 'from', 'to' and 'qword_count' are now valid ++ if (is_oop) { ++ // no registers are destroyed by this call ++ gen_write_ref_array_pre_barrier(to, qword_count); ++ } + + // Copy from low to high addresses. Use 'to' as scratch. + __ lea(end_from, Address(from, qword_count, Address::times_8, -8)); +@@ -2045,7 +2038,8 @@ class StubGenerator: public StubCodeGene + // c_rarg1 - destination array address + // c_rarg2 - element count, treated as ssize_t, can be zero + // +- address generate_conjoint_long_oop_copy(bool aligned, bool is_oop, const char *name) { ++ address generate_conjoint_long_oop_copy(bool aligned, bool is_oop, address nooverlap_target, ++ address *entry, const char *name) { + __ align(CodeEntryAlignment); + StubCodeMark mark(this, "StubRoutines", name); + address start = __ pc(); +@@ -2059,26 +2053,16 @@ class StubGenerator: public StubCodeGene + __ enter(); // required for proper stackwalking of RuntimeStub frame + assert_clean_int(c_rarg2, rax); // Make sure 'count' is clean int. + +- address disjoint_copy_entry = NULL; +- if (is_oop) { +- assert(!UseCompressedOops, "shouldn't be called for compressed oops"); +- disjoint_copy_entry = disjoint_oop_copy_entry; +- oop_copy_entry = __ pc(); +- array_overlap_test(disjoint_oop_copy_entry, Address::times_8); +- } else { +- disjoint_copy_entry = disjoint_long_copy_entry; +- long_copy_entry = __ pc(); +- array_overlap_test(disjoint_long_copy_entry, Address::times_8); +- } +- BLOCK_COMMENT("Entry:"); +- // caller can pass a 64-bit byte count here (from Unsafe.copyMemory) +- +- array_overlap_test(disjoint_copy_entry, Address::times_8); ++ if (entry != NULL) { ++ *entry = __ pc(); ++ // caller can pass a 64-bit byte count here (from Unsafe.copyMemory) ++ BLOCK_COMMENT("Entry:"); ++ } ++ ++ array_overlap_test(nooverlap_target, Address::times_8); + setup_arg_regs(); // from => rdi, to => rsi, count => rdx + // r9 and r10 may be used to save non-volatile registers +- + // 'from', 'to' and 'qword_count' are now valid +- + if (is_oop) { + // Save to and count for store barrier + __ movptr(saved_count, qword_count); +@@ -2162,7 +2146,7 @@ class StubGenerator: public StubCodeGene + // rax == 0 - success + // rax == -1^K - failure, where K is partial transfer count + // +- address generate_checkcast_copy(const char *name) { ++ address generate_checkcast_copy(const char *name, address *entry) { + + Label L_load_element, L_store_element, L_do_card_marks, L_done; + +@@ -2216,8 +2200,10 @@ class StubGenerator: public StubCodeGene + #endif + + // Caller of this entry point must set up the argument registers. +- checkcast_copy_entry = __ pc(); +- BLOCK_COMMENT("Entry:"); ++ if (entry != NULL) { ++ *entry = __ pc(); ++ BLOCK_COMMENT("Entry:"); ++ } + + // allocate spill slots for r13, r14 + enum { +@@ -2334,7 +2320,9 @@ class StubGenerator: public StubCodeGene + // Examines the alignment of the operands and dispatches + // to a long, int, short, or byte copy loop. + // +- address generate_unsafe_copy(const char *name) { ++ address generate_unsafe_copy(const char *name, ++ address byte_copy_entry, address short_copy_entry, ++ address int_copy_entry, address long_copy_entry) { + + Label L_long_aligned, L_int_aligned, L_short_aligned; + +@@ -2432,7 +2420,10 @@ class StubGenerator: public StubCodeGene + // rax == 0 - success + // rax == -1^K - failure, where K is partial transfer count + // +- address generate_generic_copy(const char *name) { ++ address generate_generic_copy(const char *name, ++ address byte_copy_entry, address short_copy_entry, ++ address int_copy_entry, address long_copy_entry, ++ address oop_copy_entry, address checkcast_copy_entry) { + + Label L_failed, L_failed_0, L_objArray; + Label L_copy_bytes, L_copy_shorts, L_copy_ints, L_copy_longs; +@@ -2725,33 +2716,60 @@ class StubGenerator: public StubCodeGene + } + + void generate_arraycopy_stubs() { +- // Call the conjoint generation methods immediately after +- // the disjoint ones so that short branches from the former +- // to the latter can be generated. +- StubRoutines::_jbyte_disjoint_arraycopy = generate_disjoint_byte_copy(false, "jbyte_disjoint_arraycopy"); +- StubRoutines::_jbyte_arraycopy = generate_conjoint_byte_copy(false, "jbyte_arraycopy"); +- +- StubRoutines::_jshort_disjoint_arraycopy = generate_disjoint_short_copy(false, "jshort_disjoint_arraycopy"); +- StubRoutines::_jshort_arraycopy = generate_conjoint_short_copy(false, "jshort_arraycopy"); +- +- StubRoutines::_jint_disjoint_arraycopy = generate_disjoint_int_oop_copy(false, false, "jint_disjoint_arraycopy"); +- StubRoutines::_jint_arraycopy = generate_conjoint_int_oop_copy(false, false, "jint_arraycopy"); +- +- StubRoutines::_jlong_disjoint_arraycopy = generate_disjoint_long_oop_copy(false, false, "jlong_disjoint_arraycopy"); +- StubRoutines::_jlong_arraycopy = generate_conjoint_long_oop_copy(false, false, "jlong_arraycopy"); ++ address entry; ++ address entry_jbyte_arraycopy; ++ address entry_jshort_arraycopy; ++ address entry_jint_arraycopy; ++ address entry_oop_arraycopy; ++ address entry_jlong_arraycopy; ++ address entry_checkcast_arraycopy; ++ ++ StubRoutines::_jbyte_disjoint_arraycopy = generate_disjoint_byte_copy(false, &entry, ++ "jbyte_disjoint_arraycopy"); ++ StubRoutines::_jbyte_arraycopy = generate_conjoint_byte_copy(false, entry, &entry_jbyte_arraycopy, ++ "jbyte_arraycopy"); ++ ++ StubRoutines::_jshort_disjoint_arraycopy = generate_disjoint_short_copy(false, &entry, ++ "jshort_disjoint_arraycopy"); ++ StubRoutines::_jshort_arraycopy = generate_conjoint_short_copy(false, entry, &entry_jshort_arraycopy, ++ "jshort_arraycopy"); ++ ++ StubRoutines::_jint_disjoint_arraycopy = generate_disjoint_int_oop_copy(false, false, &entry, ++ "jint_disjoint_arraycopy"); ++ StubRoutines::_jint_arraycopy = generate_conjoint_int_oop_copy(false, false, entry, ++ &entry_jint_arraycopy, "jint_arraycopy"); ++ ++ StubRoutines::_jlong_disjoint_arraycopy = generate_disjoint_long_oop_copy(false, false, &entry, ++ "jlong_disjoint_arraycopy"); ++ StubRoutines::_jlong_arraycopy = generate_conjoint_long_oop_copy(false, false, entry, ++ &entry_jlong_arraycopy, "jlong_arraycopy"); + + + if (UseCompressedOops) { +- StubRoutines::_oop_disjoint_arraycopy = generate_disjoint_int_oop_copy(false, true, "oop_disjoint_arraycopy"); +- StubRoutines::_oop_arraycopy = generate_conjoint_int_oop_copy(false, true, "oop_arraycopy"); ++ StubRoutines::_oop_disjoint_arraycopy = generate_disjoint_int_oop_copy(false, true, &entry, ++ "oop_disjoint_arraycopy"); ++ StubRoutines::_oop_arraycopy = generate_conjoint_int_oop_copy(false, true, entry, ++ &entry_oop_arraycopy, "oop_arraycopy"); + } else { +- StubRoutines::_oop_disjoint_arraycopy = generate_disjoint_long_oop_copy(false, true, "oop_disjoint_arraycopy"); +- StubRoutines::_oop_arraycopy = generate_conjoint_long_oop_copy(false, true, "oop_arraycopy"); +- } +- +- StubRoutines::_checkcast_arraycopy = generate_checkcast_copy("checkcast_arraycopy"); +- StubRoutines::_unsafe_arraycopy = generate_unsafe_copy("unsafe_arraycopy"); +- StubRoutines::_generic_arraycopy = generate_generic_copy("generic_arraycopy"); ++ StubRoutines::_oop_disjoint_arraycopy = generate_disjoint_long_oop_copy(false, true, &entry, ++ "oop_disjoint_arraycopy"); ++ StubRoutines::_oop_arraycopy = generate_conjoint_long_oop_copy(false, true, entry, ++ &entry_oop_arraycopy, "oop_arraycopy"); ++ } ++ ++ StubRoutines::_checkcast_arraycopy = generate_checkcast_copy("checkcast_arraycopy", &entry_checkcast_arraycopy); ++ StubRoutines::_unsafe_arraycopy = generate_unsafe_copy("unsafe_arraycopy", ++ entry_jbyte_arraycopy, ++ entry_jshort_arraycopy, ++ entry_jint_arraycopy, ++ entry_jlong_arraycopy); ++ StubRoutines::_generic_arraycopy = generate_generic_copy("generic_arraycopy", ++ entry_jbyte_arraycopy, ++ entry_jshort_arraycopy, ++ entry_jint_arraycopy, ++ entry_oop_arraycopy, ++ entry_jlong_arraycopy, ++ entry_checkcast_arraycopy); + + StubRoutines::_jbyte_fill = generate_fill(T_BYTE, false, "jbyte_fill"); + StubRoutines::_jshort_fill = generate_fill(T_SHORT, false, "jshort_fill"); +@@ -3069,20 +3087,6 @@ class StubGenerator: public StubCodeGene + } + }; // end class declaration + +-address StubGenerator::disjoint_byte_copy_entry = NULL; +-address StubGenerator::disjoint_short_copy_entry = NULL; +-address StubGenerator::disjoint_int_copy_entry = NULL; +-address StubGenerator::disjoint_long_copy_entry = NULL; +-address StubGenerator::disjoint_oop_copy_entry = NULL; +- +-address StubGenerator::byte_copy_entry = NULL; +-address StubGenerator::short_copy_entry = NULL; +-address StubGenerator::int_copy_entry = NULL; +-address StubGenerator::long_copy_entry = NULL; +-address StubGenerator::oop_copy_entry = NULL; +- +-address StubGenerator::checkcast_copy_entry = NULL; +- + void StubGenerator_generate(CodeBuffer* code, bool all) { + StubGenerator g(code, all); + } + + --- openjdk-6-6b27-1.12.6.orig/debian/patches/jexec.diff.in +++ openjdk-6-6b27-1.12.6/debian/patches/jexec.diff.in @@ -0,0 +1,15 @@ +diff -ru openjdk-6-6b08.bak/jdk/src/solaris/bin/jexec.c openjdk-6-6b08.orig/jdk/src/solaris/bin/jexec.c +--- openjdk/jdk/src/solaris/bin/jexec.c 2008-03-26 09:59:57.000000000 +0100 ++++ openjdk/jdk/src/solaris/bin/jexec.c 2008-04-03 17:14:10.000000000 +0200 +@@ -164,9 +164,10 @@ + + /* Get the path to the java binary, which is in a known position relative + * to our current position, which is in argv[0]. */ +- if (getJavaPath(argv[argi++], java, RELATIVE_DEPTH) != 0) { ++ if (getJavaPath("/@basedir@/jre/lib/jexec", java, RELATIVE_DEPTH) != 0) { + errorExit(errno, MISSING_JAVA_MSG); + } ++ argi++; + + nargv = (const char **) malloc((argc + 2) * (sizeof (const char *))); + nargv[nargc++] = java; --- openjdk-6-6b27-1.12.6.orig/debian/patches/ubuntu-security-0003-update-7162902-corba_fixes.patch +++ openjdk-6-6b27-1.12.6/debian/patches/ubuntu-security-0003-update-7162902-corba_fixes.patch @@ -0,0 +1,17 @@ +diff -Naurp openjdk-6-6b27-1.12.6.orig2/patches/openjdk/7162902-corba_fixes.patch openjdk-6-6b27-1.12.6/patches/openjdk/7162902-corba_fixes.patch +--- openjdk-6-6b27-1.12.6.orig2/patches/openjdk/7162902-corba_fixes.patch 2013-07-10 09:13:47.000000000 -0500 ++++ openjdk-6-6b27-1.12.6/patches/openjdk/7162902-corba_fixes.patch 2013-11-13 16:06:07.000000000 -0600 +@@ -1920,13 +1920,6 @@ diff -Nru openjdk.orig/corba/src/share/c + diff -Nru openjdk.orig/corba/src/share/classes/com/sun/corba/se/impl/transport/SelectorImpl.java openjdk/corba/src/share/classes/com/sun/corba/se/impl/transport/SelectorImpl.java + --- openjdk.orig/corba/src/share/classes/com/sun/corba/se/impl/transport/SelectorImpl.java 2012-09-21 19:59:14.000000000 +0100 + +++ openjdk/corba/src/share/classes/com/sun/corba/se/impl/transport/SelectorImpl.java 2012-10-30 14:13:12.264547523 +0000 +-@@ -1,5 +1,5 @@ +- /* +-- * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved. +-+ * Copyright (c) 2003, 2012, 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 + @@ -68,8 +68,8 @@ + private HashMap listenerThreads; + private HashMap readerThreads; --- openjdk-6-6b27-1.12.6.orig/debian/patches/hotspot-warn-no-errformat.diff +++ openjdk-6-6b27-1.12.6/debian/patches/hotspot-warn-no-errformat.diff @@ -0,0 +1,22 @@ +--- openjdk/hotspot/make/solaris/makefiles/gcc.make~ 2009-10-02 23:16:39.000000000 +0200 ++++ openjdk/hotspot/make/solaris/makefiles/gcc.make 2009-10-22 07:05:58.000000000 +0200 +@@ -109,7 +109,7 @@ + + + # Compiler warnings are treated as errors +-WARNINGS_ARE_ERRORS = -Werror ++WARNINGS_ARE_ERRORS = -Werror -Wno-error=format + # Enable these warnings. See 'info gcc' about details on these options + ADDITIONAL_WARNINGS = -Wpointer-arith -Wconversion -Wsign-compare + CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(ADDITIONAL_WARNINGS) +--- openjdk/hotspot/make/linux/makefiles/gcc.make~ 2009-10-22 06:58:44.000000000 +0200 ++++ openjdk/hotspot/make/linux/makefiles/gcc.make 2009-10-22 07:06:00.000000000 +0200 +@@ -98,7 +98,7 @@ + endif + + # Compiler warnings are treated as errors +-WARNINGS_ARE_ERRORS = -Werror ++WARNINGS_ARE_ERRORS = -Werror -Wno-error=format + + # Except for a few acceptable ones + # Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit --- openjdk-6-6b27-1.12.6.orig/debian/patches/icedtea-4953367.patch +++ openjdk-6-6b27-1.12.6/debian/patches/icedtea-4953367.patch @@ -0,0 +1,19 @@ +http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4953367 + +--- openjdk/jdk/src/solaris/native/java/lang/java_props_md.c~ 2010-07-13 14:45:01.623297272 +0200 ++++ openjdk/jdk/src/solaris/native/java/lang/java_props_md.c 2010-07-14 12:55:55.850797385 +0200 +@@ -410,12 +410,14 @@ + sprops.path_separator = ":"; + sprops.line_separator = "\n"; + ++#ifndef __linux__ + /* Append CDE message and resource search path to NLSPATH and + * XFILESEARCHPATH, in order to pick localized message for + * FileSelectionDialog window (Bug 4173641). + */ + setPathEnvironment("NLSPATH=/usr/dt/lib/nls/msg/%L/%N.cat"); + setPathEnvironment("XFILESEARCHPATH=/usr/dt/app-defaults/%L/Dt"); ++#endif + + return &sprops; + } --- openjdk-6-6b27-1.12.6.orig/debian/patches/ubuntu-security-0002-update-use-idx_t.patch +++ openjdk-6-6b27-1.12.6/debian/patches/ubuntu-security-0002-update-use-idx_t.patch @@ -0,0 +1,31 @@ +diff -Naurp openjdk-6-6b27-1.12.6/patches/use-idx_t.patch openjdk-6-6b27-1.12.6/patches/use-idx_t.patch +--- openjdk-6-6b27-1.12.6/patches/use-idx_t.patch 2013-07-10 09:13:47.000000000 -0500 ++++ openjdk-6-6b27-1.12.6/patches/use-idx_t.patch 2013-11-13 15:40:43.000000000 -0600 +@@ -65,19 +65,19 @@ + + inline bool BitMap::par_set_bit(idx_t bit) { + verify_index(bit); +-- volatile idx_t* const addr = word_addr(bit); +-+ volatile idx_t* const addr = (idx_t *) word_addr(bit); +- const idx_t mask = bit_mask(bit); +- idx_t old_val = *addr; ++- volatile bm_word_t* const addr = word_addr(bit); +++ volatile bm_word_t* const addr = (bm_word_t *) word_addr(bit); ++ const bm_word_t mask = bit_mask(bit); ++ bm_word_t old_val = *addr; + + @@ -56,7 +56,7 @@ + + inline bool BitMap::par_clear_bit(idx_t bit) { + verify_index(bit); +-- volatile idx_t* const addr = word_addr(bit); +-+ volatile idx_t* const addr = (idx_t *) word_addr(bit); +- const idx_t mask = ~bit_mask(bit); +- idx_t old_val = *addr; ++- volatile bm_word_t* const addr = word_addr(bit); +++ volatile bm_word_t* const addr = (bm_word_t *) word_addr(bit); ++ const bm_word_t mask = ~bit_mask(bit); ++ bm_word_t old_val = *addr; + + --- openjdk/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp.orig 2008-12-20 18:59:01.000000000 +0100 + +++ openjdk/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp 2009-03-11 21:48:47.000000000 +0100 --- openjdk-6-6b27-1.12.6.orig/debian/patches/2-sharkllvm30-PHI-128537-Call-ArrayRef-135265.patch +++ openjdk-6-6b27-1.12.6/debian/patches/2-sharkllvm30-PHI-128537-Call-ArrayRef-135265.patch @@ -0,0 +1,199 @@ +--- openjdk/hotspot/src/share/vm/shark/sharkBlock.cpp 2011-08-31 11:33:05.404964248 +0200 ++++ openjdk/hotspot/src/share/vm/shark/sharkBlock.cpp 2011-08-31 11:33:11.164992604 +0200 +@@ -1000,9 +1000,9 @@ + builder()->SetInsertPoint(done); + PHINode *result; + if (is_long) +- result = builder()->CreatePHI(SharkType::jlong_type(), "result"); ++ result = builder()->CreatePHI(SharkType::jlong_type(), 0, "result"); + else +- result = builder()->CreatePHI(SharkType::jint_type(), "result"); ++ result = builder()->CreatePHI(SharkType::jint_type(), 0, "result"); + result->addIncoming(special_result, special_case); + result->addIncoming(general_result, general_case); + +@@ -1105,7 +1105,7 @@ + builder()->CreateBr(done); + + builder()->SetInsertPoint(done); +- PHINode *result = builder()->CreatePHI(SharkType::jint_type(), "result"); ++ PHINode *result = builder()->CreatePHI(SharkType::jint_type(), 0, "result"); + result->addIncoming(LLVMValue::jint_constant(-1), lt); + result->addIncoming(LLVMValue::jint_constant(0), eq); + result->addIncoming(LLVMValue::jint_constant(1), gt); +@@ -1152,7 +1152,7 @@ + builder()->CreateBr(done); + + builder()->SetInsertPoint(done); +- PHINode *result = builder()->CreatePHI(SharkType::jint_type(), "result"); ++ PHINode *result = builder()->CreatePHI(SharkType::jint_type(), 0, "result"); + result->addIncoming(LLVMValue::jint_constant(-1), lt); + result->addIncoming(LLVMValue::jint_constant(0), eq); + result->addIncoming(LLVMValue::jint_constant(1), gt); +--- openjdk/hotspot/src/share/vm/shark/sharkBuilder.cpp 2011-08-31 11:33:05.404964248 +0200 ++++ openjdk/hotspot/src/share/vm/shark/sharkBuilder.cpp 2011-08-31 13:59:28.604517829 +0200 +@@ -465,7 +465,7 @@ + LLVMValue::bit_constant((flags & BARRIER_STORESTORE) ? 1 : 0), + LLVMValue::bit_constant(1)}; + +- return CreateCall(memory_barrier(), args, args + 5); ++ return CreateCall(memory_barrier(), llvm::makeArrayRef(args)); + } + + CallInst* SharkBuilder::CreateMemset(Value* dst, +--- openjdk/hotspot/src/share/vm/shark/sharkIntrinsics.cpp 2011-07-05 20:31:05.000000000 +0200 ++++ openjdk/hotspot/src/share/vm/shark/sharkIntrinsics.cpp 2011-08-31 11:33:11.200992924 +0200 +@@ -171,7 +171,7 @@ + builder()->CreateBr(done); + + builder()->SetInsertPoint(done); +- PHINode *phi = builder()->CreatePHI(a->getType(), "result"); ++ PHINode *phi = builder()->CreatePHI(a->getType(), 0, "result"); + phi->addIncoming(a, return_a); + phi->addIncoming(b, return_b); + +--- openjdk/hotspot/src/share/vm/shark/sharkNativeWrapper.cpp 2011-08-31 11:33:05.408964281 +0200 ++++ openjdk/hotspot/src/share/vm/shark/sharkNativeWrapper.cpp 2011-08-31 13:58:49.448323631 +0200 +@@ -149,7 +149,7 @@ + builder()->CreateBr(merge); + + builder()->SetInsertPoint(merge); +- phi = builder()->CreatePHI(box_type, "boxed_object"); ++ phi = builder()->CreatePHI(box_type, 0, "boxed_object"); + phi->addIncoming(ConstantPointerNull::get(box_type), null); + phi->addIncoming(box, not_null); + box = phi; +@@ -213,7 +213,7 @@ + PointerType::getUnqual( + FunctionType::get(return_type, param_types, false))); + Value *result = builder()->CreateCall( +- native_function, param_values.begin(), param_values.end()); ++ native_function, llvm::makeArrayRef(param_values)); + + // Start the transition back to _thread_in_Java + CreateSetThreadState(_thread_in_native_trans); +@@ -305,7 +305,7 @@ + builder()->CreateBr(merge); + + builder()->SetInsertPoint(merge); +- PHINode *phi = builder()->CreatePHI(SharkType::oop_type(), "result"); ++ PHINode *phi = builder()->CreatePHI(SharkType::oop_type(), 0, "result"); + phi->addIncoming(LLVMValue::null(), null); + phi->addIncoming(unboxed_result, not_null); + result = phi; +--- openjdk/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp 2011-07-05 20:31:05.000000000 +0200 ++++ openjdk/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp 2011-08-31 11:33:11.204992936 +0200 +@@ -290,7 +290,7 @@ + int exception_action) { + decache_for_VM_call(); + stack()->CreateSetLastJavaFrame(); +- llvm::CallInst *res = builder()->CreateCall(callee, args_start, args_end); ++ llvm::CallInst *res = builder()->CreateCall(callee, llvm::makeArrayRef(args_start, args_end)); + stack()->CreateResetLastJavaFrame(); + cache_after_VM_call(); + if (exception_action & EAM_CHECK) { +--- openjdk/hotspot/src/share/vm/shark/sharkState.cpp 2011-07-05 20:31:05.000000000 +0200 ++++ openjdk/hotspot/src/share/vm/shark/sharkState.cpp 2011-08-31 11:33:11.204992936 +0200 +@@ -131,7 +131,7 @@ + Value *this_method = this->method(); + Value *other_method = other->method(); + if (this_method != other_method) { +- PHINode *phi = builder()->CreatePHI(SharkType::methodOop_type(), "method"); ++ PHINode *phi = builder()->CreatePHI(SharkType::methodOop_type(), 0, "method"); + phi->addIncoming(this_method, this_block); + phi->addIncoming(other_method, other_block); + set_method(phi); +@@ -142,7 +142,7 @@ + Value *other_oop_tmp = other->oop_tmp(); + if (this_oop_tmp != other_oop_tmp) { + assert(this_oop_tmp && other_oop_tmp, "can't merge NULL with non-NULL"); +- PHINode *phi = builder()->CreatePHI(SharkType::oop_type(), "oop_tmp"); ++ PHINode *phi = builder()->CreatePHI(SharkType::oop_type(), 0, "oop_tmp"); + phi->addIncoming(this_oop_tmp, this_block); + phi->addIncoming(other_oop_tmp, other_block); + set_oop_tmp(phi); +@@ -287,7 +287,7 @@ + char name[18]; + + // Method +- set_method(builder()->CreatePHI(SharkType::methodOop_type(), "method")); ++ set_method(builder()->CreatePHI(SharkType::methodOop_type(), 0, "method")); + + // Local variables + for (int i = 0; i < max_locals(); i++) { +@@ -307,7 +307,7 @@ + case T_ARRAY: + snprintf(name, sizeof(name), "local_%d_", i); + value = SharkValue::create_phi( +- type, builder()->CreatePHI(SharkType::to_stackType(type), name)); ++ type, builder()->CreatePHI(SharkType::to_stackType(type), 0, name)); + break; + + case T_ADDRESS: +@@ -345,7 +345,7 @@ + case T_ARRAY: + snprintf(name, sizeof(name), "stack_%d_", i); + value = SharkValue::create_phi( +- type, builder()->CreatePHI(SharkType::to_stackType(type), name)); ++ type, builder()->CreatePHI(SharkType::to_stackType(type), 0, name)); + break; + + case T_ADDRESS: +--- openjdk/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp 2011-08-31 11:33:05.412964300 +0200 ++++ openjdk/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp 2011-08-31 11:33:11.204992936 +0200 +@@ -1180,7 +1180,7 @@ + builder()->CreateBr(loop); + builder()->SetInsertPoint(loop); + PHINode *itable_entry_addr = builder()->CreatePHI( +- SharkType::intptr_type(), "itable_entry_addr"); ++ SharkType::intptr_type(), 0, "itable_entry_addr"); + itable_entry_addr->addIncoming(itable_start, loop_entry); + + Value *itable_entry = builder()->CreateIntToPtr( +@@ -1526,7 +1526,7 @@ + // First merge + builder()->SetInsertPoint(merge1); + PHINode *nonnull_result = builder()->CreatePHI( +- SharkType::jint_type(), "nonnull_result"); ++ SharkType::jint_type(), 0, "nonnull_result"); + nonnull_result->addIncoming( + LLVMValue::jint_constant(IC_IS_INSTANCE), is_instance); + nonnull_result->addIncoming( +@@ -1537,7 +1537,7 @@ + // Second merge + builder()->SetInsertPoint(merge2); + PHINode *result = builder()->CreatePHI( +- SharkType::jint_type(), "result"); ++ SharkType::jint_type(), 0, "result"); + result->addIncoming(LLVMValue::jint_constant(IC_IS_NULL), null_block); + result->addIncoming(nonnull_result, nonnull_block); + +@@ -1713,7 +1713,7 @@ + builder()->SetInsertPoint(initialize); + if (tlab_object) { + PHINode *phi = builder()->CreatePHI( +- SharkType::oop_type(), "fast_object"); ++ SharkType::oop_type(), 0, "fast_object"); + phi->addIncoming(tlab_object, got_tlab); + phi->addIncoming(heap_object, got_heap); + fast_object = phi; +@@ -1773,7 +1773,7 @@ + builder()->SetInsertPoint(push_object); + } + if (fast_object) { +- PHINode *phi = builder()->CreatePHI(SharkType::oop_type(), "object"); ++ PHINode *phi = builder()->CreatePHI(SharkType::oop_type(), 0, "object"); + phi->addIncoming(fast_object, got_fast); + phi->addIncoming(slow_object, got_slow); + object = phi; +--- openjdk/hotspot/src/share/vm/shark/sharkValue.cpp 2011-07-05 20:31:05.000000000 +0200 ++++ openjdk/hotspot/src/share/vm/shark/sharkValue.cpp 2011-08-31 11:33:11.204992936 +0200 +@@ -233,7 +233,7 @@ + assert(type() == other->type(), "should be"); + assert(zero_checked() == other->zero_checked(), "should be"); + +- PHINode *phi = builder->CreatePHI(SharkType::to_stackType(type()), name); ++ PHINode *phi = builder->CreatePHI(SharkType::to_stackType(type()), 0, name); + phi->addIncoming(this->generic_value(), this_block); + phi->addIncoming(other->generic_value(), other_block); + return SharkValue::create_generic(type(), phi, zero_checked()); --- openjdk-6-6b27-1.12.6.orig/debian/patches/atk-wrapper-security.patch +++ openjdk-6-6b27-1.12.6/debian/patches/atk-wrapper-security.patch @@ -0,0 +1,12 @@ +--- openjdk/jdk/src/share/lib/security/java.security-linux~ 2013-07-11 16:36:14.504605120 +0200 ++++ openjdk/jdk/src/share/lib/security/java.security-linux 2013-07-11 16:38:13.085411964 +0200 +@@ -150,7 +150,8 @@ + com.sun.org.apache.xml.internal.utils.,\ + com.sun.org.apache.xml.internal.security.,\ + com.sun.org.glassfish.,\ +- org.jcp.xml.dsig.internal. ++ org.jcp.xml.dsig.internal.,\ ++ org.GNOME.Accessibility. + + # + # List of comma-separated packages that start with or equal this string --- openjdk-6-6b27-1.12.6.orig/debian/patches/accessible-toolkit.patch +++ openjdk-6-6b27-1.12.6/debian/patches/accessible-toolkit.patch @@ -0,0 +1,16 @@ +diff -uNr openjdk-orig/jdk/src/share/classes/java/awt/Toolkit.java openjdk/jdk/src/share/classes/java/awt/Toolkit.java +--- openjdk-orig/jdk/src/share/classes/java/awt/Toolkit.java 2009-01-23 11:59:47.000000000 -0500 ++++ openjdk/jdk/src/share/classes/java/awt/Toolkit.java 2009-01-23 12:05:20.000000000 -0500 +@@ -871,7 +871,11 @@ + return null; + } + }); +- loadAssistiveTechnologies(); ++ try { ++ loadAssistiveTechnologies(); ++ } catch ( AWTError error) { ++ // ignore silently ++ } + } finally { + // Make sure to always re-enable the JIT. + java.lang.Compiler.enable(); --- openjdk-6-6b27-1.12.6.orig/debian/patches/gcc-hotspot-opt-O0.diff +++ openjdk-6-6b27-1.12.6/debian/patches/gcc-hotspot-opt-O0.diff @@ -0,0 +1,11 @@ +--- openjdk/hotspot/make/linux/makefiles/gcc.make~ 2007-11-29 12:38:22.578339247 +0100 ++++ openjdk/hotspot/make/linux/makefiles/gcc.make 2007-11-29 12:42:28.742052571 +0100 +@@ -103,7 +103,7 @@ + CFLAGS_WARN/BYFILE = $(CFLAGS_WARN/$@)$(CFLAGS_WARN/DEFAULT$(CFLAGS_WARN/$@)) + + # The flags to use for an Optimized g++ build +-OPT_CFLAGS += -O3 ++OPT_CFLAGS += -O0 + + # Hotspot uses very unstrict aliasing turn this optimization off + OPT_CFLAGS += -fno-strict-aliasing --- openjdk-6-6b27-1.12.6.orig/debian/patches/1-sharkllvm30-de-const-type-135375.patch +++ openjdk-6-6b27-1.12.6/debian/patches/1-sharkllvm30-de-const-type-135375.patch @@ -0,0 +1,548 @@ +--- openjdk/hotspot/src/share/vm/shark/sharkBlock.cpp 2011-07-05 18:31:05.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/shark/sharkBlock.cpp 2011-08-30 21:15:49.115227000 +0000 +@@ -1040,8 +1040,8 @@ + object = builder()->CreateInlineOop(field->holder()); + + BasicType basic_type = field->type()->basic_type(); +- const Type *stack_type = SharkType::to_stackType(basic_type); +- const Type *field_type = SharkType::to_arrayType(basic_type); ++ Type *stack_type = SharkType::to_stackType(basic_type); ++ Type *field_type = SharkType::to_arrayType(basic_type); + + Value *addr = builder()->CreateAddressOfStructEntry( + object, in_ByteSize(field->offset_in_bytes()), +--- openjdk/hotspot/src/share/vm/shark/sharkBuilder.cpp 2011-07-05 18:31:05.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/shark/sharkBuilder.cpp 2011-08-30 21:15:49.315227000 +0000 +@@ -47,14 +47,14 @@ + // Helpers for accessing structures + Value* SharkBuilder::CreateAddressOfStructEntry(Value* base, + ByteSize offset, +- const Type* type, ++ Type* type, + const char* name) { + return CreateBitCast(CreateStructGEP(base, in_bytes(offset)), type, name); + } + + LoadInst* SharkBuilder::CreateValueOfStructEntry(Value* base, + ByteSize offset, +- const Type* type, ++ Type* type, + const char* name) { + return CreateLoad( + CreateAddressOfStructEntry( +@@ -71,7 +71,7 @@ + } + + Value* SharkBuilder::CreateArrayAddress(Value* arrayoop, +- const Type* element_type, ++ Type* element_type, + int element_bytes, + ByteSize base_offset, + Value* index, +@@ -114,7 +114,7 @@ + + // Helpers for creating intrinsics and external functions. + +-const Type* SharkBuilder::make_type(char type, bool void_ok) { ++Type* SharkBuilder::make_type(char type, bool void_ok) { + switch (type) { + // Primitive types + case 'c': +@@ -159,14 +159,14 @@ + } + } + +-const FunctionType* SharkBuilder::make_ftype(const char* params, ++FunctionType* SharkBuilder::make_ftype(const char* params, + const char* ret) { +- std::vector param_types; ++ std::vector param_types; + for (const char* c = params; *c; c++) + param_types.push_back(make_type(*c, false)); + + assert(strlen(ret) == 1, "should be"); +- const Type *return_type = make_type(*ret, true); ++ Type *return_type = make_type(*ret, true); + + return FunctionType::get(return_type, param_types, false); + } +@@ -565,7 +565,7 @@ + + Value* SharkBuilder::CreateInlineData(void* data, + size_t size, +- const Type* type, ++ Type* type, + const char* name) { + return CreateIntToPtr( + code_buffer_address(code_buffer()->inline_data(data, size)), +--- openjdk/hotspot/src/share/vm/shark/sharkBuilder.hpp 2011-07-05 18:31:05.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/shark/sharkBuilder.hpp 2011-08-30 19:52:46.735227001 +0000 +@@ -57,18 +57,18 @@ + public: + llvm::Value* CreateAddressOfStructEntry(llvm::Value* base, + ByteSize offset, +- const llvm::Type* type, ++ llvm::Type* type, + const char *name = ""); + llvm::LoadInst* CreateValueOfStructEntry(llvm::Value* base, + ByteSize offset, +- const llvm::Type* type, ++ llvm::Type* type, + const char *name = ""); + + // Helpers for accessing arrays. + public: + llvm::LoadInst* CreateArrayLength(llvm::Value* arrayoop); + llvm::Value* CreateArrayAddress(llvm::Value* arrayoop, +- const llvm::Type* element_type, ++ llvm::Type* element_type, + int element_bytes, + ByteSize base_offset, + llvm::Value* index, +@@ -85,8 +85,8 @@ + + // Helpers for creating intrinsics and external functions. + private: +- static const llvm::Type* make_type(char type, bool void_ok); +- static const llvm::FunctionType* make_ftype(const char* params, ++ static llvm::Type* make_type(char type, bool void_ok); ++ static llvm::FunctionType* make_ftype(const char* params, + const char* ret); + llvm::Value* make_function(const char* name, + const char* params, +@@ -211,7 +211,7 @@ + } + llvm::Value* CreateInlineData(void* data, + size_t size, +- const llvm::Type* type, ++ llvm::Type* type, + const char* name = ""); + + // Helpers for creating basic blocks. +--- openjdk/hotspot/src/share/vm/shark/sharkCacheDecache.cpp 2011-07-05 18:31:05.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/shark/sharkCacheDecache.cpp 2011-08-30 19:52:46.735227001 +0000 +@@ -230,7 +230,7 @@ + } + + Value* SharkOSREntryCacher::CreateAddressOfOSRBufEntry(int offset, +- const Type* type) { ++ Type* type) { + Value *result = builder()->CreateStructGEP(osr_buf(), offset); + if (type != SharkType::intptr_type()) + result = builder()->CreateBitCast(result, PointerType::getUnqual(type)); +@@ -254,12 +254,12 @@ + } + } + +-void SharkDecacher::write_value_to_frame(const Type* type, ++void SharkDecacher::write_value_to_frame(Type* type, + Value* value, + int offset) { + builder()->CreateStore(value, stack()->slot_addr(offset, type)); + } + +-Value* SharkCacher::read_value_from_frame(const Type* type, int offset) { ++Value* SharkCacher::read_value_from_frame(Type* type, int offset) { + return builder()->CreateLoad(stack()->slot_addr(offset, type)); + } +--- openjdk/hotspot/src/share/vm/shark/sharkCacheDecache.hpp 2011-07-05 18:31:05.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/shark/sharkCacheDecache.hpp 2011-08-30 19:52:46.745227001 +0000 +@@ -192,7 +192,7 @@ + + // Writer helper + protected: +- void write_value_to_frame(const llvm::Type* type, ++ void write_value_to_frame(llvm::Type* type, + llvm::Value* value, + int offset); + }; +@@ -321,7 +321,7 @@ + + // Writer helper + protected: +- llvm::Value* read_value_from_frame(const llvm::Type* type, int offset); ++ llvm::Value* read_value_from_frame(llvm::Type* type, int offset); + }; + + class SharkJavaCallCacher : public SharkCacher { +@@ -422,7 +422,7 @@ + + // Helper + private: +- llvm::Value* CreateAddressOfOSRBufEntry(int offset, const llvm::Type* type); ++ llvm::Value* CreateAddressOfOSRBufEntry(int offset, llvm::Type* type); + }; + + #endif // SHARE_VM_SHARK_SHARKCACHEDECACHE_HPP +--- openjdk/hotspot/src/share/vm/shark/sharkContext.cpp 2011-07-05 18:31:05.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/shark/sharkContext.cpp 2011-08-30 19:52:46.745227001 +0000 +@@ -76,7 +76,7 @@ + _zeroStack_type = PointerType::getUnqual( + ArrayType::get(jbyte_type(), sizeof(ZeroStack))); + +- std::vector params; ++ std::vector params; + params.push_back(methodOop_type()); + params.push_back(intptr_type()); + params.push_back(thread_type()); +--- openjdk/hotspot/src/share/vm/shark/sharkContext.hpp 2011-07-05 18:31:05.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/shark/sharkContext.hpp 2011-08-30 19:55:03.425227001 +0000 +@@ -68,118 +68,118 @@ + module()->getFunctionList().push_back(function); + } + llvm::Constant* get_external(const char* name, +- const llvm::FunctionType* sig) { ++ llvm::FunctionType* sig) { + return module()->getOrInsertFunction(name, sig); + } + + // Basic types + private: +- const llvm::Type* _void_type; +- const llvm::IntegerType* _bit_type; +- const llvm::IntegerType* _jbyte_type; +- const llvm::IntegerType* _jshort_type; +- const llvm::IntegerType* _jint_type; +- const llvm::IntegerType* _jlong_type; +- const llvm::Type* _jfloat_type; +- const llvm::Type* _jdouble_type; ++ llvm::Type* _void_type; ++ llvm::IntegerType* _bit_type; ++ llvm::IntegerType* _jbyte_type; ++ llvm::IntegerType* _jshort_type; ++ llvm::IntegerType* _jint_type; ++ llvm::IntegerType* _jlong_type; ++ llvm::Type* _jfloat_type; ++ llvm::Type* _jdouble_type; + + public: +- const llvm::Type* void_type() const { ++ llvm::Type* void_type() const { + return _void_type; + } +- const llvm::IntegerType* bit_type() const { ++ llvm::IntegerType* bit_type() const { + return _bit_type; + } +- const llvm::IntegerType* jbyte_type() const { ++ llvm::IntegerType* jbyte_type() const { + return _jbyte_type; + } +- const llvm::IntegerType* jshort_type() const { ++ llvm::IntegerType* jshort_type() const { + return _jshort_type; + } +- const llvm::IntegerType* jint_type() const { ++ llvm::IntegerType* jint_type() const { + return _jint_type; + } +- const llvm::IntegerType* jlong_type() const { ++ llvm::IntegerType* jlong_type() const { + return _jlong_type; + } +- const llvm::Type* jfloat_type() const { ++ llvm::Type* jfloat_type() const { + return _jfloat_type; + } +- const llvm::Type* jdouble_type() const { ++ llvm::Type* jdouble_type() const { + return _jdouble_type; + } +- const llvm::IntegerType* intptr_type() const { ++ llvm::IntegerType* intptr_type() const { + return LP64_ONLY(jlong_type()) NOT_LP64(jint_type()); + } + + // Compound types + private: +- const llvm::PointerType* _itableOffsetEntry_type; +- const llvm::PointerType* _jniEnv_type; +- const llvm::PointerType* _jniHandleBlock_type; +- const llvm::PointerType* _klass_type; +- const llvm::PointerType* _methodOop_type; +- const llvm::ArrayType* _monitor_type; +- const llvm::PointerType* _oop_type; +- const llvm::PointerType* _thread_type; +- const llvm::PointerType* _zeroStack_type; +- const llvm::FunctionType* _entry_point_type; +- const llvm::FunctionType* _osr_entry_point_type; ++ llvm::PointerType* _itableOffsetEntry_type; ++ llvm::PointerType* _jniEnv_type; ++ llvm::PointerType* _jniHandleBlock_type; ++ llvm::PointerType* _klass_type; ++ llvm::PointerType* _methodOop_type; ++ llvm::ArrayType* _monitor_type; ++ llvm::PointerType* _oop_type; ++ llvm::PointerType* _thread_type; ++ llvm::PointerType* _zeroStack_type; ++ llvm::FunctionType* _entry_point_type; ++ llvm::FunctionType* _osr_entry_point_type; + + public: +- const llvm::PointerType* itableOffsetEntry_type() const { ++ llvm::PointerType* itableOffsetEntry_type() const { + return _itableOffsetEntry_type; + } +- const llvm::PointerType* jniEnv_type() const { ++ llvm::PointerType* jniEnv_type() const { + return _jniEnv_type; + } +- const llvm::PointerType* jniHandleBlock_type() const { ++ llvm::PointerType* jniHandleBlock_type() const { + return _jniHandleBlock_type; + } +- const llvm::PointerType* klass_type() const { ++ llvm::PointerType* klass_type() const { + return _klass_type; + } +- const llvm::PointerType* methodOop_type() const { ++ llvm::PointerType* methodOop_type() const { + return _methodOop_type; + } +- const llvm::ArrayType* monitor_type() const { ++ llvm::ArrayType* monitor_type() const { + return _monitor_type; + } +- const llvm::PointerType* oop_type() const { ++ llvm::PointerType* oop_type() const { + return _oop_type; + } +- const llvm::PointerType* thread_type() const { ++ llvm::PointerType* thread_type() const { + return _thread_type; + } +- const llvm::PointerType* zeroStack_type() const { ++ llvm::PointerType* zeroStack_type() const { + return _zeroStack_type; + } +- const llvm::FunctionType* entry_point_type() const { ++ llvm::FunctionType* entry_point_type() const { + return _entry_point_type; + } +- const llvm::FunctionType* osr_entry_point_type() const { ++ llvm::FunctionType* osr_entry_point_type() const { + return _osr_entry_point_type; + } + + // Mappings + private: +- const llvm::Type* _to_stackType[T_CONFLICT]; +- const llvm::Type* _to_arrayType[T_CONFLICT]; ++ llvm::Type* _to_stackType[T_CONFLICT]; ++ llvm::Type* _to_arrayType[T_CONFLICT]; + + private: +- const llvm::Type* map_type(const llvm::Type* const* table, ++ llvm::Type* map_type(llvm::Type* const* table, + BasicType type) const { + assert(type >= 0 && type < T_CONFLICT, "unhandled type"); +- const llvm::Type* result = table[type]; ++ llvm::Type* result = table[type]; + assert(type != NULL, "unhandled type"); + return result; + } + + public: +- const llvm::Type* to_stackType(BasicType type) const { ++ llvm::Type* to_stackType(BasicType type) const { + return map_type(_to_stackType, type); + } +- const llvm::Type* to_arrayType(BasicType type) const { ++ llvm::Type* to_arrayType(BasicType type) const { + return map_type(_to_arrayType, type); + } + +--- openjdk/hotspot/src/share/vm/shark/sharkNativeWrapper.cpp 2011-07-05 18:31:05.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/shark/sharkNativeWrapper.cpp 2011-08-30 21:16:20.725227002 +0000 +@@ -83,9 +83,9 @@ + } + + // Start building the argument list +- std::vector param_types; ++ std::vector param_types; + std::vector param_values; +- const PointerType *box_type = PointerType::getUnqual(SharkType::oop_type()); ++ PointerType *box_type = PointerType::getUnqual(SharkType::oop_type()); + + // First argument is the JNIEnv + param_types.push_back(SharkType::jniEnv_type()); +@@ -170,7 +170,7 @@ + // fall through + + default: +- const Type *param_type = SharkType::to_stackType(arg_type(i)); ++ Type *param_type = SharkType::to_stackType(arg_type(i)); + + param_types.push_back(param_type); + param_values.push_back( +@@ -201,7 +201,7 @@ + + // Make the call + BasicType result_type = target()->result_type(); +- const Type* return_type; ++ Type* return_type; + if (result_type == T_VOID) + return_type = SharkType::void_type(); + else if (is_returning_oop()) +--- openjdk/hotspot/src/share/vm/shark/sharkStack.cpp 2011-07-05 18:31:05.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/shark/sharkStack.cpp 2011-08-30 19:52:46.745227001 +0000 +@@ -163,7 +163,7 @@ + } + + Value* SharkStack::slot_addr(int offset, +- const Type* type, ++ Type* type, + const char* name) const { + bool needs_cast = type && type != SharkType::intptr_type(); + +--- openjdk/hotspot/src/share/vm/shark/sharkStack.hpp 2011-07-05 18:31:05.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/shark/sharkStack.hpp 2011-08-30 19:52:46.755227001 +0000 +@@ -204,7 +204,7 @@ + // Addresses of things in the frame + public: + llvm::Value* slot_addr(int offset, +- const llvm::Type* type = NULL, ++ llvm::Type* type = NULL, + const char* name = "") const; + + llvm::Value* monitor_addr(int index) const { +--- openjdk/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp 2011-07-05 18:31:05.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp 2011-08-30 19:52:46.755227001 +0000 +@@ -829,7 +829,7 @@ + builder()->CreateArrayAddress( + array->jarray_value(), basic_type, index->jint_value())); + +- const Type *stack_type = SharkType::to_stackType(basic_type); ++ Type *stack_type = SharkType::to_stackType(basic_type); + if (value->getType() != stack_type) + value = builder()->CreateIntCast(value, stack_type, basic_type != T_CHAR); + +@@ -916,7 +916,7 @@ + ShouldNotReachHere(); + } + +- const Type *array_type = SharkType::to_arrayType(basic_type); ++ Type *array_type = SharkType::to_arrayType(basic_type); + if (value->getType() != array_type) + value = builder()->CreateIntCast(value, array_type, basic_type != T_CHAR); + +--- openjdk/hotspot/src/share/vm/shark/sharkType.hpp 2011-07-05 18:31:05.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/shark/sharkType.hpp 2011-08-30 19:52:46.755227001 +0000 +@@ -40,82 +40,82 @@ + + // Basic types + public: +- static const llvm::Type* void_type() { ++ static llvm::Type* void_type() { + return context().void_type(); + } +- static const llvm::IntegerType* bit_type() { ++ static llvm::IntegerType* bit_type() { + return context().bit_type(); + } +- static const llvm::IntegerType* jbyte_type() { ++ static llvm::IntegerType* jbyte_type() { + return context().jbyte_type(); + } +- static const llvm::IntegerType* jshort_type() { ++ static llvm::IntegerType* jshort_type() { + return context().jshort_type(); + } +- static const llvm::IntegerType* jint_type() { ++ static llvm::IntegerType* jint_type() { + return context().jint_type(); + } +- static const llvm::IntegerType* jlong_type() { ++ static llvm::IntegerType* jlong_type() { + return context().jlong_type(); + } +- static const llvm::Type* jfloat_type() { ++ static llvm::Type* jfloat_type() { + return context().jfloat_type(); + } +- static const llvm::Type* jdouble_type() { ++ static llvm::Type* jdouble_type() { + return context().jdouble_type(); + } +- static const llvm::IntegerType* intptr_type() { ++ static llvm::IntegerType* intptr_type() { + return context().intptr_type(); + } + + // Compound types + public: +- static const llvm::PointerType* itableOffsetEntry_type() { ++ static llvm::PointerType* itableOffsetEntry_type() { + return context().itableOffsetEntry_type(); + } +- static const llvm::PointerType* jniEnv_type() { ++ static llvm::PointerType* jniEnv_type() { + return context().jniEnv_type(); + } +- static const llvm::PointerType* jniHandleBlock_type() { ++ static llvm::PointerType* jniHandleBlock_type() { + return context().jniHandleBlock_type(); + } +- static const llvm::PointerType* klass_type() { ++ static llvm::PointerType* klass_type() { + return context().klass_type(); + } +- static const llvm::PointerType* methodOop_type() { ++ static llvm::PointerType* methodOop_type() { + return context().methodOop_type(); + } +- static const llvm::ArrayType* monitor_type() { ++ static llvm::ArrayType* monitor_type() { + return context().monitor_type(); + } +- static const llvm::PointerType* oop_type() { ++ static llvm::PointerType* oop_type() { + return context().oop_type(); + } +- static const llvm::PointerType* thread_type() { ++ static llvm::PointerType* thread_type() { + return context().thread_type(); + } +- static const llvm::PointerType* zeroStack_type() { ++ static llvm::PointerType* zeroStack_type() { + return context().zeroStack_type(); + } +- static const llvm::FunctionType* entry_point_type() { ++ static llvm::FunctionType* entry_point_type() { + return context().entry_point_type(); + } +- static const llvm::FunctionType* osr_entry_point_type() { ++ static llvm::FunctionType* osr_entry_point_type() { + return context().osr_entry_point_type(); + } + + // Mappings + public: +- static const llvm::Type* to_stackType(BasicType type) { ++ static llvm::Type* to_stackType(BasicType type) { + return context().to_stackType(type); + } +- static const llvm::Type* to_stackType(ciType* type) { ++ static llvm::Type* to_stackType(ciType* type) { + return to_stackType(type->basic_type()); + } +- static const llvm::Type* to_arrayType(BasicType type) { ++ static llvm::Type* to_arrayType(BasicType type) { + return context().to_arrayType(type); + } +- static const llvm::Type* to_arrayType(ciType* type) { ++ static llvm::Type* to_arrayType(ciType* type) { + return to_arrayType(type->basic_type()); + } + }; +--- openjdk/hotspot/src/share/vm/shark/sharkFunction.hpp 2011-08-30 20:23:51.805227002 +0000 ++++ openjdk/hotspot/src/share/vm/shark/sharkFunction.hpp 2011-08-30 20:24:26.455227000 +0000 +@@ -91,7 +91,7 @@ + bool is_osr() const { + return flow()->is_osr_flow(); + } +- const llvm::FunctionType* entry_point_type() const { ++ llvm::FunctionType* entry_point_type() const { + if (is_osr()) + return SharkType::osr_entry_point_type(); + else --- openjdk-6-6b27-1.12.6.orig/debian/patches/enumipv6-fix.patch +++ openjdk-6-6b27-1.12.6/debian/patches/enumipv6-fix.patch @@ -0,0 +1,12 @@ +diff -ru openjdk-orig/jdk/src/solaris/native/java/net/NetworkInterface.c openjdk/jdk/src/solaris/native/java/net/NetworkInterface.c +--- openjdk.orig/jdk/src/solaris/native/java/net/NetworkInterface.c 2011-07-05 14:36:10.000000000 -0400 ++++ openjdk/jdk/src/solaris/native/java/net/NetworkInterface.c 2012-02-01 11:54:32.000000000 -0500 +@@ -811,7 +811,7 @@ + uint8_t ipv6addr[16]; + + if ((f = fopen(_PATH_PROCNET_IFINET6, "r")) != NULL) { +- while (fscanf(f, "%4s%4s%4s%4s%4s%4s%4s%4s %02x %02x %02x %02x %20s\n", ++ while (fscanf(f, "%4s%4s%4s%4s%4s%4s%4s%4s %x %x %x %x %20s\n", + addr6p[0], addr6p[1], addr6p[2], addr6p[3], + addr6p[4], addr6p[5], addr6p[6], addr6p[7], + &if_idx, &plen, &scope, &dad_status, devname) != EOF) { --- openjdk-6-6b27-1.12.6.orig/debian/patches/set-exec-name-original.diff +++ openjdk-6-6b27-1.12.6/debian/patches/set-exec-name-original.diff @@ -0,0 +1,46 @@ +--- openjdk/hotspot/src/os/posix/launcher/java_md.c.orig ++++ openjdk/hotspot/src/os/posix/launcher/java_md.c +@@ -967,8 +967,19 @@ + char buf[PATH_MAX+1]; + int len = readlink(self, buf, PATH_MAX); + if (len >= 0) { ++ const char* prefixes[] = {"/cow/", "/persistmnt/", "/rofs/", "/rwfs/", "/squashmnt/", NULL}; ++ const char **prefix; ++ size_t prefix_len = 0; + buf[len] = '\0'; /* readlink doesn't nul terminate */ +- exec_path = JLI_StringDup(buf); ++ for (prefix = prefixes; *prefix; prefix++) { ++ prefix_len = strlen(buf) < strlen(*prefix) ? strlen(buf) : strlen(*prefix); ++ if (!strncmp(*prefix, buf, prefix_len)) { ++ prefix_len--; ++ break; ++ } ++ prefix_len = 0; ++ } ++ exec_path = JLI_StringDup(buf + prefix_len); + } + } + #else /* !__sun && !__linux */ +--- openjdk/jdk/src/solaris/bin/java_md.c.orig ++++ openjdk/jdk/src/solaris/bin/java_md.c +@@ -884,8 +884,19 @@ + char buf[PATH_MAX+1]; + int len = readlink(self, buf, PATH_MAX); + if (len >= 0) { ++ const char* prefixes[] = {"/cow/", "/persistmnt/", "/rofs/", "/rwfs/", "/squashmnt/", NULL}; ++ const char **prefix; ++ size_t prefix_len = 0; + buf[len] = '\0'; /* readlink doesn't nul terminate */ +- exec_path = JLI_StringDup(buf); ++ for (prefix = prefixes; *prefix; prefix++) { ++ prefix_len = strlen(buf) < strlen(*prefix) ? strlen(buf) : strlen(*prefix); ++ if (!strncmp(*prefix, buf, prefix_len)) { ++ prefix_len--; ++ break; ++ } ++ prefix_len = 0; ++ } ++ exec_path = JLI_StringDup(buf + prefix_len); + } + } + #else /* !__sun && !__linux */ --- openjdk-6-6b27-1.12.6.orig/debian/patches/sane-library-paths.patch +++ openjdk-6-6b27-1.12.6/debian/patches/sane-library-paths.patch @@ -0,0 +1,36 @@ +Description: fall back to the built-in system library path + If a native library that's been requested can't be found in any of the + known paths, fall back to looking it up without a path - i.e., trust + dlopen() to do the right thing. This addresses the problem with failing + to load libraries when using multiarch. +Author: Steve Langasek +Bug-Ubuntu: https://bugs.launchpad.net/bugs/737603 + +Index: openjdk/jdk/src/share/classes/java/lang/ClassLoader.java +=================================================================== +--- openjdk.orig/jdk/src/share/classes/java/lang/ClassLoader.java ++++ openjdk/jdk/src/share/classes/java/lang/ClassLoader.java +@@ -1676,6 +1676,10 @@ + return; + } + } ++ File libfile = new File(System.mapLibraryName(name)); ++ if (loadLibrary0(fromClass, libfile)) { ++ return; ++ } + } + // Oops, it failed + throw new UnsatisfiedLinkError("no " + name + " in java.library.path"); +Index: openjdk/hotspot/src/os/linux/vm/os_linux.cpp +=================================================================== +--- openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp ++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp +@@ -352,7 +352,7 @@ + * ... + * 7: The default directories, normally /lib and /usr/lib. + */ +-#define DEFAULT_LIBPATH "/usr/lib/jni:/lib:/usr/lib" ++#define DEFAULT_LIBPATH "/usr/lib/jni" + + #define EXTENSIONS_DIR "/lib/ext" + #define ENDORSED_DIR "/lib/endorsed" --- openjdk-6-6b27-1.12.6.orig/debian/patches/fontconfig-korean-nanum.diff +++ openjdk-6-6b27-1.12.6/debian/patches/fontconfig-korean-nanum.diff @@ -0,0 +1,266 @@ +# used for Debian wheezy and Ubuntu 12.04 LTS or newer + +--- openjdk/jdk/src/solaris/classes/sun/awt/fontconfigs/linux.fontconfig.Ubuntu.properties.orig ++++ openjdk/jdk/src/solaris/classes/sun/awt/fontconfigs/linux.fontconfig.Ubuntu.properties +@@ -60,200 +60,140 @@ + serif.plain.japanese-kochi=Kochi Mincho + serif.plain.japanese-sazanami=Sazanami Mincho + serif.plain.japanese-vlgothic=Sazanami Mincho +-serif.plain.korean-baekmuk=Baekmuk Batang +-#serif.plain.korean-baekmuk.motif=Baekmuk Batang +-serif.plain.korean-un=UnBatang +-#serif.plain.korean-un.motif=UnBatang ++serif.plain.korean-nanum=NanumMyeongjo + + serif.bold.latin-1=DejaVu Serif Bold + #serif.bold.latin-1.motif=LuxiSerif-Bold + serif.bold.japanese-kochi=Kochi Mincho + serif.bold.japanese-sazanami=Sazanami Mincho + serif.bold.japanese-vlgothic=Sazanami Mincho +-serif.bold.korean-baekmuk=Baekmuk Batang +-#serif.bold.korean-baekmuk.motif=Baekmuk Batang +-serif.bold.korean-un=UnBatang Bold +-#serif.bold.korean-un.motif=UnBatang Bold ++serif.bold.korean-nanum=NanumMyeongjo Bold + + serif.italic.latin-1=DejaVu Serif Oblique + #serif.italic.latin-1.motif=LuxiSerif-Oblique + serif.italic.japanese-kochi=Kochi Mincho + serif.italic.japanese-sazanami=Sazanami Mincho + serif.italic.japanese-vlgothic=Sazanami Mincho +-serif.italic.korean-baekmuk=Baekmuk Batang +-#serif.italic.korean-baekmuk.motif=Baekmuk Batang +-serif.italic.korean-un=UnBatang +-#serif.italic.korean-un.motif=UnBatang ++serif.italic.korean-nanum=NanumMyeongjo + + serif.bolditalic.latin-1=DejaVu Serif Bold Oblique + #serif.bolditalic.latin-1.motif=LuxiSerif-BoldOblique + serif.bolditalic.japanese-kochi=Kochi Mincho + serif.bolditalic.japanese-sazanami=Sazanami Mincho + serif.bolditalic.japanese-vlgothic=Sazanami Mincho +-serif.bolditalic.korean-baekmuk=Baekmuk Batang +-#serif.bolditalic.korean-baekmuk.motif=Baekmuk Batang +-serif.bolditalic.korean-un=UnBatang Bold +-#serif.bolditalic.korean-un.motif=UnBatang Bold ++serif.bolditalic.korean-nanum=NanumMyeongjo Bold + + sansserif.plain.latin-1=DejaVu Sans + #sansserif.plain.latin-1.motif=LuxiSans-Regular + sansserif.plain.japanese-kochi=Kochi Gothic + sansserif.plain.japanese-sazanami=Sazanami Gothic + sansserif.plain.japanese-vlgothic=VL PGothic +-sansserif.plain.korean-baekmuk=Baekmuk Gulim +-#sansserif.plain.korean-baekmuk.motif=Baekmuk Gulim +-sansserif.plain.korean-un=UnDotum +-#sansserif.plain.korean-un.motif=UnDotum ++sansserif.plain.korean-nanum=NanumGothic + + sansserif.bold.latin-1=DejaVu Sans Bold + #sansserif.bold.latin-1.motif=LuxiSans-Bold + sansserif.bold.japanese-kochi=Kochi Gothic + sansserif.bold.japanese-sazanami=Sazanami Gothic + sansserif.bold.japanese-vlgothic=VL PGothic +-sansserif.bold.korean-baekmuk=Baekmuk Gulim +-#sansserif.bold.korean-baekmuk.motif=Baekmuk Gulim +-sansserif.bold.korean-un=UnDotum Bold +-#sansserif.bold.korean-un.motif=UnDotum Bold ++sansserif.bold.korean-nanum=NanumGothic Bold + + sansserif.italic.latin-1=DejaVu Sans Oblique + #sansserif.italic.latin-1.motif=LuxiSans-Oblique + sansserif.italic.japanese-kochi=Kochi Gothic + sansserif.italic.japanese-sazanami=Sazanami Gothic + sansserif.italic.japanese-vlgothic=VL PGothic +-sansserif.italic.korean-baekmuk=Baekmuk Gulim +-#sansserif.italic.korean-baekmuk.motif=Baekmuk Gulim +-sansserif.italic.korean-un=UnDotum +-#sansserif.italic.korean-un.motif=UnDotum ++sansserif.italic.korean-nanum=NanumGothic + + sansserif.bolditalic.latin-1=DejaVu Sans Bold Oblique + #sansserif.bolditalic.latin-1.motif=LuxiSans-BoldOblique + sansserif.bolditalic.japanese-kochi=Kochi Gothic + sansserif.bolditalic.japanese-sazanami=Sazanami Gothic + sansserif.bolditalic.japanese-vlgothic=VL PGothic +-sansserif.bolditalic.korean-baekmuk=Baekmuk Gulim +-#sansserif.bolditalic.korean-baekmuk.motif=Baekmuk Gulim +-sansserif.bolditalic.korean-un=UnDotum Bold +-#sansserif.bolditalic.korean-un.motif=UnDotum Bold ++sansserif.bolditalic.korean-nanum=NanumGothic Bold + + monospaced.plain.latin-1=DejaVu Sans Mono + #monospaced.plain.latin-1.motif=LuxiMono-Regular + monospaced.plain.japanese-kochi=Kochi Gothic + monospaced.plain.japanese-sazanami=Sazanami Gothic + monospaced.plain.japanese-vlgothic=VL Gothic +-monospaced.plain.korean-baekmuk=Baekmuk Gulim +-#monospaced.plain.korean-baekmuk.motif=Baekmuk Gulim +-monospaced.plain.korean-un=UnDotum +-#monospaced.plain.korean-un.motif=UnDotum ++monospaced.plain.korean-nanum=NanumGothicCoding + + monospaced.bold.latin-1=DejaVu Sans Mono Bold + #monospaced.bold.latin-1.motif=LuxiMono-Bold + monospaced.bold.japanese-kochi=Kochi Gothic + monospaced.bold.japanese-sazanami=Sazanami Gothic + monospaced.bold.japanese-vlgothic=VL Gothic +-monospaced.bold.korean-baekmuk=Baekmuk Gulim +-#monospaced.bold.korean-baekmuk.motif=Baekmuk Gulim +-monospaced.bold.korean-un=UnDotum Bold +-#monospaced.bold.korean-un.motif=UnDotum Bold ++monospaced.bold.korean-nanum=NanumGothicCoding Bold + + monospaced.italic.latin-1=DejaVu Sans Mono Oblique + #monospaced.italic.latin-1.motif=LuxiMono-Oblique + monospaced.italic.japanese-kochi=Kochi Gothic + monospaced.italic.japanese-sazanami=Sazanami Gothic + monospaced.italic.japanese-vlgothic=VL Gothic +-monospaced.italic.korean-baekmuk=Baekmuk Gulim +-#monospaced.italic.korean-baekmuk.motif=Baekmuk Gulim +-monospaced.italic.korean-un=UnDotum +-#monospaced.italic.korean-un.motif=UnDotum ++monospaced.italic.korean-nanum=NanumGothicCoding + + monospaced.bolditalic.latin-1=DejaVu Sans Mono Bold Oblique + #monospaced.bolditalic.latin-1.motif=LuxiMono-BoldOblique + monospaced.bolditalic.japanese-kochi=Kochi Gothic + monospaced.bolditalic.japanese-sazanami=Sazanami Gothic + monospaced.bolditalic.japanese-vlgothic=VL Gothic +-monospaced.bolditalic.korean-baekmuk=Baekmuk Gulim +-#monospaced.bolditalic.korean-baekmuk.motif=Baekmuk Gulim +-monospaced.bolditalic.korean-un=UnDotum Bold +-#monospaced.bolditalic.korean-un.motif=UnDotum Bold ++monospaced.bolditalic.korean-nanum=NanumGothicCoding Bold + + dialog.plain.latin-1=DejaVu Sans + #dialog.plain.latin-1.motif=LuxiSans-Regular + dialog.plain.japanese-kochi=Kochi Gothic + dialog.plain.japanese-sazanami=Sazanami Gothic + dialog.plain.japanese-vlgothic=VL PGothic +-dialog.plain.korean-baekmuk=Baekmuk Gulim +-#dialog.plain.korean-baekmuk.motif=Baekmuk Gulim +-dialog.plain.korean-un=UnDotum +-#dialog.plain.korean-un.motif=UnDotum ++dialog.plain.korean-nanum=NanumGothic + + dialog.bold.latin-1=DejaVu Sans Bold + #dialog.bold.latin-1.motif=LuxiSans-Bold + dialog.bold.japanese-kochi=Kochi Gothic + dialog.bold.japanese-sazanami=Sazanami Gothic + dialog.bold.japanese-vlgothic=VL PGothic +-dialog.bold.korean-baekmuk=Baekmuk Gulim +-#dialog.bold.korean-baekmuk.motif=Baekmuk Gulim +-dialog.bold.korean-un=UnDotum Bold +-#dialog.bold.korean-un.motif=UnDotum Bold ++dialog.bold.korean-nanum=NanumGothic Bold + + dialog.italic.latin-1=DejaVu Sans Oblique + #dialog.italic.latin-1.motif=LuxiSans-Oblique + dialog.italic.japanese-kochi=Kochi Gothic + dialog.italic.japanese-sazanami=Sazanami Gothic + dialog.italic.japanese-vlgothic=VL PGothic +-dialog.italic.korean-baekmuk=Baekmuk Gulim +-#dialog.italic.korean-baekmuk.motif=Baekmuk Gulim +-dialog.italic.korean-un=UnDotum +-#dialog.italic.korean-un.motif=UnDotum ++dialog.italic.korean-nanum=NanumGothic + + dialog.bolditalic.latin-1=DejaVu Sans Bold Oblique + #dialog.bolditalic.latin-1.motif=LuxiSans-BoldOblique + dialog.bolditalic.japanese-kochi=Kochi Gothic + dialog.bolditalic.japanese-sazanami=Sazanami Gothic + dialog.bolditalic.japanese-vlgothic=VL PGothic +-dialog.bolditalic.korean-baekmuk=Baekmuk Gulim +-#dialog.bolditalic.korean-baekmuk.motif=Baekmuk Gulim +-dialog.bolditalic.korean-un=UnDotum Bold +-#dialog.bolditalic.korean-un.motif=UnDotum Bold ++dialog.bolditalic.korean-nanum=NanumGothic Bold + + dialoginput.plain.latin-1=DejaVu Sans Mono + #dialoginput.plain.latin-1.motif=LuxiMono-Regular + dialoginput.plain.japanese-kochi=Kochi Gothic + dialoginput.plain.japanese-sazanami=Sazanami Gothic + dialoginput.plain.japanese-vlgothic=VL Gothic +-dialoginput.plain.korean-baekmuk=Baekmuk Gulim +-#dialoginput.plain.korean-baekmuk.motif=Baekmuk Gulim +-dialoginput.plain.korean-un=UnDotum +-#dialoginput.plain.korean-un.motif=UnDotum ++dialoginput.plain.korean-nanum=NanumGothic + + dialoginput.bold.latin-1=DejaVu Sans Mono Bold + #dialoginput.bold.latin-1.motif=LuxiMono-Bold + dialoginput.bold.japanese-kochi=Kochi Gothic + dialoginput.bold.japanese-sazanami=Sazanami Gothic + dialoginput.bold.japanese-vlgothic=VL Gothic +-dialoginput.bold.korean-baekmuk=Baekmuk Gulim +-#dialoginput.bold.korean-baekmuk.motif=Baekmuk Gulim +-dialoginput.bold.korean-un=UnDotum Bold +-#dialoginput.bold.korean-un.motif=UnDotum Bold ++dialoginput.bold.korean-nanum=NanumGothic Bold + + dialoginput.italic.latin-1=DejaVu Sans Mono Oblique + #dialoginput.italic.latin-1.motif=LuxiMono-Oblique + dialoginput.italic.japanese-kochi=Kochi Gothic + dialoginput.italic.japanese-sazanami=Sazanami Gothic + dialoginput.italic.japanese-vlgothic=VL Gothic +-dialoginput.italic.korean-baekmuk=Baekmuk Gulim +-#dialoginput.italic.korean-baekmuk.motif=Baekmuk Gulim +-dialoginput.italic.korean-un=UnDotum +-#dialoginput.italic.korean-un.motif=UnDotum ++dialoginput.italic.korean-nanum=NanumGothic + + dialoginput.bolditalic.latin-1=DejaVu Sans Mono Bold Oblique + #dialoginput.bolditalic.latin-1.motif=LuxiMono-BoldOblique + dialoginput.bolditalic.japanese-kochi=Kochi Gothic + dialoginput.bolditalic.japanese-sazanami=Sazanami Gothic + dialoginput.bolditalic.japanese-vlgothic=VL Gothic +-dialoginput.bolditalic.korean-baekmuk=Baekmuk Gulim +-#dialoginput.bolditalic.korean-baekmuk.motif=Baekmuk Gulim +-dialoginput.bolditalic.korean-un=UnDotum Bold +-#dialoginput.bolditalic.korean-un.motif=UnDotum Bold ++dialoginput.bolditalic.korean-nanum=NanumGothic Bold + + # Search Sequences + +@@ -262,11 +202,11 @@ + sequence.allfonts.GB2312=latin-1,wqy-microhei,umingcn,shanheisun,wqy-zenhei + sequence.allfonts.GBK=latin-1,wqy-microhei,umingcn,shanheisun,wqy-zenhei + sequence.allfonts.x-euc-jp-linux=latin-1,japanese-vlgothic,japanese-sazanami,japanese-kochi +-sequence.allfonts.EUC-KR=latin-1,korean-un,korean-baekmuk ++sequence.allfonts.EUC-KR=latin-1,korean-nanum + sequence.allfonts.Big5=latin-1,umingtw,shanheisun,wqy-microhei,wqy-zenhei + sequence.allfonts.Big5-HKSCS=latin-1,uminghk,shanheisun,wqy-microhei,wqy-zenhei +-#sequence.fallback=uminghk,shanheisun,wqy-zenhei,japanese-vlgothic,japanese-kochi,japanese-sazanami,korean-un,korean-baekmuk,bengali,gujarati,hindi,oriya,punjabi,malayalam,tamil,telugu,sinhala +-sequence.fallback=wqy-microhei,uminghk,shanheisun,wqy-zenhei,japanese-vlgothic,japanese-sazanami,japanese-kochi,korean-un,korean-baekmuk,bengali,gujarati,hindi,oriya,punjabi,tamil,telugu ++#sequence.fallback=uminghk,shanheisun,wqy-zenhei,japanese-vlgothic,japanese-kochi,japanese-sazanami,korean-un,bengali,gujarati,hindi,oriya,punjabi,malayalam,tamil,telugu,sinhala ++sequence.fallback=wqy-microhei,uminghk,shanheisun,wqy-zenhei,japanese-vlgothic,japanese-sazanami,japanese-kochi,korean-nanum,bengali,gujarati,hindi,oriya,punjabi,tamil,telugu + + # Exclusion Ranges + +@@ -298,12 +238,12 @@ + + filename.WenQuanYi_Micro_Hei=/usr/share/fonts/truetype/wqy/wqy-microhei.ttc + filename.WenQuanYi_Zen_Hei=/usr/share/fonts/truetype/wqy/wqy-zenhei.ttc +-filename.Baekmuk_Batang=/usr/share/fonts/truetype/baekmuk/batang.ttf +-filename.UnBatang=/usr/share/fonts/truetype/unfonts/UnBatang.ttf +-filename.UnBatang_Bold=/usr/share/fonts/truetype/unfonts/UnBatangBold.ttf +-filename.Baekmuk_Gulim=/usr/share/fonts/truetype/baekmuk/gulim.ttf +-filename.UnDotum=/usr/share/fonts/truetype/unfonts/UnDotum.ttf +-filename.UnDotum_Bold=/usr/share/fonts/truetype/unfonts/UnDotumBold.ttf ++filename.NanumMyeongjo=/usr/share/fonts/truetype/nanum/NanumMyeongjo.ttf ++filename.NanumMyeongjo_Bold=/usr/share/fonts/truetype/nanum/NanumMyeongjoBold.ttf ++filename.NanumGothic=/usr/share/fonts/truetype/nanum/NanumGothic.ttf ++filename.NanumGothic_Bold=/usr/share/fonts/truetype/nanum/NanumGothicBold.ttf ++filename.NanumGothicCoding=/usr/share/fonts/truetype/nanum-coding/NanumGothic_Coding.ttf ++filename.NanumGothicCoding_Bold=/usr/share/fonts/truetype/nanum-coding/NanumGothic_Coding_Bold.ttf + filename.Kochi_Gothic=/usr/share/fonts/truetype/kochi/kochi-gothic.ttf + filename.Sazanami_Gothic=/usr/share/fonts/truetype/sazanami/sazanami-gothic.ttf + filename.Kochi_Mincho=/usr/share/fonts/truetype/kochi/kochi-mincho.ttf +@@ -346,5 +286,4 @@ + awtfontpath.japanese-kochi=/usr/share/fonts/truetype/kochi + awtfontpath.japanese-sazanami=/usr/share/fonts/truetype/sazanami + awtfontpath.japanese-vlgothic=/usr/share/fonts/truetype/vlgothic +-awtfontpath.korean-baekmuk=/usr/share/fonts/truetype/baekmuk +-awtfontpath.korean-un=/usr/share/fonts/truetype/unfonts ++awtfontpath.korean-nanum=/usr/share/fonts/truetype/nanum --- openjdk-6-6b27-1.12.6.orig/debian/patches/fontconfig-arphic-uming.diff +++ openjdk-6-6b27-1.12.6/debian/patches/fontconfig-arphic-uming.diff @@ -0,0 +1,244 @@ +--- openjdk/jdk/src/solaris/classes/sun/awt/fontconfigs/linux.fontconfig.Ubuntu.properties.orig 2008-10-12 10:42:26.000000000 +0000 ++++ openjdk/jdk/src/solaris/classes/sun/awt/fontconfigs/linux.fontconfig.Ubuntu.properties 2008-10-12 10:43:49.000000000 +0000 +@@ -25,107 +25,156 @@ + + # Version + +-# Uses Ubuntu 6.10 (Edgy) fonts and file paths. ++# Used for Ubuntu 6.10 (edgy), Ubuntu 7.04 (feisty), Ubuntu 7.10 (gutsy), ++# Debian 4.0 (etch), Debian 5.0 (lenny) fonts and file paths. + version=1 + + # Component Font Mappings + ++allfonts.chinese-gb18030=-misc-ar pl shanheisun uni-medium-r-normal--*-*-*-*-p-*-iso10646-1 ++allfonts.chinese-gb18030.motif=-misc-ar pl shanheisun uni-medium-r-normal--*-*-*-*-p-*-iso10646-1 ++allfonts.chinese-big5=-misc-ar pl shanheisun uni-medium-r-normal--*-*-*-*-p-*-iso10646-1 ++allfonts.chinese-big5.motif=-misc-ar pl shanheisun uni-medium-r-normal--*-*-*-*-p-*-iso10646-1 ++ + dialog.plain.latin-1=DejaVu Sans +-dialog.plain.japanese-x0208=Kochi Gothic +-dialog.plain.korean=Baekmuk Dotum ++dialog.plain.latin-1.motif=LuxiSans-Regular ++dialog.plain.japanese-x0208=-vlgothic-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 ++dialog.plain.korean=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-*-* ++dialog.plain.korean.motif=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-*-* + + dialog.bold.latin-1=DejaVu Sans Bold +-dialog.bold.japanese-x0208=Kochi Gothic +-dialog.bold.korean=Baekmuk Dotum ++dialog.bold.latin-1.motif=LuxiSans-Bold ++dialog.bold.japanese-x0208=-vlgothic-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 ++dialog.bold.korean=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-*-* ++dialog.bold.korean.motif=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-*-* + + dialog.italic.latin-1=DejaVu Sans Oblique +-dialog.italic.japanese-x0208=Kochi Gothic +-dialog.italic.korean=Baekmuk Dotum ++dialog.italic.latin-1.motif=LuxiSans-Oblique ++dialog.italic.japanese-x0208=-vlgothic-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 ++dialog.italic.korean=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-*-* ++dialog.italic.korean.motif=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-*-* + + dialog.bolditalic.latin-1=DejaVu Sans Bold Oblique +-dialog.bolditalic.japanese-x0208=Kochi Gothic +-dialog.bolditalic.korean=Baekmuk Dotum +- ++dialog.bolditalic.latin-1.motif=LuxiSans-BoldOblique ++dialog.bolditalic.japanese-x0208=-vlgothic-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 ++dialog.bolditalic.korean=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-*-* ++dialog.bolditalic.korean.motif=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-*-* + + sansserif.plain.latin-1=DejaVu Sans +-sansserif.plain.japanese-x0208=Kochi Gothic +-sansserif.plain.korean=Baekmuk Dotum ++sansserif.plain.latin-1.motif=LuxiSans-Regular ++sansserif.plain.japanese-x0208=-vlgothic-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 ++sansserif.plain.korean=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-*-* ++sansserif.plain.korean.motif=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-*-* + + sansserif.bold.latin-1=DejaVu Sans Bold +-sansserif.bold.japanese-x0208=Kochi Gothic +-sansserif.bold.korean=Baekmuk Dotum ++sansserif.bold.latin-1.motif=LuxiSans-Bold ++sansserif.bold.japanese-x0208=-vlgothic-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 ++sansserif.bold.korean=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-*-* ++sansserif.bold.korean.motif=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-*-* + + sansserif.italic.latin-1=DejaVu Sans Oblique +-sansserif.italic.japanese-x0208=Kochi Gothic +-sansserif.italic.korean=Baekmuk Dotum ++sansserif.italic.latin-1.motif=LuxiSans-Oblique ++sansserif.italic.japanese-x0208=-vlgothic-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 ++sansserif.italic.korean=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-*-* ++sansserif.italic.korean.motif=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-*-* + + sansserif.bolditalic.latin-1=DejaVu Sans Bold Oblique +-sansserif.bolditalic.japanese-x0208=Kochi Gothic +-sansserif.bolditalic.korean=Baekmuk Dotum +- ++sansserif.bolditalic.latin-1.motif=LuxiSans-BoldOblique ++sansserif.bolditalic.japanese-x0208=-vlgothic-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 ++sansserif.bolditalic.korean=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-*-* ++sansserif.bolditalic.korean.motif=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-*-* + + serif.plain.latin-1=DejaVu Serif +-serif.plain.japanese-x0208=Kochi Mincho +-serif.plain.korean=Baekmuk Batang ++serif.plain.latin-1.motif=LuxiSerif-Regular ++serif.plain.japanese-x0208=-sazanami-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 ++serif.plain.korean=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-*-* ++serif.plain.korean.motif=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-*-* + + serif.bold.latin-1=DejaVu Serif Bold +-serif.bold.japanese-x0208=Kochi Mincho +-serif.bold.korean=Baekmuk Batang ++serif.bold.latin-1.motif=LuxiSerif-Bold ++serif.bold.japanese-x0208=-sazanami-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 ++serif.bold.korean=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-*-* ++serif.bold.korean.motif=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-*-* + + serif.italic.latin-1=DejaVu Serif Oblique +-serif.italic.japanese-x0208=Kochi Mincho +-serif.italic.korean=Baekmuk Batang ++serif.italic.latin-1.motif=LuxiSerif-Oblique ++serif.italic.japanese-x0208=-sazanami-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 ++serif.italic.korean=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-*-* ++serif.italic.korean.motif=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-*-* + + serif.bolditalic.latin-1=DejaVu Serif Bold Oblique +-serif.bolditalic.japanese-x0208=Kochi Mincho +-serif.bolditalic.korean=Baekmuk Batang +- ++serif.bolditalic.latin-1.motif=LuxiSerif-BoldOblique ++serif.bolditalic.japanese-x0208=-sazanami-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 ++serif.bolditalic.korean=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-*-* ++serif.bolditalic.korean.motif=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-*-* + + monospaced.plain.latin-1=DejaVu Sans Mono +-monospaced.plain.japanese-x0208=Kochi Gothic +-monospaced.plain.korean=Baekmuk Dotum ++monospaced.plain.latin-1.motif=LuxiMono-Regular ++monospaced.plain.japanese-x0208=-sazanami-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 ++monospaced.plain.korean=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-*-* ++monospaced.plain.korean.motif=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-*-* + + monospaced.bold.latin-1=DejaVu Sans Mono Bold +-monospaced.bold.japanese-x0208=Kochi Gothic +-monospaced.bold.korean=Baekmuk Dotum ++monospaced.bold.latin-1.motif=LuxiMono-Bold ++monospaced.bold.japanese-x0208=-sazanami-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 ++monospaced.bold.korean=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-*-* ++monospaced.bold.korean.motif=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-*-* + + monospaced.italic.latin-1=DejaVu Sans Mono Oblique +-monospaced.italic.japanese-x0208=Kochi Gothic +-monospaced.italic.korean=Baekmuk Dotum ++monospaced.italic.latin-1.motif=LuxiMono-Oblique ++monospaced.italic.japanese-x0208=-sazanami-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 ++monospaced.italic.korean=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-*-* ++monospaced.italic.korean.motif=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-*-* + + monospaced.bolditalic.latin-1=DejaVu Sans Mono Bold Oblique +-monospaced.bolditalic.japanese-x0208=Kochi Gothic +-monospaced.bolditalic.korean=Baekmuk Dotum +- ++monospaced.bolditalic.latin-1.motif=LuxiMono-BoldOblique ++monospaced.bolditalic.japanese-x0208=-sazanami-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 ++monospaced.bolditalic.korean=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-*-* ++monospaced.bolditalic.korean.motif=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-*-* + + dialoginput.plain.latin-1=DejaVu Sans Mono +-dialoginput.plain.japanese-x0208=Kochi Gothic +-dialoginput.plain.korean=Baekmuk Dotum ++dialoginput.plain.latin-1.motif=LuxiMono-Regular ++dialoginput.plain.japanese-x0208=-sazanami-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 ++dialoginput.plain.korean=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-*-* ++dialoginput.plain.korean.motif=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-*-* + + dialoginput.bold.latin-1=DejaVu Sans Mono Bold +-dialoginput.bold.japanese-x0208=Kochi Gothic +-dialoginput.bold.korean=Baekmuk Dotum ++dialoginput.bold.latin-1.motif=LuxiMono-Bold ++dialoginput.bold.japanese-x0208=-sazanami-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 ++dialoginput.bold.korean=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-*-* ++dialoginput.bold.korean.motif=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-*-* + + dialoginput.italic.latin-1=DejaVu Sans Mono Oblique +-dialoginput.italic.japanese-x0208=Kochi Gothic +-dialoginput.italic.korean=Baekmuk Dotum ++dialoginput.italic.latin-1.motif=LuxiMono-Oblique ++dialoginput.italic.japanese-x0208=-sazanami-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 ++dialoginput.italic.korean=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-*-* ++dialoginput.italic.korean.motif=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-*-* + + dialoginput.bolditalic.latin-1=DejaVu Sans Mono Bold Oblique +-dialoginput.bolditalic.japanese-x0208=Kochi Gothic +-dialoginput.bolditalic.korean=Baekmuk Dotum +- +-allfonts.chinese-big5=AR PL ZenKai Uni +-allfonts.chinese-gb18030=AR PL ZenKai Uni ++dialoginput.bolditalic.latin-1.motif=LuxiMono-BoldOblique ++dialoginput.bolditalic.japanese-x0208=-sazanami-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0 ++dialoginput.bolditalic.korean=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-*-* ++dialoginput.bolditalic.korean.motif=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-*-* + + # Search Sequences + + sequence.allfonts=latin-1 +-sequence.allfonts.Big5=chinese-big5,latin-1 +-sequence.allfonts.x-euc-jp-linux=japanese-x0208,latin-1 +-sequence.allfonts.EUC-KR=korean,latin-1 +-sequence.allfonts.GB18030=chinese-gb18030,latin-1 ++sequence.allfonts.UTF-8.ko=latin-1,korean ++sequence.allfonts.UTF-8=latin-1,chinese-gb18030 ++sequence.allfonts.UTF-8.ja=latin-1,japanese-x0208 ++sequence.allfonts.UTF-8.zh.CN=latin-1,chinese-gb18030 ++sequence.allfonts.UTF-8.zh.TW=latin-1,chinese-big5 ++sequence.allfonts.Big5=latin-1,chinese-big5 ++sequence.allfonts.GB2312=latin-1,chinese-gb18030 ++sequence.allfonts.x-euc-jp-linux=latin-1,japanese-x0208 ++sequence.allfonts.EUC-KR=latin-1,korean ++sequence.allfonts.GB18030=latin-1,chinese-gb18030 + sequence.fallback=chinese-big5,chinese-gb18030,japanese-x0208,korean + ++# Exclusion Ranges ++ ++exclusion.japanese-x0208=0390-03d6,2200-22ef,2701-27be ++ + # Font File Names + + filename.DejaVu_Sans=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf +@@ -143,8 +192,27 @@ + filename.DejaVu_Serif_Oblique=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif-Oblique.ttf + filename.DejaVu_Serif_Bold_Oblique=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif-BoldOblique.ttf + +-filename.Kochi_Gothic=/usr/share/fonts/truetype/kochi/kochi-gothic-subst.ttf +-filename.Kochi_Mincho=/usr/share/fonts/truetype/kochi/kochi-mincho-subst.ttf +-filename.AR_PL_ZenKai_Uni=/usr/share/fonts//truetype/arphic/ukai.ttf +-filename.Baekmuk_Dotum=/usr/share/fonts/truetype/baekmuk/dotum.ttf +-filename.Baekmuk_Batang=/usr/share/fonts/truetype/baekmuk/batang.ttf ++filename.-misc-ar_pl_shanheisun_uni-medium-r-normal--*-*-*-*-p-*-iso10646-1=/usr/share/fonts/truetype/arphic/uming.ttf ++filename.-misc-baekmuk_batang-medium-r-normal--*-%d-*-*-c-*-*-*=/usr/share/fonts/truetype/baekmuk/batang.ttf ++filename.-misc-baekmuk_gulim-medium-r-normal--*-%d-*-*-c-*-*-*=/usr/share/fonts/truetype/baekmuk/gulim.ttf ++filename.-vlgothic-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0=/usr/share/fonts/truetype/vlgothic/VL-Gothic-Regular.ttf ++filename.-sazanami-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0=/usr/share/fonts/truetype/sazanami/sazanami-mincho.ttf ++ ++filename.LuxiSans-Regular=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luxisr.ttf ++filename.LuxiSans-Bold=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luxisb.ttf ++filename.LuxiSans-Oblique=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luxisri.ttf ++filename.LuxiSans-BoldOblique=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luxisbi.ttf ++filename.LuxiMono-Regular=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luximr.ttf ++filename.LuxiMono-Bold=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luximb.ttf ++filename.LuxiMono-Oblique=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luximri.ttf ++filename.LuxiMono-BoldOblique=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luximbi.ttf ++filename.LuxiSerif-Regular=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luxirr.ttf ++filename.LuxiSerif-Bold=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luxirb.ttf ++filename.LuxiSerif-Oblique=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luxirri.ttf ++filename.LuxiSerif-BoldOblique=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luxirbi.ttf ++ ++# AWT X11 font paths ++awtfontpath.latin-1=/usr/share/fonts/X11/Type1 ++awtfontpath.chinese-gb18030=/usr/share/fonts/truetype/arphic ++awtfontpath.japanese-x0208=/usr/share/fonts/truetype/vlgothic ++awtfontpath.korean=/usr/share/fonts/truetype/baekmuk --- openjdk-6-6b27-1.12.6.orig/debian/patches/nonreparenting-wm.diff +++ openjdk-6-6b27-1.12.6/debian/patches/nonreparenting-wm.diff @@ -0,0 +1,64 @@ +--- openjdk/jdk/src/solaris/classes/sun/awt/X11/XWM.java ++++ openjdk/jdk/src/solaris/classes/sun/awt/X11/XWM.java +@@ -99,11 +99,14 @@ + METACITY_WM = 11, + COMPIZ_WM = 12, + LG3D_WM = 13, +- MUTTER_WM = 14; ++ MUTTER_WM = 14, ++ OTHER_NONREPARENTING_WM = 15; + public String toString() { + switch (WMID) { + case NO_WM: + return "NO WM"; ++ case OTHER_NONREPARENTING_WM: ++ return "Other non-reparenting WM"; + case OTHER_WM: + return "Other WM"; + case OPENLOOK_WM: +@@ -579,7 +582,7 @@ + // TODO: according to wikipedia, compiz is now reparenting. This should + // probably be updated. + static boolean isNonReparentingWM() { +- return (XWM.getWMID() == XWM.COMPIZ_WM || XWM.getWMID() == XWM.LG3D_WM); ++ return (XWM.getWMID() == XWM.COMPIZ_WM || XWM.getWMID() == XWM.LG3D_WM || XWM.getWMID() == XWM.OTHER_NONREPARENTING_WM); + } + + /* +@@ -771,9 +774,17 @@ + * supports WIN or _NET wm spec. + */ + else if (l_net_protocol.active()) { +- awt_wmgr = XWM.OTHER_WM; ++ if (XToolkit.getEnv("_JAVA_AWT_WM_NONREPARENTING") != null) { ++ awt_wmgr = XWM.OTHER_NONREPARENTING_WM; ++ } else { ++ awt_wmgr = XWM.OTHER_WM; ++ } + } else if (win.active()) { +- awt_wmgr = XWM.OTHER_WM; ++ if (XToolkit.getEnv("_JAVA_AWT_WM_NONREPARENTING") != null) { ++ awt_wmgr = XWM.OTHER_NONREPARENTING_WM; ++ } else { ++ awt_wmgr = XWM.OTHER_WM; ++ } + } + /* + * Check for legacy WMs. +@@ -784,6 +795,8 @@ + awt_wmgr = XWM.MOTIF_WM; + } else if (isOpenLook()) { + awt_wmgr = XWM.OPENLOOK_WM; ++ } else if (XToolkit.getEnv("_JAVA_AWT_WM_NONREPARENTING") != null) { ++ awt_wmgr = XWM.OTHER_NONREPARENTING_WM; + } else { + awt_wmgr = XWM.OTHER_WM; + } +@@ -1307,6 +1320,7 @@ + res = new Insets(28, 6, 6, 6); + break; + case NO_WM: ++ case OTHER_NONREPARENTING_WM: + case LG3D_WM: + res = zeroInsets; + break; --- openjdk-6-6b27-1.12.6.orig/debian/patches/zero-only-use-floating-point-if-floating-poi.patch +++ openjdk-6-6b27-1.12.6/debian/patches/zero-only-use-floating-point-if-floating-poi.patch @@ -0,0 +1,30 @@ +From 480e011dbe52d4cc81f2719edadaa7aec785fbe6 Mon Sep 17 00:00:00 2001 +From: Sebastian Andrzej Siewior +Date: Thu, 17 Jun 2010 18:00:23 +0200 +Subject: [PATCH] openjdk/zero: only use floating point if floating point available + +Those two opcodes are not available on non-FPU machines. If we have the +SPE extension we could use evldd and evstdd but this requires the +address to be 64bit aligned. + +Signed-off-by: Sebastian Andrzej Siewior +--- + .../src/os_cpu/linux_zero/vm/os_linux_zero.hpp | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/ports/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp b/ports/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp +index 86d3562..40fd41e 100644 +--- openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp. ++++ openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp +@@ -33,7 +33,7 @@ + + // Atomically copy 64 bits of data + static void atomic_copy64(volatile void *src, volatile void *dst) { +-#if defined(PPC) && !defined(_LP64) ++#if defined(PPC) && !defined(_LP64) && !defined(__NO_FPRS__) + double tmp; + asm volatile ("lfd %0, 0(%1)\n" + "stfd %0, 0(%2)\n" +-- +1.6.6.1 + --- openjdk-6-6b27-1.12.6.orig/debian/patches/gcc-no-hardening.diff +++ openjdk-6-6b27-1.12.6/debian/patches/gcc-no-hardening.diff @@ -0,0 +1,54 @@ +--- openjdk/corba/make/common/Defs-linux.gmk.orig 2010-04-22 09:58:17.181086515 +0200 ++++ openjdk/corba/make/common/Defs-linux.gmk 2010-04-26 14:24:18.061085475 +0200 +@@ -76,10 +76,10 @@ + # + # Default optimization + # +-CC_HIGHEST_OPT = -O3 +-CC_HIGHER_OPT = -O3 +-CC_LOWER_OPT = -O2 +-CC_NO_OPT = ++CC_HIGHEST_OPT = -O3 -fno-stack-protector -U_FORTIFY_SOURCE ++CC_HIGHER_OPT = -O3 -fno-stack-protector -U_FORTIFY_SOURCE ++CC_LOWER_OPT = -O2 -fno-stack-protector -U_FORTIFY_SOURCE ++CC_NO_OPT = -fno-stack-protector -U_FORTIFY_SOURCE + + ifeq ($(PRODUCT), java) + _OPT = $(CC_HIGHER_OPT) +--- openjdk/jdk/make/common/Defs-linux.gmk.orig 2010-04-22 09:58:17.181086515 +0200 ++++ openjdk/jdk/make/common/Defs-linux.gmk 2010-04-26 14:23:05.512336179 +0200 +@@ -86,10 +86,10 @@ + # + # Default optimization + # +-CC_HIGHEST_OPT = -O3 +-CC_HIGHER_OPT = -O3 +-CC_LOWER_OPT = -O2 +-CC_NO_OPT = ++CC_HIGHEST_OPT = -O3 -fno-stack-protector -U_FORTIFY_SOURCE ++CC_HIGHER_OPT = -O3 -fno-stack-protector -U_FORTIFY_SOURCE ++CC_LOWER_OPT = -O2 -fno-stack-protector -U_FORTIFY_SOURCE ++CC_NO_OPT = -fno-stack-protector -U_FORTIFY_SOURCE + + ifeq ($(PRODUCT), java) + _OPT = $(CC_HIGHER_OPT) +--- openjdk/hotspot/make/linux/makefiles/gcc.make.orig 2010-04-22 09:58:17.181086515 +0200 ++++ openjdk/hotspot/make/linux/makefiles/gcc.make 2010-04-26 14:22:27.202335807 +0200 +@@ -116,7 +116,7 @@ + CFLAGS_WARN/BYFILE = $(CFLAGS_WARN/$@)$(CFLAGS_WARN/DEFAULT$(CFLAGS_WARN/$@)) + + # The flags to use for an Optimized g++ build +-OPT_CFLAGS += -O3 ++OPT_CFLAGS += -O3 -fno-stack-protector -U_FORTIFY_SOURCE + + # Hotspot uses very unstrict aliasing turn this optimization off + OPT_CFLAGS += -fno-strict-aliasing +@@ -127,7 +127,7 @@ + OPT_CFLAGS += -fno-expensive-optimizations + endif + +-OPT_CFLAGS/NOOPT=-O0 ++OPT_CFLAGS/NOOPT=-O0 -fno-stack-protector -U_FORTIFY_SOURCE + + # 6835796. Problem in GCC 4.3.0 with mulnode.o optimized compilation. + ifneq "$(shell expr \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) = 3 \) \))" "0" --- openjdk-6-6b27-1.12.6.orig/debian/patches/gcc-mtune-generic.diff +++ openjdk-6-6b27-1.12.6/debian/patches/gcc-mtune-generic.diff @@ -0,0 +1,11 @@ +--- openjdk/hotspot/build/linux/makefiles/gcc.make~ 2007-11-24 16:52:59.077912783 +0100 ++++ openjdk/hotspot/build/linux/makefiles/gcc.make 2007-11-24 17:10:26.373711002 +0100 +@@ -69,7 +69,7 @@ + CFLAGS += -g + + ARCHFLAG = $(ARCHFLAG/$(BUILDARCH)) +-ARCHFLAG/i486 = -m32 -march=i586 ++ARCHFLAG/i486 = -m32 -march=i586 -mtune=generic + ARCHFLAG/amd64 = -m64 + ARCHFLAG/ia64 = + ARCHFLAG/sparc = -m32 -mcpu=v9 --- openjdk-6-6b27-1.12.6.orig/debian/patches/gcc-jdk-opt-O2.diff +++ openjdk-6-6b27-1.12.6/debian/patches/gcc-jdk-opt-O2.diff @@ -0,0 +1,13 @@ +--- openjdk/jdk/make/common/Defs-linux.gmk~ 2007-11-29 12:38:22.578339247 +0100 ++++ openjdk/jdk/make/common/Defs-linux.gmk 2007-11-29 12:43:13.992735167 +0100 +@@ -86,8 +86,8 @@ + # + # Default optimization + # +-CC_HIGHEST_OPT = -O3 +-CC_HIGHER_OPT = -O3 ++CC_HIGHEST_OPT = -O2 ++CC_HIGHER_OPT = -O2 + CC_LOWER_OPT = -O2 + CC_NO_OPT = + --- openjdk-6-6b27-1.12.6.orig/debian/patches/gcc-hotspot-opt-O2.diff +++ openjdk-6-6b27-1.12.6/debian/patches/gcc-hotspot-opt-O2.diff @@ -0,0 +1,11 @@ +--- openjdk/hotspot/make/linux/makefiles/gcc.make~ 2007-11-29 12:38:22.578339247 +0100 ++++ openjdk/hotspot/make/linux/makefiles/gcc.make 2007-11-29 12:42:28.742052571 +0100 +@@ -103,7 +103,7 @@ + CFLAGS_WARN/BYFILE = $(CFLAGS_WARN/$@)$(CFLAGS_WARN/DEFAULT$(CFLAGS_WARN/$@)) + + # The flags to use for an Optimized g++ build +-OPT_CFLAGS += -O3 ++OPT_CFLAGS += -O2 + + # Hotspot uses very unstrict aliasing turn this optimization off + OPT_CFLAGS += -fno-strict-aliasing --- openjdk-6-6b27-1.12.6.orig/debian/patches/shebang.diff +++ openjdk-6-6b27-1.12.6/debian/patches/shebang.diff @@ -0,0 +1,8 @@ +diff -ru openjdk-6-6b08.bak/jdk/src/share/sample/scripting/scriptpad/src/scripts/memory.sh openjdk-6-6b08/jdk/src/share/sample/scripting/scriptpad/src/scripts/memory.sh +--- openjdk/jdk/src/share/sample/scripting/scriptpad/src/scripts/memory.sh 2008-03-26 09:59:56.000000000 +0100 ++++ openjdk/jdk/src/share/sample/scripting/scriptpad/src/scripts/memory.sh 2008-04-02 11:10:52.000000000 +0200 +@@ -1,3 +1,4 @@ ++#!/bin/sh + # + # Copyright 2006 Sun Microsystems, Inc. All Rights Reserved. + # --- openjdk-6-6b27-1.12.6.orig/debian/patches/default-jvm-cfg-original.diff +++ openjdk-6-6b27-1.12.6/debian/patches/default-jvm-cfg-original.diff @@ -0,0 +1,44 @@ +--- openjdk/hotspot/src/share/tools/launcher/java.c ++++ openjdk/hotspot/src/share/tools/launcher/java.c +@@ -1653,7 +1653,7 @@ + ReadKnownVMs(const char *jrepath, char * arch, jboolean speculative) + { + FILE *jvmCfg; +- char jvmCfgName[MAXPATHLEN+20]; ++ char jvmCfgName[MAXPATHLEN+30]; + char line[MAXPATHLEN+20]; + int cnt = 0; + int lineno = 0; +@@ -1674,6 +1674,10 @@ + + jvmCfg = fopen(jvmCfgName, "r"); + if (jvmCfg == NULL) { ++ strcat(jvmCfgName, "-default"); ++ jvmCfg = fopen(jvmCfgName, "r"); ++ } ++ if (jvmCfg == NULL) { + if (!speculative) { + ReportErrorMessage2("Error: could not open `%s'", jvmCfgName, + JNI_TRUE); +--- openjdk/jdk/src/share/bin/java.c~ 2008-11-22 01:11:18.000000000 +0100 ++++ openjdk/jdk/src/share/bin/java.c 2008-12-17 09:43:09.000000000 +0100 +@@ -1653,7 +1653,7 @@ + ReadKnownVMs(const char *jrepath, char * arch, jboolean speculative) + { + FILE *jvmCfg; +- char jvmCfgName[MAXPATHLEN+20]; ++ char jvmCfgName[MAXPATHLEN+30]; + char line[MAXPATHLEN+20]; + int cnt = 0; + int lineno = 0; +@@ -1674,6 +1674,10 @@ + + jvmCfg = fopen(jvmCfgName, "r"); + if (jvmCfg == NULL) { ++ strcat(jvmCfgName, "-default"); ++ jvmCfg = fopen(jvmCfgName, "r"); ++ } ++ if (jvmCfg == NULL) { + if (!speculative) { + ReportErrorMessage2("Error: could not open `%s'", jvmCfgName, + JNI_TRUE); --- openjdk-6-6b27-1.12.6.orig/debian/patches/openjdk-ubuntu-branding.patch +++ openjdk-6-6b27-1.12.6/debian/patches/openjdk-ubuntu-branding.patch @@ -0,0 +1,11 @@ +--- openjdk/hotspot/src/share/vm/runtime/arguments.cpp~ 2008-12-17 10:14:03.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp 2008-12-17 10:16:29.000000000 +0100 +@@ -25,7 +25,7 @@ + #include "incls/_precompiled.incl" + #include "incls/_arguments.cpp.incl" + +-#define DEFAULT_VENDOR_URL_BUG "http://icedtea.classpath.org/bugzilla" ++#define DEFAULT_VENDOR_URL_BUG "https://bugs.launchpad.net/ubuntu/+source/openjdk-6/" + #define DEFAULT_JAVA_LAUNCHER "generic" + + char** Arguments::_jvm_flags_array = NULL; --- openjdk-6-6b27-1.12.6.orig/debian/patches/sparc-inline.diff +++ openjdk-6-6b27-1.12.6/debian/patches/sparc-inline.diff @@ -0,0 +1,128 @@ +# unused patch + +--- openjdk/hotspot/src/cpu/sparc/vm/assembler_sparc.inline.hpp.old 2009-10-02 23:16:39.000000000 +0200 ++++ openjdk/hotspot/src/cpu/sparc/vm/assembler_sparc.inline.hpp 2010-01-11 16:02:21.152335133 +0100 +@@ -45,6 +45,7 @@ + + // inlines for SPARC assembler -- dmu 5/97 + ++#if 0 + inline void Assembler::check_delay() { + # ifdef CHECK_DELAY + guarantee( delay_state != at_delay_slot, "must say delayed() when filling delay slot"); +@@ -56,6 +57,7 @@ + check_delay(); + AbstractAssembler::emit_long(x); + } ++#endif + + inline void Assembler::emit_data(int x, relocInfo::relocType rtype) { + relocate(rtype); +@@ -69,7 +71,9 @@ + + + inline void Assembler::add(Register s1, Register s2, Register d ) { emit_long( op(arith_op) | rd(d) | op3(add_op3) | rs1(s1) | rs2(s2) ); } ++#if 0 + inline void Assembler::add(Register s1, int simm13a, Register d, relocInfo::relocType rtype ) { emit_data( op(arith_op) | rd(d) | op3(add_op3) | rs1(s1) | immed(true) | simm(simm13a, 13), rtype ); } ++#endif + inline void Assembler::add(Register s1, int simm13a, Register d, RelocationHolder const& rspec ) { emit_data( op(arith_op) | rd(d) | op3(add_op3) | rs1(s1) | immed(true) | simm(simm13a, 13), rspec ); } + + inline void Assembler::bpr( RCondition c, bool a, Predict p, Register s1, address d, relocInfo::relocType rt ) { v9_only(); emit_data( op(branch_op) | annul(a) | cond(c) | op2(bpr_op2) | wdisp16(intptr_t(d), intptr_t(pc())) | predict(p) | rs1(s1), rt); has_delay_slot(); } +@@ -157,10 +161,12 @@ + if (a.has_index()) { assert(offset == 0, ""); ld( a.base(), a.index(), d); } + else { ld( a.base(), a.disp() + offset, d); } + } ++#if 0 + inline void Assembler::ldsb(const Address& a, Register d, int offset) { + if (a.has_index()) { assert(offset == 0, ""); ldsb(a.base(), a.index(), d); } + else { ldsb(a.base(), a.disp() + offset, d); } + } ++#endif + inline void Assembler::ldsh(const Address& a, Register d, int offset) { + if (a.has_index()) { assert(offset == 0, ""); ldsh(a.base(), a.index(), d); } + else { ldsh(a.base(), a.disp() + offset, d); } +@@ -237,7 +243,9 @@ + // p 226 + + inline void Assembler::stb( Register d, Register s1, Register s2) { emit_long( op(ldst_op) | rd(d) | op3(stb_op3) | rs1(s1) | rs2(s2) ); } ++#if 0 + inline void Assembler::stb( Register d, Register s1, int simm13a) { emit_data( op(ldst_op) | rd(d) | op3(stb_op3) | rs1(s1) | immed(true) | simm(simm13a, 13)); } ++#endif + inline void Assembler::sth( Register d, Register s1, Register s2) { emit_long( op(ldst_op) | rd(d) | op3(sth_op3) | rs1(s1) | rs2(s2) ); } + inline void Assembler::sth( Register d, Register s1, int simm13a) { emit_data( op(ldst_op) | rd(d) | op3(sth_op3) | rs1(s1) | immed(true) | simm(simm13a, 13)); } + inline void Assembler::stw( Register d, Register s1, Register s2) { emit_long( op(ldst_op) | rd(d) | op3(stw_op3) | rs1(s1) | rs2(s2) ); } +@@ -249,7 +257,9 @@ + inline void Assembler::std( Register d, Register s1, Register s2) { v9_dep(); assert(d->is_even(), "not even"); emit_long( op(ldst_op) | rd(d) | op3(std_op3) | rs1(s1) | rs2(s2) ); } + inline void Assembler::std( Register d, Register s1, int simm13a) { v9_dep(); assert(d->is_even(), "not even"); emit_data( op(ldst_op) | rd(d) | op3(std_op3) | rs1(s1) | immed(true) | simm(simm13a, 13)); } + ++#if 0 + inline void Assembler::st( Register d, Register s1, Register s2) { stw(d, s1, s2); } ++#endif + inline void Assembler::st( Register d, Register s1, int simm13a) { stw(d, s1, simm13a); } + + #ifdef ASSERT +--- openjdk/hotspot/src/cpu/sparc/vm/assembler_sparc.hpp.old 2009-10-02 23:16:39.000000000 +0200 ++++ openjdk/hotspot/src/cpu/sparc/vm/assembler_sparc.hpp 2010-01-11 16:02:10.644835375 +0100 +@@ -1105,12 +1105,21 @@ + AbstractAssembler::flush(); + } + +- inline void emit_long(int); // shadows AbstractAssembler::emit_long ++ inline void emit_long(int x) { ++ check_delay(); ++ AbstractAssembler::emit_long(x); ++ } + inline void emit_data(int x) { emit_long(x); } + inline void emit_data(int, RelocationHolder const&); + inline void emit_data(int, relocInfo::relocType rtype); + // helper for above fcns +- inline void check_delay(); ++ inline void check_delay() { ++# ifdef CHECK_DELAY ++ guarantee( delay_state != at_delay_slot, "must say delayed() when filling delay slot"); ++ delay_state = no_delay; ++# endif ++ } ++ + + + public: +@@ -1119,7 +1128,7 @@ + // pp 135 (addc was addx in v8) + + inline void add(Register s1, Register s2, Register d ); +- inline void add(Register s1, int simm13a, Register d, relocInfo::relocType rtype = relocInfo::none); ++ inline void add(Register s1, int simm13a, Register d, relocInfo::relocType rtype = relocInfo::none) { emit_data( op(arith_op) | rd(d) | op3(add_op3) | rs1(s1) | immed(true) | simm(simm13a, 13), rtype ); } + inline void add(Register s1, int simm13a, Register d, RelocationHolder const& rspec); + inline void add(Register s1, RegisterOrConstant s2, Register d, int offset = 0); + inline void add(const Address& a, Register d, int offset = 0) { add( a.base(), a.disp() + offset, d, a.rspec(offset)); } +@@ -1331,7 +1340,10 @@ + inline void ld( Register s1, ByteSize simm13a, Register d); + #endif + +- inline void ldsb(const Address& a, Register d, int offset = 0); ++ inline void ldsb(const Address& a, Register d, int offset = 0) { ++ if (a.has_index()) { assert(offset == 0, ""); ldsb(a.base(), a.index(), d); } ++ else { ldsb(a.base(), a.disp() + offset, d); } ++ } + inline void ldsh(const Address& a, Register d, int offset = 0); + inline void ldsw(const Address& a, Register d, int offset = 0); + inline void ldub(const Address& a, Register d, int offset = 0); +@@ -1552,7 +1564,7 @@ + // p 226 + + inline void stb( Register d, Register s1, Register s2 ); +- inline void stb( Register d, Register s1, int simm13a); ++ inline void stb( Register d, Register s1, int simm13a) { emit_data( op(ldst_op) | rd(d) | op3(stb_op3) | rs1(s1) | immed(true) | simm(simm13a, 13)); } + inline void sth( Register d, Register s1, Register s2 ); + inline void sth( Register d, Register s1, int simm13a); + inline void stw( Register d, Register s1, Register s2 ); +@@ -1561,7 +1573,7 @@ + inline void st( Register d, Register s1, int simm13a); + inline void stx( Register d, Register s1, Register s2 ); + inline void stx( Register d, Register s1, int simm13a); +- inline void std( Register d, Register s1, Register s2 ); ++ inline void std( Register d, Register s1, Register s2 ) { stw(d, s1, s2); } + inline void std( Register d, Register s1, int simm13a); + + #ifdef ASSERT --- openjdk-6-6b27-1.12.6.orig/debian/patches/java-access-bridge-security.patch +++ openjdk-6-6b27-1.12.6/debian/patches/java-access-bridge-security.patch @@ -0,0 +1,13 @@ +--- openjdk/jdk/src/share/lib/security/java.security~ 2013-07-11 16:38:49.109655315 +0200 ++++ openjdk/jdk/src/share/lib/security/java.security 2013-07-11 16:39:43.470023816 +0200 +@@ -150,7 +150,9 @@ + com.sun.org.apache.xml.internal.utils.,\ + com.sun.org.apache.xml.internal.security.,\ + com.sun.org.glassfish.,\ +- org.jcp.xml.dsig.internal. ++ org.jcp.xml.dsig.internal.,\ ++ org.GNOME.Accessibility.,\ ++ org.GNOME.Bonobo. + + # + # List of comma-separated packages that start with or equal this string --- openjdk-6-6b27-1.12.6.orig/debian/patches/ubuntu-security-9999-Makefile.in.patch +++ openjdk-6-6b27-1.12.6/debian/patches/ubuntu-security-9999-Makefile.in.patch @@ -0,0 +1,109 @@ +diff -Naurp -x build openjdk-6-6b27-1.12.6.orig/Makefile.in openjdk-6-6b27-1.12.6/Makefile.in +--- openjdk-6-6b27-1.12.6.orig/Makefile.in 2013-07-11 09:20:21.000000000 -0500 ++++ openjdk-6-6b27-1.12.6/Makefile.in 2013-11-16 07:18:30.000000000 -0600 +@@ -792,7 +792,90 @@ SECURITY_PATCHES = \ + patches/security/20130618/langtools_merge-01.patch \ + patches/security/20130618/langtools_merge-02.patch \ + patches/security/20130618/langtools_generics.patch \ +- patches/security/20130618/langtools_merge-03.patch ++ patches/security/20130618/langtools_merge-03.patch \ ++ patches/openjdk/8017196-ensure_proxies_are_handled_appropriately.patch \ ++ patches/openjdk/8011157-improve_corba_portability.patch \ ++ patches/openjdk/8022940-enhance_corba_translations.patch \ ++ patches/openjdk/8013503-improve_stream_factories.patch \ ++ patches/openjdk/8012425-transform_transformfactory.patch \ ++ patches/openjdk/8017298-better_xml_support.patch \ ++ patches/openjdk/8014530-better_dsp.patch \ ++ patches/openjdk/8021366-jaxp_test_fix-01.patch \ ++ patches/openjdk/8021933-jaxp_test_fix-02.patch \ ++ patches/openjdk/8022682-supporting_xom.patch \ ++ patches/openjdk/8015978-incorrect_transformation.patch \ ++ patches/openjdk/oj6-20-merge.patch \ ++ patches/openjdk/8024914-swapped_usage.patch \ ++ patches/openjdk/8017505-better_client_service.patch \ ++ patches/openjdk/8016256-finalization_final.patch \ ++ patches/openjdk/8023683-enhance_class_file_parsing.patch \ ++ patches/openjdk/8016675-robust_javadoc.patch \ ++ patches/openjdk/8016653-ignoreable_characters.patch \ ++ patches/openjdk/7196533-timezone_bottleneck.patch \ ++ patches/openjdk/8006900-new_date_time.patch \ ++ patches/openjdk/8008589-better_mbean_permission_validation.patch \ ++ patches/openjdk/8011071-better_crypto_provider_handling.patch \ ++ patches/openjdk/8011081-improve_jhat.patch \ ++ patches/openjdk/8011157-improve_corba_portability-jdk.patch \ ++ patches/openjdk/8012071-better_bean_building.patch \ ++ patches/openjdk/8012147-improve_tool.patch \ ++ patches/openjdk/8012277-improve_dataflavour.patch \ ++ patches/openjdk/8013506-better_pack200.patch \ ++ patches/openjdk/8013510-augment_image_writing.patch \ ++ patches/openjdk/8013514-improve_cmap_stability.patch \ ++ patches/openjdk/8013744-better_tabling.patch \ ++ patches/openjdk/8014085-better_serialization.patch \ ++ patches/openjdk/8014093-improve_image_parsing.patch \ ++ patches/openjdk/8014102-improve_image_conversion.patch \ ++ patches/openjdk/8014341-better_kerberos_service.patch \ ++ patches/openjdk/8014534-better_profiling.patch \ ++ patches/openjdk/8014987-augment_serialization.patch \ ++ patches/openjdk/8015731-auth_improvements.patch \ ++ patches/openjdk/8015743-address_internet_addresses.patch \ ++ patches/openjdk/8016357-update_hs_diagnostic_class.patch \ ++ patches/openjdk/8002070-remove_logger_stack_search.patch \ ++ patches/openjdk/8010118-caller_sensitive.patch \ ++ patches/openjdk/oj6-19-fix_8010118_test_cases.patch \ ++ patches/openjdk/8010727-empty_logger_name.patch \ ++ patches/openjdk/8010939-logmanager_deadlock.patch \ ++ patches/openjdk/8011990-logger_test_urls.patch \ ++ patches/openjdk/8013380-logger_stack_walk_glassfish.patch \ ++ patches/openjdk/8014745-logger_stack_walk_switch.patch \ ++ patches/openjdk/8012243-serial_regression.patch \ ++ patches/openjdk/8014718-remove_logging_suntoolkit.patch \ ++ patches/openjdk/8011139-revise_checking_getenclosingclass.patch \ ++ patches/openjdk/8017196-ensure_proxies_are_handled_appropriately-jdk.patch \ ++ patches/openjdk/8017287-better_resource_disposal.patch \ ++ patches/openjdk/8017291-cast_proxies_aside.patch \ ++ patches/openjdk/7146431-java.security_files.patch \ ++ patches/openjdk/8006882-jmockit.patch \ ++ patches/openjdk/8000450-restrict_access.patch \ ++ patches/openjdk/8019979-better_access_test.patch \ ++ patches/openjdk/8004188-rename_java.security.patch \ ++ patches/openjdk/8017566-backout_part_of_8000450.patch \ ++ patches/openjdk/8017300-improve_interface_implementation.patch \ ++ patches/openjdk/8019292-better_attribute_value_exceptions.patch \ ++ patches/openjdk/8019617-better_view_of_objects.patch \ ++ patches/openjdk/8012617-arrayindexoutofbounds_linebreakmeasurer.patch \ ++ patches/openjdk/8020293-jvm_crash.patch \ ++ patches/openjdk/8013739-better_ldap_resource_management.patch \ ++ patches/openjdk/8014349-getdeclaredclass_fix.patch \ ++ patches/openjdk/6954275-big_xml_signatures.patch \ ++ patches/openjdk/8021290-signature_validation.patch \ ++ patches/openjdk/8012453-runtime.exec.patch \ ++ patches/openjdk/8015965-typo_in_property_name.patch \ ++ patches/openjdk/8015144-performance_regression.patch \ ++ patches/openjdk/8019969-inet6_test_case_fix.patch \ ++ patches/openjdk/8019584-invalid_notification_fix.patch \ ++ patches/openjdk/8021577-bean_serialization_fix.patch \ ++ patches/openjdk/8021969-jnlp_load_failure.patch \ ++ patches/openjdk/8021355-splashscreen_regression.patch \ ++ patches/openjdk/8022661-writeobject_flush.patch \ ++ patches/openjdk/8023964-ignore_test.patch \ ++ patches/openjdk/8003992-embedded_nulls.patch \ ++ patches/openjdk/8013827-createtempfile_hang.patch \ ++ patches/openjdk/8025128-createtempfile_absolute_prefix.patch \ ++ patches/openjdk/oj6-21-overrides.patch + + SPECIAL_SECURITY_PATCH_1 = patches/security/20120214/7112642.patch + SPECIAL_SECURITY_PATCH_2 = patches/security/20130618/8009071-improve_shape_handling.patch +@@ -1000,13 +1083,9 @@ ICEDTEA_PATCHES = $(DROP_PATCHES) $(SECU + patches/openjdk/8011154-awt_regression.patch \ + patches/openjdk/8011992-MlibOpsTest_failed.patch \ + patches/openjdk/8012112-MlibOpsTest_fails.patch \ +- patches/openjdk/8012617-arrayindexoutofbounds_linebreakmeasurer.patch \ + patches/openjdk/8012933-appcontext_disposed_too_early.patch \ + patches/openjdk/8013196-TimeZone_getDefault_throws_exception.patch \ + patches/openjdk/8014427-raster_regression.patch \ +- patches/openjdk/8010727-empty_logger_name.patch \ +- patches/openjdk/8010939-logmanager_deadlock.patch \ +- patches/openjdk/8014718-remove_logging_suntoolkit.patch \ + patches/openjdk/8009996-emitter_bean.patch \ + patches/openjdk/6541350-tz_display_names_l10n.patch \ + patches/openjdk/6821191-tz_display_names_l10n.patch \ --- openjdk-6-6b27-1.12.6.orig/debian/patches/shark-removed-intrinsics.patch +++ openjdk-6-6b27-1.12.6/debian/patches/shark-removed-intrinsics.patch @@ -0,0 +1,47 @@ +--- openjdk/hotspot/src/share/vm/shark/sharkBuilder.cpp~ 2011-11-14 23:07:38.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/shark/sharkBuilder.cpp 2012-01-03 13:49:31.976978467 +0100 +@@ -369,7 +369,7 @@ + // acceptable to mimic this approach if your platform cannot + // perform these operations without delegating to a function. + +-#ifdef ARM ++#if defined(ARM) || SHARK_LLVM_VERSION >= 30 + static jint zero_cmpxchg_int(volatile jint *ptr, jint oldval, jint newval) { + return Atomic::cmpxchg(newval, ptr, oldval); + } +@@ -377,7 +377,7 @@ + + Value* SharkBuilder::cmpxchg_int() { + return make_function( +-#ifdef ARM ++#if defined(ARM) || SHARK_LLVM_VERSION >= 30 + (address) zero_cmpxchg_int, + #else + "llvm.atomic.cmp.swap.i32.p0i32", +@@ -385,7 +385,7 @@ + "Iii", "i"); + } + +-#ifdef ARM ++#if defined(ARM) || SHARK_LLVM_VERSION >= 30 + static intptr_t zero_cmpxchg_ptr(volatile intptr_t* ptr, + intptr_t oldval, + intptr_t newval) { +@@ -395,7 +395,7 @@ + + Value* SharkBuilder::cmpxchg_ptr() { + return make_function( +-#ifdef ARM ++#if defined(ARM) || SHARK_LLVM_VERSION >= 30 + (address) zero_cmpxchg_ptr, + #else + "llvm.atomic.cmp.swap.i" LP64_ONLY("64") NOT_LP64("32") ".p0i" LP64_ONLY("64") NOT_LP64("32"), +@@ -409,7 +409,7 @@ + + Value* SharkBuilder::memory_barrier() { + return make_function( +-#ifdef ARM ++#if defined(ARM) || SHARK_LLVM_VERSION >= 30 + (address) 0xffff0fa0, // __kernel_dmb + #else + "llvm.memory.barrier", --- openjdk-6-6b27-1.12.6.orig/debian/patches/gcc-jdk-opt-O0.diff +++ openjdk-6-6b27-1.12.6/debian/patches/gcc-jdk-opt-O0.diff @@ -0,0 +1,15 @@ +--- openjdk/jdk/make/common/Defs-linux.gmk.orig 2009-01-08 23:40:48.000000000 +0000 ++++ openjdk/jdk/make/common/Defs-linux.gmk 2009-01-08 23:41:03.000000000 +0000 +@@ -86,9 +86,9 @@ + # + # Default optimization + # +-CC_HIGHEST_OPT = -O3 +-CC_HIGHER_OPT = -O3 +-CC_LOWER_OPT = -O2 ++CC_HIGHEST_OPT = -O0 ++CC_HIGHER_OPT = -O0 ++CC_LOWER_OPT = -O0 + CC_NO_OPT = + + ifeq ($(PRODUCT), java) --- openjdk-6-6b27-1.12.6.orig/debian/patches/hotspot-7026307.patch +++ openjdk-6-6b27-1.12.6/debian/patches/hotspot-7026307.patch @@ -0,0 +1,24 @@ + +# HG changeset patch +# User iveresov +# Date 1301462717 25200 +# Node ID 348c0df561a92ba9ab469566cd4dc8028e9ecc99 +# Parent b1c22848507b08e5370d08ca88e186f107f254c8 +7026307: DEBUG MESSAGE: broken null klass on amd64 +Summary: Correct typo introduces in 7020521 +Reviewed-by: never, kvn + +--- openjdk.orig/hotspot/src/cpu/x86/vm/stubGenerator_x86_64.cpp Tue Mar 29 17:35:34 2011 -0700 ++++ openjdk/hotspot/src/cpu/x86/vm/stubGenerator_x86_64.cpp Tue Mar 29 22:25:17 2011 -0700 +@@ -2449,8 +2449,8 @@ class StubGenerator: public StubCodeGene + // + address generate_generic_copy(const char *name, + address byte_copy_entry, address short_copy_entry, +- address int_copy_entry, address long_copy_entry, +- address oop_copy_entry, address checkcast_copy_entry) { ++ address int_copy_entry, address oop_copy_entry, ++ address long_copy_entry, address checkcast_copy_entry) { + + Label L_failed, L_failed_0, L_objArray; + Label L_copy_bytes, L_copy_shorts, L_copy_ints, L_copy_longs; + --- openjdk-6-6b27-1.12.6.orig/debian/patches/fix-race-cond-print.diff +++ openjdk-6-6b27-1.12.6/debian/patches/fix-race-cond-print.diff @@ -0,0 +1,15 @@ +--- openjdk/jdk/src/solaris/classes/sun/print/UnixPrintServiceLookup.java 2008-04-11 04:18:13.000000000 -0400 ++++ openjdk/jdk/src/solaris/classes/sun/print/UnixPrintServiceLookup.java 2008-07-30 12:45:40.000000000 -0400 +@@ -163,6 +163,12 @@ + + + public UnixPrintServiceLookup() { ++ try { ++ refreshServices(); ++ } catch (Exception se) { ++ IPPPrintService.debug_println(debugPrefix+"Exception in refreshServices()"); ++ } ++ + // start the printer listener thread + if (pollServices) { + PrinterChangeListener thr = new PrinterChangeListener(); --- openjdk-6-6b27-1.12.6.orig/debian/patches/m68k-text-relocations.diff +++ openjdk-6-6b27-1.12.6/debian/patches/m68k-text-relocations.diff @@ -0,0 +1,11 @@ +--- openjdk/hotspot/make/linux/makefiles/gcc.make~ 2012-12-01 18:49:19.202356557 +0100 ++++ openjdk/hotspot/make/linux/makefiles/gcc.make 2012-12-01 18:50:41.430358414 +0100 +@@ -58,7 +58,7 @@ + # Compiler flags + + # position-independent code +-ifneq ($(filter alpha parisc ppc ppc64 s390 s390x sparc sparc64 sparcv9,$(ZERO_LIBARCH)),) ++ifneq ($(filter alpha m68k parisc ppc ppc64 s390 s390x sparc sparc64 sparcv9,$(ZERO_LIBARCH)),) + PICFLAG = -fPIC + else + PICFLAG = -fpic --- openjdk-6-6b27-1.12.6.orig/debian/patches/3-sharkllvm30-MCJIT.patch +++ openjdk-6-6b27-1.12.6/debian/patches/3-sharkllvm30-MCJIT.patch @@ -0,0 +1,31 @@ +--- openjdk/hotspot/src/share/vm/shark/sharkCompiler.cpp 2011-08-31 11:39:35.630899283 +0200 ++++ openjdk/hotspot/src/share/vm/shark/sharkCompiler.cpp 2011-08-31 16:10:00.459354097 +0200 +@@ -72,6 +72,9 @@ + // Initialize the native target + InitializeNativeTarget(); + ++ // MCJIT require a native AsmPrinter ++ InitializeNativeTargetAsmPrinter(); ++ + // Create the two contexts which we'll use + _normal_context = new SharkContext("normal"); + _native_context = new SharkContext("native"); +@@ -113,6 +116,7 @@ + builder.setJITMemoryManager(memory_manager()); + builder.setEngineKind(EngineKind::JIT); + builder.setErrorStr(&ErrorMsg); ++ builder.setUseMCJIT(true); + _execution_engine = builder.create(); + + if (!execution_engine()) { +--- openjdk/hotspot/src/share/vm/shark/llvmHeaders.hpp 2011-08-31 14:40:04.392596214 +0200 ++++ openjdk/hotspot/src/share/vm/shark/llvmHeaders.hpp 2011-08-31 14:41:27.569008721 +0200 +@@ -60,7 +60,7 @@ + #include + #include + #if SHARK_LLVM_VERSION >= 27 +-#include ++#include + #include + #include + #if SHARK_LLVM_VERSION >= 29 --- openjdk-6-6b27-1.12.6.orig/debian/patches/libpcsclite-dlopen.diff +++ openjdk-6-6b27-1.12.6/debian/patches/libpcsclite-dlopen.diff @@ -0,0 +1,31 @@ +--- openjdk/jdk/src/solaris/classes/sun/security/smartcardio/PlatformPCSC.java~ 2011-11-14 23:12:15.000000000 +0100 ++++ openjdk/jdk/src/solaris/classes/sun/security/smartcardio/PlatformPCSC.java 2012-04-10 12:26:44.633272023 +0200 +@@ -48,6 +48,7 @@ + + private final static String PROP_NAME = "sun.security.smartcardio.library"; + ++ private final static String LIB0 = "libpcsclite.so.1"; + private final static String LIB1 = "/usr/$LIBISA/libpcsclite.so"; + private final static String LIB2 = "/usr/local/$LIBISA/libpcsclite.so"; + +@@ -103,17 +104,9 @@ + if (lib.length() != 0) { + return lib; + } +- lib = expand(LIB1); +- if (new File(lib).isFile()) { +- // if LIB1 exists, use that +- return lib; +- } +- lib = expand(LIB2); +- if (new File(lib).isFile()) { +- // if LIB2 exists, use that +- return lib; +- } +- throw new IOException("No PC/SC library found on this system"); ++ // let dlopen do the work ++ lib = LIB0; ++ return lib; + } + + private static native void initialize(String libraryName); --- openjdk-6-6b27-1.12.6.orig/debian/patches/pkcs11-secmod-debug.diff +++ openjdk-6-6b27-1.12.6/debian/patches/pkcs11-secmod-debug.diff @@ -0,0 +1,11 @@ +--- openjdk/jdk/src/share/native/sun/security/pkcs11/j2secmod.h~ 2010-02-17 04:14:45.000000000 +0100 ++++ openjdk/jdk/src/share/native/sun/security/pkcs11/j2secmod.h 2010-04-12 15:00:23.903585870 +0200 +@@ -27,7 +27,7 @@ + + #include "sun_security_pkcs11_Secmod.h" + +-// #define SECMOD_DEBUG ++#define SECMOD_DEBUG + + #include "j2secmod_md.h" +